diff options
author | yui-knk <spiketeika@gmail.com> | 2023-09-20 23:51:39 +0900 |
---|---|---|
committer | Yuichiro Kaneko <spiketeika@gmail.com> | 2023-09-22 11:25:53 +0900 |
commit | fb7a2ddb4be21a6d0def8286f341b1b4ee368fe0 (patch) | |
tree | fb69e8ada6e1d86695eb323732ce6577079f3c29 /rubyparser.h | |
parent | bf129370d32da9b673d242bb3c9661f2188b3ad0 (diff) | |
download | ruby-fb7a2ddb4be21a6d0def8286f341b1b4ee368fe0.tar.gz |
Directly free structure managed by imemo tmpbuf
NODE_ARGS, NODE_ARYPTN, NODE_FNDPTN manage memory of their
structure by imemo tmpbuf Object.
However rb_ast_struct has reference to NODE. Then these
memory can be freed directly when rb_ast_struct is freed.
This commit reduces parser's dependency on CRuby functions.
Diffstat (limited to 'rubyparser.h')
-rw-r--r-- | rubyparser.h | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/rubyparser.h b/rubyparser.h index e95b71f049..5aa0e86be9 100644 --- a/rubyparser.h +++ b/rubyparser.h @@ -292,8 +292,6 @@ struct rb_args_info { unsigned int no_kwarg: 1; unsigned int ruby2_keywords: 1; unsigned int forwarding: 1; - - VALUE imemo; }; struct rb_ary_pattern_info { @@ -364,8 +362,6 @@ typedef struct rb_parser_config_struct { // TODO: Should it return `rb_strterm_t *'? VALUE (*new_strterm)(VALUE v1, VALUE v2, VALUE v3, VALUE v0, int heredoc); int (*strterm_is_heredoc)(VALUE strterm); - VALUE (*tmpbuf_auto_free_pointer)(void); - void *(*tmpbuf_set_ptr)(VALUE v, void *ptr); rb_imemo_tmpbuf_t *(*tmpbuf_parser_heap)(void *buf, rb_imemo_tmpbuf_t *old_heap, size_t cnt); rb_ast_t *(*ast_new)(VALUE nb); |