aboutsummaryrefslogtreecommitdiffstats
path: root/node.h
diff options
context:
space:
mode:
authorAaron Patterson <tenderlove@ruby-lang.org>2020-07-23 16:00:28 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2020-07-27 12:40:01 -0700
commit35ba2783fe6b3316a6bbc6f00bf975ad7185d6e0 (patch)
tree6b5ebe0fbd35d375f5b111d6cb8557be31b34e5b /node.h
parentc5ae79d7e953e778c89d0991e82b62a3d78fb5be (diff)
downloadruby-35ba2783fe6b3316a6bbc6f00bf975ad7185d6e0.tar.gz
Use a linked list to eliminate imemo tmp bufs for managing local tables
This patch changes local table memory to be managed by a linked list rather than via the garbage collector. It reduces allocations from the GC and also fixes a use-after-free bug in the concurrent-with-sweep compactor I'm working on.
Diffstat (limited to 'node.h')
-rw-r--r--node.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/node.h b/node.h
index 84c5d09b83..8252955ef2 100644
--- a/node.h
+++ b/node.h
@@ -401,11 +401,13 @@ typedef struct rb_ast_body_struct {
typedef struct rb_ast_struct {
VALUE flags;
node_buffer_t *node_buffer;
+ ID *local_lists;
rb_ast_body_t body;
} rb_ast_t;
rb_ast_t *rb_ast_new(void);
void rb_ast_mark(rb_ast_t*);
void rb_ast_update_references(rb_ast_t*);
+void rb_ast_add_local_table(rb_ast_t*, ID *buf);
void rb_ast_dispose(rb_ast_t*);
void rb_ast_free(rb_ast_t*);
size_t rb_ast_memsize(const rb_ast_t*);