Skip to content
Permalink
Browse files
fixed remaining bugs in OP_ASGN stack adjustment; close #3159
  • Loading branch information
matz committed May 16, 2016
1 parent 29d3a40 commit 6b0299f72b23071342d3ab067db1abbf15253102
Showing 1 changed file with 7 additions and 6 deletions.
@@ -1855,15 +1855,16 @@ codegen(codegen_scope *s, node *tree, int val)
gen_assignment(s, tree->car, cursp(), val);
}
else {
if (val) {
genop(s, MKOP_AB(OP_MOVE, vsp, cursp()));
}
if (callargs == CALL_MAXARGS) {
genop(s, MKOP_AB(OP_ARYPUSH, cursp()-1, cursp()));
if (val) {
genop(s, MKOP_AB(OP_MOVE, vsp, cursp()));
}
pop();
genop(s, MKOP_AB(OP_ARYPUSH, cursp(), cursp()+1));
}
else if (val) {
genop(s, MKOP_AB(OP_MOVE, vsp, cursp()));
else {
pop_n(callargs);
callargs++;
}
pop();
idx = new_msym(s, attrsym(s,sym(tree->car->cdr->cdr->car)));

0 comments on commit 6b0299f

Please sign in to comment.