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".
This commit is contained in:
parent
e37a37e696
commit
8642a573e6
@ -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;
|
||||
iseq->body->builtin_attrs |= BUILTIN_ATTR_SINGLE_NOARG_LEAF;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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,
|
||||
BUILTIN_ATTR_SINGLE_NOARG_LEAF = 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,
|
||||
vm_call_single_noarg_leaf_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) &&
|
||||
if ((iseq->body->builtin_attrs & BUILTIN_ATTR_SINGLE_NOARG_LEAF) &&
|
||||
!(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);
|
||||
CC_SET_FASTPATH(cc, vm_call_single_noarg_leaf_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) {
|
||||
iseq->body->builtin_attrs & BUILTIN_ATTR_SINGLE_NOARG_LEAF) {
|
||||
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 const BUILTIN_ATTR_SINGLE_NOARG_LEAF: rb_builtin_attr = 2;
|
||||
pub type rb_builtin_attr = u32;
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy, Clone)]
|
||||
|
Loading…
x
Reference in New Issue
Block a user