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

Compile-time expression evaluator was missing variables

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • 9
    • core-libs
    • None
    • b28
    • generic
    • generic

        With optimistic typing, we try to evaluate lots of side-effect free expressions when we do on-demand compilation to gain insight into the types of those expressions. Unfortunately, some scoped variables were mistakenly marked as being in local slots and not in scope, and thus compilation didn't benefit from compile-time type evaluation for them. While this does not affect correctness, it resulted in unnecessarily increasing the number of deoptimizing recompilations as the compiler couldn't detect early that a program point doing a dyn:getProp on such variables will deoptimize later.

        The solution is to postpone communicating the information about a symbol being local to the Compiler until AssignSymbols has processed the whole Block that defines the symbol, instead of doing it as soon as the symbol is defined (as circumstances following the definition can promote the symbol into scope, e.g. it being accessed from a nested function etc.)

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

                Created:
                Updated:
                Resolved: