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

jdk.nashorn.internal.codegen.ApplySpecialization$1.leaveIdentNode() should throw stackless Exception

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 9
    • Component/s: core-libs
    • Subcomponent:
    • Resolved In Build:
      b29
    • CPU:
      generic
    • OS:
      generic

      Backports

        Description

        Profiling a simple scenario:

        $ ~/Install/jdk9u20/bin/java -jar dist/nashorn.jar -Dnashorn.typeInfo.disabled=false --class-cache-size=0 --persistent-code-cache=false -scripting --log=time test/script/basic/compile-octane.js -- --iterations 5

        ...yields a few simple low-hanging fruits, here is one of them. Out of 320 seconds of run, 20 seconds is spent here:

        19.750 jdk.nashorn.internal.ir.IdentNode.accept(jdk.nashorn.internal.ir.visitor.NodeVisitor)
        19.750 jdk.nashorn.internal.codegen.ApplySpecialization$1.leaveIdentNode(jdk.nashorn.internal.ir.IdentNode)
        19.140 java.lang.UnsupportedOperationException.<init>()
        19.150 java.lang.RuntimeException.<init>()
        19.150 java.lang.Exception.<init>()
        19.150 java.lang.Throwable.<init>()
        20.290 java.lang.Throwable.fillInStackTrace()

        Please throw some different from UOE from ApplySpecialization$1.leaveIdentNode(), the exception with fillInStackTrace() overridden should be best. You may also consider throwing the pre-cached exception from the static field, if that is not messy for the Nashorn code.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                lagergren Marcus Lagergren
                Reporter:
                shade Aleksey Shipilev
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: