|
|
| Line 7: |
Line 7: |
| * Automate parts of deCOMtamination: class squashing & out-param rewriting (in the near future) | | * Automate parts of deCOMtamination: class squashing & out-param rewriting (in the near future) |
| * Helps replacing deprecated APIs at call-sites & function renaming | | * Helps replacing deprecated APIs at call-sites & function renaming |
| * Problems: currently produces ugly code, CPP causes blind-spots | | * Could be integrated into any editor to do eclipse-style refactoring. |
| | | * Has a web frontend. |
| == Dehydra: syntax & flow aware grepper ==
| | * Since the squash isn't tied to an IDE, it should evolve quicker. If you discover a boring rewrite task that could be implement as an algorithm - it maybe easier to extend squash than to perform it by hand. |
| * Match on control flow<br>eg can find [http://people.mozilla.org/~tglek/malloc.js mismatched malloc/free] calls
| | * '''FIXME''': CPP causes blind-spots in the code. |
| * Inspired by UNO, but supports nested AST structures and types allowing more precise pattern matching
| | * '''FIXME''': Lack of precise source locations in parts of the AST. |
| * Uses JS instead of a custom DSL
| |
| * Cross-function analyses being worked on
| |
| ** Can build a complete call graph, with custom hooks for callbacks, etc
| |
| ** Should be able to find unused functions
| |
| ** Prove that functions are only used in certain ways
| |
| | |
| == Making Attractive Tools ==
| |
| * Accidental byproduct of using JS in dehydra is that analyses can easily be serialized into a form consumable by AJAX applications
| |
| ** This opens up exciting ways to visualize Mozilla code in ways that IDEs don't allow.
| |
| ** Pump Eclipse-style navigation abilities into LXR
| |
| ** Use Firefox with SVG, Canvas, (OpenGL?) to develop Firefox
| |
| ** JS is a perfect tool for Graydon's old idea of producing a consumable "AST" blob of Mozilla that one can run own scripts on to research code properties
| |
| * Squash could be integrated into any editor to do eclipse*style refactoring (Not sure if it's worth the hassle)
| |
| * Making smart & generic C/C++ tools is hard, but making generic tools that focus on Moz2 is doable | |
| * Since the tools aren't tied to an IDE they should evolve quicker, so if you discover a boring task that could be implement as an algorithm - it may not be as hard to implement as it seems. | |