Skip to content

Commit 15a8220

Browse files
committedJul 18, 2018
All is not well in full interp/JIT land for block dispatch of lambdas.
ACP pass calls PrepareFixedBlockArgsInstr but each_with_index and a couple of others when passed a lambda end up expecting the ary spreading we used to do in prepareFixedBlockArgs. I tried figuring out how these native calls could be changed but I see both call and yield on block being hit. Changing the error in call to yieldValues did fix one case but I have no confidence this is correct. So I removed preparefixed for more generic prepareblockargs for now. We need to dig in more here but block args are so complicated.
1 parent 1572660 commit 15a8220

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

Diff for: ‎core/src/main/java/org/jruby/ir/passes/AddCallProtocolInstructions.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public Object execute(IRScope scope, Object... data) {
124124
if (arityValue == 1) {
125125
prologueBB.addInstr(PrepareSingleBlockArgInstr.INSTANCE);
126126
} else {
127-
prologueBB.addInstr(PrepareFixedBlockArgsInstr.INSTANCE);
127+
prologueBB.addInstr(PrepareBlockArgsInstr.INSTANCE);
128128
}
129129
} else {
130130
prologueBB.addInstr(PrepareBlockArgsInstr.INSTANCE);

0 commit comments

Comments
 (0)
Please sign in to comment.