ruby-changes:59476
From: Koichi <ko1@a...>
Date: Wed, 25 Dec 2019 14:13:06 +0900 (JST)
Subject: [ruby-changes:59476] d9bf9c572f (master): take care of USE_LAZY_LOAD=1.
https://git.ruby-lang.org/ruby.git/commit/?id=d9bf9c572f From d9bf9c572f461c282fa6e65833e98bc7d453a66f Mon Sep 17 00:00:00 2001 From: Koichi Sasada <ko1@a...> Date: Wed, 25 Dec 2019 14:10:35 +0900 Subject: take care of USE_LAZY_LOAD=1. On USE_LAZY_LOAD=1, the iseq should be loaded. So rb_iseq_check() is needed. Furthermore, now lazy loading with builtin_function_table is not supported, so it should cancel lazy loading. diff --git a/builtin.c b/builtin.c index 67b43c7..6de7722 100644 --- a/builtin.c +++ b/builtin.c @@ -51,7 +51,7 @@ rb_load_with_builtin_functions(const char *feature_name, const struct rb_builtin https://github.com/ruby/ruby/blob/trunk/builtin.c#L51 vm->builtin_function_table = NULL; // exec - rb_iseq_eval(iseq); + rb_iseq_eval(rb_iseq_check(iseq)); } #endif diff --git a/compile.c b/compile.c index 56b91bf..4343443 100644 --- a/compile.c +++ b/compile.c @@ -11499,7 +11499,11 @@ ibf_load_iseq(const struct ibf_load *load, const rb_iseq_t *index_iseq) https://github.com/ruby/ruby/blob/trunk/compile.c#L11499 #if IBF_ISEQ_DEBUG fprintf(stderr, "ibf_load_iseq: loading iseq=%p\n", (void *)iseq); #endif - rb_ibf_load_iseq_complete(iseq); + 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 -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/