mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
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.
This commit is contained in:
parent
5d02c1dd14
commit
f66e0212ef
Notes:
git
2020-07-13 08:56:53 +09:00
7 changed files with 77 additions and 15 deletions
4
struct.c
4
struct.c
|
@ -316,9 +316,9 @@ opt_struct_aset(rb_execution_context_t *ec, VALUE self, VALUE val, VALUE idx)
|
|||
}
|
||||
|
||||
static const struct rb_builtin_function struct_aref_builtin =
|
||||
RB_BUILTIN_FUNCTION(0, struct_aref, opt_struct_aref, 1);
|
||||
RB_BUILTIN_FUNCTION(0, struct_aref, opt_struct_aref, 1, 0);
|
||||
static const struct rb_builtin_function struct_aset_builtin =
|
||||
RB_BUILTIN_FUNCTION(1, struct_aref, opt_struct_aset, 2);
|
||||
RB_BUILTIN_FUNCTION(1, struct_aref, opt_struct_aset, 2, 0);
|
||||
|
||||
static void
|
||||
define_aref_method(VALUE nstr, VALUE name, VALUE off)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue