diff options
author | Aaron Patterson <tenderlove@ruby-lang.org> | 2019-09-04 09:38:17 -0700 |
---|---|---|
committer | Aaron Patterson <tenderlove@ruby-lang.org> | 2019-09-05 10:13:50 -0700 |
commit | 545b6db3fb367944f72cee5d41892eed63574634 (patch) | |
tree | c4fa68600e1d00cfdc23b082a8435b78e1c493f0 /parse.y | |
parent | f0fd1c0cd8d34b870a3011a36f5179d1b5f3547d (diff) | |
download | bundler-545b6db3fb367944f72cee5d41892eed63574634.tar.gz |
Create two buckets for allocating NODE structs
This commit adds two buckets for allocating NODE structs, then allocates
"markable" NODE objects from one bucket. The reason to do this is so
when the AST mark function scans nodes for VALUE objects to mark, we
only scan NODE objects that we know to reference VALUE objects. If we
*did not* divide the objects, then the mark function spends too much
time scanning objects that don't contain any references.
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -9357,7 +9357,7 @@ yylex(YYSTYPE *lval, YYLTYPE *yylloc, struct parser_params *p) static NODE* node_newnode(struct parser_params *p, enum node_type type, VALUE a0, VALUE a1, VALUE a2, const rb_code_location_t *loc) { - NODE *n = rb_ast_newnode(p->ast); + NODE *n = rb_ast_newnode(p->ast, type); rb_node_init(n, type, a0, a1, a2); |