(1) us (2) PE (3) Fabius (4) Consel (1) set-up code (3) early computations: code generated statically (1) templates (2) residual program with early input unknown (3) emit instructions (late computations) (1) templates with holes filled in (2) residual program (3) result of emitting the late computations (emit instructions generated statically) & filling their holes (1) directives (3) "emit" the analysis (1) run-time constants identification & reachability analyses (2) BTA (3) BTA data structure for the analysis (1) CFG (2) ASTs (3) ASTs the static compiler (1) run-time constants identification & reachability analyses to produce set-up code, templates, directives (2) BTA (3) BTA to produce early & late computations the dynamic compiler (1) stitcher & its table, directives, input template; performs specialization by executing set-up code & directives to instantiate templates into final executable code (2) specializer (3) routine of early and late instructions (specialized code generator) form of the template (1) machine-code optimized at run-time (2) source code which is compiled (3) machine code manipulated at run-time (1) set-up code & templates use different registers (3) early and late computations use different registers opts (1) dynamic constant propagation, folding, dead code elimination, strength reduction, loop unrolling, code motion for loads: all intraprocedural (2) specialized functions: interprocedural (3) dynamic constant propagation, folding, dead code elimination, inlining, loop unrolling, strength reduction, specialized functions, (future) register assignment: emit instructions are not optimized within their surrounding code, are interspersed with regularly compiled code (~set-up code) (1) & (3) have the same problem with doing good register allocation in the face of loop unrolling & inlining: each iteration uses the same registers, arguments & parameters may not use the same registers how the template is optimized (1) all normal static optimizations within the context of is enclosing procedure at run-time, separate from the set-up code (3) emitted instructions optimized with the early instructions stitcher optimizations (1) run-time constant values are loaded from a table (3) run-time constant values are stored in registers what triggers dynamic compilation (1) programmer annotations (3) currying (for each supplied argument, a new function that takes the remaining arguments is dynamically compiled), but only 2 stages at the moment what triggers loop unrolling (1) unrolled annotation (3) (more aggressive) heuristic in the static compiler data supported (1) all data structures (some partially constant), all data types (2) all data structures (some partially constant) (3) lists of lists, integers languages (1) C (2) usually purely functional languages (3) simple, first-order, purely functional language (4) C performance (1) fast dynamic compile cost, good quality dynamically compiled code (3) fast dynamic compile cost, not good quality dynamically compiled code