mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* parse.y, compile.c, gc.c, insns.def, intern.h, iseq.c, node.h,
object.c, string.c, variable.c, vm_macro.def: revert private instance variable feature, which is postponed until next major release. * marshal.c: TYPE_SYMBOL2 removed; MARSHAL_MINOR reverted back to 8th version. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
3600c7ef8f
commit
b83ed6d1bd
13 changed files with 25 additions and 160 deletions
19
compile.c
19
compile.c
|
@ -2343,11 +2343,6 @@ defined_expr(rb_iseq_t *iseq, LINK_ANCHOR *ret,
|
|||
ADD_INSN3(ret, nd_line(node), defined, INT2FIX(DEFINED_IVAR),
|
||||
ID2SYM(node->nd_vid), needstr);
|
||||
return 1;
|
||||
case NODE_IVAR2:
|
||||
ADD_INSN(ret, nd_line(node), putnil);
|
||||
ADD_INSN3(ret, nd_line(node), defined, INT2FIX(DEFINED_IVAR2),
|
||||
ID2SYM(node->nd_vid), needstr);
|
||||
return 1;
|
||||
|
||||
case NODE_GVAR:
|
||||
ADD_INSN(ret, nd_line(node), putnil);
|
||||
|
@ -3321,13 +3316,12 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
|
|||
}
|
||||
case NODE_IASGN:
|
||||
case NODE_IASGN2:{
|
||||
int is_local = (nd_type(node) == NODE_IASGN2) ? 1 : 0;
|
||||
COMPILE(ret, "lvalue", node->nd_value);
|
||||
if (!poped) {
|
||||
ADD_INSN(ret, nd_line(node), dup);
|
||||
}
|
||||
ADD_INSN2(ret, nd_line(node), setinstancevariable,
|
||||
ID2SYM(node->nd_vid), INT2FIX(is_local));
|
||||
ADD_INSN1(ret, nd_line(node), setinstancevariable,
|
||||
ID2SYM(node->nd_vid));
|
||||
break;
|
||||
}
|
||||
case NODE_CDECL:{
|
||||
|
@ -3898,14 +3892,11 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
|
|||
}
|
||||
break;
|
||||
}
|
||||
case NODE_IVAR:
|
||||
case NODE_IVAR2:{
|
||||
int is_local = (nd_type(node) == NODE_IVAR2) ? 1 : 0;
|
||||
|
||||
case NODE_IVAR:{
|
||||
debugi("nd_vid", node->nd_vid);
|
||||
if (!poped) {
|
||||
ADD_INSN2(ret, nd_line(node), getinstancevariable,
|
||||
ID2SYM(node->nd_vid), INT2FIX(is_local));
|
||||
ADD_INSN1(ret, nd_line(node), getinstancevariable,
|
||||
ID2SYM(node->nd_vid));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue