summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Kokubun <[email protected]>2024-01-16 17:31:26 -0800
committerTakashi Kokubun <[email protected]>2024-01-16 17:31:27 -0800
commit8642a573e6d1091fefbb552bb714ebcf8da66289 ()
tree45e92c6488c926888350cbcc5d7e322eefa74845
parente37a37e696fdb97a3028f04d8439c010d52adb62 (diff)
Rename BUILTIN_ATTR_SINGLE_NOARG_INLINE
to BUILTIN_ATTR_SINGLE_NOARG_LEAF The attribute was created when the other attribute was called BUILTIN_ATTR_INLINE. Now that the original attribute is renamed to BUILTIN_ATTR_LEAF, it's only confusing that we call it "_INLINE".
-rw-r--r--compile.c2
-rw-r--r--vm_core.h2
-rw-r--r--vm_insnhelper.c6
-rw-r--r--vm_trace.c2
-rw-r--r--yjit/src/cruby_bindings.inc.rs2
5 files changed, 7 insertions, 7 deletions
@@ -3847,7 +3847,7 @@ iseq_peephole_optimize(rb_iseq_t *iseq, LINK_ELEMENT *list, const int do_tailcal
iobj->insn_id = BIN(opt_invokebuiltin_delegate_leave);
const struct rb_builtin_function *bf = (const struct rb_builtin_function *)iobj->operands[0];
if (iobj == (INSN *)list && bf->argc == 0 && (iseq->body->builtin_attrs & BUILTIN_ATTR_LEAF)) {
- iseq->body->builtin_attrs |= BUILTIN_ATTR_SINGLE_NOARG_INLINE;
}
}
}
@@ -366,7 +366,7 @@ enum rb_builtin_attr {
// The iseq does not call methods.
BUILTIN_ATTR_LEAF = 0x01,
// This iseq only contains single `opt_invokebuiltin_delegate_leave` instruction with 0 arguments.
- BUILTIN_ATTR_SINGLE_NOARG_INLINE = 0x02,
};
typedef VALUE (*rb_jit_func_t)(struct rb_execution_context_struct *, struct rb_control_frame_struct *);
@@ -2925,7 +2925,7 @@ vm_call_iseq_setup_kwparm_nokwarg(rb_execution_context_t *ec, rb_control_frame_t
static VALUE builtin_invoker0(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr);
static VALUE
-vm_call_single_noarg_inline_builtin(rb_execution_context_t *ec, rb_control_frame_t *cfp,
struct rb_calling_info *calling)
{
const struct rb_builtin_function *bf = calling->cc->aux_.bf;
@@ -2955,11 +2955,11 @@ vm_callee_setup_arg(rb_execution_context_t *ec, struct rb_calling_info *calling,
VM_ASSERT(cc == calling->cc);
if (cacheable_ci && vm_call_iseq_optimizable_p(ci, cc)) {
- if ((iseq->body->builtin_attrs & BUILTIN_ATTR_SINGLE_NOARG_INLINE) &&
!(ruby_vm_event_flags & (RUBY_EVENT_C_CALL | RUBY_EVENT_C_RETURN))) {
VM_ASSERT(iseq->body->builtin_attrs & BUILTIN_ATTR_LEAF);
vm_cc_bf_set(cc, (void *)iseq->body->iseq_encoded[1]);
- CC_SET_FASTPATH(cc, vm_call_single_noarg_inline_builtin, true);
}
else {
CC_SET_FASTPATH(cc, vm_call_iseq_setup_func(ci, param_size, local_size), true);
@@ -1273,7 +1273,7 @@ rb_tracepoint_enable_for_target(VALUE tpval, VALUE target, VALUE target_line)
rb_hash_aset(tp->local_target_set, (VALUE)iseq, Qtrue);
if ((tp->events & (RUBY_EVENT_CALL | RUBY_EVENT_RETURN)) &&
- iseq->body->builtin_attrs & BUILTIN_ATTR_SINGLE_NOARG_INLINE) {
rb_clear_bf_ccs();
}
@@ -448,7 +448,7 @@ pub struct iseq_inline_cvar_cache_entry {
pub entry: *mut rb_cvar_class_tbl_entry,
}
pub const BUILTIN_ATTR_LEAF: rb_builtin_attr = 1;
-pub const BUILTIN_ATTR_SINGLE_NOARG_INLINE: rb_builtin_attr = 2;
pub type rb_builtin_attr = u32;
#[repr(C)]
#[derive(Debug, Copy, Clone)]