ilusm.dev

jit

Just-in-time compilation, performance optimization.

Load with: use jit

Quick example

use jit

result = jitco("value", 10, "value")
prn(result)

Functions

JIT compiler

jitne()

Creates a new instance.

jitco(jit, func, args_types)

Connects. Takes jit, func, args_types.

jitru(jit, func, args)

Runs. Takes jit, func, args.

Tracing JIT

jtrne()

Creates a new instance.

jtrre(tracer, func_id, bytecode_pos, stack_snapshot)

Performs the operation. Takes tracer, func_id, bytecode_pos, stack_snapshot.

jtrad(trace, opcode, operands)

Adds an item. Takes trace, opcode, operands.

jtrgu(trace, condition, snapshot)

Performs the operation. Takes trace, condition, snapshot.

jtrcm(trace)

Performs the operation. Takes trace.

Type specialization

jitsp(types)

Performs the operation. Takes types.

jitun(value)

Performs the operation. Takes value.

Optimization passes

jitop(ast, max_depth)

Opens a connection or resource. Takes ast, max_depth.

jitop1(ast)

Performs the operation. Takes ast.

jitop2(ast)

Performs the operation. Takes ast.

jitop3(ast)

Performs the operation. Takes ast.

jitop4(ast, factor)

Performs the operation. Takes ast, factor.

jitop5(ast)

Performs the operation. Takes ast.

Profiling

jtpst()

Sets a value or starts a process.

jtpst1()

Performs the operation.

jtprp()

Performs the operation.

Adaptive optimization

jtane()

Creates a new instance.

jtaca(adaptive, args)

Performs the operation. Takes adaptive, args.

Bytecode -> Native

jitbc(bytecode, target_arch)

Performs the operation. Takes bytecode, target_arch.

Deoptimization

jtdeo(jit_frame, reason)

Performs the operation. Takes jit_frame, reason.

OSR (On-Stack Replacement)

jtosr(func, bytecode_pos, locals)

Performs the operation. Takes func, bytecode_pos, locals.

Inline caching

jticn()

Performs the operation.

jticl(ic, key)

Closes or clears. Takes ic, key.

jtics(ic, key, value)

Performs the operation. Takes ic, key, value.

JIT statistics

jitst(jit)

Sets a value or starts a process. Takes jit.

Notes

  • JIT compilation helpers - emit machine code, manage executable memory.