Squash: Difference between revisions

1,599 bytes added ,  10 April 2007
no edit summary
No edit summary
No edit summary
Line 1: Line 1:
Squash is a [http://weblogs.mozillazine.org/roadmap/archives/2006/11/oinkbased_patch_generation.html patch generation] tool to assist with [[Gecko:DeCOMtamination]].
Squash is a [http://weblogs.mozillazine.org/roadmap/archives/2006/11/oinkbased_patch_generation.html patch generation] tool to assist with [[Gecko:DeCOMtamination]].
This [http://blog.mozilla.com/tglek/2007/01/03/squashed-and-compiled blog post] describes how to use squash.
This [http://blog.mozilla.com/tglek/2007/01/03/squashed-and-compiled blog post] describes how to use squash.
Squash: refactoring tool
* Quickly produce large refactoring patches
* Automate parts of deCOMtamination: class squashing & out-param rewriting(in the near future)
* Helps replacing deprecated APIs at callsites
* Problems: currently produces ugly code, CPP causes blind-spots
Dehydra: syntax & flow aware grepper
* 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.
Confirmed users
381

edits