spilling

internal fun spilling(t: Throwable, evalId: Int, sourceName: String, code: String): Throwable

Replace a compile-stage throwable whose message carries an IR dump; anything else is returned untouched.

Two shapes reach here, and they differ in whether the dump can be lifted out by identity:

  • CompilationException (lowering, via Lower.kt) exposes it as content, so it is CUT OUT of the message by value — no assumption about the wording built around it, everything else survives verbatim.

  • FunctionCodegen.generate (codegen) concatenates irFunction.dump() into a plain RuntimeException at the throw, leaving no field to lift it out of, so that one is bounded by length instead.