The source code for jshydra can be found at my Mozilla user hg repo. Presently, it requires some hackery and file modifications to merely build the system. I use SpiderMonkey internal APIs (the parsing APIs, to be exact), so that's where most of the hackery comes into play.
For the time being, I'm probably going to put aside doing more work on jshydra, as I have more pressing work on my plate at this time. If you have any questions, feel free to contact me via IRC (handle: jcranmer (I should be in #mmgc)) or via my email address as listed in bugzilla.
5 comments:
Nice! When I was thinking about javascript documentation issues the other day, I was pondering hooking some javascript up to the spidermonkey parser... then this shows up! (the best solutions right now use Rhino, which I don't think quite keeps up sufficiently....)
Any chance of augmenting the jsscan module to (optionally) emit comments as AST blocks? That would enable actual inference logic to parse out type annotations from the comments and check them/propagate from there. But more importantly, it makes it much easier to do fancy documentation processing (than when you don't have the documentation blocks...)
(And lest there be any confusion, by "any chance", I'm not wondering if it's possible; it's a plea for you to distract yourself from your other projects some more. ;)
I chose to use the actual SpiderMonkey APIs, as unfriendly as they are, because that would guarantee me 100% accuracy (at least as far as Mozilla JS is concerned).
Re the comment stuff, this is something that has been considered, as jshydra would need something à la GCC's user attributes or Java's annotations to be useful in doing static analyses.
This is really cool, Joshua, nice work. I'd love to hear more about it when you have a chance some time. I'm especially interested to see if I can use this at all to supplement my dxr stuff to now get proper JS info when I build the type database.
I hope you have more success than me with JStify -- you should, if you have enough time to spend on the project.
I'll be sure to send you any person who's looking for JavaScript static analysis.
Sir,
I would like to know which version of spidermonkey is required by latest jshydra
Post a Comment