Project

General

Profile

Bug #15522 » _ruby_mjit_p207u2.c

vo.x (Vit Ondruch), 01/10/2019 11:47 AM

 
#include "/tmp/_ruby_mjit_hp207u0.h"
/* block (2 levels) in foo@-e:7 */

VALUE
_mjit2(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp)
{
VALUE stack[2];
static const VALUE *const original_body_iseq = (VALUE *)0x26e3bc0;

label_0: /* nop */
{
MAYBE_UNUSED(unsigned int) stack_size = 0;
{
/* none */
}
}

label_1: /* getlocal */
{
MAYBE_UNUSED(unsigned int) stack_size = 0;
MAYBE_UNUSED(VALUE) val;
MAYBE_UNUSED(lindex_t) idx;
MAYBE_UNUSED(rb_num_t) level;
idx = (lindex_t)0x3;
level = (rb_num_t)0x2;
{
val = *(vm_get_ep(GET_EP(), level) - idx);
RB_DEBUG_COUNTER_INC(lvar_get);
(void)RB_DEBUG_COUNTER_INC_IF(lvar_get_dynamic, level > 0);
}
stack[0] = val;
}

label_4: /* getlocal_WC_0 */
{
MAYBE_UNUSED(unsigned int) stack_size = 1;
MAYBE_UNUSED(VALUE) val;
MAYBE_UNUSED(lindex_t) idx;
MAYBE_UNUSED(rb_num_t) level;
level = 0;
idx = (lindex_t)0x3;
{
val = *(vm_get_ep(GET_EP(), level) - idx);
RB_DEBUG_COUNTER_INC(lvar_get);
(void)RB_DEBUG_COUNTER_INC_IF(lvar_get_dynamic, level > 0);
}
stack[1] = val;
}

label_6: /* opt_mult */
{
MAYBE_UNUSED(unsigned int) stack_size = 2;
MAYBE_UNUSED(CALL_CACHE) cc;
MAYBE_UNUSED(CALL_INFO) ci;
MAYBE_UNUSED(VALUE) obj, recv, val;
ci = (CALL_INFO)0x26e2280;
cc = (CALL_CACHE)0x26e20e0;
recv = stack[0];
obj = stack[1];
{
val = vm_opt_mult(recv, obj);

if (val == Qundef) {
reg_cfp->sp = (VALUE *)reg_cfp->bp + 3;
reg_cfp->pc = original_body_iseq + 6;
goto cancel;
}
}
stack[0] = val;
}

label_9: /* dup */
{
MAYBE_UNUSED(unsigned int) stack_size = 1;
MAYBE_UNUSED(VALUE) val, val1, val2;
val = stack[0];
{
val1 = val2 = val;
}
stack[1] = val2;
stack[0] = val1;
}

label_10: /* setlocal */
{
MAYBE_UNUSED(unsigned int) stack_size = 2;
MAYBE_UNUSED(VALUE) val;
MAYBE_UNUSED(lindex_t) idx;
MAYBE_UNUSED(rb_num_t) level;
idx = (lindex_t)0x3;
level = (rb_num_t)0x2;
val = stack[1];
{
vm_env_write(vm_get_ep(GET_EP(), level), -(int)idx, val);
RB_DEBUG_COUNTER_INC(lvar_set);
(void)RB_DEBUG_COUNTER_INC_IF(lvar_set_dynamic, level > 0);
}
}

label_13: /* nop */
{
MAYBE_UNUSED(unsigned int) stack_size = 1;
{
/* none */
}
}

label_14: /* leave */
{
MAYBE_UNUSED(unsigned int) stack_size = 1;
MAYBE_UNUSED(VALUE) val;
val = stack[0];
reg_cfp->pc = original_body_iseq + 15;
reg_cfp->sp = (VALUE *)reg_cfp->bp + 0 + 1;
{
if (OPT_CHECKED_RUN) {
const VALUE *const bp = vm_base_ptr(reg_cfp);
if (reg_cfp->sp != bp) {
vm_stack_consistency_error(ec, reg_cfp, bp);
}
}

RUBY_VM_CHECK_INTS(ec);

if (vm_pop_frame(ec, GET_CFP(), GET_EP())) {
#if OPT_CALL_THREADED_CODE
rb_ec_thread_ptr(ec)->retval = val;
return 0;
#else
return val;
#endif
}
else {
#if OPT_CALL_THREADED_CODE
rb_ec_thread_ptr(ec)->retval = val;
return 0;
#else
return val;
#endif
}
}
stack[0] = val;
if (UNLIKELY(ruby_vm_event_enabled_global_flags & ISEQ_TRACE_EVENTS)) {
reg_cfp->sp = (VALUE *)reg_cfp->bp + 2;
goto cancel;
}
}

cancel:
*((VALUE *)reg_cfp->bp + 1) = stack[0];
*((VALUE *)reg_cfp->bp + 2) = stack[1];
return Qundef;

} /* end of _mjit2 */
(1-1/3)