diff options
author | yui-knk <spiketeika@gmail.com> | 2023-08-22 18:24:14 +0900 |
---|---|---|
committer | Yuichiro Kaneko <spiketeika@gmail.com> | 2023-08-23 07:59:54 +0900 |
commit | 00054de6b5ca65f87ca561f31daeb094442638fc (patch) | |
tree | 983b7726a3a539e4ac11d0dee3be0a2943708099 /compile.c | |
parent | ff552389137c2d0af16c63e82bfc7e123be30198 (diff) |
Remove nd_entry from NODE_GASGN and NODE_GVAR
After a0f12a0258e4020bd657ee80b7d8f22bd33ea223 NODE_GASGN and
NODE_GVAR hold same value on both nd_vid and nd_entry.
This commit stops setting value to nd_entry and makes to use only
nd_vid.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/8261
Diffstat (limited to 'compile.c')
-rw-r--r-- | compile.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -5348,7 +5348,7 @@ defined_expr0(rb_iseq_t *iseq, LINK_ANCHOR *const ret, case NODE_GVAR: ADD_INSN(ret, line_node, putnil); ADD_INSN3(ret, line_node, defined, INT2FIX(DEFINED_GVAR), - ID2SYM(node->nd_entry), PUSH_VAL(DEFINED_GVAR)); + ID2SYM(node->nd_vid), PUSH_VAL(DEFINED_GVAR)); return; case NODE_CVAR: @@ -9471,7 +9471,7 @@ iseq_compile_each0(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const no if (!popped) { ADD_INSN(ret, node, dup); } - ADD_INSN1(ret, node, setglobal, ID2SYM(node->nd_entry)); + ADD_INSN1(ret, node, setglobal, ID2SYM(node->nd_vid)); break; } case NODE_IASGN:{ @@ -9601,7 +9601,7 @@ iseq_compile_each0(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const no break; } case NODE_GVAR:{ - ADD_INSN1(ret, node, getglobal, ID2SYM(node->nd_entry)); + ADD_INSN1(ret, node, getglobal, ID2SYM(node->nd_vid)); if (popped) { ADD_INSN(ret, node, pop); } |