summaryrefslogtreecommitdiff
path: root/insns.def
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2020-07-09 21:43:42 +0900
committer卜部昌平 <shyouhei@ruby-lang.org>2020-07-13 08:56:18 +0900
commitf66e0212efe4f6572d5e81741e831ab735cc2fee (patch)
tree94b45502a7d483489b697c3966b7d75e9cfd9b40 /insns.def
parent5d02c1dd14648d95178ac5ec756f5b03fe00d549 (diff)
precalc invokebuiltin destinations
Noticed that struct rb_builtin_function is a purely compile-time constant. MJIT can eliminate some runtime calculations by statically generate dedicated C code generator for each builtin functions.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3305
Diffstat (limited to 'insns.def')
-rw-r--r--insns.def8
1 files changed, 4 insertions, 4 deletions
diff --git a/insns.def b/insns.def
index c4e80040b6..2151ae2484 100644
--- a/insns.def
+++ b/insns.def
@@ -1478,11 +1478,11 @@ DEFINE_INSN
invokebuiltin
(RB_BUILTIN bf)
(...)
-(VALUE ret)
+(VALUE val)
// attr bool leaf = false; /* anything can happen inside */
// attr rb_snum_t sp_inc = 1 - bf->argc;
{
- ret = vm_invoke_builtin(ec, reg_cfp, bf, STACK_ADDR_FROM_TOP(bf->argc));
+ val = vm_invoke_builtin(ec, reg_cfp, bf, STACK_ADDR_FROM_TOP(bf->argc));
}
/* call specific function with args (same parameters) */
@@ -1490,10 +1490,10 @@ DEFINE_INSN
opt_invokebuiltin_delegate
(RB_BUILTIN bf, rb_num_t index)
()
-(VALUE ret)
+(VALUE val)
// attr bool leaf = false; /* anything can happen inside */
{
- ret = vm_invoke_builtin_delegate(ec, reg_cfp, bf, (unsigned int)index);
+ val = vm_invoke_builtin_delegate(ec, reg_cfp, bf, (unsigned int)index);
}
/* call specific function with args (same parameters) and leave */