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

Caching code with optimistic.types=true and --lazy-compilation=true generate more code than with --lazy-compilation=false

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Won't Fix
    • Affects Version/s: 8u40, 9
    • Fix Version/s: 8u40
    • Component/s: core-libs
    • Labels:
      None
    • Environment:

      jdk8u40

      Description

      I am not sure, but this situation is not right,
      In documentation :
      Use lazy code generation strategies - do not compile the entire script at once.
      I ran simple script (nashorn/test/examples/array-micro.js) :

      $ jjs --persistent-code-cache=true --lazy-compilation=true --optimistic-types=true array-micro.js
      after :
      $ ls nashorn_code_cache | wc
           21 21 710

      remove nashorn_code_cache directory...

      $ jjs --persistent-code-cache=true --lazy-compilation=false --optimistic-types=true array-micro.js
      after :
      $ ls nashorn_code_cache | wc
       5 5 168

      for jdk9 it is reproduce too.


        Attachments

          Issue Links

            Activity

              People

              Assignee:
              hannesw Hannes Wallnoefer
              Reporter:
              slugovoy Sergey Lugovoy (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: