From 7e536b3be26ae48738a036a58be8dfa380bd21da Mon Sep 17 00:00:00 2001 From: 卜部昌平 Date: Sun, 12 Jul 2020 14:53:54 +0900 Subject: builtin.h: avoid copy&paste Instead of doubling the invokebuiltin logic here and there, use the same insns.def definition for both MJIT/non-JIT situations. --- builtin.h | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'builtin.h') diff --git a/builtin.h b/builtin.h index be7bb16a28..0da200f961 100644 --- a/builtin.h +++ b/builtin.h @@ -80,20 +80,4 @@ struct builtin_binary { size_t bin_size; }; -// mjit - -RBIMPL_ATTR_MAYBE_UNUSED() -static void -mjit_invokebuiltin_default_compiler(FILE *f, const struct rb_builtin_function *bf, long index) -{ - if (index >= 0) { - fprintf(f, "val = vm_invoke_builtin(ec, GET_CFP(), %p, STACK_ADDR_FROM_TOP(%d));\n", - (const void *)bf, bf->argc); - } - else { - fprintf(f, "val = vm_invoke_builtin_delegate(ec, GET_CFP(), %p, %ld);\n", - (const void *)bf, index); - } -} - #endif // BUILTIN_H_INCLUDED -- cgit v1.2.3