Class CancelPointAsmGenerator

java.lang.Object
org.ek9lang.compiler.backend.jvm.AbstractAsmGenerator
org.ek9lang.compiler.backend.jvm.CancelPointAsmGenerator
All Implemented Interfaces:
Consumer<CancelPointInstr>, org.objectweb.asm.Opcodes

final class CancelPointAsmGenerator extends AbstractAsmGenerator implements Consumer<CancelPointInstr>, org.objectweb.asm.Opcodes
The JVM lowering of CANCEL_POINT (EK9_BACKEND_IR_CONTRACTS.md Contract 24): one instruction,
INVOKESTATIC org/ek9/lang/Ek9Cancellation.check()V
which throws org.ek9.lang.Cancelled once on an async task whose cancellation was requested, and otherwise returns. No line number: it is no source line.

-D"ek9.cancel.points"=false on the compiler emits nothing, to measure what the points cost; a task running EK9 code then stops only at the runtime's wait points or the close's bounded join.