Class PassSwitches

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

public final class PassSwitches extends Object
THE switches of IR_OPTIMISATION's passes (D3', Steve 2026-11-12; EK9_IR_OPTIMISATION_RAILS_AND_REWRITES.md A.1, item 3 - one system property, not the pass manager): -D"ek9.opt.disable"=<pass>[,<pass>] names the placement or rewrite passes IR_OPTIMISATION leaves out, so a differential leg can run a program with and without one pass and a native defect can be attributed to it. Every pass is keyed here from its first commit; the passes are SAFE_POINTS, CANCEL_POINTS, PUBLISH and CONFINE today. A name that is no pass is an error - a misspelt switch that disabled nothing would be a blind instrument.

The switch changes the IR a build produces, so it is in the build key (cli/BuildKeyOf holds one and writes keyText()); a build under one setting is never reused for another (DI-7). Ownership rewrites run at every optimisation level (D3'): the level never gates a pass, only this switch does.

  • Field Details

    • DISABLE_PROPERTY

      public static final String DISABLE_PROPERTY
      The property: a comma-separated list of the passes to disable.
      See Also:
    • SAFE_POINTS

      public static final String SAFE_POINTS
      SafePointPlacement and its verifier V-S.
      See Also:
    • CANCEL_POINTS

      public static final String CANCEL_POINTS
      CancelPointPlacement and its verifier V-C.
      See Also:
    • PUBLISH

      public static final String PUBLISH
      PublishPlacement and its verifier V-P.
      See Also:
    • CONFINE

      public static final String CONFINE
      ConfinePlacement and its verifier V-N (N-V V1).
      See Also:
    • PASSES

      public static final Set<String> PASSES
      Every pass a switch may name: a new pass adds its name here, in its first commit.
  • Constructor Details

    • PassSwitches

      public PassSwitches()
      The switches of this JVM: -Dek9.opt.disable.
    • PassSwitches

      public PassSwitches(String text)
      The switches a property's text names.
      Parameters:
      text - a comma-separated list of pass names; blank disables nothing
  • Method Details

    • isEnabled

      public boolean isEnabled(String pass)
      Does the named pass run.
    • keyText

      public String keyText()
      The build key's text for these switches: none, or the disabled passes sorted and comma-joined.