[mono][wasm] Avoid passing the icall name/c function name to mono_register_jit_icall_...
authorZoltan Varga <vargaz@gmail.com>
Sat, 28 Jan 2023 09:54:07 +0000 (04:54 -0500)
committerGitHub <noreply@github.com>
Sat, 28 Jan 2023 09:54:07 +0000 (04:54 -0500)
It creates unused string literals.

src/mono/mono/mini/mini-runtime.c

index ce664ed..1e5c5ed 100644 (file)
@@ -734,8 +734,13 @@ register_opcode_emulation (int opcode, MonoJitICallInfo *jit_icall_info, const c
  * nor does the C++ overload fmod (mono_fmod instead). These functions therefore
  * must be extern "C".
  */
+#ifdef DISABLE_JIT
+#define register_icall(func, sig, avoid_wrapper) \
+       (mono_register_jit_icall_info (&mono_get_jit_icall_info ()->func, func, NULL, (sig), (avoid_wrapper), NULL))
+#else
 #define register_icall(func, sig, avoid_wrapper) \
        (mono_register_jit_icall_info (&mono_get_jit_icall_info ()->func, func, #func, (sig), (avoid_wrapper), #func))
+#endif
 
 #define register_icall_no_wrapper(func, sig) register_icall (func, sig, TRUE)
 #define register_icall_with_wrapper(func, sig) register_icall (func, sig, FALSE)