summaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2023-06-30 17:52:21 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2023-06-30 23:59:05 +0900
commit0d0841ad4c08ef30a9aaa3012021f17b91e7ee7f (patch)
tree8da489a09480c9c413b75dba26f4b8dc343c40c3 /compile.c
parentc1432a481615c7f1ad2c1426f0617f73599e2493 (diff)
Compile code for lazy ISeq loding always
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/compile.c b/compile.c
index 605ca79228..b961a9f334 100644
--- a/compile.c
+++ b/compile.c
@@ -13313,16 +13313,12 @@ ibf_load_iseq(const struct ibf_load *load, const rb_iseq_t *index_iseq)
#endif
pinned_list_store(load->iseq_list, iseq_index, (VALUE)iseq);
-#if !USE_LAZY_LOAD
+ if (!USE_LAZY_LOAD || GET_VM()->builtin_function_table) {
#if IBF_ISEQ_DEBUG
- fprintf(stderr, "ibf_load_iseq: loading iseq=%p\n", (void *)iseq);
+ fprintf(stderr, "ibf_load_iseq: loading iseq=%p\n", (void *)iseq);
#endif
- rb_ibf_load_iseq_complete(iseq);
-#else
- if (GET_VM()->builtin_function_table) {
rb_ibf_load_iseq_complete(iseq);
}
-#endif /* !USE_LAZY_LOAD */
#if IBF_ISEQ_DEBUG
fprintf(stderr, "ibf_load_iseq: iseq=%p loaded %p\n",
@@ -13379,9 +13375,9 @@ ibf_load_setup(struct ibf_load *load, VALUE loader_obj, VALUE str)
rb_raise(rb_eRuntimeError, "broken binary format");
}
-#if USE_LAZY_LOAD
- str = rb_str_new(RSTRING_PTR(str), RSTRING_LEN(str));
-#endif
+ if (USE_LAZY_LOAD) {
+ str = rb_str_new(RSTRING_PTR(str), RSTRING_LEN(str));
+ }
ibf_load_setup_bytes(load, loader_obj, StringValuePtr(str), RSTRING_LEN(str));
RB_OBJ_WRITE(loader_obj, &load->str, str);