相关于 https://ask.clojure.org/index.php/11553/arrayindexoutofboundsexception-in-clojure-asm-frame
(defprotocol P
(^double p1 [p a])
(^double p2 [p a]))
(let [p (reify P)]
(min 0.0
(case :p1
:p1 (p1 p :foo)
Double/MAX_VALUE)))
产生于
Execution error (VerifyError) at java.lang.Class/getDeclaredConstructors0 (Class.java:-2).
Inconsistent stackmap frames at branch target 121
Exception Details:
Location:
user$eval1401301.invokeStatic()Ljava/lang/Object; @115: goto
Reason:
Current frame's stack size doesn't match stackmap.
Current Frame:
bci: @115
flags: { }
locals: { null, 'clojure/lang/Keyword' }
stack: { double, double_2nd, 'java/lang/Object' }
Stackmap Frame:
bci: @121
flags: { }
locals: { 'clojure/lang/IObj', 'clojure/lang/Keyword' }
stack: { double, double_2nd, top, top }
Bytecode:
0000000: bb00 0f59 01b7 0012 c000 14b2 0018 c000
0000010: 1ab9 001e 0200 4b0e b200 224c 2bb8 0028
0000020: aa00 0000 0000 0056 3c72 5a61 3c72 5a61
0000030: 0000 0014 2bb2 0022 a600 3e2a 014b 59b8
0000040: 002c b200 2ea5 0011 59c1 0030 9a00 1c59
0000050: b800 2cb3 002e b200 34b6 0039 5fb2 003c
0000060: b900 4203 00a7 000e c000 30b2 003c b900
0000070: 4602 00a7 0006 b200 4cb8 0054 b800 58b0
0000080:
Stackmap Table:
full_frame(@52,{Object[#20],Object[#91]},{Double})
full_frame(@86,{Null,Object[#91]},{Double,Object[#20]})
full_frame(@104,{Null,Object[#91]},{Double,Object[#20]})
full_frame(@115,{Null,Object[#91]},{Double,Object[#93]})
full_frame(@118,{Object[#20],Object[#91]},{Double})
full_frame(@121,{Object[#20],Object[#91]},{Double,Top,Top})
在 1.10.3 和 1.11.0-beta1 上复现
如果你希望我将此提交到 JIRA,请告诉我:)
James