-
Bug
-
Resolution: Fixed
-
P2
-
8
-
b102
-
generic
-
generic
-
Verified
The RETURN symbol in split function always has the OBJECT type, even if the function return type is a primitive. This leads to an AssertionError in codegen.
One way to reproduce this problem is to compile the Octane earley-boyer.js or crypto.js files with a splitter threshold of 1000:
bin/js -Dnashorn.compiler.splitter.threshold=1000 test/script/external/octane/earley-boyer.js
Exception in thread "main" java.lang.AssertionError: boolean is not compatible with object
at jdk.nashorn.internal.codegen.MethodEmitter.popType(MethodEmitter.java:235)
at jdk.nashorn.internal.codegen.MethodEmitter.store(MethodEmitter.java:953)
at jdk.nashorn.internal.codegen.MethodEmitter.storeCompilerConstant(MethodEmitter.java:912)
at jdk.nashorn.internal.codegen.CodeGenerator.enterSplitNode(CodeGenerator.java:1692)
at jdk.nashorn.internal.ir.SplitNode.accept(SplitNode.java:84)
at jdk.nashorn.internal.ir.LexicalContextNode$Acceptor.accept(LexicalContextNode.java:51)
at jdk.nashorn.internal.ir.LexicalContextStatement.accept(LexicalContextStatement.java:53)
at jdk.nashorn.internal.ir.SplitNode.accept(SplitNode.java:35)
at jdk.nashorn.internal.ir.Node.accept(Node.java:291)
at jdk.nashorn.internal.ir.Block.accept(Block.java:138)
at jdk.nashorn.internal.ir.LexicalContextNode$Acceptor.accept(LexicalContextNode.java:51)
at jdk.nashorn.internal.ir.Block.accept(Block.java:343)
at jdk.nashorn.internal.ir.FunctionNode.accept(FunctionNode.java:297)
at jdk.nashorn.internal.ir.LexicalContextNode$Acceptor.accept(LexicalContextNode.java:51)
at jdk.nashorn.internal.ir.LexicalContextExpression.accept(LexicalContextExpression.java:46)
at jdk.nashorn.internal.ir.FunctionNode.accept(FunctionNode.java:49)
......
One way to reproduce this problem is to compile the Octane earley-boyer.js or crypto.js files with a splitter threshold of 1000:
bin/js -Dnashorn.compiler.splitter.threshold=1000 test/script/external/octane/earley-boyer.js
Exception in thread "main" java.lang.AssertionError: boolean is not compatible with object
at jdk.nashorn.internal.codegen.MethodEmitter.popType(MethodEmitter.java:235)
at jdk.nashorn.internal.codegen.MethodEmitter.store(MethodEmitter.java:953)
at jdk.nashorn.internal.codegen.MethodEmitter.storeCompilerConstant(MethodEmitter.java:912)
at jdk.nashorn.internal.codegen.CodeGenerator.enterSplitNode(CodeGenerator.java:1692)
at jdk.nashorn.internal.ir.SplitNode.accept(SplitNode.java:84)
at jdk.nashorn.internal.ir.LexicalContextNode$Acceptor.accept(LexicalContextNode.java:51)
at jdk.nashorn.internal.ir.LexicalContextStatement.accept(LexicalContextStatement.java:53)
at jdk.nashorn.internal.ir.SplitNode.accept(SplitNode.java:35)
at jdk.nashorn.internal.ir.Node.accept(Node.java:291)
at jdk.nashorn.internal.ir.Block.accept(Block.java:138)
at jdk.nashorn.internal.ir.LexicalContextNode$Acceptor.accept(LexicalContextNode.java:51)
at jdk.nashorn.internal.ir.Block.accept(Block.java:343)
at jdk.nashorn.internal.ir.FunctionNode.accept(FunctionNode.java:297)
at jdk.nashorn.internal.ir.LexicalContextNode$Acceptor.accept(LexicalContextNode.java:51)
at jdk.nashorn.internal.ir.LexicalContextExpression.accept(LexicalContextExpression.java:46)
at jdk.nashorn.internal.ir.FunctionNode.accept(FunctionNode.java:49)
......
- blocks
-
JDK-8020719 Run tests with reduced splitter threshold
-
- Closed
-