diff options
author | Aaron Patterson <[email protected]> | 2019-09-04 09:38:17 -0700 |
---|---|---|
committer | Aaron Patterson <[email protected]> | 2019-09-05 10:13:50 -0700 |
commit | 545b6db3fb367944f72cee5d41892eed63574634 (patch) | |
tree | c4fa68600e1d00cfdc23b082a8435b78e1c493f0 /node.h | |
parent | f0fd1c0cd8d34b870a3011a36f5179d1b5f3547d (diff) |
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 'node.h')
-rw-r--r-- | node.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -409,7 +409,7 @@ void rb_ast_dispose(rb_ast_t*); void rb_ast_free(rb_ast_t*); size_t rb_ast_memsize(const rb_ast_t*); void rb_ast_add_mark_object(rb_ast_t*, VALUE); -NODE *rb_ast_newnode(rb_ast_t*); +NODE *rb_ast_newnode(rb_ast_t*, enum node_type type); void rb_ast_delete_node(rb_ast_t*, NODE *n); VALUE rb_parser_new(void); |