Reputation: 51064
I would like to examine the structure of pieces of JavaScript, i.e. once an object has been interpreted, what is the structure of the memory space the interpreted parts occupy, e.g. it has an 'array' of members, probably a header record, etc. Pretty much like I can present a simple C function as assembly code, or vice versa.
I have never come across any such information? Is this highly proprietary for the various interpretors, is it some secret understood by nobody, is it a big tree of string values and string metadata? Where can I see this kind of thing?
Upvotes: 2
Views: 214
Reputation: 49544
It is highly proprietary for various interpreters.
Here is some info on how V8 works (the chrome engine):
You may also like to take a look at the source code to SquirrelFish (WebKit/Safari)...
info:http://trac.webkit.org/wiki/SquirrelFish
... and TraceMonkey (FF3.1+) as they are both available.
info:https://wiki.mozilla.org/JavaScript:TraceMonkey
Upvotes: 4
Reputation: 16761
Well, since Firefox is open source, you could have a look at the code... But I am pretty sure the information you are looking for would take a while to extract from the code.
Upvotes: 1
Reputation: 39926
I think this very much depends on who's Javascript engine you're talking about. A good place to start tho might be a look at Google Chrome's Javascript engine called V8. That link will lead you to some videos on YouTube that give some information about how it was engineered
Upvotes: 1