|
|
| (3 intermediate revisions by the same user not shown) |
| Line 3: |
Line 3: |
|
| |
|
|
| |
|
| Squash: refactoring tool | | == Squash: refactoring tool == |
| * Quickly produce large refactoring patches | | * Quickly produce large refactoring patches |
| * 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 callsites | | * Helps replace 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. |
| | * 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. |
| | * '''FIXME''': CPP causes blind-spots in the code. |
| | * '''FIXME''': Lack of precise source locations in parts of the AST. |
|
| |
|
| Dehydra: syntax & flow aware grepper
| | * '''TODO''': Add Objective C++ support for OSX issues like [https://bugzilla.mozilla.org/show_bug.cgi?id=163260 Exception Checking] |
| * Match on control flow<br>eg can find mismatched malloc/free calls | |
| * Inspired by UNO, but supports nested AST structures and types allowing more precise pattern matching
| |
| * 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.
| |
| ** 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.
| |