x-lang

← Index

x/tool/asm-compile

JIT compiler: x-lang to native code via assembler.

%asm-compile-fresh

Emit native code for an x-lang (fn …) expression, with no cache in the way. compile-asm – the public door, in asm-cache.x – calls this only when the byte cache misses, which is why this module is imported lazily from there: loading it costs 2.5M evals, and a warm cache never needs it. Takes the fvar alist and ANALYSER? already decided by that door. An fvar holding a prim may be CALLED by name; (%call HEAD arg …) calls a prim the code computes, and refuses at run time if the head is not one.

Returns: CALLABLE — X-lang callable prim