Compile code for non-embedded CI always

This commit is contained in:
Nobuyoshi Nakada 2023-06-28 22:45:34 +09:00
parent 5204ad56e1
commit 469e644c93
No known key found for this signature in database
GPG Key ID: 3582D74E1FEE4465
2 changed files with 10 additions and 9 deletions

View File

@ -167,7 +167,7 @@ jobs:
# - { name: TRANSIENT_HEAP_CHECK_MODE, env: { cppflags: '-DTRANSIENT_HEAP_CHECK_MODE' } } # - { name: TRANSIENT_HEAP_CHECK_MODE, env: { cppflags: '-DTRANSIENT_HEAP_CHECK_MODE' } }
# - { name: VM_CHECK_MODE, env: { cppflags: '-DVM_CHECK_MODE' } } # - { name: VM_CHECK_MODE, env: { cppflags: '-DVM_CHECK_MODE' } }
- { name: USE_EMBED_CI=0, env: { cppflags: '-DUSE_EMBED_CI=0' } } # - { name: USE_EMBED_CI=0, env: { cppflags: '-DUSE_EMBED_CI=0' } }
- { name: USE_FLONUM=0, env: { cppflags: '-DUSE_FLONUM=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_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' } }

View File

@ -65,8 +65,12 @@ struct rb_callinfo {
VALUE argc; VALUE argc;
}; };
#ifndef USE_EMBED_CI #if !defined(USE_EMBED_CI) || (USE_EMBED_CI+0)
#undef USE_EMBED_CI
#define USE_EMBED_CI 1 #define USE_EMBED_CI 1
#else
#undef USE_EMBED_CI
#define USE_EMBED_CI 0
#endif #endif
#if SIZEOF_VALUE == 8 #if SIZEOF_VALUE == 8
@ -96,7 +100,9 @@ struct rb_callinfo {
static inline bool static inline bool
vm_ci_packed_p(const struct rb_callinfo *ci) vm_ci_packed_p(const struct rb_callinfo *ci)
{ {
#if USE_EMBED_CI if (!USE_EMBED_CI) {
return 0;
}
if (LIKELY(((VALUE)ci) & 0x01)) { if (LIKELY(((VALUE)ci) & 0x01)) {
return 1; return 1;
} }
@ -104,9 +110,6 @@ vm_ci_packed_p(const struct rb_callinfo *ci)
VM_ASSERT(IMEMO_TYPE_P(ci, imemo_callinfo)); VM_ASSERT(IMEMO_TYPE_P(ci, imemo_callinfo));
return 0; return 0;
} }
#else
return 0;
#endif
} }
static inline bool static inline bool
@ -196,12 +199,10 @@ vm_ci_dump(const struct rb_callinfo *ci)
static inline const struct rb_callinfo * static inline const struct rb_callinfo *
vm_ci_new_(ID mid, unsigned int flag, unsigned int argc, const struct rb_callinfo_kwarg *kwarg, const char *file, int line) vm_ci_new_(ID mid, unsigned int flag, unsigned int argc, const struct rb_callinfo_kwarg *kwarg, const char *file, int line)
{ {
#if USE_EMBED_CI if (USE_EMBED_CI && VM_CI_EMBEDDABLE_P(mid, flag, argc, kwarg)) {
if (VM_CI_EMBEDDABLE_P(mid, flag, argc, kwarg)) {
RB_DEBUG_COUNTER_INC(ci_packed); RB_DEBUG_COUNTER_INC(ci_packed);
return vm_ci_new_id(mid, flag, argc, kwarg); return vm_ci_new_id(mid, flag, argc, kwarg);
} }
#endif
const bool debug = 0; const bool debug = 0;
if (debug) ruby_debug_printf("%s:%d ", file, line); if (debug) ruby_debug_printf("%s:%d ", file, line);