Academic
Publications
Trace-based just-in-time type specialization for dynamic languages

Trace-based just-in-time type specialization for dynamic languages,10.1145/1542476.1542528,Andreas Gal,Brendan Eich,Mike Shaver,David Anderson,David M

Trace-based just-in-time type specialization for dynamic languages   (Citations: 37)
BibTex | RIS | RefWorks Download
Andreas Gal, Brendan Eich, Mike Shaver, David Anderson, David Mandelin, Mohammad R. Haghighat, Blake Kaplan, Graydon Hoare, Boris Zbarsky, Jason Orendorff, Jesse Ruderman, Edwin W. Smithhttp://academic.research.microsoft.com/io.ashx?type=5&id=4728529&selfId1=0&selfId2=0&maxNumber=12&query=
Dynamic languages such as JavaScript are more difficult to com- pile than statically typed ones. Since no concrete type information is available, traditional compilers need to emit generic code that can handle all possible type combinations at runtime. We present an al- ternative compilation technique for dynamically-typed languages that identifies frequently executed loop traces at run-time and then generates machine code on the fly that is specialized for the ac- tual dynamic types occurring on each path through the loop. Our method provides cheap inter-procedural type specialization, and an elegant and efficient way of incrementally compiling lazily discov- ered alternative paths through nested loops. We have implemented a dynamic compiler for JavaScript based on our technique and we have measured speedups of 10x and more for certain benchmark programs.
Cumulative Annual
View Publication
The following links allow you to view full publications. These links are maintained by other sources not affiliated with Microsoft Academic Search.
    • ...Trace-based compilation has been explored in binary translation systems [1, 7, 8], lightweight JIT for embedded JVMs [12, 20], and more recently in compilers for dynamically typed languages such as JavaScript [4, 13], Lua [17], and Python [6]...
    • ...SPUR [4] and TraceMonkey [13] also use trace tree formation but with some variations, such as (4) ending a trace when leaving the loop scope (stop-when-leaving-loop) or (5) when the stack depth of the inlined calls exceeds a threshold...
    • ...Static-scope-based repetition detectors are used in trace compilers that support tree-shaped traces, such as HotpathVM [11, 12] for Java, TraceMonkey [13] for JavaScript, LuaJIT [17] for Lua, and SPUR [4] for CIL (and JavaScript converted to CIL)...

    Hiroshige Hayashizakiet al. Improving the performance of trace-based systems by false loop filteri...

    • ...cution paths (loops) in the program and compiles only those paths [4, 7, 8]. The rarely executed bits of code are interpreted...
    • ...In the literature of trace compilation, these are called side-exits [8]...

    Shu-yu Guoet al. The essence of compiling with traces

    • ...Recently, trace-based compilation has gained popularity in dynamic scripting languages because it provides more opportunities for type specialization and concretization [3, 4, 5, 6] compared to the traditional method-based compilation...
    • ...Recently, trace compilation has been explored extensively in compilation for dynamic scripting languages, such as PyPy [5] for Python, SPUR [6] and TraceMonkey [3] for JavaScript, and LuaJIT [4] and [13] for Lua, and Tamarin-Tracing for ActionScript [14]...

    Hiroshi Inoueet al. A trace-based Java JIT compiler retrofitted from a method-based compil...

    • ...Tracing JITs have then be adapted to be used for a very light-weight Java VM [15] and afterwards used in several implementations of dynamic languages, such as JavaScript [13], Lua 4 and now Python (and other languages) via PyPy...
    • ...This is a common approach in VM implementations [13, 22]; the novelty of our approach is that we generalized it enough to be usable for different interpreters...

    Carl Friedrich Bolzet al. Allocation removal by partial evaluation in a tracing JIT

    • ...An alternative software technique for reducing the cost of dynamic type checks is trace-based compilation [10, 11], which is heavier-weight due to expensive trace collection and aggressive optimization, but generates higher-quality code...
    • ...developed in HotPathVM [11], and is currently used in the TraceMonkey JavaScript VM in Mozilla Firefox [10]...

    Owen Andersonet al. Checked Load: Architectural support for JavaScript type-checking on mo...

Sort by: