mirror of
https://github.com/ruby/ruby.git
synced 2026-01-26 12:14:51 +00:00
Remove opt_aref_with and opt_aset_with
When these instructions were introduced it was common to read from a hash with mutable string literals. However, these days, I think these instructions are fairly rare. I tested this with the lobsters benchmark, and saw no difference in speed. In order to be sure, I tracked down every use of this instruction in the lobsters benchmark, and there were only 4 places where it was used. Additionally, this patch fixes a case where "chilled strings" should emit a warning but they don't. ```ruby class Foo def self.[](x)= x.gsub!(/hello/, "hi") end Foo["hello world"] ``` Removing these instructions shows this warning: ``` > ./miniruby -vw test.rb ruby 3.5.0dev (2025-08-25T21:36:50Z rm-opt_aref_with dca08e286c) +PRISM [arm64-darwin24] test.rb:2: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) ``` [Feature #21553]
This commit is contained in:
parent
8df06d6d90
commit
fb6e3a8000
46
compile.c
46
compile.c
@ -3898,8 +3898,6 @@ iseq_peephole_optimize(rb_iseq_t *iseq, LINK_ELEMENT *list, const int do_tailcal
|
||||
|
||||
if (do_tailcallopt &&
|
||||
(IS_INSN_ID(iobj, send) ||
|
||||
IS_INSN_ID(iobj, opt_aref_with) ||
|
||||
IS_INSN_ID(iobj, opt_aset_with) ||
|
||||
IS_INSN_ID(iobj, invokesuper))) {
|
||||
/*
|
||||
* send ...
|
||||
@ -8965,25 +8963,6 @@ compile_call_precheck_freeze(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
/* optimization shortcut
|
||||
* obj["literal"] -> opt_aref_with(obj, "literal")
|
||||
*/
|
||||
if (get_node_call_nd_mid(node) == idAREF && !private_recv_p(node) && get_nd_args(node) &&
|
||||
nd_type_p(get_nd_args(node), NODE_LIST) && RNODE_LIST(get_nd_args(node))->as.nd_alen == 1 &&
|
||||
(nd_type_p(RNODE_LIST(get_nd_args(node))->nd_head, NODE_STR) || nd_type_p(RNODE_LIST(get_nd_args(node))->nd_head, NODE_FILE)) &&
|
||||
ISEQ_COMPILE_DATA(iseq)->current_block == NULL &&
|
||||
!frozen_string_literal_p(iseq) &&
|
||||
ISEQ_COMPILE_DATA(iseq)->option->specialized_instruction) {
|
||||
VALUE str = get_string_value(RNODE_LIST(get_nd_args(node))->nd_head);
|
||||
CHECK(COMPILE(ret, "recv", get_nd_recv(node)));
|
||||
ADD_INSN2(ret, line_node, opt_aref_with, str,
|
||||
new_callinfo(iseq, idAREF, 1, 0, NULL, FALSE));
|
||||
RB_OBJ_WRITTEN(iseq, Qundef, str);
|
||||
if (popped) {
|
||||
ADD_INSN(ret, line_node, pop);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -10311,31 +10290,6 @@ compile_attrasgn(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node
|
||||
LABEL *else_label = NULL;
|
||||
VALUE branches = Qfalse;
|
||||
|
||||
/* optimization shortcut
|
||||
* obj["literal"] = value -> opt_aset_with(obj, "literal", value)
|
||||
*/
|
||||
if (!ISEQ_COMPILE_DATA(iseq)->in_masgn &&
|
||||
mid == idASET && !private_recv_p(node) && RNODE_ATTRASGN(node)->nd_args &&
|
||||
nd_type_p(RNODE_ATTRASGN(node)->nd_args, NODE_LIST) && RNODE_LIST(RNODE_ATTRASGN(node)->nd_args)->as.nd_alen == 2 &&
|
||||
(nd_type_p(RNODE_LIST(RNODE_ATTRASGN(node)->nd_args)->nd_head, NODE_STR) || nd_type_p(RNODE_LIST(RNODE_ATTRASGN(node)->nd_args)->nd_head, NODE_FILE)) &&
|
||||
ISEQ_COMPILE_DATA(iseq)->current_block == NULL &&
|
||||
!frozen_string_literal_p(iseq) &&
|
||||
ISEQ_COMPILE_DATA(iseq)->option->specialized_instruction)
|
||||
{
|
||||
VALUE str = get_string_value(RNODE_LIST(RNODE_ATTRASGN(node)->nd_args)->nd_head);
|
||||
CHECK(COMPILE(ret, "recv", RNODE_ATTRASGN(node)->nd_recv));
|
||||
CHECK(COMPILE(ret, "value", RNODE_LIST(RNODE_LIST(RNODE_ATTRASGN(node)->nd_args)->nd_next)->nd_head));
|
||||
if (!popped) {
|
||||
ADD_INSN(ret, node, swap);
|
||||
ADD_INSN1(ret, node, topn, INT2FIX(1));
|
||||
}
|
||||
ADD_INSN2(ret, node, opt_aset_with, str,
|
||||
new_callinfo(iseq, idASET, 2, 0, NULL, FALSE));
|
||||
RB_OBJ_WRITTEN(iseq, Qundef, str);
|
||||
ADD_INSN(ret, node, pop);
|
||||
return COMPILE_OK;
|
||||
}
|
||||
|
||||
INIT_ANCHOR(recv);
|
||||
INIT_ANCHOR(args);
|
||||
argc = setup_args(iseq, args, RNODE_ATTRASGN(node)->nd_args, &flag, NULL);
|
||||
|
||||
38
insns.def
38
insns.def
@ -1541,44 +1541,6 @@ opt_aset
|
||||
}
|
||||
}
|
||||
|
||||
/* recv[str] = set */
|
||||
DEFINE_INSN
|
||||
opt_aset_with
|
||||
(VALUE key, CALL_DATA cd)
|
||||
(VALUE recv, VALUE val)
|
||||
(VALUE val)
|
||||
/* Same discussion as opt_aset. */
|
||||
// attr bool leaf = false; /* has rb_funcall() */ /* calls #hash */
|
||||
{
|
||||
VALUE tmp = vm_opt_aset_with(recv, key, val);
|
||||
|
||||
if (!UNDEF_P(tmp)) {
|
||||
val = tmp;
|
||||
}
|
||||
else {
|
||||
TOPN(0) = rb_str_resurrect(key);
|
||||
PUSH(val);
|
||||
CALL_SIMPLE_METHOD();
|
||||
}
|
||||
}
|
||||
|
||||
/* recv[str] */
|
||||
DEFINE_INSN
|
||||
opt_aref_with
|
||||
(VALUE key, CALL_DATA cd)
|
||||
(VALUE recv)
|
||||
(VALUE val)
|
||||
/* Same discussion as opt_aref. */
|
||||
// attr bool leaf = false; /* has rb_funcall() */ /* calls #yield */
|
||||
{
|
||||
val = vm_opt_aref_with(recv, key);
|
||||
|
||||
if (UNDEF_P(val)) {
|
||||
PUSH(rb_str_resurrect(key));
|
||||
CALL_SIMPLE_METHOD();
|
||||
}
|
||||
}
|
||||
|
||||
/* optimized length */
|
||||
DEFINE_INSN
|
||||
opt_length
|
||||
|
||||
@ -5526,44 +5526,6 @@ pm_opt_str_freeze_p(const rb_iseq_t *iseq, const pm_call_node_t *node)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the given call node can use the opt_aref_with optimization
|
||||
* with the current iseq options.
|
||||
*/
|
||||
static inline bool
|
||||
pm_opt_aref_with_p(const rb_iseq_t *iseq, const pm_call_node_t *node)
|
||||
{
|
||||
return (
|
||||
!PM_NODE_FLAG_P(node, PM_CALL_NODE_FLAGS_SAFE_NAVIGATION) &&
|
||||
node->arguments != NULL &&
|
||||
PM_NODE_TYPE_P((const pm_node_t *) node->arguments, PM_ARGUMENTS_NODE) &&
|
||||
((const pm_arguments_node_t *) node->arguments)->arguments.size == 1 &&
|
||||
PM_NODE_TYPE_P(((const pm_arguments_node_t *) node->arguments)->arguments.nodes[0], PM_STRING_NODE) &&
|
||||
node->block == NULL &&
|
||||
!PM_NODE_FLAG_P(((const pm_arguments_node_t *) node->arguments)->arguments.nodes[0], PM_STRING_FLAGS_FROZEN) &&
|
||||
ISEQ_COMPILE_DATA(iseq)->option->specialized_instruction
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the given call node can use the opt_aset_with optimization
|
||||
* with the current iseq options.
|
||||
*/
|
||||
static inline bool
|
||||
pm_opt_aset_with_p(const rb_iseq_t *iseq, const pm_call_node_t *node)
|
||||
{
|
||||
return (
|
||||
!PM_NODE_FLAG_P(node, PM_CALL_NODE_FLAGS_SAFE_NAVIGATION) &&
|
||||
node->arguments != NULL &&
|
||||
PM_NODE_TYPE_P((const pm_node_t *) node->arguments, PM_ARGUMENTS_NODE) &&
|
||||
((const pm_arguments_node_t *) node->arguments)->arguments.size == 2 &&
|
||||
PM_NODE_TYPE_P(((const pm_arguments_node_t *) node->arguments)->arguments.nodes[0], PM_STRING_NODE) &&
|
||||
node->block == NULL &&
|
||||
!PM_NODE_FLAG_P(((const pm_arguments_node_t *) node->arguments)->arguments.nodes[0], PM_STRING_FLAGS_FROZEN) &&
|
||||
ISEQ_COMPILE_DATA(iseq)->option->specialized_instruction
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Compile the instructions necessary to read a constant, based on the options
|
||||
* of the current iseq.
|
||||
@ -7397,44 +7359,6 @@ pm_compile_call_node(rb_iseq_t *iseq, const pm_call_node_t *node, LINK_ANCHOR *c
|
||||
}
|
||||
break;
|
||||
}
|
||||
case idAREF: {
|
||||
if (pm_opt_aref_with_p(iseq, node)) {
|
||||
const pm_string_node_t *string = (const pm_string_node_t *) ((const pm_arguments_node_t *) node->arguments)->arguments.nodes[0];
|
||||
VALUE value = parse_static_literal_string(iseq, scope_node, (const pm_node_t *) string, &string->unescaped);
|
||||
|
||||
PM_COMPILE_NOT_POPPED(node->receiver);
|
||||
|
||||
const struct rb_callinfo *callinfo = new_callinfo(iseq, idAREF, 1, 0, NULL, FALSE);
|
||||
PUSH_INSN2(ret, location, opt_aref_with, value, callinfo);
|
||||
|
||||
if (popped) {
|
||||
PUSH_INSN(ret, location, pop);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case idASET: {
|
||||
if (pm_opt_aset_with_p(iseq, node)) {
|
||||
const pm_string_node_t *string = (const pm_string_node_t *) ((const pm_arguments_node_t *) node->arguments)->arguments.nodes[0];
|
||||
VALUE value = parse_static_literal_string(iseq, scope_node, (const pm_node_t *) string, &string->unescaped);
|
||||
|
||||
PM_COMPILE_NOT_POPPED(node->receiver);
|
||||
PM_COMPILE_NOT_POPPED(((const pm_arguments_node_t *) node->arguments)->arguments.nodes[1]);
|
||||
|
||||
if (!popped) {
|
||||
PUSH_INSN(ret, location, swap);
|
||||
PUSH_INSN1(ret, location, topn, INT2FIX(1));
|
||||
}
|
||||
|
||||
const struct rb_callinfo *callinfo = new_callinfo(iseq, idASET, 2, 0, NULL, FALSE);
|
||||
PUSH_INSN2(ret, location, opt_aset_with, value, callinfo);
|
||||
PUSH_INSN(ret, location, pop);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (PM_NODE_FLAG_P(node, PM_CALL_NODE_FLAGS_ATTRIBUTE_WRITE) && !popped) {
|
||||
|
||||
1
test/.excludes-zjit/TestGc.rb
Normal file
1
test/.excludes-zjit/TestGc.rb
Normal file
@ -0,0 +1 @@
|
||||
exclude(:test_interrupt_in_finalizer, "Interrupt checks are still being developed")
|
||||
@ -2007,7 +2007,7 @@ class TestHashOnly < Test::Unit::TestCase
|
||||
|
||||
EnvUtil.without_gc do
|
||||
before = ObjectSpace.count_objects[:T_STRING]
|
||||
5.times{ h["abc"] }
|
||||
5.times{ h["abc".freeze] }
|
||||
assert_equal before, ObjectSpace.count_objects[:T_STRING]
|
||||
end
|
||||
end
|
||||
|
||||
@ -1534,14 +1534,6 @@ class TestYJIT < Test::Unit::TestCase
|
||||
RUBY
|
||||
end
|
||||
|
||||
def test_opt_aref_with
|
||||
assert_compiles(<<~RUBY, insns: %i[opt_aref_with], result: "bar", frozen_string_literal: false)
|
||||
h = {"foo" => "bar"}
|
||||
|
||||
h["foo"]
|
||||
RUBY
|
||||
end
|
||||
|
||||
def test_proc_block_arg
|
||||
assert_compiles(<<~RUBY, result: [:proc, :no_block])
|
||||
def yield_if_given = block_given? ? yield : :no_block
|
||||
|
||||
@ -6946,45 +6946,6 @@ vm_opt_aset(VALUE recv, VALUE obj, VALUE set)
|
||||
}
|
||||
}
|
||||
|
||||
static VALUE
|
||||
vm_opt_aref_with(VALUE recv, VALUE key)
|
||||
{
|
||||
if (!SPECIAL_CONST_P(recv) && RBASIC_CLASS(recv) == rb_cHash &&
|
||||
BASIC_OP_UNREDEFINED_P(BOP_AREF, HASH_REDEFINED_OP_FLAG) &&
|
||||
rb_hash_compare_by_id_p(recv) == Qfalse &&
|
||||
!FL_TEST(recv, RHASH_PROC_DEFAULT)) {
|
||||
return rb_hash_aref(recv, key);
|
||||
}
|
||||
else {
|
||||
return Qundef;
|
||||
}
|
||||
}
|
||||
|
||||
VALUE
|
||||
rb_vm_opt_aref_with(VALUE recv, VALUE key)
|
||||
{
|
||||
return vm_opt_aref_with(recv, key);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
vm_opt_aset_with(VALUE recv, VALUE key, VALUE val)
|
||||
{
|
||||
if (!SPECIAL_CONST_P(recv) && RBASIC_CLASS(recv) == rb_cHash &&
|
||||
BASIC_OP_UNREDEFINED_P(BOP_ASET, HASH_REDEFINED_OP_FLAG) &&
|
||||
rb_hash_compare_by_id_p(recv) == Qfalse) {
|
||||
return rb_hash_aset(recv, key, val);
|
||||
}
|
||||
else {
|
||||
return Qundef;
|
||||
}
|
||||
}
|
||||
|
||||
VALUE
|
||||
rb_vm_opt_aset_with(VALUE recv, VALUE key, VALUE value)
|
||||
{
|
||||
return vm_opt_aset_with(recv, key, value);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
vm_opt_length(VALUE recv, int bop)
|
||||
{
|
||||
|
||||
1
yjit.rb
1
yjit.rb
@ -322,7 +322,6 @@ module RubyVM::YJIT
|
||||
leave
|
||||
objtostring
|
||||
opt_aref
|
||||
opt_aref_with
|
||||
opt_aset
|
||||
opt_case_dispatch
|
||||
opt_div
|
||||
|
||||
@ -3888,40 +3888,6 @@ fn gen_opt_aref(
|
||||
}
|
||||
}
|
||||
|
||||
fn gen_opt_aset_with(
|
||||
jit: &mut JITState,
|
||||
asm: &mut Assembler,
|
||||
) -> Option<CodegenStatus> {
|
||||
// We might allocate or raise
|
||||
jit_prepare_non_leaf_call(jit, asm);
|
||||
|
||||
let key_opnd = Opnd::Value(jit.get_arg(0));
|
||||
let recv_opnd = asm.stack_opnd(1);
|
||||
let value_opnd = asm.stack_opnd(0);
|
||||
|
||||
extern "C" {
|
||||
fn rb_vm_opt_aset_with(recv: VALUE, key: VALUE, value: VALUE) -> VALUE;
|
||||
}
|
||||
|
||||
let val_opnd = asm.ccall(
|
||||
rb_vm_opt_aset_with as *const u8,
|
||||
vec![
|
||||
recv_opnd,
|
||||
key_opnd,
|
||||
value_opnd,
|
||||
],
|
||||
);
|
||||
asm.stack_pop(2); // Keep it on stack during GC
|
||||
|
||||
asm.cmp(val_opnd, Qundef.into());
|
||||
asm.je(Target::side_exit(Counter::opt_aset_with_qundef));
|
||||
|
||||
let top = asm.stack_push(Type::Unknown);
|
||||
asm.mov(top, val_opnd);
|
||||
|
||||
return Some(KeepCompiling);
|
||||
}
|
||||
|
||||
fn gen_opt_aset(
|
||||
jit: &mut JITState,
|
||||
asm: &mut Assembler,
|
||||
@ -4017,38 +3983,6 @@ fn gen_opt_aset(
|
||||
}
|
||||
}
|
||||
|
||||
fn gen_opt_aref_with(
|
||||
jit: &mut JITState,
|
||||
asm: &mut Assembler,
|
||||
) -> Option<CodegenStatus>{
|
||||
// We might allocate or raise
|
||||
jit_prepare_non_leaf_call(jit, asm);
|
||||
|
||||
let key_opnd = Opnd::Value(jit.get_arg(0));
|
||||
let recv_opnd = asm.stack_opnd(0);
|
||||
|
||||
extern "C" {
|
||||
fn rb_vm_opt_aref_with(recv: VALUE, key: VALUE) -> VALUE;
|
||||
}
|
||||
|
||||
let val_opnd = asm.ccall(
|
||||
rb_vm_opt_aref_with as *const u8,
|
||||
vec![
|
||||
recv_opnd,
|
||||
key_opnd
|
||||
],
|
||||
);
|
||||
asm.stack_pop(1); // Keep it on stack during GC
|
||||
|
||||
asm.cmp(val_opnd, Qundef.into());
|
||||
asm.je(Target::side_exit(Counter::opt_aref_with_qundef));
|
||||
|
||||
let top = asm.stack_push(Type::Unknown);
|
||||
asm.mov(top, val_opnd);
|
||||
|
||||
return Some(KeepCompiling);
|
||||
}
|
||||
|
||||
fn gen_opt_and(
|
||||
jit: &mut JITState,
|
||||
asm: &mut Assembler,
|
||||
@ -10792,8 +10726,6 @@ fn get_gen_fn(opcode: VALUE) -> Option<InsnGenFn> {
|
||||
YARVINSN_opt_neq => Some(gen_opt_neq),
|
||||
YARVINSN_opt_aref => Some(gen_opt_aref),
|
||||
YARVINSN_opt_aset => Some(gen_opt_aset),
|
||||
YARVINSN_opt_aref_with => Some(gen_opt_aref_with),
|
||||
YARVINSN_opt_aset_with => Some(gen_opt_aset_with),
|
||||
YARVINSN_opt_mult => Some(gen_opt_mult),
|
||||
YARVINSN_opt_div => Some(gen_opt_div),
|
||||
YARVINSN_opt_ltlt => Some(gen_opt_ltlt),
|
||||
|
||||
254
yjit/src/cruby_bindings.inc.rs
generated
254
yjit/src/cruby_bindings.inc.rs
generated
@ -846,135 +846,131 @@ pub const YARVINSN_opt_and: ruby_vminsn_type = 90;
|
||||
pub const YARVINSN_opt_or: ruby_vminsn_type = 91;
|
||||
pub const YARVINSN_opt_aref: ruby_vminsn_type = 92;
|
||||
pub const YARVINSN_opt_aset: ruby_vminsn_type = 93;
|
||||
pub const YARVINSN_opt_aset_with: ruby_vminsn_type = 94;
|
||||
pub const YARVINSN_opt_aref_with: ruby_vminsn_type = 95;
|
||||
pub const YARVINSN_opt_length: ruby_vminsn_type = 96;
|
||||
pub const YARVINSN_opt_size: ruby_vminsn_type = 97;
|
||||
pub const YARVINSN_opt_empty_p: ruby_vminsn_type = 98;
|
||||
pub const YARVINSN_opt_succ: ruby_vminsn_type = 99;
|
||||
pub const YARVINSN_opt_not: ruby_vminsn_type = 100;
|
||||
pub const YARVINSN_opt_regexpmatch2: ruby_vminsn_type = 101;
|
||||
pub const YARVINSN_invokebuiltin: ruby_vminsn_type = 102;
|
||||
pub const YARVINSN_opt_invokebuiltin_delegate: ruby_vminsn_type = 103;
|
||||
pub const YARVINSN_opt_invokebuiltin_delegate_leave: ruby_vminsn_type = 104;
|
||||
pub const YARVINSN_getlocal_WC_0: ruby_vminsn_type = 105;
|
||||
pub const YARVINSN_getlocal_WC_1: ruby_vminsn_type = 106;
|
||||
pub const YARVINSN_setlocal_WC_0: ruby_vminsn_type = 107;
|
||||
pub const YARVINSN_setlocal_WC_1: ruby_vminsn_type = 108;
|
||||
pub const YARVINSN_putobject_INT2FIX_0_: ruby_vminsn_type = 109;
|
||||
pub const YARVINSN_putobject_INT2FIX_1_: ruby_vminsn_type = 110;
|
||||
pub const YARVINSN_trace_nop: ruby_vminsn_type = 111;
|
||||
pub const YARVINSN_trace_getlocal: ruby_vminsn_type = 112;
|
||||
pub const YARVINSN_trace_setlocal: ruby_vminsn_type = 113;
|
||||
pub const YARVINSN_trace_getblockparam: ruby_vminsn_type = 114;
|
||||
pub const YARVINSN_trace_setblockparam: ruby_vminsn_type = 115;
|
||||
pub const YARVINSN_trace_getblockparamproxy: ruby_vminsn_type = 116;
|
||||
pub const YARVINSN_trace_getspecial: ruby_vminsn_type = 117;
|
||||
pub const YARVINSN_trace_setspecial: ruby_vminsn_type = 118;
|
||||
pub const YARVINSN_trace_getinstancevariable: ruby_vminsn_type = 119;
|
||||
pub const YARVINSN_trace_setinstancevariable: ruby_vminsn_type = 120;
|
||||
pub const YARVINSN_trace_getclassvariable: ruby_vminsn_type = 121;
|
||||
pub const YARVINSN_trace_setclassvariable: ruby_vminsn_type = 122;
|
||||
pub const YARVINSN_trace_opt_getconstant_path: ruby_vminsn_type = 123;
|
||||
pub const YARVINSN_trace_getconstant: ruby_vminsn_type = 124;
|
||||
pub const YARVINSN_trace_setconstant: ruby_vminsn_type = 125;
|
||||
pub const YARVINSN_trace_getglobal: ruby_vminsn_type = 126;
|
||||
pub const YARVINSN_trace_setglobal: ruby_vminsn_type = 127;
|
||||
pub const YARVINSN_trace_putnil: ruby_vminsn_type = 128;
|
||||
pub const YARVINSN_trace_putself: ruby_vminsn_type = 129;
|
||||
pub const YARVINSN_trace_putobject: ruby_vminsn_type = 130;
|
||||
pub const YARVINSN_trace_putspecialobject: ruby_vminsn_type = 131;
|
||||
pub const YARVINSN_trace_putstring: ruby_vminsn_type = 132;
|
||||
pub const YARVINSN_trace_putchilledstring: ruby_vminsn_type = 133;
|
||||
pub const YARVINSN_trace_concatstrings: ruby_vminsn_type = 134;
|
||||
pub const YARVINSN_trace_anytostring: ruby_vminsn_type = 135;
|
||||
pub const YARVINSN_trace_toregexp: ruby_vminsn_type = 136;
|
||||
pub const YARVINSN_trace_intern: ruby_vminsn_type = 137;
|
||||
pub const YARVINSN_trace_newarray: ruby_vminsn_type = 138;
|
||||
pub const YARVINSN_trace_pushtoarraykwsplat: ruby_vminsn_type = 139;
|
||||
pub const YARVINSN_trace_duparray: ruby_vminsn_type = 140;
|
||||
pub const YARVINSN_trace_duphash: ruby_vminsn_type = 141;
|
||||
pub const YARVINSN_trace_expandarray: ruby_vminsn_type = 142;
|
||||
pub const YARVINSN_trace_concatarray: ruby_vminsn_type = 143;
|
||||
pub const YARVINSN_trace_concattoarray: ruby_vminsn_type = 144;
|
||||
pub const YARVINSN_trace_pushtoarray: ruby_vminsn_type = 145;
|
||||
pub const YARVINSN_trace_splatarray: ruby_vminsn_type = 146;
|
||||
pub const YARVINSN_trace_splatkw: ruby_vminsn_type = 147;
|
||||
pub const YARVINSN_trace_newhash: ruby_vminsn_type = 148;
|
||||
pub const YARVINSN_trace_newrange: ruby_vminsn_type = 149;
|
||||
pub const YARVINSN_trace_pop: ruby_vminsn_type = 150;
|
||||
pub const YARVINSN_trace_dup: ruby_vminsn_type = 151;
|
||||
pub const YARVINSN_trace_dupn: ruby_vminsn_type = 152;
|
||||
pub const YARVINSN_trace_swap: ruby_vminsn_type = 153;
|
||||
pub const YARVINSN_trace_opt_reverse: ruby_vminsn_type = 154;
|
||||
pub const YARVINSN_trace_topn: ruby_vminsn_type = 155;
|
||||
pub const YARVINSN_trace_setn: ruby_vminsn_type = 156;
|
||||
pub const YARVINSN_trace_adjuststack: ruby_vminsn_type = 157;
|
||||
pub const YARVINSN_trace_defined: ruby_vminsn_type = 158;
|
||||
pub const YARVINSN_trace_definedivar: ruby_vminsn_type = 159;
|
||||
pub const YARVINSN_trace_checkmatch: ruby_vminsn_type = 160;
|
||||
pub const YARVINSN_trace_checkkeyword: ruby_vminsn_type = 161;
|
||||
pub const YARVINSN_trace_checktype: ruby_vminsn_type = 162;
|
||||
pub const YARVINSN_trace_defineclass: ruby_vminsn_type = 163;
|
||||
pub const YARVINSN_trace_definemethod: ruby_vminsn_type = 164;
|
||||
pub const YARVINSN_trace_definesmethod: ruby_vminsn_type = 165;
|
||||
pub const YARVINSN_trace_send: ruby_vminsn_type = 166;
|
||||
pub const YARVINSN_trace_sendforward: ruby_vminsn_type = 167;
|
||||
pub const YARVINSN_trace_opt_send_without_block: ruby_vminsn_type = 168;
|
||||
pub const YARVINSN_trace_opt_new: ruby_vminsn_type = 169;
|
||||
pub const YARVINSN_trace_objtostring: ruby_vminsn_type = 170;
|
||||
pub const YARVINSN_trace_opt_ary_freeze: ruby_vminsn_type = 171;
|
||||
pub const YARVINSN_trace_opt_hash_freeze: ruby_vminsn_type = 172;
|
||||
pub const YARVINSN_trace_opt_str_freeze: ruby_vminsn_type = 173;
|
||||
pub const YARVINSN_trace_opt_nil_p: ruby_vminsn_type = 174;
|
||||
pub const YARVINSN_trace_opt_str_uminus: ruby_vminsn_type = 175;
|
||||
pub const YARVINSN_trace_opt_duparray_send: ruby_vminsn_type = 176;
|
||||
pub const YARVINSN_trace_opt_newarray_send: ruby_vminsn_type = 177;
|
||||
pub const YARVINSN_trace_invokesuper: ruby_vminsn_type = 178;
|
||||
pub const YARVINSN_trace_invokesuperforward: ruby_vminsn_type = 179;
|
||||
pub const YARVINSN_trace_invokeblock: ruby_vminsn_type = 180;
|
||||
pub const YARVINSN_trace_leave: ruby_vminsn_type = 181;
|
||||
pub const YARVINSN_trace_throw: ruby_vminsn_type = 182;
|
||||
pub const YARVINSN_trace_jump: ruby_vminsn_type = 183;
|
||||
pub const YARVINSN_trace_branchif: ruby_vminsn_type = 184;
|
||||
pub const YARVINSN_trace_branchunless: ruby_vminsn_type = 185;
|
||||
pub const YARVINSN_trace_branchnil: ruby_vminsn_type = 186;
|
||||
pub const YARVINSN_trace_once: ruby_vminsn_type = 187;
|
||||
pub const YARVINSN_trace_opt_case_dispatch: ruby_vminsn_type = 188;
|
||||
pub const YARVINSN_trace_opt_plus: ruby_vminsn_type = 189;
|
||||
pub const YARVINSN_trace_opt_minus: ruby_vminsn_type = 190;
|
||||
pub const YARVINSN_trace_opt_mult: ruby_vminsn_type = 191;
|
||||
pub const YARVINSN_trace_opt_div: ruby_vminsn_type = 192;
|
||||
pub const YARVINSN_trace_opt_mod: ruby_vminsn_type = 193;
|
||||
pub const YARVINSN_trace_opt_eq: ruby_vminsn_type = 194;
|
||||
pub const YARVINSN_trace_opt_neq: ruby_vminsn_type = 195;
|
||||
pub const YARVINSN_trace_opt_lt: ruby_vminsn_type = 196;
|
||||
pub const YARVINSN_trace_opt_le: ruby_vminsn_type = 197;
|
||||
pub const YARVINSN_trace_opt_gt: ruby_vminsn_type = 198;
|
||||
pub const YARVINSN_trace_opt_ge: ruby_vminsn_type = 199;
|
||||
pub const YARVINSN_trace_opt_ltlt: ruby_vminsn_type = 200;
|
||||
pub const YARVINSN_trace_opt_and: ruby_vminsn_type = 201;
|
||||
pub const YARVINSN_trace_opt_or: ruby_vminsn_type = 202;
|
||||
pub const YARVINSN_trace_opt_aref: ruby_vminsn_type = 203;
|
||||
pub const YARVINSN_trace_opt_aset: ruby_vminsn_type = 204;
|
||||
pub const YARVINSN_trace_opt_aset_with: ruby_vminsn_type = 205;
|
||||
pub const YARVINSN_trace_opt_aref_with: ruby_vminsn_type = 206;
|
||||
pub const YARVINSN_trace_opt_length: ruby_vminsn_type = 207;
|
||||
pub const YARVINSN_trace_opt_size: ruby_vminsn_type = 208;
|
||||
pub const YARVINSN_trace_opt_empty_p: ruby_vminsn_type = 209;
|
||||
pub const YARVINSN_trace_opt_succ: ruby_vminsn_type = 210;
|
||||
pub const YARVINSN_trace_opt_not: ruby_vminsn_type = 211;
|
||||
pub const YARVINSN_trace_opt_regexpmatch2: ruby_vminsn_type = 212;
|
||||
pub const YARVINSN_trace_invokebuiltin: ruby_vminsn_type = 213;
|
||||
pub const YARVINSN_trace_opt_invokebuiltin_delegate: ruby_vminsn_type = 214;
|
||||
pub const YARVINSN_trace_opt_invokebuiltin_delegate_leave: ruby_vminsn_type = 215;
|
||||
pub const YARVINSN_trace_getlocal_WC_0: ruby_vminsn_type = 216;
|
||||
pub const YARVINSN_trace_getlocal_WC_1: ruby_vminsn_type = 217;
|
||||
pub const YARVINSN_trace_setlocal_WC_0: ruby_vminsn_type = 218;
|
||||
pub const YARVINSN_trace_setlocal_WC_1: ruby_vminsn_type = 219;
|
||||
pub const YARVINSN_trace_putobject_INT2FIX_0_: ruby_vminsn_type = 220;
|
||||
pub const YARVINSN_trace_putobject_INT2FIX_1_: ruby_vminsn_type = 221;
|
||||
pub const VM_INSTRUCTION_SIZE: ruby_vminsn_type = 222;
|
||||
pub const YARVINSN_opt_length: ruby_vminsn_type = 94;
|
||||
pub const YARVINSN_opt_size: ruby_vminsn_type = 95;
|
||||
pub const YARVINSN_opt_empty_p: ruby_vminsn_type = 96;
|
||||
pub const YARVINSN_opt_succ: ruby_vminsn_type = 97;
|
||||
pub const YARVINSN_opt_not: ruby_vminsn_type = 98;
|
||||
pub const YARVINSN_opt_regexpmatch2: ruby_vminsn_type = 99;
|
||||
pub const YARVINSN_invokebuiltin: ruby_vminsn_type = 100;
|
||||
pub const YARVINSN_opt_invokebuiltin_delegate: ruby_vminsn_type = 101;
|
||||
pub const YARVINSN_opt_invokebuiltin_delegate_leave: ruby_vminsn_type = 102;
|
||||
pub const YARVINSN_getlocal_WC_0: ruby_vminsn_type = 103;
|
||||
pub const YARVINSN_getlocal_WC_1: ruby_vminsn_type = 104;
|
||||
pub const YARVINSN_setlocal_WC_0: ruby_vminsn_type = 105;
|
||||
pub const YARVINSN_setlocal_WC_1: ruby_vminsn_type = 106;
|
||||
pub const YARVINSN_putobject_INT2FIX_0_: ruby_vminsn_type = 107;
|
||||
pub const YARVINSN_putobject_INT2FIX_1_: ruby_vminsn_type = 108;
|
||||
pub const YARVINSN_trace_nop: ruby_vminsn_type = 109;
|
||||
pub const YARVINSN_trace_getlocal: ruby_vminsn_type = 110;
|
||||
pub const YARVINSN_trace_setlocal: ruby_vminsn_type = 111;
|
||||
pub const YARVINSN_trace_getblockparam: ruby_vminsn_type = 112;
|
||||
pub const YARVINSN_trace_setblockparam: ruby_vminsn_type = 113;
|
||||
pub const YARVINSN_trace_getblockparamproxy: ruby_vminsn_type = 114;
|
||||
pub const YARVINSN_trace_getspecial: ruby_vminsn_type = 115;
|
||||
pub const YARVINSN_trace_setspecial: ruby_vminsn_type = 116;
|
||||
pub const YARVINSN_trace_getinstancevariable: ruby_vminsn_type = 117;
|
||||
pub const YARVINSN_trace_setinstancevariable: ruby_vminsn_type = 118;
|
||||
pub const YARVINSN_trace_getclassvariable: ruby_vminsn_type = 119;
|
||||
pub const YARVINSN_trace_setclassvariable: ruby_vminsn_type = 120;
|
||||
pub const YARVINSN_trace_opt_getconstant_path: ruby_vminsn_type = 121;
|
||||
pub const YARVINSN_trace_getconstant: ruby_vminsn_type = 122;
|
||||
pub const YARVINSN_trace_setconstant: ruby_vminsn_type = 123;
|
||||
pub const YARVINSN_trace_getglobal: ruby_vminsn_type = 124;
|
||||
pub const YARVINSN_trace_setglobal: ruby_vminsn_type = 125;
|
||||
pub const YARVINSN_trace_putnil: ruby_vminsn_type = 126;
|
||||
pub const YARVINSN_trace_putself: ruby_vminsn_type = 127;
|
||||
pub const YARVINSN_trace_putobject: ruby_vminsn_type = 128;
|
||||
pub const YARVINSN_trace_putspecialobject: ruby_vminsn_type = 129;
|
||||
pub const YARVINSN_trace_putstring: ruby_vminsn_type = 130;
|
||||
pub const YARVINSN_trace_putchilledstring: ruby_vminsn_type = 131;
|
||||
pub const YARVINSN_trace_concatstrings: ruby_vminsn_type = 132;
|
||||
pub const YARVINSN_trace_anytostring: ruby_vminsn_type = 133;
|
||||
pub const YARVINSN_trace_toregexp: ruby_vminsn_type = 134;
|
||||
pub const YARVINSN_trace_intern: ruby_vminsn_type = 135;
|
||||
pub const YARVINSN_trace_newarray: ruby_vminsn_type = 136;
|
||||
pub const YARVINSN_trace_pushtoarraykwsplat: ruby_vminsn_type = 137;
|
||||
pub const YARVINSN_trace_duparray: ruby_vminsn_type = 138;
|
||||
pub const YARVINSN_trace_duphash: ruby_vminsn_type = 139;
|
||||
pub const YARVINSN_trace_expandarray: ruby_vminsn_type = 140;
|
||||
pub const YARVINSN_trace_concatarray: ruby_vminsn_type = 141;
|
||||
pub const YARVINSN_trace_concattoarray: ruby_vminsn_type = 142;
|
||||
pub const YARVINSN_trace_pushtoarray: ruby_vminsn_type = 143;
|
||||
pub const YARVINSN_trace_splatarray: ruby_vminsn_type = 144;
|
||||
pub const YARVINSN_trace_splatkw: ruby_vminsn_type = 145;
|
||||
pub const YARVINSN_trace_newhash: ruby_vminsn_type = 146;
|
||||
pub const YARVINSN_trace_newrange: ruby_vminsn_type = 147;
|
||||
pub const YARVINSN_trace_pop: ruby_vminsn_type = 148;
|
||||
pub const YARVINSN_trace_dup: ruby_vminsn_type = 149;
|
||||
pub const YARVINSN_trace_dupn: ruby_vminsn_type = 150;
|
||||
pub const YARVINSN_trace_swap: ruby_vminsn_type = 151;
|
||||
pub const YARVINSN_trace_opt_reverse: ruby_vminsn_type = 152;
|
||||
pub const YARVINSN_trace_topn: ruby_vminsn_type = 153;
|
||||
pub const YARVINSN_trace_setn: ruby_vminsn_type = 154;
|
||||
pub const YARVINSN_trace_adjuststack: ruby_vminsn_type = 155;
|
||||
pub const YARVINSN_trace_defined: ruby_vminsn_type = 156;
|
||||
pub const YARVINSN_trace_definedivar: ruby_vminsn_type = 157;
|
||||
pub const YARVINSN_trace_checkmatch: ruby_vminsn_type = 158;
|
||||
pub const YARVINSN_trace_checkkeyword: ruby_vminsn_type = 159;
|
||||
pub const YARVINSN_trace_checktype: ruby_vminsn_type = 160;
|
||||
pub const YARVINSN_trace_defineclass: ruby_vminsn_type = 161;
|
||||
pub const YARVINSN_trace_definemethod: ruby_vminsn_type = 162;
|
||||
pub const YARVINSN_trace_definesmethod: ruby_vminsn_type = 163;
|
||||
pub const YARVINSN_trace_send: ruby_vminsn_type = 164;
|
||||
pub const YARVINSN_trace_sendforward: ruby_vminsn_type = 165;
|
||||
pub const YARVINSN_trace_opt_send_without_block: ruby_vminsn_type = 166;
|
||||
pub const YARVINSN_trace_opt_new: ruby_vminsn_type = 167;
|
||||
pub const YARVINSN_trace_objtostring: ruby_vminsn_type = 168;
|
||||
pub const YARVINSN_trace_opt_ary_freeze: ruby_vminsn_type = 169;
|
||||
pub const YARVINSN_trace_opt_hash_freeze: ruby_vminsn_type = 170;
|
||||
pub const YARVINSN_trace_opt_str_freeze: ruby_vminsn_type = 171;
|
||||
pub const YARVINSN_trace_opt_nil_p: ruby_vminsn_type = 172;
|
||||
pub const YARVINSN_trace_opt_str_uminus: ruby_vminsn_type = 173;
|
||||
pub const YARVINSN_trace_opt_duparray_send: ruby_vminsn_type = 174;
|
||||
pub const YARVINSN_trace_opt_newarray_send: ruby_vminsn_type = 175;
|
||||
pub const YARVINSN_trace_invokesuper: ruby_vminsn_type = 176;
|
||||
pub const YARVINSN_trace_invokesuperforward: ruby_vminsn_type = 177;
|
||||
pub const YARVINSN_trace_invokeblock: ruby_vminsn_type = 178;
|
||||
pub const YARVINSN_trace_leave: ruby_vminsn_type = 179;
|
||||
pub const YARVINSN_trace_throw: ruby_vminsn_type = 180;
|
||||
pub const YARVINSN_trace_jump: ruby_vminsn_type = 181;
|
||||
pub const YARVINSN_trace_branchif: ruby_vminsn_type = 182;
|
||||
pub const YARVINSN_trace_branchunless: ruby_vminsn_type = 183;
|
||||
pub const YARVINSN_trace_branchnil: ruby_vminsn_type = 184;
|
||||
pub const YARVINSN_trace_once: ruby_vminsn_type = 185;
|
||||
pub const YARVINSN_trace_opt_case_dispatch: ruby_vminsn_type = 186;
|
||||
pub const YARVINSN_trace_opt_plus: ruby_vminsn_type = 187;
|
||||
pub const YARVINSN_trace_opt_minus: ruby_vminsn_type = 188;
|
||||
pub const YARVINSN_trace_opt_mult: ruby_vminsn_type = 189;
|
||||
pub const YARVINSN_trace_opt_div: ruby_vminsn_type = 190;
|
||||
pub const YARVINSN_trace_opt_mod: ruby_vminsn_type = 191;
|
||||
pub const YARVINSN_trace_opt_eq: ruby_vminsn_type = 192;
|
||||
pub const YARVINSN_trace_opt_neq: ruby_vminsn_type = 193;
|
||||
pub const YARVINSN_trace_opt_lt: ruby_vminsn_type = 194;
|
||||
pub const YARVINSN_trace_opt_le: ruby_vminsn_type = 195;
|
||||
pub const YARVINSN_trace_opt_gt: ruby_vminsn_type = 196;
|
||||
pub const YARVINSN_trace_opt_ge: ruby_vminsn_type = 197;
|
||||
pub const YARVINSN_trace_opt_ltlt: ruby_vminsn_type = 198;
|
||||
pub const YARVINSN_trace_opt_and: ruby_vminsn_type = 199;
|
||||
pub const YARVINSN_trace_opt_or: ruby_vminsn_type = 200;
|
||||
pub const YARVINSN_trace_opt_aref: ruby_vminsn_type = 201;
|
||||
pub const YARVINSN_trace_opt_aset: ruby_vminsn_type = 202;
|
||||
pub const YARVINSN_trace_opt_length: ruby_vminsn_type = 203;
|
||||
pub const YARVINSN_trace_opt_size: ruby_vminsn_type = 204;
|
||||
pub const YARVINSN_trace_opt_empty_p: ruby_vminsn_type = 205;
|
||||
pub const YARVINSN_trace_opt_succ: ruby_vminsn_type = 206;
|
||||
pub const YARVINSN_trace_opt_not: ruby_vminsn_type = 207;
|
||||
pub const YARVINSN_trace_opt_regexpmatch2: ruby_vminsn_type = 208;
|
||||
pub const YARVINSN_trace_invokebuiltin: ruby_vminsn_type = 209;
|
||||
pub const YARVINSN_trace_opt_invokebuiltin_delegate: ruby_vminsn_type = 210;
|
||||
pub const YARVINSN_trace_opt_invokebuiltin_delegate_leave: ruby_vminsn_type = 211;
|
||||
pub const YARVINSN_trace_getlocal_WC_0: ruby_vminsn_type = 212;
|
||||
pub const YARVINSN_trace_getlocal_WC_1: ruby_vminsn_type = 213;
|
||||
pub const YARVINSN_trace_setlocal_WC_0: ruby_vminsn_type = 214;
|
||||
pub const YARVINSN_trace_setlocal_WC_1: ruby_vminsn_type = 215;
|
||||
pub const YARVINSN_trace_putobject_INT2FIX_0_: ruby_vminsn_type = 216;
|
||||
pub const YARVINSN_trace_putobject_INT2FIX_1_: ruby_vminsn_type = 217;
|
||||
pub const VM_INSTRUCTION_SIZE: ruby_vminsn_type = 218;
|
||||
pub type ruby_vminsn_type = u32;
|
||||
pub type rb_iseq_callback = ::std::option::Option<
|
||||
unsafe extern "C" fn(arg1: *const rb_iseq_t, arg2: *mut ::std::os::raw::c_void),
|
||||
|
||||
@ -519,9 +519,6 @@ make_counters! {
|
||||
opt_aset_not_fixnum,
|
||||
opt_aset_not_hash,
|
||||
|
||||
opt_aref_with_qundef,
|
||||
opt_aset_with_qundef,
|
||||
|
||||
opt_case_dispatch_megamorphic,
|
||||
|
||||
opt_getconstant_path_ic_miss,
|
||||
|
||||
284
zjit/src/cruby_bindings.inc.rs
generated
284
zjit/src/cruby_bindings.inc.rs
generated
@ -557,150 +557,146 @@ pub const YARVINSN_opt_and: ruby_vminsn_type = 90;
|
||||
pub const YARVINSN_opt_or: ruby_vminsn_type = 91;
|
||||
pub const YARVINSN_opt_aref: ruby_vminsn_type = 92;
|
||||
pub const YARVINSN_opt_aset: ruby_vminsn_type = 93;
|
||||
pub const YARVINSN_opt_aset_with: ruby_vminsn_type = 94;
|
||||
pub const YARVINSN_opt_aref_with: ruby_vminsn_type = 95;
|
||||
pub const YARVINSN_opt_length: ruby_vminsn_type = 96;
|
||||
pub const YARVINSN_opt_size: ruby_vminsn_type = 97;
|
||||
pub const YARVINSN_opt_empty_p: ruby_vminsn_type = 98;
|
||||
pub const YARVINSN_opt_succ: ruby_vminsn_type = 99;
|
||||
pub const YARVINSN_opt_not: ruby_vminsn_type = 100;
|
||||
pub const YARVINSN_opt_regexpmatch2: ruby_vminsn_type = 101;
|
||||
pub const YARVINSN_invokebuiltin: ruby_vminsn_type = 102;
|
||||
pub const YARVINSN_opt_invokebuiltin_delegate: ruby_vminsn_type = 103;
|
||||
pub const YARVINSN_opt_invokebuiltin_delegate_leave: ruby_vminsn_type = 104;
|
||||
pub const YARVINSN_getlocal_WC_0: ruby_vminsn_type = 105;
|
||||
pub const YARVINSN_getlocal_WC_1: ruby_vminsn_type = 106;
|
||||
pub const YARVINSN_setlocal_WC_0: ruby_vminsn_type = 107;
|
||||
pub const YARVINSN_setlocal_WC_1: ruby_vminsn_type = 108;
|
||||
pub const YARVINSN_putobject_INT2FIX_0_: ruby_vminsn_type = 109;
|
||||
pub const YARVINSN_putobject_INT2FIX_1_: ruby_vminsn_type = 110;
|
||||
pub const YARVINSN_trace_nop: ruby_vminsn_type = 111;
|
||||
pub const YARVINSN_trace_getlocal: ruby_vminsn_type = 112;
|
||||
pub const YARVINSN_trace_setlocal: ruby_vminsn_type = 113;
|
||||
pub const YARVINSN_trace_getblockparam: ruby_vminsn_type = 114;
|
||||
pub const YARVINSN_trace_setblockparam: ruby_vminsn_type = 115;
|
||||
pub const YARVINSN_trace_getblockparamproxy: ruby_vminsn_type = 116;
|
||||
pub const YARVINSN_trace_getspecial: ruby_vminsn_type = 117;
|
||||
pub const YARVINSN_trace_setspecial: ruby_vminsn_type = 118;
|
||||
pub const YARVINSN_trace_getinstancevariable: ruby_vminsn_type = 119;
|
||||
pub const YARVINSN_trace_setinstancevariable: ruby_vminsn_type = 120;
|
||||
pub const YARVINSN_trace_getclassvariable: ruby_vminsn_type = 121;
|
||||
pub const YARVINSN_trace_setclassvariable: ruby_vminsn_type = 122;
|
||||
pub const YARVINSN_trace_opt_getconstant_path: ruby_vminsn_type = 123;
|
||||
pub const YARVINSN_trace_getconstant: ruby_vminsn_type = 124;
|
||||
pub const YARVINSN_trace_setconstant: ruby_vminsn_type = 125;
|
||||
pub const YARVINSN_trace_getglobal: ruby_vminsn_type = 126;
|
||||
pub const YARVINSN_trace_setglobal: ruby_vminsn_type = 127;
|
||||
pub const YARVINSN_trace_putnil: ruby_vminsn_type = 128;
|
||||
pub const YARVINSN_trace_putself: ruby_vminsn_type = 129;
|
||||
pub const YARVINSN_trace_putobject: ruby_vminsn_type = 130;
|
||||
pub const YARVINSN_trace_putspecialobject: ruby_vminsn_type = 131;
|
||||
pub const YARVINSN_trace_putstring: ruby_vminsn_type = 132;
|
||||
pub const YARVINSN_trace_putchilledstring: ruby_vminsn_type = 133;
|
||||
pub const YARVINSN_trace_concatstrings: ruby_vminsn_type = 134;
|
||||
pub const YARVINSN_trace_anytostring: ruby_vminsn_type = 135;
|
||||
pub const YARVINSN_trace_toregexp: ruby_vminsn_type = 136;
|
||||
pub const YARVINSN_trace_intern: ruby_vminsn_type = 137;
|
||||
pub const YARVINSN_trace_newarray: ruby_vminsn_type = 138;
|
||||
pub const YARVINSN_trace_pushtoarraykwsplat: ruby_vminsn_type = 139;
|
||||
pub const YARVINSN_trace_duparray: ruby_vminsn_type = 140;
|
||||
pub const YARVINSN_trace_duphash: ruby_vminsn_type = 141;
|
||||
pub const YARVINSN_trace_expandarray: ruby_vminsn_type = 142;
|
||||
pub const YARVINSN_trace_concatarray: ruby_vminsn_type = 143;
|
||||
pub const YARVINSN_trace_concattoarray: ruby_vminsn_type = 144;
|
||||
pub const YARVINSN_trace_pushtoarray: ruby_vminsn_type = 145;
|
||||
pub const YARVINSN_trace_splatarray: ruby_vminsn_type = 146;
|
||||
pub const YARVINSN_trace_splatkw: ruby_vminsn_type = 147;
|
||||
pub const YARVINSN_trace_newhash: ruby_vminsn_type = 148;
|
||||
pub const YARVINSN_trace_newrange: ruby_vminsn_type = 149;
|
||||
pub const YARVINSN_trace_pop: ruby_vminsn_type = 150;
|
||||
pub const YARVINSN_trace_dup: ruby_vminsn_type = 151;
|
||||
pub const YARVINSN_trace_dupn: ruby_vminsn_type = 152;
|
||||
pub const YARVINSN_trace_swap: ruby_vminsn_type = 153;
|
||||
pub const YARVINSN_trace_opt_reverse: ruby_vminsn_type = 154;
|
||||
pub const YARVINSN_trace_topn: ruby_vminsn_type = 155;
|
||||
pub const YARVINSN_trace_setn: ruby_vminsn_type = 156;
|
||||
pub const YARVINSN_trace_adjuststack: ruby_vminsn_type = 157;
|
||||
pub const YARVINSN_trace_defined: ruby_vminsn_type = 158;
|
||||
pub const YARVINSN_trace_definedivar: ruby_vminsn_type = 159;
|
||||
pub const YARVINSN_trace_checkmatch: ruby_vminsn_type = 160;
|
||||
pub const YARVINSN_trace_checkkeyword: ruby_vminsn_type = 161;
|
||||
pub const YARVINSN_trace_checktype: ruby_vminsn_type = 162;
|
||||
pub const YARVINSN_trace_defineclass: ruby_vminsn_type = 163;
|
||||
pub const YARVINSN_trace_definemethod: ruby_vminsn_type = 164;
|
||||
pub const YARVINSN_trace_definesmethod: ruby_vminsn_type = 165;
|
||||
pub const YARVINSN_trace_send: ruby_vminsn_type = 166;
|
||||
pub const YARVINSN_trace_sendforward: ruby_vminsn_type = 167;
|
||||
pub const YARVINSN_trace_opt_send_without_block: ruby_vminsn_type = 168;
|
||||
pub const YARVINSN_trace_opt_new: ruby_vminsn_type = 169;
|
||||
pub const YARVINSN_trace_objtostring: ruby_vminsn_type = 170;
|
||||
pub const YARVINSN_trace_opt_ary_freeze: ruby_vminsn_type = 171;
|
||||
pub const YARVINSN_trace_opt_hash_freeze: ruby_vminsn_type = 172;
|
||||
pub const YARVINSN_trace_opt_str_freeze: ruby_vminsn_type = 173;
|
||||
pub const YARVINSN_trace_opt_nil_p: ruby_vminsn_type = 174;
|
||||
pub const YARVINSN_trace_opt_str_uminus: ruby_vminsn_type = 175;
|
||||
pub const YARVINSN_trace_opt_duparray_send: ruby_vminsn_type = 176;
|
||||
pub const YARVINSN_trace_opt_newarray_send: ruby_vminsn_type = 177;
|
||||
pub const YARVINSN_trace_invokesuper: ruby_vminsn_type = 178;
|
||||
pub const YARVINSN_trace_invokesuperforward: ruby_vminsn_type = 179;
|
||||
pub const YARVINSN_trace_invokeblock: ruby_vminsn_type = 180;
|
||||
pub const YARVINSN_trace_leave: ruby_vminsn_type = 181;
|
||||
pub const YARVINSN_trace_throw: ruby_vminsn_type = 182;
|
||||
pub const YARVINSN_trace_jump: ruby_vminsn_type = 183;
|
||||
pub const YARVINSN_trace_branchif: ruby_vminsn_type = 184;
|
||||
pub const YARVINSN_trace_branchunless: ruby_vminsn_type = 185;
|
||||
pub const YARVINSN_trace_branchnil: ruby_vminsn_type = 186;
|
||||
pub const YARVINSN_trace_once: ruby_vminsn_type = 187;
|
||||
pub const YARVINSN_trace_opt_case_dispatch: ruby_vminsn_type = 188;
|
||||
pub const YARVINSN_trace_opt_plus: ruby_vminsn_type = 189;
|
||||
pub const YARVINSN_trace_opt_minus: ruby_vminsn_type = 190;
|
||||
pub const YARVINSN_trace_opt_mult: ruby_vminsn_type = 191;
|
||||
pub const YARVINSN_trace_opt_div: ruby_vminsn_type = 192;
|
||||
pub const YARVINSN_trace_opt_mod: ruby_vminsn_type = 193;
|
||||
pub const YARVINSN_trace_opt_eq: ruby_vminsn_type = 194;
|
||||
pub const YARVINSN_trace_opt_neq: ruby_vminsn_type = 195;
|
||||
pub const YARVINSN_trace_opt_lt: ruby_vminsn_type = 196;
|
||||
pub const YARVINSN_trace_opt_le: ruby_vminsn_type = 197;
|
||||
pub const YARVINSN_trace_opt_gt: ruby_vminsn_type = 198;
|
||||
pub const YARVINSN_trace_opt_ge: ruby_vminsn_type = 199;
|
||||
pub const YARVINSN_trace_opt_ltlt: ruby_vminsn_type = 200;
|
||||
pub const YARVINSN_trace_opt_and: ruby_vminsn_type = 201;
|
||||
pub const YARVINSN_trace_opt_or: ruby_vminsn_type = 202;
|
||||
pub const YARVINSN_trace_opt_aref: ruby_vminsn_type = 203;
|
||||
pub const YARVINSN_trace_opt_aset: ruby_vminsn_type = 204;
|
||||
pub const YARVINSN_trace_opt_aset_with: ruby_vminsn_type = 205;
|
||||
pub const YARVINSN_trace_opt_aref_with: ruby_vminsn_type = 206;
|
||||
pub const YARVINSN_trace_opt_length: ruby_vminsn_type = 207;
|
||||
pub const YARVINSN_trace_opt_size: ruby_vminsn_type = 208;
|
||||
pub const YARVINSN_trace_opt_empty_p: ruby_vminsn_type = 209;
|
||||
pub const YARVINSN_trace_opt_succ: ruby_vminsn_type = 210;
|
||||
pub const YARVINSN_trace_opt_not: ruby_vminsn_type = 211;
|
||||
pub const YARVINSN_trace_opt_regexpmatch2: ruby_vminsn_type = 212;
|
||||
pub const YARVINSN_trace_invokebuiltin: ruby_vminsn_type = 213;
|
||||
pub const YARVINSN_trace_opt_invokebuiltin_delegate: ruby_vminsn_type = 214;
|
||||
pub const YARVINSN_trace_opt_invokebuiltin_delegate_leave: ruby_vminsn_type = 215;
|
||||
pub const YARVINSN_trace_getlocal_WC_0: ruby_vminsn_type = 216;
|
||||
pub const YARVINSN_trace_getlocal_WC_1: ruby_vminsn_type = 217;
|
||||
pub const YARVINSN_trace_setlocal_WC_0: ruby_vminsn_type = 218;
|
||||
pub const YARVINSN_trace_setlocal_WC_1: ruby_vminsn_type = 219;
|
||||
pub const YARVINSN_trace_putobject_INT2FIX_0_: ruby_vminsn_type = 220;
|
||||
pub const YARVINSN_trace_putobject_INT2FIX_1_: ruby_vminsn_type = 221;
|
||||
pub const YARVINSN_zjit_opt_send_without_block: ruby_vminsn_type = 222;
|
||||
pub const YARVINSN_zjit_opt_nil_p: ruby_vminsn_type = 223;
|
||||
pub const YARVINSN_zjit_opt_plus: ruby_vminsn_type = 224;
|
||||
pub const YARVINSN_zjit_opt_minus: ruby_vminsn_type = 225;
|
||||
pub const YARVINSN_zjit_opt_mult: ruby_vminsn_type = 226;
|
||||
pub const YARVINSN_zjit_opt_div: ruby_vminsn_type = 227;
|
||||
pub const YARVINSN_zjit_opt_mod: ruby_vminsn_type = 228;
|
||||
pub const YARVINSN_zjit_opt_eq: ruby_vminsn_type = 229;
|
||||
pub const YARVINSN_zjit_opt_neq: ruby_vminsn_type = 230;
|
||||
pub const YARVINSN_zjit_opt_lt: ruby_vminsn_type = 231;
|
||||
pub const YARVINSN_zjit_opt_le: ruby_vminsn_type = 232;
|
||||
pub const YARVINSN_zjit_opt_gt: ruby_vminsn_type = 233;
|
||||
pub const YARVINSN_zjit_opt_ge: ruby_vminsn_type = 234;
|
||||
pub const YARVINSN_zjit_opt_and: ruby_vminsn_type = 235;
|
||||
pub const YARVINSN_zjit_opt_or: ruby_vminsn_type = 236;
|
||||
pub const VM_INSTRUCTION_SIZE: ruby_vminsn_type = 237;
|
||||
pub const YARVINSN_opt_length: ruby_vminsn_type = 94;
|
||||
pub const YARVINSN_opt_size: ruby_vminsn_type = 95;
|
||||
pub const YARVINSN_opt_empty_p: ruby_vminsn_type = 96;
|
||||
pub const YARVINSN_opt_succ: ruby_vminsn_type = 97;
|
||||
pub const YARVINSN_opt_not: ruby_vminsn_type = 98;
|
||||
pub const YARVINSN_opt_regexpmatch2: ruby_vminsn_type = 99;
|
||||
pub const YARVINSN_invokebuiltin: ruby_vminsn_type = 100;
|
||||
pub const YARVINSN_opt_invokebuiltin_delegate: ruby_vminsn_type = 101;
|
||||
pub const YARVINSN_opt_invokebuiltin_delegate_leave: ruby_vminsn_type = 102;
|
||||
pub const YARVINSN_getlocal_WC_0: ruby_vminsn_type = 103;
|
||||
pub const YARVINSN_getlocal_WC_1: ruby_vminsn_type = 104;
|
||||
pub const YARVINSN_setlocal_WC_0: ruby_vminsn_type = 105;
|
||||
pub const YARVINSN_setlocal_WC_1: ruby_vminsn_type = 106;
|
||||
pub const YARVINSN_putobject_INT2FIX_0_: ruby_vminsn_type = 107;
|
||||
pub const YARVINSN_putobject_INT2FIX_1_: ruby_vminsn_type = 108;
|
||||
pub const YARVINSN_trace_nop: ruby_vminsn_type = 109;
|
||||
pub const YARVINSN_trace_getlocal: ruby_vminsn_type = 110;
|
||||
pub const YARVINSN_trace_setlocal: ruby_vminsn_type = 111;
|
||||
pub const YARVINSN_trace_getblockparam: ruby_vminsn_type = 112;
|
||||
pub const YARVINSN_trace_setblockparam: ruby_vminsn_type = 113;
|
||||
pub const YARVINSN_trace_getblockparamproxy: ruby_vminsn_type = 114;
|
||||
pub const YARVINSN_trace_getspecial: ruby_vminsn_type = 115;
|
||||
pub const YARVINSN_trace_setspecial: ruby_vminsn_type = 116;
|
||||
pub const YARVINSN_trace_getinstancevariable: ruby_vminsn_type = 117;
|
||||
pub const YARVINSN_trace_setinstancevariable: ruby_vminsn_type = 118;
|
||||
pub const YARVINSN_trace_getclassvariable: ruby_vminsn_type = 119;
|
||||
pub const YARVINSN_trace_setclassvariable: ruby_vminsn_type = 120;
|
||||
pub const YARVINSN_trace_opt_getconstant_path: ruby_vminsn_type = 121;
|
||||
pub const YARVINSN_trace_getconstant: ruby_vminsn_type = 122;
|
||||
pub const YARVINSN_trace_setconstant: ruby_vminsn_type = 123;
|
||||
pub const YARVINSN_trace_getglobal: ruby_vminsn_type = 124;
|
||||
pub const YARVINSN_trace_setglobal: ruby_vminsn_type = 125;
|
||||
pub const YARVINSN_trace_putnil: ruby_vminsn_type = 126;
|
||||
pub const YARVINSN_trace_putself: ruby_vminsn_type = 127;
|
||||
pub const YARVINSN_trace_putobject: ruby_vminsn_type = 128;
|
||||
pub const YARVINSN_trace_putspecialobject: ruby_vminsn_type = 129;
|
||||
pub const YARVINSN_trace_putstring: ruby_vminsn_type = 130;
|
||||
pub const YARVINSN_trace_putchilledstring: ruby_vminsn_type = 131;
|
||||
pub const YARVINSN_trace_concatstrings: ruby_vminsn_type = 132;
|
||||
pub const YARVINSN_trace_anytostring: ruby_vminsn_type = 133;
|
||||
pub const YARVINSN_trace_toregexp: ruby_vminsn_type = 134;
|
||||
pub const YARVINSN_trace_intern: ruby_vminsn_type = 135;
|
||||
pub const YARVINSN_trace_newarray: ruby_vminsn_type = 136;
|
||||
pub const YARVINSN_trace_pushtoarraykwsplat: ruby_vminsn_type = 137;
|
||||
pub const YARVINSN_trace_duparray: ruby_vminsn_type = 138;
|
||||
pub const YARVINSN_trace_duphash: ruby_vminsn_type = 139;
|
||||
pub const YARVINSN_trace_expandarray: ruby_vminsn_type = 140;
|
||||
pub const YARVINSN_trace_concatarray: ruby_vminsn_type = 141;
|
||||
pub const YARVINSN_trace_concattoarray: ruby_vminsn_type = 142;
|
||||
pub const YARVINSN_trace_pushtoarray: ruby_vminsn_type = 143;
|
||||
pub const YARVINSN_trace_splatarray: ruby_vminsn_type = 144;
|
||||
pub const YARVINSN_trace_splatkw: ruby_vminsn_type = 145;
|
||||
pub const YARVINSN_trace_newhash: ruby_vminsn_type = 146;
|
||||
pub const YARVINSN_trace_newrange: ruby_vminsn_type = 147;
|
||||
pub const YARVINSN_trace_pop: ruby_vminsn_type = 148;
|
||||
pub const YARVINSN_trace_dup: ruby_vminsn_type = 149;
|
||||
pub const YARVINSN_trace_dupn: ruby_vminsn_type = 150;
|
||||
pub const YARVINSN_trace_swap: ruby_vminsn_type = 151;
|
||||
pub const YARVINSN_trace_opt_reverse: ruby_vminsn_type = 152;
|
||||
pub const YARVINSN_trace_topn: ruby_vminsn_type = 153;
|
||||
pub const YARVINSN_trace_setn: ruby_vminsn_type = 154;
|
||||
pub const YARVINSN_trace_adjuststack: ruby_vminsn_type = 155;
|
||||
pub const YARVINSN_trace_defined: ruby_vminsn_type = 156;
|
||||
pub const YARVINSN_trace_definedivar: ruby_vminsn_type = 157;
|
||||
pub const YARVINSN_trace_checkmatch: ruby_vminsn_type = 158;
|
||||
pub const YARVINSN_trace_checkkeyword: ruby_vminsn_type = 159;
|
||||
pub const YARVINSN_trace_checktype: ruby_vminsn_type = 160;
|
||||
pub const YARVINSN_trace_defineclass: ruby_vminsn_type = 161;
|
||||
pub const YARVINSN_trace_definemethod: ruby_vminsn_type = 162;
|
||||
pub const YARVINSN_trace_definesmethod: ruby_vminsn_type = 163;
|
||||
pub const YARVINSN_trace_send: ruby_vminsn_type = 164;
|
||||
pub const YARVINSN_trace_sendforward: ruby_vminsn_type = 165;
|
||||
pub const YARVINSN_trace_opt_send_without_block: ruby_vminsn_type = 166;
|
||||
pub const YARVINSN_trace_opt_new: ruby_vminsn_type = 167;
|
||||
pub const YARVINSN_trace_objtostring: ruby_vminsn_type = 168;
|
||||
pub const YARVINSN_trace_opt_ary_freeze: ruby_vminsn_type = 169;
|
||||
pub const YARVINSN_trace_opt_hash_freeze: ruby_vminsn_type = 170;
|
||||
pub const YARVINSN_trace_opt_str_freeze: ruby_vminsn_type = 171;
|
||||
pub const YARVINSN_trace_opt_nil_p: ruby_vminsn_type = 172;
|
||||
pub const YARVINSN_trace_opt_str_uminus: ruby_vminsn_type = 173;
|
||||
pub const YARVINSN_trace_opt_duparray_send: ruby_vminsn_type = 174;
|
||||
pub const YARVINSN_trace_opt_newarray_send: ruby_vminsn_type = 175;
|
||||
pub const YARVINSN_trace_invokesuper: ruby_vminsn_type = 176;
|
||||
pub const YARVINSN_trace_invokesuperforward: ruby_vminsn_type = 177;
|
||||
pub const YARVINSN_trace_invokeblock: ruby_vminsn_type = 178;
|
||||
pub const YARVINSN_trace_leave: ruby_vminsn_type = 179;
|
||||
pub const YARVINSN_trace_throw: ruby_vminsn_type = 180;
|
||||
pub const YARVINSN_trace_jump: ruby_vminsn_type = 181;
|
||||
pub const YARVINSN_trace_branchif: ruby_vminsn_type = 182;
|
||||
pub const YARVINSN_trace_branchunless: ruby_vminsn_type = 183;
|
||||
pub const YARVINSN_trace_branchnil: ruby_vminsn_type = 184;
|
||||
pub const YARVINSN_trace_once: ruby_vminsn_type = 185;
|
||||
pub const YARVINSN_trace_opt_case_dispatch: ruby_vminsn_type = 186;
|
||||
pub const YARVINSN_trace_opt_plus: ruby_vminsn_type = 187;
|
||||
pub const YARVINSN_trace_opt_minus: ruby_vminsn_type = 188;
|
||||
pub const YARVINSN_trace_opt_mult: ruby_vminsn_type = 189;
|
||||
pub const YARVINSN_trace_opt_div: ruby_vminsn_type = 190;
|
||||
pub const YARVINSN_trace_opt_mod: ruby_vminsn_type = 191;
|
||||
pub const YARVINSN_trace_opt_eq: ruby_vminsn_type = 192;
|
||||
pub const YARVINSN_trace_opt_neq: ruby_vminsn_type = 193;
|
||||
pub const YARVINSN_trace_opt_lt: ruby_vminsn_type = 194;
|
||||
pub const YARVINSN_trace_opt_le: ruby_vminsn_type = 195;
|
||||
pub const YARVINSN_trace_opt_gt: ruby_vminsn_type = 196;
|
||||
pub const YARVINSN_trace_opt_ge: ruby_vminsn_type = 197;
|
||||
pub const YARVINSN_trace_opt_ltlt: ruby_vminsn_type = 198;
|
||||
pub const YARVINSN_trace_opt_and: ruby_vminsn_type = 199;
|
||||
pub const YARVINSN_trace_opt_or: ruby_vminsn_type = 200;
|
||||
pub const YARVINSN_trace_opt_aref: ruby_vminsn_type = 201;
|
||||
pub const YARVINSN_trace_opt_aset: ruby_vminsn_type = 202;
|
||||
pub const YARVINSN_trace_opt_length: ruby_vminsn_type = 203;
|
||||
pub const YARVINSN_trace_opt_size: ruby_vminsn_type = 204;
|
||||
pub const YARVINSN_trace_opt_empty_p: ruby_vminsn_type = 205;
|
||||
pub const YARVINSN_trace_opt_succ: ruby_vminsn_type = 206;
|
||||
pub const YARVINSN_trace_opt_not: ruby_vminsn_type = 207;
|
||||
pub const YARVINSN_trace_opt_regexpmatch2: ruby_vminsn_type = 208;
|
||||
pub const YARVINSN_trace_invokebuiltin: ruby_vminsn_type = 209;
|
||||
pub const YARVINSN_trace_opt_invokebuiltin_delegate: ruby_vminsn_type = 210;
|
||||
pub const YARVINSN_trace_opt_invokebuiltin_delegate_leave: ruby_vminsn_type = 211;
|
||||
pub const YARVINSN_trace_getlocal_WC_0: ruby_vminsn_type = 212;
|
||||
pub const YARVINSN_trace_getlocal_WC_1: ruby_vminsn_type = 213;
|
||||
pub const YARVINSN_trace_setlocal_WC_0: ruby_vminsn_type = 214;
|
||||
pub const YARVINSN_trace_setlocal_WC_1: ruby_vminsn_type = 215;
|
||||
pub const YARVINSN_trace_putobject_INT2FIX_0_: ruby_vminsn_type = 216;
|
||||
pub const YARVINSN_trace_putobject_INT2FIX_1_: ruby_vminsn_type = 217;
|
||||
pub const YARVINSN_zjit_opt_send_without_block: ruby_vminsn_type = 218;
|
||||
pub const YARVINSN_zjit_opt_nil_p: ruby_vminsn_type = 219;
|
||||
pub const YARVINSN_zjit_opt_plus: ruby_vminsn_type = 220;
|
||||
pub const YARVINSN_zjit_opt_minus: ruby_vminsn_type = 221;
|
||||
pub const YARVINSN_zjit_opt_mult: ruby_vminsn_type = 222;
|
||||
pub const YARVINSN_zjit_opt_div: ruby_vminsn_type = 223;
|
||||
pub const YARVINSN_zjit_opt_mod: ruby_vminsn_type = 224;
|
||||
pub const YARVINSN_zjit_opt_eq: ruby_vminsn_type = 225;
|
||||
pub const YARVINSN_zjit_opt_neq: ruby_vminsn_type = 226;
|
||||
pub const YARVINSN_zjit_opt_lt: ruby_vminsn_type = 227;
|
||||
pub const YARVINSN_zjit_opt_le: ruby_vminsn_type = 228;
|
||||
pub const YARVINSN_zjit_opt_gt: ruby_vminsn_type = 229;
|
||||
pub const YARVINSN_zjit_opt_ge: ruby_vminsn_type = 230;
|
||||
pub const YARVINSN_zjit_opt_and: ruby_vminsn_type = 231;
|
||||
pub const YARVINSN_zjit_opt_or: ruby_vminsn_type = 232;
|
||||
pub const VM_INSTRUCTION_SIZE: ruby_vminsn_type = 233;
|
||||
pub type ruby_vminsn_type = u32;
|
||||
pub type rb_iseq_callback = ::std::option::Option<
|
||||
unsafe extern "C" fn(arg1: *const rb_iseq_t, arg2: *mut ::std::os::raw::c_void),
|
||||
|
||||
@ -3191,29 +3191,6 @@ pub fn iseq_to_hir(iseq: *const rb_iseq_t) -> Result<Function, ParseError> {
|
||||
n -= 1;
|
||||
}
|
||||
}
|
||||
YARVINSN_opt_aref_with => {
|
||||
// NB: opt_aref_with has an instruction argument for the call at get_arg(0)
|
||||
let cd: *const rb_call_data = get_arg(pc, 1).as_ptr();
|
||||
let call_info = unsafe { rb_get_call_data_ci(cd) };
|
||||
if unknown_call_type(unsafe { rb_vm_ci_flag(call_info) }) {
|
||||
// Unknown call type; side-exit into the interpreter
|
||||
let exit_id = fun.push_insn(block, Insn::Snapshot { state: exit_state });
|
||||
fun.push_insn(block, Insn::SideExit { state: exit_id, reason: SideExitReason::UnknownCallType });
|
||||
break; // End the block
|
||||
}
|
||||
let argc = unsafe { vm_ci_argc((*cd).ci) };
|
||||
|
||||
assert_eq!(1, argc, "opt_aref_with should only be emitted for argc=1");
|
||||
let aref_arg = fun.push_insn(block, Insn::Const { val: Const::Value(get_arg(pc, 0)) });
|
||||
let args = vec![aref_arg];
|
||||
|
||||
let mut send_state = state.clone();
|
||||
send_state.stack_push(aref_arg);
|
||||
let send_state = fun.push_insn(block, Insn::Snapshot { state: send_state });
|
||||
let recv = state.stack_pop()?;
|
||||
let send = fun.push_insn(block, Insn::SendWithoutBlock { self_val: recv, cd, args, state: send_state });
|
||||
state.stack_push(send);
|
||||
}
|
||||
YARVINSN_opt_neq => {
|
||||
// NB: opt_neq has two cd; get_arg(0) is for eq and get_arg(1) is for neq
|
||||
let cd: *const rb_call_data = get_arg(pc, 1).as_ptr();
|
||||
@ -5223,22 +5200,6 @@ mod tests {
|
||||
");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_aref_with() {
|
||||
eval("
|
||||
def test(a) = a['string lit triggers aref_with']
|
||||
");
|
||||
assert_contains_opcode("test", YARVINSN_opt_aref_with);
|
||||
assert_snapshot!(hir_string("test"), @r"
|
||||
fn test@<compiled>:2:
|
||||
bb0(v0:BasicObject, v1:BasicObject):
|
||||
v3:StringExact[VALUE(0x1000)] = Const Value(VALUE(0x1000))
|
||||
v5:BasicObject = SendWithoutBlock v1, :[], v3
|
||||
CheckInterrupts
|
||||
Return v5
|
||||
");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn opt_empty_p() {
|
||||
eval("
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user