Ben Lerner wrote:
I've been tangentially following along with the *hydra work, but I don't have a full picture of where it all fits together. So far, it seems that Dehydra and Treehydra are both plugins to GCC, used while compiling Mozilla itself, with analyses written in JS to manipulate C/C++ code. Where does JSHydra fit in -- is it also a GCC plugin, or could it be used e.g. from a Firefox extension directly?
JSHydra is actually just a standalone executable that needs the SpiderMonkey source to compile properly (I'm using internal APIs). It's possible that I could make it work as a Firefox extension, but it's a low priority at this point.
The use case I'm considering is something like: I'm writing a tool at the moment (as an extension to Firefox, though it could be XULRunner or whatever; I've been using extensions so I could familiarize myself with how they work in practice) which reads a .xpi, parses the css, xul, and hopefully js files, and does stuff (stuff == TBD...) to them. I'm trying to do this within Firefox for the same reason you used SpiderMonkey internal APIs -- for 100% accuracy compared to Firefox. I had tried using Brendan Eich's Narcissus, but it's out of date and doesn't parse the latest additions to JS... Might JSHydra be the tool I'm looking for instead, and if so how do I invoke and use it?
That's the reason I didn't use Narcissus: I figured the actual, real APIs would be more accurate.
In terms of support, jshydra is definitely not there yet. The support for looking at multiple JS files at once is non-existent (it is a goal, though), and I'm working on some general utility scripts to make the ASTs a bit friendlier as I have time.
BTW -- I'm emailing you here as I don't know if this is directly postable to the newsgroup, or if I have to have an account somewheres or another... if it is postable, and if topic-appropriate, we can continue the conversation there for others to chime in as well.
The newsgroups are accessible to all, and I would call this on-topic, so I'll crosspost this reply there.
-- Beware of bugs in the above code; I have only proved it correct, not tried it. -- Donald E. Knuth _______________________________________________ dev-static-analysis mailing list [email protected] https://lists.mozilla.org/listinfo/dev-static-analysis
