Class ActivationScopes

java.lang.Object
org.ek9lang.compiler.phase9.ActivationScopes

final class ActivationScopes extends Object
THE record of which scopes are entered in which ACTIVATION during an IRStructureWalk: the operation body is one activation, and every per-iteration list (CompositeInstr.Activation.PER_ITERATION) starts a new one for as long as it is walked. Shared by the stage-0 rules (LoopActivationOwnership) and the ownership verifier (OwnershipVerifier) so "is this scope in the current activation" has one answer.
  • Constructor Details

    • ActivationScopes

      ActivationScopes()
  • Method Details

    • instruction

      void instruction(IRInstr instruction)
      Track one instruction (only SCOPE_ENTER matters).
    • enterList

      void enterList(CompositeInstr.NestedList list)
    • exitList

      void exitList(CompositeInstr.NestedList list)
    • inLoop

      boolean inLoop()
      True while inside at least one per-iteration list.
    • enteredInCurrentActivation

      boolean enteredInCurrentActivation(String scopeId)
      True when the scope was entered in the activation now being walked.
    • enteredInEnclosingActivation

      boolean enteredInEnclosingActivation(String scopeId)
      True when the scope was entered in this activation or one that encloses it.
    • currentActivation

      Object currentActivation()
      The current activation's identity (compared by identity), for rules that compare where two instructions are.