summaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-12-12 23:33:47 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-12-13 12:53:03 +0900
commit54f0e63a8c53753af7db8653972ac450415eae13 (patch)
treedac9a7e9874c5ce570db851a9052297b5978961c /compile.c
parentd3c8f7b1cd2fdba95436889869e94f4c3cf419e8 (diff)
Remove `NODE_DASGN_CURR` [Feature #18406]
This `NODE` type was used in pre-YARV implementation, to improve the performance of assignment to dynamic local variable defined at the innermost scope. It has no longer any actual difference with `NODE_DASGN`, except for the node dump.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/5251
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/compile.c b/compile.c
index 82593d8774..83389947c0 100644
--- a/compile.c
+++ b/compile.c
@@ -4928,7 +4928,6 @@ compile_massign_opt(rb_iseq_t *iseq, LINK_ANCHOR *const ret,
MEMORY(ln->nd_vid);
break;
case NODE_DASGN:
- case NODE_DASGN_CURR:
case NODE_IASGN:
case NODE_CVASGN:
MEMORY(ln->nd_vid);
@@ -5322,7 +5321,6 @@ defined_expr0(rb_iseq_t *iseq, LINK_ANCHOR *const ret,
case NODE_MASGN:
case NODE_LASGN:
case NODE_DASGN:
- case NODE_DASGN_CURR:
case NODE_GASGN:
case NODE_IASGN:
case NODE_CDECL:
@@ -6592,8 +6590,7 @@ iseq_compile_pattern_each(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *c
ADD_INSNL(ret, line_node, jump, matched);
break;
}
- case NODE_DASGN:
- case NODE_DASGN_CURR: {
+ case NODE_DASGN: {
int idx, lv, ls;
ID id = node->nd_vid;
@@ -6609,7 +6606,7 @@ iseq_compile_pattern_each(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *c
}
if (idx < 0) {
- COMPILE_ERROR(ERROR_ARGS "NODE_DASGN(_CURR): unknown id (%"PRIsVALUE")",
+ COMPILE_ERROR(ERROR_ARGS "NODE_DASGN: unknown id (%"PRIsVALUE")",
rb_id2str(id));
return COMPILE_NG;
}
@@ -9199,8 +9196,7 @@ iseq_compile_each0(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const no
ADD_SETLOCAL(ret, node, idx, get_lvar_level(iseq));
break;
}
- case NODE_DASGN:
- case NODE_DASGN_CURR:{
+ case NODE_DASGN: {
int idx, lv, ls;
ID id = node->nd_vid;
CHECK(COMPILE(ret, "dvalue", node->nd_value));
@@ -9213,7 +9209,7 @@ iseq_compile_each0(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const no
idx = get_dyna_var_idx(iseq, id, &lv, &ls);
if (idx < 0) {
- COMPILE_ERROR(ERROR_ARGS "NODE_DASGN(_CURR): unknown id (%"PRIsVALUE")",
+ COMPILE_ERROR(ERROR_ARGS "NODE_DASGN: unknown id (%"PRIsVALUE")",
rb_id2str(id));
goto ng;
}