aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/compilers.yml2
-rw-r--r--compile.c14
-rw-r--r--vm_core.h8
3 files changed, 8 insertions, 16 deletions
diff --git a/.github/workflows/compilers.yml b/.github/workflows/compilers.yml
index c32ee6a3a7..769e0a57ba 100644
--- a/.github/workflows/compilers.yml
+++ b/.github/workflows/compilers.yml
@@ -170,7 +170,7 @@ jobs:
# - { name: USE_EMBED_CI=0, env: { cppflags: '-DUSE_EMBED_CI=0' } }
- { name: USE_FLONUM=0, env: { cppflags: '-DUSE_FLONUM=0' } }
# - { name: USE_GC_MALLOC_OBJ_INFO_DETAILS, env: { cppflags: '-DUSE_GC_MALLOC_OBJ_INFO_DETAILS' } }
- - { name: USE_LAZY_LOAD, env: { cppflags: '-DUSE_LAZY_LOAD' } }
+# - { name: USE_LAZY_LOAD, env: { cppflags: '-DUSE_LAZY_LOAD' } }
# - { name: USE_SYMBOL_GC=0, env: { cppflags: '-DUSE_SYMBOL_GC=0' } }
# - { name: USE_THREAD_CACHE=0, env: { cppflags: '-DUSE_THREAD_CACHE=0' } }
# - { name: USE_TRANSIENT_HEAP=0, env: { cppflags: '-DUSE_TRANSIENT_HEAP=0' } }
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);
diff --git a/vm_core.h b/vm_core.h
index f0f393e497..a76f57e596 100644
--- a/vm_core.h
+++ b/vm_core.h
@@ -548,22 +548,18 @@ struct rb_iseq_struct {
#define ISEQ_BODY(iseq) ((iseq)->body)
-#ifndef USE_LAZY_LOAD
+#if !defined(USE_LAZY_LOAD) || !(USE_LAZY_LOAD+0)
#define USE_LAZY_LOAD 0
#endif
-#if USE_LAZY_LOAD
const rb_iseq_t *rb_iseq_complete(const rb_iseq_t *iseq);
-#endif
static inline const rb_iseq_t *
rb_iseq_check(const rb_iseq_t *iseq)
{
-#if USE_LAZY_LOAD
- if (ISEQ_BODY(iseq) == NULL) {
+ if (USE_LAZY_LOAD && ISEQ_BODY(iseq) == NULL) {
rb_iseq_complete((rb_iseq_t *)iseq);
}
-#endif
return iseq;
}