Confirmed users
381
edits
|  (New page: [http://blog.mozilla.com/tglek/2007/08/06/outparams-take-2/ Blog entry].   Pork#Running_outparamdel gives an example of running the tool.  TODO: * Convert NS_ERROR errors to constants ...) | No edit summary | ||
| Line 4: | Line 4: | ||
| [[Pork#Running_outparamdel]] gives an example of running the tool. | [[Pork#Running_outparamdel]] gives an example of running the tool. | ||
| TODO | ==TODO== | ||
| * Convert NS_ERROR errors to constants   | ===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 | * 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)) | * Need a macro to annotate getters where assigning NULL to the outparam has a special meaning. ie nsresult getterFunc(NOT_NULL(nsISupports **outval)) | ||