• Icon: Sub-task Sub-task
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 8u60
    • core-libs
    • None


      Four different programs seem to cause this failure

      jjs> function f(){ try { Object; } catch(x if x >>>=0) { throw x2; } finally { } } f()
      Exception in thread "main" java.lang.AssertionError
         at jdk.nashorn.internal.ir.Symbol.getSlot(Symbol.java:563)
         at jdk.nashorn.internal.codegen.MethodEmitter.load(MethodEmitter.java:953)
         at jdk.nashorn.internal.codegen.MethodEmitter.emitLocalVariableConversion(MethodEmitter.java:2519)
         at jdk.nashorn.internal.codegen.MethodEmitter.beforeJoinPoint(MethodEmitter.java:2492)
         at jdk.nashorn.internal.codegen.CodeGenerator.enterThrowNode(CodeGenerator.java:2981)
         at jdk.nashorn.internal.ir.ThrowNode.accept(ThrowNode.java:80)
         at jdk.nashorn.internal.ir.Node.accept(Node.java:265)
         at jdk.nashorn.internal.ir.Block.accept(Block.java:178)
         at jdk.nashorn.internal.ir.LexicalContextNode$Acceptor.accept(LexicalContextNode.java:57)
         at jdk.nashorn.internal.ir.Block.accept(Block.java:425)
         ...


      jjs> function f(){ try { return; } catch(x) { return x ^= 0; } finally { throw 0; } } f()
      Exception in thread "main" java.lang.AssertionError
         at jdk.nashorn.internal.ir.Symbol.getSlot(Symbol.java:555)
         at jdk.nashorn.internal.codegen.MethodEmitter.load(MethodEmitter.java:953)
         at jdk.nashorn.internal.codegen.MethodEmitter.emitLocalVariableConversion(MethodEmitter.java:2519)
         at jdk.nashorn.internal.codegen.MethodEmitter.beforeJoinPoint(MethodEmitter.java:2492)
         at jdk.nashorn.internal.codegen.CodeGenerator.enterThrowNode(CodeGenerator.java:2981)
         at jdk.nashorn.internal.ir.ThrowNode.accept(ThrowNode.java:80)
         at jdk.nashorn.internal.ir.Node.accept(Node.java:265)
         at jdk.nashorn.internal.ir.Block.accept(Block.java:178)
         at jdk.nashorn.internal.ir.LexicalContextNode$Acceptor.accept(LexicalContextNode.java:57)
         at jdk.nashorn.internal.ir.Block.accept(Block.java:425)
         ...


      jjs> function f(){ try { return; } catch(x) { return x ^= Object; } finally { throw Object; } } f()
      Exception in thread "main" java.lang.AssertionError
         at jdk.nashorn.internal.ir.Symbol.getSlot(Symbol.java:558)
         at jdk.nashorn.internal.codegen.MethodEmitter.load(MethodEmitter.java:953)
         at jdk.nashorn.internal.codegen.MethodEmitter.emitLocalVariableConversion(MethodEmitter.java:2519)
         at jdk.nashorn.internal.codegen.MethodEmitter.beforeJoinPoint(MethodEmitter.java:2492)
         at jdk.nashorn.internal.codegen.CodeGenerator.enterThrowNode(CodeGenerator.java:2981)
         at jdk.nashorn.internal.ir.ThrowNode.accept(ThrowNode.java:80)
         at jdk.nashorn.internal.ir.Node.accept(Node.java:265)
         at jdk.nashorn.internal.ir.Block.accept(Block.java:178)
         at jdk.nashorn.internal.ir.LexicalContextNode$Acceptor.accept(LexicalContextNode.java:57)
         at jdk.nashorn.internal.ir.Block.accept(Block.java:425)
         ...

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

              Created:
              Updated:
              Resolved: