Hi Slava,

I was just wondering what your thoughts were on the trendy 'tracing' jit 
compilation technique used in mozillas new javascript engine?

I'm guessing you're already well read up on this, but for those who 
don't know this is a recent jit technique where the unit of compilation 
is entire loops rather than individual functions.
The idea is that the interpreter keeps count of backward jumps in 
interpreted bytecode code, and when it detects a hot loop the tracing 
jit records the low-level execution of the loop and writes it out 
compiled in its entirety. Function calls are inlined and types 
specialised according to their recorded values at runtime, with guard 
clauses side-exiting to the interpreter if types change.
More info here:

http://www.ics.uci.edu/~franz/Site/pubs-pdf/ICS-TR-07-12.pdf
http://weblogs.mozillazine.org/roadmap/archives/2008/08/tracemonkey_javascript_lightsp.html

Anyway it sounds to my (very) untrained mind like this could have some 
advantages over static compilation

- static type hints not required
- maybe simpler implementation
   - reduced requirement on static optimiser pass (e.g. inlining and 
extra-block type inference occur as artifact of execution tracing at jit 
time)
- faster initial compile
- smaller code footprint (code not inlined/specialised until hot loops 
detected at runtime).

This isn't a feature request or anything daft like that, I'm just 
interested in your thoughts as somebody who has put a lot of time into 
thinking about compilation.

N.B. if you don't have the time to answer this then don't worry

Thanks,

Phil



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to