mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
YJIT: Fallback opt_getconstant_path for const_missing (#8623)
* YJIT: Fallback opt_getconstant_path for const_missing * Fix a comment [ci skip] * Remove a wrapper function
This commit is contained in:
parent
0bf1749e9f
commit
5808999d30
6 changed files with 75 additions and 42 deletions
15
insns.def
15
insns.def
|
@ -260,20 +260,7 @@ opt_getconstant_path
|
|||
(VALUE val)
|
||||
// attr bool leaf = false; /* may autoload or raise */
|
||||
{
|
||||
const ID *segments = ic->segments;
|
||||
struct iseq_inline_constant_cache_entry *ice = ic->entry;
|
||||
if (ice && vm_ic_hit_p(ice, GET_EP())) {
|
||||
val = ice->value;
|
||||
|
||||
VM_ASSERT(val == vm_get_ev_const_chain(ec, segments));
|
||||
} else {
|
||||
ruby_vm_constant_cache_misses++;
|
||||
val = vm_get_ev_const_chain(ec, segments);
|
||||
vm_ic_track_const_chain(GET_CFP(), ic, segments);
|
||||
// Because leaf=false, we need to undo the PC increment to get the address to this instruction
|
||||
// INSN_ATTR(width) == 2
|
||||
vm_ic_update(GET_ISEQ(), ic, val, GET_EP(), GET_PC() - 2);
|
||||
}
|
||||
val = rb_vm_opt_getconstant_path(ec, GET_CFP(), ic);
|
||||
}
|
||||
|
||||
/* Get constant variable id. If klass is Qnil and allow_nil is Qtrue, constants
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue