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

Compile-time expression evaluator was missing variables

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b28
    • CPU:
      generic
    • OS:
      generic

      Backports

        Description

        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.)

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  Created:
                  Updated:
                  Resolved: