Skip to content

Instantly share code, notes, and snippets.

@mfikes
Created April 21, 2015 21:25
Show Gist options
  • Save mfikes/4ac575ecd96f6b07c385 to your computer and use it in GitHub Desktop.
Save mfikes/4ac575ecd96f6b07c385 to your computer and use it in GitHub Desktop.
Testing with Nashorn
Exception in thread "main" java.lang.AssertionError: Failed generating bytecode for builds/out-adv/core-advanced-test.js:11659
at jdk.nashorn.internal.codegen.CompilationPhase$13.transform(CompilationPhase.java:486)
at jdk.nashorn.internal.codegen.CompilationPhase.apply(CompilationPhase.java:728)
at jdk.nashorn.internal.codegen.Compiler.compile(Compiler.java:620)
at jdk.nashorn.internal.runtime.RecompilableScriptFunctionData.compileTypeSpecialization(RecompilableScriptFunctionData.java:512)
at jdk.nashorn.internal.runtime.RecompilableScriptFunctionData.getBest(RecompilableScriptFunctionData.java:729)
at jdk.nashorn.internal.runtime.ScriptFunctionData.getBestConstructor(ScriptFunctionData.java:243)
at jdk.nashorn.internal.runtime.ScriptFunction.findNewMethod(ScriptFunction.java:480)
at jdk.nashorn.internal.runtime.ScriptObject.lookup(ScriptObject.java:1878)
at jdk.nashorn.internal.runtime.linker.NashornLinker.getGuardedInvocation(NashornLinker.java:100)
at jdk.nashorn.internal.runtime.linker.NashornLinker.getGuardedInvocation(NashornLinker.java:94)
at jdk.internal.dynalink.support.CompositeTypeBasedGuardingDynamicLinker.getGuardedInvocation(CompositeTypeBasedGuardingDynamicLinker.java:176)
at jdk.internal.dynalink.support.CompositeGuardingDynamicLinker.getGuardedInvocation(CompositeGuardingDynamicLinker.java:124)
at jdk.internal.dynalink.support.LinkerServicesImpl.getGuardedInvocation(LinkerServicesImpl.java:154)
at jdk.internal.dynalink.DynamicLinker.relink(DynamicLinker.java:234)
at jdk.nashorn.internal.scripts.Script$Recompilation$1204$5804450I$core_advanced_test$cu1$restOf.L:14$$goog$math$Integer$fromInt$$(builds/out-adv/core-advanced-test.js:11660)
at jdk.nashorn.internal.scripts.Script$Recompilation$1202$core_advanced_test$cu38$restOf.L:14$:split-18(builds/out-adv/core-advanced-test.js:11664)
at jdk.nashorn.internal.scripts.Script$Recompilation$190$452$core_advanced_test.L:14(builds/out-adv/core-advanced-test.js:11424)
at jdk.nashorn.internal.scripts.Script$Recompilation$189$core_advanced_test.:program(builds/out-adv/core-advanced-test.js:14)
at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:636)
at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:228)
at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:393)
at jdk.nashorn.tools.Shell.apply(Shell.java:397)
at jdk.nashorn.tools.Shell.runScripts(Shell.java:326)
at jdk.nashorn.tools.Shell.run(Shell.java:172)
at jdk.nashorn.tools.Shell.main(Shell.java:136)
at jdk.nashorn.tools.Shell.main(Shell.java:112)
Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
at jdk.nashorn.internal.codegen.Label$Stack.pop(Label.java:300)
at jdk.nashorn.internal.codegen.MethodEmitter.popType(MethodEmitter.java:278)
at jdk.nashorn.internal.codegen.MethodEmitter.pop(MethodEmitter.java:501)
at jdk.nashorn.internal.codegen.CodeGenerator.loadAND_OR(CodeGenerator.java:3788)
at jdk.nashorn.internal.codegen.CodeGenerator.access$3300(CodeGenerator.java:182)
at jdk.nashorn.internal.codegen.CodeGenerator$1.enterOR(CodeGenerator.java:1074)
at jdk.nashorn.internal.ir.visitor.NodeOperatorVisitor.enterBinaryNode(NodeOperatorVisitor.java:175)
at jdk.nashorn.internal.ir.BinaryNode.accept(BinaryNode.java:339)
at jdk.nashorn.internal.codegen.CodeGenerator.loadExpression(CodeGenerator.java:840)
at jdk.nashorn.internal.codegen.CodeGenerator.loadExpression(CodeGenerator.java:816)
at jdk.nashorn.internal.codegen.CodeGenerator.loadAndDiscard(CodeGenerator.java:3658)
at jdk.nashorn.internal.codegen.CodeGenerator.enterExpressionStatement(CodeGenerator.java:1712)
at jdk.nashorn.internal.ir.ExpressionStatement.accept(ExpressionStatement.java:63)
at jdk.nashorn.internal.ir.Node.accept(Node.java:276)
at jdk.nashorn.internal.ir.Block.accept(Block.java:183)
at jdk.nashorn.internal.ir.LexicalContextNode$Acceptor.accept(LexicalContextNode.java:57)
at jdk.nashorn.internal.ir.Block.accept(Block.java:447)
at jdk.nashorn.internal.codegen.CodeGenerator.enterForOrWhile(CodeGenerator.java:3422)
at jdk.nashorn.internal.codegen.CodeGenerator.enterForNode(CodeGenerator.java:1743)
at jdk.nashorn.internal.ir.ForNode.accept(ForNode.java:110)
at jdk.nashorn.internal.ir.LexicalContextNode$Acceptor.accept(LexicalContextNode.java:57)
at jdk.nashorn.internal.ir.LexicalContextStatement.accept(LexicalContextStatement.java:55)
at jdk.nashorn.internal.ir.LoopNode.accept(LoopNode.java:36)
at jdk.nashorn.internal.ir.Node.accept(Node.java:276)
at jdk.nashorn.internal.ir.Block.accept(Block.java:183)
at jdk.nashorn.internal.ir.LexicalContextNode$Acceptor.accept(LexicalContextNode.java:57)
at jdk.nashorn.internal.ir.Block.accept(Block.java:447)
at jdk.nashorn.internal.ir.FunctionNode.accept(FunctionNode.java:383)
at jdk.nashorn.internal.ir.LexicalContextNode$Acceptor.accept(LexicalContextNode.java:57)
at jdk.nashorn.internal.ir.LexicalContextExpression.accept(LexicalContextExpression.java:47)
at jdk.nashorn.internal.ir.FunctionNode.accept(FunctionNode.java:58)
at jdk.nashorn.internal.codegen.CompilationPhase.transformFunction(CompilationPhase.java:732)
at jdk.nashorn.internal.codegen.CompilationPhase.access$100(CompilationPhase.java:69)
at jdk.nashorn.internal.codegen.CompilationPhase$13.transform(CompilationPhase.java:473)
... 25 more
Tested with 1 out of 4 possible js targets
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment