summaryrefslogtreecommitdiff
path: root/internal/ruby_parser.h
diff options
context:
space:
mode:
authorHASUMI Hitoshi <[email protected]>2024-04-26 21:43:35 +0900
committerYuichiro Kaneko <[email protected]>2024-04-27 12:08:26 +0900
commit55a402bb759597487905a94d5b1bbff4a672499c (patch)
tree9a6309c61f0f6871de0d47c135d4270bb270dfc7 /internal/ruby_parser.h
parentbf1f16ef47966e33401e5b9656a4ae4152dd1e60 (diff)
Add line_count field to rb_ast_body_t
This patch adds `int line_count` field to `rb_ast_body_t` structure. Instead, we no longer cast `script_lines` to Fixnum. ## Background Ref https://github.com/ruby/ruby/pull/10618 In the PR above, we have decoupled IMEMO from `rb_ast_t`. This means we could lift the five-words-restriction of the structure that forced us to unionize `rb_ast_t *` and `FIXNUM` in one field. ## Relating refactor - Remove the second parameter of `rb_ruby_ast_new()` function ## Attention I will remove a code that assigns -1 to line_count, in `rb_binding_add_dynavars()` of vm.c, because I don't think it is necessary. But I will make another PR for this so that we can atomically revert in case I was wrong (See the comment on the code)
Diffstat (limited to 'internal/ruby_parser.h')
-rw-r--r--internal/ruby_parser.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/ruby_parser.h b/internal/ruby_parser.h
index eb36be7d4b..98c3461954 100644
--- a/internal/ruby_parser.h
+++ b/internal/ruby_parser.h
@@ -96,7 +96,7 @@ enum lex_state_e {
EXPR_NONE = 0
};
-VALUE rb_ruby_ast_new(const NODE *const root, rb_parser_ary_t *script_lines);
+VALUE rb_ruby_ast_new(const NODE *const root);
rb_ast_t *rb_ruby_ast_data_get(VALUE vast);
#endif /* INTERNAL_RUBY_PARSE_H */