diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2024-01-17 16:45:57 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2024-01-22 19:39:34 +0900 |
commit | 127b19ab561b5365884b465d50356a1e4019713c (patch) | |
tree | 3efd404748d23a86992531fe287ec34b4f1dd2b9 /builtin.c | |
parent | 15f6ee057d800d54f803449d6bd4a8aadea524c1 (diff) | |
download | ruby-127b19ab561b5365884b465d50356a1e4019713c.tar.gz |
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.
Diffstat (limited to 'builtin.c')
-rw-r--r-- | builtin.c | 1 |
1 files changed, 0 insertions, 1 deletions
@@ -46,7 +46,6 @@ rb_load_with_builtin_functions(const char *feature_name, const struct rb_builtin rb_vm_t *vm = GET_VM(); if (vm->builtin_function_table != NULL) rb_bug("vm->builtin_function_table should be NULL."); vm->builtin_function_table = table; - vm->builtin_inline_index = 0; const rb_iseq_t *iseq = rb_iseq_ibf_load_bytes((const char *)bin, size); ASSUME(iseq); // otherwise an exception should have raised vm->builtin_function_table = NULL; |