mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
fixed remaining bugs in OP_ASGN stack adjustment; close #3159
This commit is contained in:
@@ -1855,16 +1855,17 @@ codegen(codegen_scope *s, node *tree, int val)
|
||||
gen_assignment(s, tree->car, cursp(), val);
|
||||
}
|
||||
else {
|
||||
if (callargs == CALL_MAXARGS) {
|
||||
genop(s, MKOP_AB(OP_ARYPUSH, cursp()-1, cursp()));
|
||||
if (val) {
|
||||
genop(s, MKOP_AB(OP_MOVE, vsp, cursp()));
|
||||
}
|
||||
pop();
|
||||
}
|
||||
else if (val) {
|
||||
if (val) {
|
||||
genop(s, MKOP_AB(OP_MOVE, vsp, cursp()));
|
||||
}
|
||||
if (callargs == CALL_MAXARGS) {
|
||||
pop();
|
||||
genop(s, MKOP_AB(OP_ARYPUSH, cursp(), cursp()+1));
|
||||
}
|
||||
else {
|
||||
pop_n(callargs);
|
||||
callargs++;
|
||||
}
|
||||
pop();
|
||||
idx = new_msym(s, attrsym(s,sym(tree->car->cdr->cdr->car)));
|
||||
genop(s, MKOP_ABC(OP_SEND, cursp(), idx, callargs));
|
||||
|
||||
Reference in New Issue
Block a user