Details
-
Bug
-
Resolution: Fixed
-
P4
-
None
-
None
-
b82
-
generic
-
generic
-
Verified
Description
Code:
var flag = true;
function func(obj) {
print(obj);
}
func(flag? /bar1/ : /bar2/);
----------------------------------------------------------
Exception:
----------------
Exception in thread "main" java.lang.VerifyError: Bad type on operand stack
Exception Details:
Location:
jdk/nashorn/internal/scripts/Script$bar.runScript(Ljava/lang/Object;Ljdk/nashorn/internal/runtime/ScriptFunction;)Ljava/lang/Object; @135: invokedynamic
Reason:
Type 'java/lang/Object' (current frame, stack[2]) is not assignable to 'jdk/nashorn/internal/parser/Lexer$RegexToken'
Current Frame:
bci: @135
flags: { }
locals: { 'java/lang/Object', 'jdk/nashorn/internal/runtime/ScriptFunction', 'jdk/nashorn/internal/runtime/ScriptObject', 'java/lang/Object' }
stack: { 'java/lang/Object', null, 'java/lang/Object' }
Bytecode:
0000000: 2bb6 0018 4dbb 001a 5903 b800 1e2c b700
0000010: 21b8 0027 4d2c bb00 4959 124a 124d 2cb2
0000020: 004f 1400 5012 5804 b800 1e04 03b7 005b
0000030: ba00 6000 002c ba00 6300 004e 2cb2 0069
0000040: ba00 6c00 002c ba00 6f00 0001 2cba 0072
0000050: 0000 b800 7899 001c b200 7b59 c700 0f57
0000060: 127d 127f b800 8559 b300 7bb8 0088 a700
0000070: 19b2 008b 59c7 000f 5712 8d12 7fb8 0085
0000080: 59b3 008b b800 88ba 0090 0000 4e2d b0
Stackmap Table:
full_frame(@107,{Object[#146],Object[#20],Object[#148],Object[#146]},{Object[#146],Null,Object[#146]})
full_frame(@113,{Object[#146],Object[#20],Object[#148],Object[#146]},{Object[#146],Null})
full_frame(@132,{Object[#146],Object[#20],Object[#148],Object[#146]},{Object[#146],Null,Object[#146]})
full_frame(@135,{Object[#146],Object[#20],Object[#148],Object[#146]},{Object[#146],Null,Object[#146]})
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Class.java:2307)
at java.lang.Class.getField0(Class.java:2634)
at java.lang.Class.getField(Class.java:1535)
at jdk.nashorn.internal.codegen.Compiler.install(Compiler.java:486)
at jdk.nashorn.internal.runtime.Context.compile(Context.java:926)
at jdk.nashorn.internal.runtime.Context.compileScript(Context.java:891)
at jdk.nashorn.internal.runtime.Context.compileScript(Context.java:516)
at jdk.nashorn.tools.Shell.runScripts(Shell.java:285)
at jdk.nashorn.tools.Shell.run(Shell.java:167)
at jdk.nashorn.tools.Shell.main(Shell.java:136)
at jdk.nashorn.tools.Shell.main(Shell.java:115)
sundar@sundar-TravelMate-5720:~/src/nashorn-jdk8/nashorn/bin$ vi bar.js
sundar@sundar-TravelMate-5720:~/src/nashorn-jdk8/nashorn/bin$ sh jjs -scripting bar.js ^C
sundar@sundar-TravelMate-5720:~/src/nashorn-jdk8/nashorn/bin$ sh jjs bar.js
Exception in thread "main" java.lang.VerifyError: Bad type on operand stack
Exception Details:
Location:
jdk/nashorn/internal/scripts/Script$bar.runScript(Ljava/lang/Object;Ljdk/nashorn/internal/runtime/ScriptFunction;)Ljava/lang/Object; @135: invokedynamic
Reason:
Type 'java/lang/Object' (current frame, stack[2]) is not assignable to 'jdk/nashorn/internal/parser/Lexer$RegexToken'
Current Frame:
bci: @135
flags: { }
locals: { 'java/lang/Object', 'jdk/nashorn/internal/runtime/ScriptFunction', 'jdk/nashorn/internal/runtime/ScriptObject', 'java/lang/Object' }
stack: { 'java/lang/Object', null, 'java/lang/Object' }
Bytecode:
0000000: 2bb6 0018 4dbb 001a 5903 b800 1e2c b700
0000010: 21b8 0027 4d2c bb00 4959 124a 124d 2cb2
0000020: 004f 1400 5012 5804 b800 1e04 03b7 005b
0000030: ba00 6000 002c ba00 6300 004e 2cb2 0069
0000040: ba00 6c00 002c ba00 6f00 0001 2cba 0072
0000050: 0000 b800 7899 001c b200 7b59 c700 0f57
0000060: 127d 127f b800 8559 b300 7bb8 0088 a700
0000070: 19b2 008b 59c7 000f 5712 8d12 7fb8 0085
0000080: 59b3 008b b800 88ba 0090 0000 4e2d b0
Stackmap Table:
full_frame(@107,{Object[#146],Object[#20],Object[#148],Object[#146]},{Object[#146],Null,Object[#146]})
full_frame(@113,{Object[#146],Object[#20],Object[#148],Object[#146]},{Object[#146],Null})
full_frame(@132,{Object[#146],Object[#20],Object[#148],Object[#146]},{Object[#146],Null,Object[#146]})
full_frame(@135,{Object[#146],Object[#20],Object[#148],Object[#146]},{Object[#146],Null,Object[#146]})
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Class.java:2307)
at java.lang.Class.getField0(Class.java:2634)
at java.lang.Class.getField(Class.java:1535)
at jdk.nashorn.internal.codegen.Compiler.install(Compiler.java:486)
at jdk.nashorn.internal.runtime.Context.compile(Context.java:926)
at jdk.nashorn.internal.runtime.Context.compileScript(Context.java:891)
at jdk.nashorn.internal.runtime.Context.compileScript(Context.java:516)
at jdk.nashorn.tools.Shell.runScripts(Shell.java:285)
at jdk.nashorn.tools.Shell.run(Shell.java:167)
at jdk.nashorn.tools.Shell.main(Shell.java:136)
at jdk.nashorn.tools.Shell.main(Shell.java:115)
var flag = true;
function func(obj) {
print(obj);
}
func(flag? /bar1/ : /bar2/);
----------------------------------------------------------
Exception:
----------------
Exception in thread "main" java.lang.VerifyError: Bad type on operand stack
Exception Details:
Location:
jdk/nashorn/internal/scripts/Script$bar.runScript(Ljava/lang/Object;Ljdk/nashorn/internal/runtime/ScriptFunction;)Ljava/lang/Object; @135: invokedynamic
Reason:
Type 'java/lang/Object' (current frame, stack[2]) is not assignable to 'jdk/nashorn/internal/parser/Lexer$RegexToken'
Current Frame:
bci: @135
flags: { }
locals: { 'java/lang/Object', 'jdk/nashorn/internal/runtime/ScriptFunction', 'jdk/nashorn/internal/runtime/ScriptObject', 'java/lang/Object' }
stack: { 'java/lang/Object', null, 'java/lang/Object' }
Bytecode:
0000000: 2bb6 0018 4dbb 001a 5903 b800 1e2c b700
0000010: 21b8 0027 4d2c bb00 4959 124a 124d 2cb2
0000020: 004f 1400 5012 5804 b800 1e04 03b7 005b
0000030: ba00 6000 002c ba00 6300 004e 2cb2 0069
0000040: ba00 6c00 002c ba00 6f00 0001 2cba 0072
0000050: 0000 b800 7899 001c b200 7b59 c700 0f57
0000060: 127d 127f b800 8559 b300 7bb8 0088 a700
0000070: 19b2 008b 59c7 000f 5712 8d12 7fb8 0085
0000080: 59b3 008b b800 88ba 0090 0000 4e2d b0
Stackmap Table:
full_frame(@107,{Object[#146],Object[#20],Object[#148],Object[#146]},{Object[#146],Null,Object[#146]})
full_frame(@113,{Object[#146],Object[#20],Object[#148],Object[#146]},{Object[#146],Null})
full_frame(@132,{Object[#146],Object[#20],Object[#148],Object[#146]},{Object[#146],Null,Object[#146]})
full_frame(@135,{Object[#146],Object[#20],Object[#148],Object[#146]},{Object[#146],Null,Object[#146]})
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Class.java:2307)
at java.lang.Class.getField0(Class.java:2634)
at java.lang.Class.getField(Class.java:1535)
at jdk.nashorn.internal.codegen.Compiler.install(Compiler.java:486)
at jdk.nashorn.internal.runtime.Context.compile(Context.java:926)
at jdk.nashorn.internal.runtime.Context.compileScript(Context.java:891)
at jdk.nashorn.internal.runtime.Context.compileScript(Context.java:516)
at jdk.nashorn.tools.Shell.runScripts(Shell.java:285)
at jdk.nashorn.tools.Shell.run(Shell.java:167)
at jdk.nashorn.tools.Shell.main(Shell.java:136)
at jdk.nashorn.tools.Shell.main(Shell.java:115)
sundar@sundar-TravelMate-5720:~/src/nashorn-jdk8/nashorn/bin$ vi bar.js
sundar@sundar-TravelMate-5720:~/src/nashorn-jdk8/nashorn/bin$ sh jjs -scripting bar.js ^C
sundar@sundar-TravelMate-5720:~/src/nashorn-jdk8/nashorn/bin$ sh jjs bar.js
Exception in thread "main" java.lang.VerifyError: Bad type on operand stack
Exception Details:
Location:
jdk/nashorn/internal/scripts/Script$bar.runScript(Ljava/lang/Object;Ljdk/nashorn/internal/runtime/ScriptFunction;)Ljava/lang/Object; @135: invokedynamic
Reason:
Type 'java/lang/Object' (current frame, stack[2]) is not assignable to 'jdk/nashorn/internal/parser/Lexer$RegexToken'
Current Frame:
bci: @135
flags: { }
locals: { 'java/lang/Object', 'jdk/nashorn/internal/runtime/ScriptFunction', 'jdk/nashorn/internal/runtime/ScriptObject', 'java/lang/Object' }
stack: { 'java/lang/Object', null, 'java/lang/Object' }
Bytecode:
0000000: 2bb6 0018 4dbb 001a 5903 b800 1e2c b700
0000010: 21b8 0027 4d2c bb00 4959 124a 124d 2cb2
0000020: 004f 1400 5012 5804 b800 1e04 03b7 005b
0000030: ba00 6000 002c ba00 6300 004e 2cb2 0069
0000040: ba00 6c00 002c ba00 6f00 0001 2cba 0072
0000050: 0000 b800 7899 001c b200 7b59 c700 0f57
0000060: 127d 127f b800 8559 b300 7bb8 0088 a700
0000070: 19b2 008b 59c7 000f 5712 8d12 7fb8 0085
0000080: 59b3 008b b800 88ba 0090 0000 4e2d b0
Stackmap Table:
full_frame(@107,{Object[#146],Object[#20],Object[#148],Object[#146]},{Object[#146],Null,Object[#146]})
full_frame(@113,{Object[#146],Object[#20],Object[#148],Object[#146]},{Object[#146],Null})
full_frame(@132,{Object[#146],Object[#20],Object[#148],Object[#146]},{Object[#146],Null,Object[#146]})
full_frame(@135,{Object[#146],Object[#20],Object[#148],Object[#146]},{Object[#146],Null,Object[#146]})
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Class.java:2307)
at java.lang.Class.getField0(Class.java:2634)
at java.lang.Class.getField(Class.java:1535)
at jdk.nashorn.internal.codegen.Compiler.install(Compiler.java:486)
at jdk.nashorn.internal.runtime.Context.compile(Context.java:926)
at jdk.nashorn.internal.runtime.Context.compileScript(Context.java:891)
at jdk.nashorn.internal.runtime.Context.compileScript(Context.java:516)
at jdk.nashorn.tools.Shell.runScripts(Shell.java:285)
at jdk.nashorn.tools.Shell.run(Shell.java:167)
at jdk.nashorn.tools.Shell.main(Shell.java:136)
at jdk.nashorn.tools.Shell.main(Shell.java:115)