summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2023-08-04 20:36:02 -0700
committerTakashi Kokubun <takashikkbn@gmail.com>2023-08-04 20:50:46 -0700
commite176f84138ff4fc5f7442cc969a281aeb714e7bd (patch)
treeede309536b6c2872e4678566c2b28f1e7bb855e0 /vm.c
parent2e94610f70baca4af004202f288a6b5dd10889ca (diff)
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.
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/vm.c b/vm.c
index f67bd30bdd..325ab9935e 100644
--- a/vm.c
+++ b/vm.c
@@ -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);
}