diff options
author | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-27 16:44:57 +0000 |
---|---|---|
committer | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-27 16:44:57 +0000 |
commit | e35fe8d11b889a5646a23df06bbecf16f88c518a (patch) | |
tree | d4346b34db86ab7c09ccb2db3f0e2803664e9421 /node.h | |
parent | 15270f48a9f3ccd7e57798d7eff4dd8d5d83c259 (diff) | |
download | ruby-e35fe8d11b889a5646a23df06bbecf16f88c518a.tar.gz |
Revert "Revert "Manage AST NODEs out of GC""
This re-introduces r60485.
This reverts commit 5a176b75b1187cbd3861c387bde65ff66396a07c.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'node.h')
-rw-r--r-- | node.h | 34 |
1 files changed, 26 insertions, 8 deletions
@@ -439,6 +439,24 @@ typedef struct RNode { RUBY_SYMBOL_EXPORT_BEGIN +typedef struct node_buffer_struct node_buffer_t; +/* T_IMEMO/ast */ +typedef struct ast_struct { + VALUE flags; + VALUE reserved1; + NODE *root; + node_buffer_t *node_buffer; + VALUE mark_ary; +} ast_t; +ast_t *rb_ast_new(); +void rb_ast_mark(ast_t*); +void rb_ast_dispose(ast_t*); +void rb_ast_free(ast_t*); +void rb_ast_add_mark_object(ast_t*, VALUE); +void rb_ast_delete_mark_object(ast_t*, VALUE); +NODE *rb_ast_newnode(ast_t*); +void rb_ast_delete_node(ast_t*, NODE *n); + VALUE rb_parser_new(void); VALUE rb_parser_end_seen_p(VALUE); VALUE rb_parser_encoding(VALUE); @@ -447,15 +465,15 @@ VALUE rb_parser_set_yydebug(VALUE, VALUE); VALUE rb_parser_dump_tree(NODE *node, int comment); void rb_parser_set_options(VALUE, int, int, int, int); -NODE *rb_parser_compile_cstr(VALUE, const char*, const char*, int, int); -NODE *rb_parser_compile_string(VALUE, const char*, VALUE, int); -NODE *rb_parser_compile_file(VALUE, const char*, VALUE, int); -NODE *rb_parser_compile_string_path(VALUE vparser, VALUE fname, VALUE src, int line); -NODE *rb_parser_compile_file_path(VALUE vparser, VALUE fname, VALUE input, int line); +ast_t *rb_parser_compile_cstr(VALUE, const char*, const char*, int, int); +ast_t *rb_parser_compile_string(VALUE, const char*, VALUE, int); +ast_t *rb_parser_compile_file(VALUE, const char*, VALUE, int); +ast_t *rb_parser_compile_string_path(VALUE vparser, VALUE fname, VALUE src, int line); +ast_t *rb_parser_compile_file_path(VALUE vparser, VALUE fname, VALUE input, int line); -NODE *rb_compile_cstr(const char*, const char*, int, int); -NODE *rb_compile_string(const char*, VALUE, int); -NODE *rb_compile_file(const char*, VALUE, int); +ast_t *rb_compile_cstr(const char*, const char*, int, int); +ast_t *rb_compile_string(const char*, VALUE, int); +ast_t *rb_compile_file(const char*, VALUE, int); void rb_node_init(NODE *n, enum node_type type, VALUE a0, VALUE a1, VALUE a2); NODE *rb_node_newnode(enum node_type,VALUE,VALUE,VALUE); |