Outparamdel: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 2: | Line 2: | ||
===Running Outparamdel=== | |||
* Produce a list of files to run | |||
find ~/work/ff-build/ -name \*.ii | |||
* Optional: produce a list of outparams to rewrite. Can use dehydra to detect them | |||
../../pork-barrel/pork-barrel --save-output .outparamdel 4 /tmp/list.txt ./dehydra -dehydra-javascript dehydra_scripts/outparams.js 2> /tmp/outparams.err | |||
find ~/work/ff-build/ -name \*.outparamdel|xargs cat|sort|uniq |grep OUTPARAMS:|sed 's/OUTPARAMS://' > /tmp/outparams | |||
* Run outparamdel | |||
../../pork-barrel/pork-barrel 4 /tmp/list.txt ./outparamdel -od-list /tmp/outparams > outparams.diff 2> /tmp/outparams.err | |||
==TODO== | ==TODO== | ||
===Manual Mozilla changes=== | ===Manual Mozilla changes=== | ||
Revision as of 22:46, 28 November 2007
Running Outparamdel
- Produce a list of files to run
find ~/work/ff-build/ -name \*.ii
- Optional: produce a list of outparams to rewrite. Can use dehydra to detect them
../../pork-barrel/pork-barrel --save-output .outparamdel 4 /tmp/list.txt ./dehydra -dehydra-javascript dehydra_scripts/outparams.js 2> /tmp/outparams.err find ~/work/ff-build/ -name \*.outparamdel|xargs cat|sort|uniq |grep OUTPARAMS:|sed 's/OUTPARAMS://' > /tmp/outparams
- Run outparamdel
../../pork-barrel/pork-barrel 4 /tmp/list.txt ./outparamdel -od-list /tmp/outparams > outparams.diff 2> /tmp/outparams.err
TODO
Manual Mozilla changes
- Convert NS_ERROR errors to constants
Automatically Detect Outparam Candidates (dehydra_scripts/outparams.js)
- Process function body ensuring that only errors codes can be returned. NS_OK + some error
- Then check the class hierarchy if this is the only implementation of the method
- Use class hierarchy to start rewriting at the oldest virtual method that target method overloads
- Ensure that the virtual method isn't originally defined by XPIDL
- Ensure that all overloads of this method will be rewritten (can't change return value otherwise)
Near Future
- Write an optimizer for ?: caller rewrites
- Need a macro to annotate getters where assigning NULL to the outparam has a special meaning. ie nsresult getterFunc(NOT_NULL(nsISupports **outval))