Fix a couple issues noticed by nobu
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
This commit is contained in:
parent
f446d68ba6
commit
334e4c65b3
@ -9520,7 +9520,7 @@ compile_super(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, i
|
|||||||
/* rest argument */
|
/* rest argument */
|
||||||
int idx = local_body->local_table_size - local_body->param.rest_start;
|
int idx = local_body->local_table_size - local_body->param.rest_start;
|
||||||
ADD_GETLOCAL(args, node, idx, lvar_level);
|
ADD_GETLOCAL(args, node, idx, lvar_level);
|
||||||
ADD_INSN1(args, node, splatarray, local_body->param.flags.has_post ? Qtrue : Qfalse);
|
ADD_INSN1(args, node, splatarray, RBOOL(local_body->param.flags.has_post));
|
||||||
|
|
||||||
argc = local_body->param.rest_start + 1;
|
argc = local_body->param.rest_start + 1;
|
||||||
flag |= VM_CALL_ARGS_SPLAT;
|
flag |= VM_CALL_ARGS_SPLAT;
|
||||||
@ -9529,7 +9529,6 @@ compile_super(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, i
|
|||||||
/* post arguments */
|
/* post arguments */
|
||||||
int post_len = local_body->param.post_num;
|
int post_len = local_body->param.post_num;
|
||||||
int post_start = local_body->param.post_start;
|
int post_start = local_body->param.post_start;
|
||||||
flag |= VM_CALL_ARGS_SPLAT_MUT;
|
|
||||||
|
|
||||||
if (local_body->param.flags.has_rest) {
|
if (local_body->param.flags.has_rest) {
|
||||||
int j;
|
int j;
|
||||||
@ -9538,6 +9537,7 @@ compile_super(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, i
|
|||||||
ADD_GETLOCAL(args, node, idx, lvar_level);
|
ADD_GETLOCAL(args, node, idx, lvar_level);
|
||||||
}
|
}
|
||||||
ADD_INSN1(args, node, pushtoarray, INT2FIX(j));
|
ADD_INSN1(args, node, pushtoarray, INT2FIX(j));
|
||||||
|
flag |= VM_CALL_ARGS_SPLAT_MUT;
|
||||||
/* argc is settled at above */
|
/* argc is settled at above */
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user