diff options
author | Aaron Patterson <tenderlove@ruby-lang.org> | 2019-09-05 11:04:43 -0700 |
---|---|---|
committer | Aaron Patterson <tenderlove@ruby-lang.org> | 2019-09-05 11:04:43 -0700 |
commit | 8f096226e1b76f95f4d853d3dea2bc75eeeb5244 (patch) | |
tree | 74860932a1cc5ab53e959b9d29e1d6c4c8848f28 /node.c | |
parent | 8cd845aa5b69e49c1092a482f8c14f85f899e038 (diff) |
Stash tmpbuffer inside internal structs
I guess those AST node were actually used for something, so we'd better
not touch them. Instead this commit just puts the tmpbuffer inside a
different internal struct so that we can mark them.
Diffstat (limited to 'node.c')
-rw-r--r-- | node.c | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -1265,6 +1265,16 @@ mark_ast_value(void *ctx, NODE * node) } break; } + case NODE_ARYPTN: + { + struct rb_ary_pattern_info *apinfo = node->nd_apinfo; + rb_gc_mark(apinfo->imemo); + } + case NODE_ARGS: + { + struct rb_args_info *args = node->nd_ainfo; + rb_gc_mark(args->imemo); + } case NODE_LIT: case NODE_STR: case NODE_XSTR: @@ -1272,8 +1282,6 @@ mark_ast_value(void *ctx, NODE * node) case NODE_DXSTR: case NODE_DREGX: case NODE_DSYM: - case NODE_ARGS: - case NODE_ARYPTN: rb_gc_mark(node->nd_lit); break; default: |