PlainEngine
Compiles a snippet by driving the compiler directly, holding the expensive state ourselves.
The only thing that makes this fast is WHERE the session boundary sits: the project environment, the FirJvmSessionFactory.Context and the shared + library sessions (the classpath FIR index, seconds on a modpack) are built once in warmUp and reused, while each eval builds only a source session — provider wiring, not a classpath scan. Every CLI-level entry point (K2JVMCompiler, prepareJvmSessions, KotlinToJVMBytecodeCompiler) rebuilds all of it per call, which is why none of them appear here.
Types
A compiled snippet, or why it did not compile. Ok.resultField comes from the lowering's scriptResultFieldDataAttr; Ok.resultType is what resultTypeName renders off the frontend cone. Both are null when the snippet ended on a statement rather than a value.
Everything reused across evals. Built once; the game classpath does not change under us. The KotlinCoreEnvironment is deliberately absent: nothing reads it, and the Disposer it registered with keeps it (and its project, which projectEnvironment wraps) alive for the life of the process.
Properties
Functions
Resolved FIR through fir2ir and the JVM backend. yieldTypes rides along as one more IR extension — the conversion is where an IrCall is still a call, so it is the only window to fill its arguments.
Run a compiled snippet and hand back its result: the script body IS the class constructor, so constructing it runs it.
The result property's resolved type. Two things are read off it that the rendered name cannot carry: flexibility, which the renderer flattens to the upper bound, and value-class-ness.
The result type as the frontend saw it: IR flattens a platform type to its upper bound at EVERY level, so patching the rendered string reaches the outermost ? and nothing inside it. The cone still knows.
Only reached when the snippet had no result value, so the lowering left no tag to read the name off. A script's own declarations become members of its class, so the file holds exactly the one.
JVM binary name of the result's type when it is a value class, else null — the one case where the field alone cannot report the value it holds. A root package means the SNIPPET declared it, and the script lowering nests those inside scriptClass: a ClassId carries the relative path, never the container.