Make AST classes immutable

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • None
    • Affects Version/s: None
    • Component/s: core-libs
    • None

      We should make AST classes immutable, with a copy-on-write semantics. Benefits include:
      - structural sharing of catch/finally blocks (and finally blocks on return/break/continue)
      - structural sharing of AST across type-specialized versions of functions. Aside from reducing footprint and avoiding eager cloning, it also gives us the peace of mind that a previous type-specialized codegen pipeline on the same AST didn't somehow corrupt the state of the AST.

            Assignee:
            Attila Szegedi
            Reporter:
            Attila Szegedi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: