diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-02-24 02:07:05 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-02-24 02:07:05 +0000 |
commit | 0fe72040e4c278bfafe232dc44551de2dfac85e2 (patch) | |
tree | b94399addca7cc57efeb4ae755c408a09d99d115 /gc.c | |
parent | c5148e038316b3351b4c831773b83e08c11c20fb (diff) | |
download | ruby-0fe72040e4c278bfafe232dc44551de2dfac85e2.tar.gz |
* 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
Diffstat (limited to 'gc.c')
-rw-r--r-- | gc.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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; |