diff options
author | Koichi Sasada <[email protected]> | 2023-03-17 16:00:34 +0900 |
---|---|---|
committer | Koichi Sasada <[email protected]> | 2023-03-23 14:03:12 +0900 |
commit | e5a5e43c36443e06756aba6de95c94b41b910a82 (patch) | |
tree | d6f558ef0e11eea7365a113638603adf4d24ace3 | |
parent | fee9044b255579228b60038d998abec0f75ca87f (diff) |
should not restore builtin_inline_index
`builtin_inline_index` is restored because THEN clause on
`Primitive.mandatory_only?` was compiled twice.
However, f29c9d6d36 skips to compile THEN clause so we don't
need to restore `builtin_inline_index`.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/7486
-rw-r--r-- | compile.c | 3 |
1 files changed, 0 insertions, 3 deletions
@@ -8348,15 +8348,12 @@ compile_builtin_mandatory_only_method(rb_iseq_t *iseq, const NODE *node, const N .script_lines = ISEQ_BODY(iseq)->variable.script_lines, }; - int prev_inline_index = GET_VM()->builtin_inline_index; - ISEQ_BODY(iseq)->mandatory_only_iseq = rb_iseq_new_with_opt(&ast, rb_iseq_base_label(iseq), rb_iseq_path(iseq), rb_iseq_realpath(iseq), nd_line(line_node), NULL, 0, ISEQ_TYPE_METHOD, ISEQ_COMPILE_DATA(iseq)->option); - GET_VM()->builtin_inline_index = prev_inline_index; ALLOCV_END(idtmp); return COMPILE_OK; } |