Squash: Difference between revisions

85 bytes added ,  10 April 2007
no edit summary
No edit summary
No edit summary
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 replacing deprecated APIs at call-sites & function renaming
* Problems: currently produces ugly code, CPP causes blind-spots
* Problems: currently produces ugly code, CPP causes blind-spots


Dehydra: syntax & flow aware grepper
== Dehydra: syntax & flow aware grepper ==
* Match on control flow<br>eg can find mismatched malloc/free calls
* Match on control flow<br>eg can find [http://people.mozilla.org/~tglek/malloc.js mismatched malloc/free] calls
* Inspired by UNO, but supports nested AST structures and types allowing more precise pattern matching
* Inspired by UNO, but supports nested AST structures and types allowing more precise pattern matching
* Uses JS instead of a custom DSL
* Uses JS instead of a custom DSL
Line 18: Line 18:
** Prove that functions are only used in certain ways
** Prove that functions are only used in certain ways


Making Attractive Tools
== Making Attractive Tools ==
*Accidental byproduct of using JS in dehydra is that analyses can easily be serialized into a form consumable by AJAX applications
* 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.
** This opens up exciting ways to visualize Mozilla code in ways that IDEs don't allow.
** Pump Eclipse-style navigation abilities into LXR
** Pump Eclipse-style navigation abilities into LXR
** Use Firefox with SVG, Canvas, (OpenGL?) to develop Firefox
** 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
** 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)
* 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
* 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.
* 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.
Confirmed users
381

edits