ruby/template
HASUMI Hitoshi 9b1e97b211 [Universal parser] DeVALUE of p->debug_lines and ast->body.script_lines
This patch is part of universal parser work.

## Summary
- Decouple VALUE from members below:
  - `(struct parser_params *)->debug_lines`
  - `(rb_ast_t *)->body.script_lines`
- Instead, they are now `rb_parser_ary_t *`
  - They can also be a `(VALUE)FIXNUM` as before to hold line count
- `ISEQ_BODY(iseq)->variable.script_lines` remains VALUE
  - In order to do this,
  - Add `VALUE script_lines` param to `rb_iseq_new_with_opt()`
  - Introduce `rb_parser_build_script_lines_from()` to convert `rb_parser_ary_t *` into `VALUE`

## Other details
- Extend `rb_parser_ary_t *`. It previously could only store `rb_parser_ast_token *`, now can store script_lines, too
- Change tactics of building the top-level `SCRIPT_LINES__` in `yycompile0()`
  - Before: While parsing, each line of the script is added to `SCRIPT_LINES__[path]`
  - After: After `yyparse(p)`, `SCRIPT_LINES__[path]` will be built from `p->debug_lines`
- Remove the second parameter of `rb_parser_set_script_lines()` to make it simple
- Introduce `script_lines_free()` to be called from `rb_ast_free()` because the GC no longer takes care of the script_lines
- Introduce `rb_parser_string_deep_copy()` in parse.y to maintain script_lines when `rb_ruby_parser_free()` called
  - With regard to this, please see *Future tasks* below

## Future tasks
- Decouple IMEMO from `rb_ast_t *`
  - This lifts the five-members-restriction of Ruby object,
  - So we will be able to move the ownership of the `lex.string_buffer` from parser to AST
  - Then we remove `rb_parser_string_deep_copy()` to make the whole thing simple
2024-04-15 20:51:54 +09:00
..
Doxyfile.tmpl Remove never used macros related to RJIT [ci skip] 2024-03-24 22:37:20 +09:00
GNUmakefile.in Remove duplicate dependency line 2024-03-08 11:58:41 +09:00
Makefile.in Realclean extracted bundled gems and lock files 2024-04-11 23:47:32 +09:00
builtin_binary.inc.tmpl Revert "Disable iseq-dumped builtin module for universal x86_64/arm64 binaries" 2023-11-09 16:01:01 +09:00
call_iseq_optimized.inc.tmpl fix inline method cache sync bug 2020-12-15 13:29:30 +09:00
configure-ext.mk.tmpl Remove `--jobserver-auth` option which varies for each run 2023-06-19 18:28:10 +09:00
depend.tmpl Added depend files 2019-07-14 01:31:29 +09:00
encdb.h.tmpl Refactor encdb and transdb templates 2024-03-17 19:09:37 +09:00
extinit.c.tmpl Alias init functions 2024-02-04 16:43:09 +09:00
exts.mk.tmpl Ignore failures on removing ext sub directories 2024-03-11 00:46:15 +09:00
fake.rb.in [Bug #19967] Reset `LIBPATHENV` env after started 2023-10-21 14:05:20 +09:00
id.c.tmpl Generate token ID indexes in id.def 2022-09-08 18:18:56 +09:00
id.h.tmpl Add comments to id.h and undef finished macros 2023-07-21 14:52:43 +09:00
known_errors.inc.tmpl [DOC] Documentize known_errors 2024-01-13 11:08:00 +09:00
limits.c.tmpl
prelude.c.tmpl [Universal parser] DeVALUE of p->debug_lines and ast->body.script_lines 2024-04-15 20:51:54 +09:00
ruby-gdb.in Added install-dbg 2020-06-13 08:22:06 +09:00
ruby-lldb.in Added install-dbg 2020-06-13 08:22:06 +09:00
ruby-runner.h.in
ruby.pc.in Use RUBY_PROGRAM_VERSION as version in pkg-config file [ci skip] 2023-04-13 11:31:34 +09:00
sizes.c.tmpl Fix trivial -Wundef warnings 2021-05-04 14:56:55 +02:00
transdb.h.tmpl Refactor encdb and transdb templates 2024-03-17 19:09:37 +09:00
unicode_norm_gen.tmpl Use `_` instead of `_n_` 2019-10-18 20:24:36 +09:00
unicode_properties.rdoc.tmpl [Bug #19728] Auto-generate unicode property docs 2023-07-01 23:22:17 +09:00
verconf.h.tmpl