Just suppress a warning for non-Emscripten Wasm build

Revert "Revert "Skip calling jit_exec on Wasm""

This reverts commit 2e94610f70baca4af004202f288a6b5dd10889ca.

It's not about whether it's optimized away or not. I just don't want to
leave and maintain the callsite (e.g. signature) in the path where
YJIT is never built.
This commit is contained in:
Takashi Kokubun 2023-08-04 20:36:02 -07:00
parent 2e94610f70
commit e176f84138

6
vm.c
View File

@ -422,7 +422,7 @@ jit_exec(rb_execution_context_t *ec)
}
#else
static inline rb_jit_func_t jit_compile(rb_execution_context_t *ec) { return 0; }
static inline VALUE jit_exec(rb_execution_context_t *ec) { return Qundef; }
RBIMPL_ATTR_MAYBE_UNUSED() static inline VALUE jit_exec(rb_execution_context_t *ec) { return Qundef; }
#endif
#include "vm_insnhelper.c"
@ -2336,9 +2336,7 @@ vm_exec_bottom_main(void *context)
struct rb_vm_exec_context *ctx = (struct rb_vm_exec_context *)context;
ctx->state = TAG_NONE;
if (UNDEF_P(ctx->result = jit_exec(ctx->ec))) {
ctx->result = vm_exec_core(ctx->ec);
}
ctx->result = vm_exec_core(ctx->ec);
vm_exec_enter_vm_loop(ctx->ec, ctx, ctx->tag, true);
}