From 0fe72040e4c278bfafe232dc44551de2dfac85e2 Mon Sep 17 00:00:00 2001 From: ko1 Date: Sat, 24 Feb 2007 02:07:05 +0000 Subject: * parse.y, node.h, compile.c: change node tree structure. a purpose of this change is to unify argument structure of method and block. this change prohibits duplicate block parameter name. new argument infromation: NODE_ARGS [m: int, o: NODE_OPT_ARG, ->] NODE_ARGS_AUX [r: ID, b: ID, ->] NODE_ARGS_AUX [Pst: id, Plen: int, init: NODE*] optarg information: NODE_OPT_ARGS [idx, expr, ->] * vm_macro.def: ditto. * gc.c: ditto. * iseq.c: ditto. * compile.h: fix debug function name. * test/ripper/test_scanner_events.rb: |_,_,foo| -> |_1,_2,foo| * test/ruby/test_lambda.rb: disalbe test temporarily. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- gc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gc.c') diff --git a/gc.c b/gc.c index bbf3694ff9..987a5f842e 100644 --- a/gc.c +++ b/gc.c @@ -844,7 +844,6 @@ gc_mark_children(VALUE ptr, int lev) case NODE_RESCUE: case NODE_RESBODY: case NODE_CLASS: - case NODE_ARGS: case NODE_BLOCK_PASS: gc_mark((VALUE)obj->as.node.u2.node, lev); /* fall through */ @@ -859,11 +858,13 @@ gc_mark_children(VALUE ptr, int lev) case NODE_CALL: case NODE_DEFS: case NODE_OP_ASGN1: + case NODE_ARGS: gc_mark((VALUE)obj->as.node.u1.node, lev); /* fall through */ case NODE_SUPER: /* 3 */ case NODE_FCALL: case NODE_DEFN: + case NODE_ARGS_AUX: ptr = (VALUE)obj->as.node.u3.node; goto again; @@ -922,6 +923,7 @@ gc_mark_children(VALUE ptr, int lev) case NODE_SCOPE: /* 2,3 */ case NODE_CDECL: + case NODE_OPT_ARG: gc_mark((VALUE)obj->as.node.u3.node, lev); ptr = (VALUE)obj->as.node.u2.node; goto again; -- cgit v1.2.3