compile

open fun compile(code: String, guardLane: GuardLane, evalId: Int, abandoned: BooleanSupplier): Any

Compile code to an opaque handle, on COMPILER and nowhere else — pure computation, no game state. The handle is a masking-loaded type the game loader only ever passes back to execute.

Return

an opaque compiled-script handle for execute

Parameters

code

the snippet source to compile

guardLane

the target lane's scriptguard, woven into the snippet as a per-tick timeout check, or null for the off-tick parallel lane (no watchdog)

evalId

the kill id that fires THIS eval's woven check

abandoned

true once nothing will read the result — the eval was cancelled or reaped. A compile still queued then never starts, and one under way stops at its next phase; both throw java.util.concurrent.CancellationException

Throws

off COMPILER: that thread is all that keeps two compiles out of the compiler's caches at once, and a race there corrupts them without a sound

if masking-loader init or compilation fails