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

Ensure symbol table immutability in Nashorn AST

XMLWordPrintable

    • b81
    • generic
    • generic

        Symbol tables (and symbols themselves) are mutable in Nashorn at the moment. They're the last mutable piece of AST. We should make them immutable; this would allow moving SYMBOL_ASSIGNMENT_PHASE and compilation phases into COMPILE_UPTO_SERIALIZABLE phase group, before SERIALIZE_SPLIT_PHASE. That in turn would allow us to keep ASTs weakly reachable and reuse them in optimistic recompilations as only OPTIMISTIC_TYPE_ASSIGNMENT_PHASE and LOCAL_VARIABLE_TYPE_CALCULATION_PHASE would need to be re-run. That could cut down on compilation cost significantly as we would need to reparse much less frequently while doing deoptimizing recompilation.

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

                Created:
                Updated:
                Resolved: