Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8008980

Make AST classes immutable

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • None
    • None
    • 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.

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

              Created:
              Updated:
              Resolved: