mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Use line numbers as builtin-index
The order of iseq may differ from the order of tokens, typically `while`/`until` conditions are put after the body. These orders can match by using line numbers as builtin-indexes, but at the same time, it introduces the restriction that multiple `cexpr!` and `cstmt!` cannot appear in the same line. Another possible idea is to use `RubyVM::AbstractSyntaxTree` and `node_id` instead of ripper, with making BASERUBY 3.1 or later.
This commit is contained in:
parent
15f6ee057d
commit
127b19ab56
5 changed files with 3 additions and 10 deletions
|
@ -27,7 +27,6 @@ builtin_iseq_load(const char *feature_name, const struct rb_builtin_function *ta
|
|||
feature_name);
|
||||
}
|
||||
vm->builtin_function_table = table;
|
||||
vm->builtin_inline_index = 0;
|
||||
static const rb_compile_option_t optimization = {
|
||||
TRUE, /* unsigned int inline_const_cache; */
|
||||
TRUE, /* unsigned int peephole_optimization; */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue