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

JShell LocalExecutionControl only needs stopCheck() on backward branches

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • 25
    • tools
    • generic
    • generic

      JShell's LocalExecutionControl ensures a running eval thread can be stopped by JShell.stop() by inserting an invocation of stopCheck() at every branch point in the bytecode of loaded classfiles.

      However, this same guarantee can be provided by invocing stopCheck() only at backward branches and not at forward branches. By doing this, the performance and size impact on the executing code can be reduced.

      Fortunately the new ClassFile API makes this kind of modification easy 👍

            acobbs Archie Cobbs
            acobbs Archie Cobbs
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: