class compiler::ConstChecks
sys::Obj compiler::CompilerSupport compiler::CompilerStep compiler::ConstChecks
ConstChecks adds hooks into constructors and it-blocks to ensure that an attempt to set a const field will throw ConstErr if not in the objects constructor. We also use this step to insert the runtime checks for non-nullable fields.
For each it-block which sets const fields:
doCall(Foo it) { this.checkInCtor(it) ... }
For each constructor which takes an it-block:
new make(..., |This| f) { f?.enterCtor(this) ... checksField$Foo() // if non-nullable fields need runtime checks f?.exitCtor() // for every return return }