# HG changeset patch # User anatofuz # Date 1550231514 -32400 # Node ID da6d6597bd690f5dde89cb29bc6ae880814ba622 # Parent 18916fa4f32cb631b26a6f8bf918afe0bc0bac8e rollback diff -r 18916fa4f32c -r da6d6597bd69 src/core/cbc-interp.cbc --- a/src/core/cbc-interp.cbc Fri Feb 15 20:50:50 2019 +0900 +++ b/src/core/cbc-interp.cbc Fri Feb 15 20:51:54 2019 +0900 @@ -20,9 +20,9 @@ * the OP needs (return register + argument registers. The pc will point to the first place after * the current op, i.e. the first 16 bit register number. We add the requested number to that and * use the result as index into the reg_base array which stores the frame's locals. */ -#define GET_REG(pc, idx,i) (i.reg_base[check_reg(i.tc, i.reg_base, *((MVMuint16 *)(pc + idx)))]) +#define GET_REG(pc, idx,i) (i->reg_base[check_reg(i->tc, i->reg_base, *((MVMuint16 *)(pc + idx)))]) #else -#define GET_REG(pc, idx,i) (i.reg_base[*((MVMuint16 *)(pc + idx))]) +#define GET_REG(pc, idx,i) (i->reg_base[*((MVMuint16 *)(pc + idx))]) #endif #if MVM_GC_DEBUG == 2 MVM_STATIC_INLINE MVMuint16 check_lex(MVMThreadContext *tc, MVMFrame *f, MVMuint16 idx) { @@ -33,7 +33,7 @@ MVM_ASSERT_NOT_FROMSPACE(tc, f->env[idx].o); return idx; } -#define GET_LEX(pc, idx, f,i) f->env[check_lex(i.tc, f, *((MVMuint16 *)(pc + idx)))] +#define GET_LEX(pc, idx, f,i) f->env[check_lex(i->tc, f, *((MVMuint16 *)(pc + idx)))] #else #define GET_LEX(pc, idx, f,i) f->env[*((MVMuint16 *)(pc + idx))] #endif @@ -43,7 +43,7 @@ #define GET_UI32(pc, idx) *((MVMuint32 *)(pc + idx)) #define GET_N32(pc, idx) *((MVMnum32 *)(pc + idx)) -#define NEXT_OP(i) (i.op = *(MVMuint16 *)(i.cur_op), i.cur_op += 2, i.op) +#define NEXT_OP(i) (i->op = *(MVMuint16 *)(i->cur_op), i->cur_op += 2, i->op) #if MVM_CGOTO #define DISPATCH(op) {goto (CODES[op])(i);} @@ -59,244 +59,240 @@ static int op_count=0; int cbc_trace=0; -// #define ddd(x) printf("count=%d op=%d cur_op=%p reg[0]=%p reg[2]=%p \n", op_count++, *i.cur_op, i.cur_op, GET_REG(i.cur_op, 0,i).o, GET_REG(i.cur_op, 2,i).o) -#define ddd(x) ((op_count++,cbc_trace)?printf("count=%d op=%d\n", op_count, *(MVMuint16 *)i.cur_op):0) +// #define ddd(x) printf("count=%d op=%d cur_op=%p reg[0]=%p reg[2]=%p \n", op_count++, *i->cur_op, i->cur_op, GET_REG(i->cur_op, 0,i).o, GET_REG(i->cur_op, 2,i).o) +#define ddd(x) ((op_count++,cbc_trace)?printf("count=%d op=%d\n", op_count, *(MVMuint16 *)i->cur_op):0) //#define ddd(x) (op_count++) // #define ddd(x) 0 -__code cbc_next(INTER i){ - i.tc->interp_cur_op = &i.cur_op; - i.tc->interp_bytecode_start = &i.bytecode_start; - i.tc->interp_reg_base = &i.reg_base; - i.tc->interp_cu = &i.cu; - __code (*c)(INTER); +__code cbc_next(INTERP i){ + __code (*c)(INTERP); ddd(0); c = CODES[NEXT_OP(i)]; - i.tc->gc_status=0; + i->tc->gc_status=0; goto c(i); } -__code cbc_no_op(INTER i){ - goto cbc_next(i); -} -__code cbc_const_i8(INTER i){ +__code cbc_no_op(INTERP i){ + goto cbc_next(i); +} +__code cbc_const_i8(INTERP i){ goto cbc_const_i16(i); } -__code cbc_const_i16(INTER i){ +__code cbc_const_i16(INTERP i){ goto cbc_const_i32(i); } -__code cbc_const_i32(INTER i){ - MVM_exception_throw_adhoc(i.tc, "const_iX NYI"); +__code cbc_const_i32(INTERP i){ + MVM_exception_throw_adhoc(i->tc, "const_iX NYI"); goto cbc_const_i64(i); } -__code cbc_const_i64(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_BC_get_I64(i.cur_op, 2); - i.cur_op += 10; - goto cbc_next(i); -} -__code cbc_const_n32(INTER i){ - MVM_exception_throw_adhoc(i.tc, "const_n32 NYI"); +__code cbc_const_i64(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_BC_get_I64(i->cur_op, 2); + i->cur_op += 10; + goto cbc_next(i); +} +__code cbc_const_n32(INTERP i){ + MVM_exception_throw_adhoc(i->tc, "const_n32 NYI"); goto cbc_const_n64(i); } -__code cbc_const_n64(INTER i){ - GET_REG(i.cur_op, 0,i).n64 = MVM_BC_get_N64(i.cur_op, 2); - i.cur_op += 10; - goto cbc_next(i); -} -__code cbc_const_s(INTER i){ - GET_REG(i.cur_op, 0,i).s = MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 2)); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_set(INTER i){ - GET_REG(i.cur_op, 0,i) = GET_REG(i.cur_op, 2,i); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_extend_u8(INTER i){ - GET_REG(i.cur_op, 0,i).u64 = (MVMuint64)GET_REG(i.cur_op, 2,i).u8; - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_extend_u16(INTER i){ - GET_REG(i.cur_op, 0,i).u64 = (MVMuint64)GET_REG(i.cur_op, 2,i).u16; - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_extend_u32(INTER i){ - GET_REG(i.cur_op, 0,i).u64 = (MVMuint64)GET_REG(i.cur_op, 2,i).u32; - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_extend_i8(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = (MVMint64)GET_REG(i.cur_op, 2,i).i8; - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_extend_i16(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = (MVMint64)GET_REG(i.cur_op, 2,i).i16; - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_extend_i32(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = (MVMint64)GET_REG(i.cur_op, 2,i).i32; - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_trunc_u8(INTER i){ - GET_REG(i.cur_op, 0,i).u8 = (MVMuint8)GET_REG(i.cur_op, 2,i).u64; - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_trunc_u16(INTER i){ - GET_REG(i.cur_op, 0,i).u16 = (MVMuint16)GET_REG(i.cur_op, 2,i).u64; - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_trunc_u32(INTER i){ - GET_REG(i.cur_op, 0,i).u32 = (MVMuint32)GET_REG(i.cur_op, 2,i).u64; - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_trunc_i8(INTER i){ - GET_REG(i.cur_op, 0,i).i8 = (MVMint8)GET_REG(i.cur_op, 2,i).i64; - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_trunc_i16(INTER i){ - GET_REG(i.cur_op, 0,i).i16 = (MVMint16)GET_REG(i.cur_op, 2,i).i64; - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_trunc_i32(INTER i){ - GET_REG(i.cur_op, 0,i).i32 = (MVMint32)GET_REG(i.cur_op, 2,i).i64; - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_extend_n32(INTER i){ - GET_REG(i.cur_op, 0,i).n64 = (MVMnum64)GET_REG(i.cur_op, 2,i).n32; - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_trunc_n32(INTER i){ - GET_REG(i.cur_op, 0,i).n32 = (MVMnum32)GET_REG(i.cur_op, 2,i).n64; - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_goto(INTER i){ - i.cur_op = i.bytecode_start + GET_UI32(i.cur_op, 0); - GC_SYNC_POINT(i.tc); - goto cbc_next(i); -} -__code cbc_if_i(INTER i){ - if (GET_REG(i.cur_op, 0,i).i64) - i.cur_op = i.bytecode_start + GET_UI32(i.cur_op, 2); +__code cbc_const_n64(INTERP i){ + GET_REG(i->cur_op, 0,i).n64 = MVM_BC_get_N64(i->cur_op, 2); + i->cur_op += 10; + goto cbc_next(i); +} +__code cbc_const_s(INTERP i){ + GET_REG(i->cur_op, 0,i).s = MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 2)); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_set(INTERP i){ + GET_REG(i->cur_op, 0,i) = GET_REG(i->cur_op, 2,i); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_extend_u8(INTERP i){ + GET_REG(i->cur_op, 0,i).u64 = (MVMuint64)GET_REG(i->cur_op, 2,i).u8; + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_extend_u16(INTERP i){ + GET_REG(i->cur_op, 0,i).u64 = (MVMuint64)GET_REG(i->cur_op, 2,i).u16; + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_extend_u32(INTERP i){ + GET_REG(i->cur_op, 0,i).u64 = (MVMuint64)GET_REG(i->cur_op, 2,i).u32; + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_extend_i8(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = (MVMint64)GET_REG(i->cur_op, 2,i).i8; + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_extend_i16(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = (MVMint64)GET_REG(i->cur_op, 2,i).i16; + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_extend_i32(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = (MVMint64)GET_REG(i->cur_op, 2,i).i32; + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_trunc_u8(INTERP i){ + GET_REG(i->cur_op, 0,i).u8 = (MVMuint8)GET_REG(i->cur_op, 2,i).u64; + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_trunc_u16(INTERP i){ + GET_REG(i->cur_op, 0,i).u16 = (MVMuint16)GET_REG(i->cur_op, 2,i).u64; + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_trunc_u32(INTERP i){ + GET_REG(i->cur_op, 0,i).u32 = (MVMuint32)GET_REG(i->cur_op, 2,i).u64; + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_trunc_i8(INTERP i){ + GET_REG(i->cur_op, 0,i).i8 = (MVMint8)GET_REG(i->cur_op, 2,i).i64; + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_trunc_i16(INTERP i){ + GET_REG(i->cur_op, 0,i).i16 = (MVMint16)GET_REG(i->cur_op, 2,i).i64; + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_trunc_i32(INTERP i){ + GET_REG(i->cur_op, 0,i).i32 = (MVMint32)GET_REG(i->cur_op, 2,i).i64; + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_extend_n32(INTERP i){ + GET_REG(i->cur_op, 0,i).n64 = (MVMnum64)GET_REG(i->cur_op, 2,i).n32; + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_trunc_n32(INTERP i){ + GET_REG(i->cur_op, 0,i).n32 = (MVMnum32)GET_REG(i->cur_op, 2,i).n64; + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_goto(INTERP i){ + i->cur_op = i->bytecode_start + GET_UI32(i->cur_op, 0); + GC_SYNC_POINT(i->tc); + goto cbc_next(i); +} +__code cbc_if_i(INTERP i){ + if (GET_REG(i->cur_op, 0,i).i64) + i->cur_op = i->bytecode_start + GET_UI32(i->cur_op, 2); else - i.cur_op += 6; - GC_SYNC_POINT(i.tc); - goto cbc_next(i); -} -__code cbc_unless_i(INTER i){ - if (GET_REG(i.cur_op, 0,i).i64) - i.cur_op += 6; + i->cur_op += 6; + GC_SYNC_POINT(i->tc); + goto cbc_next(i); +} +__code cbc_unless_i(INTERP i){ + if (GET_REG(i->cur_op, 0,i).i64) + i->cur_op += 6; else - i.cur_op = i.bytecode_start + GET_UI32(i.cur_op, 2); - GC_SYNC_POINT(i.tc); - goto cbc_next(i); -} -__code cbc_if_n(INTER i){ - if (GET_REG(i.cur_op, 0,i).n64 != 0.0) - i.cur_op = i.bytecode_start + GET_UI32(i.cur_op, 2); + i->cur_op = i->bytecode_start + GET_UI32(i->cur_op, 2); + GC_SYNC_POINT(i->tc); + goto cbc_next(i); +} +__code cbc_if_n(INTERP i){ + if (GET_REG(i->cur_op, 0,i).n64 != 0.0) + i->cur_op = i->bytecode_start + GET_UI32(i->cur_op, 2); else - i.cur_op += 6; - GC_SYNC_POINT(i.tc); - goto cbc_next(i); -} -__code cbc_unless_n(INTER i){ - if (GET_REG(i.cur_op, 0,i).n64 != 0.0) - i.cur_op += 6; + i->cur_op += 6; + GC_SYNC_POINT(i->tc); + goto cbc_next(i); +} +__code cbc_unless_n(INTERP i){ + if (GET_REG(i->cur_op, 0,i).n64 != 0.0) + i->cur_op += 6; else - i.cur_op = i.bytecode_start + GET_UI32(i.cur_op, 2); - GC_SYNC_POINT(i.tc); - goto cbc_next(i); -} -__code cbc_if_s(INTER i){ - MVMString *str = GET_REG(i.cur_op, 0,i).s; - if (!str || MVM_string_graphs(i.tc, str) == 0) - i.cur_op += 6; + i->cur_op = i->bytecode_start + GET_UI32(i->cur_op, 2); + GC_SYNC_POINT(i->tc); + goto cbc_next(i); +} +__code cbc_if_s(INTERP i){ + MVMString *str = GET_REG(i->cur_op, 0,i).s; + if (!str || MVM_string_graphs(i->tc, str) == 0) + i->cur_op += 6; else - i.cur_op = i.bytecode_start + GET_UI32(i.cur_op, 2); - GC_SYNC_POINT(i.tc); - goto cbc_next(i); - } -__code cbc_unless_s(INTER i){ - MVMString *str = GET_REG(i.cur_op, 0,i).s; - if (!str || MVM_string_graphs(i.tc, str) == 0) - i.cur_op = i.bytecode_start + GET_UI32(i.cur_op, 2); + i->cur_op = i->bytecode_start + GET_UI32(i->cur_op, 2); + GC_SYNC_POINT(i->tc); + goto cbc_next(i); + } +__code cbc_unless_s(INTERP i){ + MVMString *str = GET_REG(i->cur_op, 0,i).s; + if (!str || MVM_string_graphs(i->tc, str) == 0) + i->cur_op = i->bytecode_start + GET_UI32(i->cur_op, 2); else - i.cur_op += 6; - GC_SYNC_POINT(i.tc); - goto cbc_next(i); - } -__code cbc_if_s0(INTER i){ - MVMString *str = GET_REG(i.cur_op, 0,i).s; - if (!MVM_coerce_istrue_s(i.tc, str)) - i.cur_op += 6; + i->cur_op += 6; + GC_SYNC_POINT(i->tc); + goto cbc_next(i); + } +__code cbc_if_s0(INTERP i){ + MVMString *str = GET_REG(i->cur_op, 0,i).s; + if (!MVM_coerce_istrue_s(i->tc, str)) + i->cur_op += 6; else - i.cur_op = i.bytecode_start + GET_UI32(i.cur_op, 2); - GC_SYNC_POINT(i.tc); - goto cbc_next(i); - } -__code cbc_unless_s0(INTER i){ - MVMString *str = GET_REG(i.cur_op, 0,i).s; - if (!MVM_coerce_istrue_s(i.tc, str)) - i.cur_op = i.bytecode_start + GET_UI32(i.cur_op, 2); + i->cur_op = i->bytecode_start + GET_UI32(i->cur_op, 2); + GC_SYNC_POINT(i->tc); + goto cbc_next(i); + } +__code cbc_unless_s0(INTERP i){ + MVMString *str = GET_REG(i->cur_op, 0,i).s; + if (!MVM_coerce_istrue_s(i->tc, str)) + i->cur_op = i->bytecode_start + GET_UI32(i->cur_op, 2); else - i.cur_op += 6; - GC_SYNC_POINT(i.tc); - goto cbc_next(i); - } -__code cbc_if_o(INTER i){ - GC_SYNC_POINT(i.tc); - MVM_coerce_istrue(i.tc, GET_REG(i.cur_op, 0,i).o, NULL, - i.bytecode_start + GET_UI32(i.cur_op, 2), - i.cur_op + 6, + i->cur_op += 6; + GC_SYNC_POINT(i->tc); + goto cbc_next(i); + } +__code cbc_if_o(INTERP i){ + GC_SYNC_POINT(i->tc); + MVM_coerce_istrue(i->tc, GET_REG(i->cur_op, 0,i).o, NULL, + i->bytecode_start + GET_UI32(i->cur_op, 2), + i->cur_op + 6, 0); goto cbc_next(i); } -__code cbc_unless_o(INTER i){ - GC_SYNC_POINT(i.tc); - MVM_coerce_istrue(i.tc, GET_REG(i.cur_op, 0,i).o, NULL, - i.bytecode_start + GET_UI32(i.cur_op, 2), - i.cur_op + 6, +__code cbc_unless_o(INTERP i){ + GC_SYNC_POINT(i->tc); + MVM_coerce_istrue(i->tc, GET_REG(i->cur_op, 0,i).o, NULL, + i->bytecode_start + GET_UI32(i->cur_op, 2), + i->cur_op + 6, 1); goto cbc_next(i); } -__code cbc_jumplist(INTER i){ - MVMint64 num_labels = MVM_BC_get_I64(i.cur_op, 0); - MVMint64 input = GET_REG(i.cur_op, 8,i).i64; - i.cur_op += 10; +__code cbc_jumplist(INTERP i){ + MVMint64 num_labels = MVM_BC_get_I64(i->cur_op, 0); + MVMint64 input = GET_REG(i->cur_op, 8,i).i64; + i->cur_op += 10; /* the goto ops are guaranteed valid/existent by validation.c */ if (input < 0 || input >= num_labels) { /* implicitly covers num_labels == 0 */ /* skip the entire goto list block */ - i.cur_op += (6 /* size of each goto op */) * num_labels; + i->cur_op += (6 /* size of each goto op */) * num_labels; } else { /* delve directly into the selected goto op */ - i.cur_op = i.bytecode_start + GET_UI32(i.cur_op, + i->cur_op = i->bytecode_start + GET_UI32(i->cur_op, input * (6 /* size of each goto op */) + (2 /* size of the goto instruction itself */)); } - GC_SYNC_POINT(i.tc); - goto cbc_next(i); - } -__code cbc_getlex(INTER i){ - MVMFrame *f = i.tc->cur_frame; - MVMuint16 idx = GET_UI16(i.cur_op, 2); - MVMuint16 outers = GET_UI16(i.cur_op, 4); + GC_SYNC_POINT(i->tc); + goto cbc_next(i); + } +__code cbc_getlex(INTERP i){ + MVMFrame *f = i->tc->cur_frame; + MVMuint16 idx = GET_UI16(i->cur_op, 2); + MVMuint16 outers = GET_UI16(i->cur_op, 4); MVMuint16 *lexical_types; while (outers) { if (!f->outer) - MVM_exception_throw_adhoc(i.tc, "getlex: outer index out of range"); + MVM_exception_throw_adhoc(i->tc, "getlex: outer index out of range"); f = f->outer; outers--; } @@ -304,364 +300,364 @@ ? f->spesh_cand->lexical_types : f->static_info->body.lexical_types; if (lexical_types[idx] == MVM_reg_obj) { - MVMRegister found = GET_LEX(i.cur_op, 2, f,i); + MVMRegister found = GET_LEX(i->cur_op, 2, f,i); MVMObject *value = found.o == NULL - ? MVM_frame_vivify_lexical(i.tc, f, idx) + ? MVM_frame_vivify_lexical(i->tc, f, idx) : found.o; - GET_REG(i.cur_op, 0,i).o = value; - if (MVM_spesh_log_is_logging(i.tc)) - MVM_spesh_log_type(i.tc, value); + GET_REG(i->cur_op, 0,i).o = value; + if (MVM_spesh_log_is_logging(i->tc)) + MVM_spesh_log_type(i->tc, value); } else { - GET_REG(i.cur_op, 0,i) = GET_LEX(i.cur_op, 2, f,i); + GET_REG(i->cur_op, 0,i) = GET_LEX(i->cur_op, 2, f,i); } - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_bindlex(INTER i){ - MVMFrame *f = i.tc->cur_frame; - MVMuint16 outers = GET_UI16(i.cur_op, 2); + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_bindlex(INTERP i){ + MVMFrame *f = i->tc->cur_frame; + MVMuint16 outers = GET_UI16(i->cur_op, 2); MVMuint16 kind = f->spesh_cand && f->spesh_cand->local_types - ? f->spesh_cand->local_types[GET_UI16(i.cur_op, 4)] - : f->static_info->body.local_types[GET_UI16(i.cur_op, 4)]; + ? f->spesh_cand->local_types[GET_UI16(i->cur_op, 4)] + : f->static_info->body.local_types[GET_UI16(i->cur_op, 4)]; while (outers) { if (!f->outer) - MVM_exception_throw_adhoc(i.tc, "bindlex: outer index out of range"); + MVM_exception_throw_adhoc(i->tc, "bindlex: outer index out of range"); f = f->outer; outers--; } if (kind == MVM_reg_obj || kind == MVM_reg_str) { #if MVM_GC_DEGUG - MVM_ASSERT_NOT_FROMSPACE(i.tc, GET_REG(i.cur_op, 4,i).o); + MVM_ASSERT_NOT_FROMSPACE(i->tc, GET_REG(i->cur_op, 4,i).o); #endif - MVM_ASSIGN_REF(i.tc, &(f->header), GET_LEX(i.cur_op, 0, f,i).o, - GET_REG(i.cur_op, 4,i).o); + MVM_ASSIGN_REF(i->tc, &(f->header), GET_LEX(i->cur_op, 0, f,i).o, + GET_REG(i->cur_op, 4,i).o); } else { - GET_LEX(i.cur_op, 0, f,i) = GET_REG(i.cur_op, 4,i); + GET_LEX(i->cur_op, 0, f,i) = GET_REG(i->cur_op, 4,i); } - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_getlex_ni(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_frame_find_lexical_by_name(i.tc, - MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 2)), MVM_reg_int64)->i64; - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_getlex_nn(INTER i){ - GET_REG(i.cur_op, 0,i).n64 = MVM_frame_find_lexical_by_name(i.tc, - MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 2)), MVM_reg_num64)->n64; - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_getlex_ns(INTER i){ - GET_REG(i.cur_op, 0,i).s = MVM_frame_find_lexical_by_name(i.tc, - MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 2)), MVM_reg_str)->s; - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_getlex_no(INTER i){ - MVMRegister *found = MVM_frame_find_lexical_by_name(i.tc, - MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 2)), MVM_reg_obj); + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_getlex_ni(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_frame_find_lexical_by_name(i->tc, + MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 2)), MVM_reg_int64)->i64; + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_getlex_nn(INTERP i){ + GET_REG(i->cur_op, 0,i).n64 = MVM_frame_find_lexical_by_name(i->tc, + MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 2)), MVM_reg_num64)->n64; + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_getlex_ns(INTERP i){ + GET_REG(i->cur_op, 0,i).s = MVM_frame_find_lexical_by_name(i->tc, + MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 2)), MVM_reg_str)->s; + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_getlex_no(INTERP i){ + MVMRegister *found = MVM_frame_find_lexical_by_name(i->tc, + MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 2)), MVM_reg_obj); if (found) { - GET_REG(i.cur_op, 0,i).o = found->o; - if (MVM_spesh_log_is_logging(i.tc)) - MVM_spesh_log_type(i.tc, found->o); + GET_REG(i->cur_op, 0,i).o = found->o; + if (MVM_spesh_log_is_logging(i->tc)) + MVM_spesh_log_type(i->tc, found->o); } else { - GET_REG(i.cur_op, 0,i).o = i.tc->instance->VMNull; + GET_REG(i->cur_op, 0,i).o = i->tc->instance->VMNull; } - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_bindlex_ni(INTER i){ - MVM_frame_bind_lexical_by_name(i.tc, - MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 0)), - MVM_reg_int64, &(GET_REG(i.cur_op, 4,i))); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_bindlex_nn(INTER i){ - MVM_frame_bind_lexical_by_name(i.tc, - MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 0)), - MVM_reg_num64, &(GET_REG(i.cur_op, 4,i))); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_bindlex_ns(INTER i){ - MVM_frame_bind_lexical_by_name(i.tc, - MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 0)), - MVM_reg_str, &(GET_REG(i.cur_op, 4,i))); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_bindlex_no(INTER i){ - MVM_frame_bind_lexical_by_name(i.tc, - MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 0)), - MVM_reg_obj, &(GET_REG(i.cur_op, 4,i))); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_getlex_ng(INTER i){ + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_bindlex_ni(INTERP i){ + MVM_frame_bind_lexical_by_name(i->tc, + MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 0)), + MVM_reg_int64, &(GET_REG(i->cur_op, 4,i))); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_bindlex_nn(INTERP i){ + MVM_frame_bind_lexical_by_name(i->tc, + MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 0)), + MVM_reg_num64, &(GET_REG(i->cur_op, 4,i))); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_bindlex_ns(INTERP i){ + MVM_frame_bind_lexical_by_name(i->tc, + MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 0)), + MVM_reg_str, &(GET_REG(i->cur_op, 4,i))); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_bindlex_no(INTERP i){ + MVM_frame_bind_lexical_by_name(i->tc, + MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 0)), + MVM_reg_obj, &(GET_REG(i->cur_op, 4,i))); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_getlex_ng(INTERP i){ goto cbc_bindlex_ng(i); } -__code cbc_bindlex_ng(INTER i){ - MVM_exception_throw_adhoc(i.tc, "get/bindlex_ng NYI"); +__code cbc_bindlex_ng(INTERP i){ + MVM_exception_throw_adhoc(i->tc, "get/bindlex_ng NYI"); goto cbc_getdynlex(i); } -__code cbc_getdynlex(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_frame_getdynlex(i.tc, GET_REG(i.cur_op, 2,i).s, - i.tc->cur_frame->caller); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_binddynlex(INTER i){ - MVM_frame_binddynlex(i.tc, GET_REG(i.cur_op, 0,i).s, GET_REG(i.cur_op, 2,i).o, - i.tc->cur_frame->caller); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_setlexvalue(INTER i){ - MVMObject *code = GET_REG(i.cur_op, 0,i).o; - MVMString *name = MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 2)); - MVMObject *val = GET_REG(i.cur_op, 6,i).o; - MVMint16 flag = GET_I16(i.cur_op, 8); +__code cbc_getdynlex(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_frame_getdynlex(i->tc, GET_REG(i->cur_op, 2,i).s, + i->tc->cur_frame->caller); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_binddynlex(INTERP i){ + MVM_frame_binddynlex(i->tc, GET_REG(i->cur_op, 0,i).s, GET_REG(i->cur_op, 2,i).o, + i->tc->cur_frame->caller); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_setlexvalue(INTERP i){ + MVMObject *code = GET_REG(i->cur_op, 0,i).o; + MVMString *name = MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 2)); + MVMObject *val = GET_REG(i->cur_op, 6,i).o; + MVMint16 flag = GET_I16(i->cur_op, 8); if (flag < 0 || flag > 2) - MVM_exception_throw_adhoc(i.tc, "setlexvalue provided with invalid flag"); + MVM_exception_throw_adhoc(i->tc, "setlexvalue provided with invalid flag"); if (IS_CONCRETE(code) && REPR(code)->ID == MVM_REPR_ID_MVMCode) { MVMStaticFrame *sf = ((MVMCode *)code)->body.sf; MVMuint8 found = 0; if (!sf->body.fully_deserialized) - MVM_bytecode_finish_frame(i.tc, sf->body.cu, sf, 0); + MVM_bytecode_finish_frame(i->tc, sf->body.cu, sf, 0); if (sf->body.lexical_names) { MVMLexicalRegistry *entry; - MVM_HASH_GET(i.tc, sf->body.lexical_names, name, entry); + MVM_HASH_GET(i->tc, sf->body.lexical_names, name, entry); if (entry && sf->body.lexical_types[entry->value] == MVM_reg_obj) { - MVM_ASSIGN_REF(i.tc, &(sf->common.header), sf->body.static_env[entry->value].o, val); + MVM_ASSIGN_REF(i->tc, &(sf->common.header), sf->body.static_env[entry->value].o, val); sf->body.static_env_flags[entry->value] = (MVMuint8)flag; found = 1; } } if (!found) - MVM_exception_throw_adhoc(i.tc, "setstaticlex given invalid lexical name"); + MVM_exception_throw_adhoc(i->tc, "setstaticlex given invalid lexical name"); } else { - MVM_exception_throw_adhoc(i.tc, "setstaticlex needs a code ref"); + MVM_exception_throw_adhoc(i->tc, "setstaticlex needs a code ref"); } - i.cur_op += 10; - goto cbc_next(i); - } -__code cbc_lexprimspec(INTER i){ - MVMObject *ctx = GET_REG(i.cur_op, 2,i).o; - MVMString *name = GET_REG(i.cur_op, 4,i).s; + i->cur_op += 10; + goto cbc_next(i); + } +__code cbc_lexprimspec(INTERP i){ + MVMObject *ctx = GET_REG(i->cur_op, 2,i).o; + MVMString *name = GET_REG(i->cur_op, 4,i).s; if (REPR(ctx)->ID != MVM_REPR_ID_MVMContext || !IS_CONCRETE(ctx)) - MVM_exception_throw_adhoc(i.tc, "lexprimspec needs a context"); - GET_REG(i.cur_op, 0,i).i64 = MVM_frame_lexical_primspec(i.tc, + MVM_exception_throw_adhoc(i->tc, "lexprimspec needs a context"); + GET_REG(i->cur_op, 0,i).i64 = MVM_frame_lexical_primspec(i->tc, ((MVMContext *)ctx)->body.context, name); - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_return_i(INTER i){ - if (MVM_spesh_log_is_logging(i.tc)) - MVM_spesh_log_return_type(i.tc, NULL); - MVM_args_set_result_int(i.tc, GET_REG(i.cur_op, 0,i).i64, + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_return_i(INTERP i){ + if (MVM_spesh_log_is_logging(i->tc)) + MVM_spesh_log_return_type(i->tc, NULL); + MVM_args_set_result_int(i->tc, GET_REG(i->cur_op, 0,i).i64, MVM_RETURN_CALLER_FRAME); - if (MVM_frame_try_return(i.tc) == 0) + if (MVM_frame_try_return(i->tc) == 0) goto cbc_return_label(i); goto cbc_next(i); } -__code cbc_return_n(INTER i){ - if (MVM_spesh_log_is_logging(i.tc)) - MVM_spesh_log_return_type(i.tc, NULL); - MVM_args_set_result_num(i.tc, GET_REG(i.cur_op, 0,i).n64, +__code cbc_return_n(INTERP i){ + if (MVM_spesh_log_is_logging(i->tc)) + MVM_spesh_log_return_type(i->tc, NULL); + MVM_args_set_result_num(i->tc, GET_REG(i->cur_op, 0,i).n64, MVM_RETURN_CALLER_FRAME); - if (MVM_frame_try_return(i.tc) == 0) + if (MVM_frame_try_return(i->tc) == 0) goto cbc_return_label(i); goto cbc_next(i); } -__code cbc_return_s(INTER i){ - if (MVM_spesh_log_is_logging(i.tc)) - MVM_spesh_log_return_type(i.tc, NULL); - MVM_args_set_result_str(i.tc, GET_REG(i.cur_op, 0,i).s, +__code cbc_return_s(INTERP i){ + if (MVM_spesh_log_is_logging(i->tc)) + MVM_spesh_log_return_type(i->tc, NULL); + MVM_args_set_result_str(i->tc, GET_REG(i->cur_op, 0,i).s, MVM_RETURN_CALLER_FRAME); - if (MVM_frame_try_return(i.tc) == 0) + if (MVM_frame_try_return(i->tc) == 0) goto cbc_return_label(i); goto cbc_next(i); } -__code cbc_return_o(INTER i){ - MVMObject *value = GET_REG(i.cur_op, 0, i).o; - if (MVM_spesh_log_is_logging(i.tc)) { - MVMROOT(i.tc, value, { - MVM_spesh_log_return_type(i.tc, value); +__code cbc_return_o(INTERP i){ + MVMObject *value = GET_REG(i->cur_op, 0, i).o; + if (MVM_spesh_log_is_logging(i->tc)) { + MVMROOT(i->tc, value, { + MVM_spesh_log_return_type(i->tc, value); }); } - MVM_args_set_result_obj(i.tc, value, MVM_RETURN_CALLER_FRAME); - if (MVM_frame_try_return(i.tc) == 0) + MVM_args_set_result_obj(i->tc, value, MVM_RETURN_CALLER_FRAME); + if (MVM_frame_try_return(i->tc) == 0) goto cbc_return_label(i); goto cbc_next(i); } -__code cbc_return(INTER i){ - if (MVM_spesh_log_is_logging(i.tc)) - MVM_spesh_log_return_type(i.tc, NULL); - MVM_args_assert_void_return_ok(i.tc, MVM_RETURN_CALLER_FRAME); - if (MVM_frame_try_return(i.tc) == 0) +__code cbc_return(INTERP i){ + if (MVM_spesh_log_is_logging(i->tc)) + MVM_spesh_log_return_type(i->tc, NULL); + MVM_args_assert_void_return_ok(i->tc, MVM_RETURN_CALLER_FRAME); + if (MVM_frame_try_return(i->tc) == 0) goto cbc_return_label(i); goto cbc_next(i); } -__code cbc_eq_i(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = GET_REG(i.cur_op, 2,i).i64 == GET_REG(i.cur_op, 4,i).i64; - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_ne_i(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = GET_REG(i.cur_op, 2,i).i64 != GET_REG(i.cur_op, 4,i).i64; - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_lt_i(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = GET_REG(i.cur_op, 2,i).i64 < GET_REG(i.cur_op, 4,i).i64; - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_le_i(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = GET_REG(i.cur_op, 2,i).i64 <= GET_REG(i.cur_op, 4,i).i64; - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_gt_i(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = GET_REG(i.cur_op, 2,i).i64 > GET_REG(i.cur_op, 4,i).i64; - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_ge_i(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = GET_REG(i.cur_op, 2,i).i64 >= GET_REG(i.cur_op, 4,i).i64; - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_cmp_i(INTER i){ - MVMint64 a = GET_REG(i.cur_op, 2,i).i64, b = GET_REG(i.cur_op, 4,i).i64; - GET_REG(i.cur_op, 0,i).i64 = (a > b) - (a < b); - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_add_i(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = GET_REG(i.cur_op, 2,i).i64 + GET_REG(i.cur_op, 4,i).i64; - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_sub_i(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = GET_REG(i.cur_op, 2,i).i64 - GET_REG(i.cur_op, 4,i).i64; - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_mul_i(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = GET_REG(i.cur_op, 2,i).i64 * GET_REG(i.cur_op, 4,i).i64; - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_div_i(INTER i){ - MVMint64 num = GET_REG(i.cur_op, 2,i).i64; - MVMint64 denom = GET_REG(i.cur_op, 4,i).i64; +__code cbc_eq_i(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = GET_REG(i->cur_op, 2,i).i64 == GET_REG(i->cur_op, 4,i).i64; + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_ne_i(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = GET_REG(i->cur_op, 2,i).i64 != GET_REG(i->cur_op, 4,i).i64; + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_lt_i(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = GET_REG(i->cur_op, 2,i).i64 < GET_REG(i->cur_op, 4,i).i64; + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_le_i(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = GET_REG(i->cur_op, 2,i).i64 <= GET_REG(i->cur_op, 4,i).i64; + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_gt_i(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = GET_REG(i->cur_op, 2,i).i64 > GET_REG(i->cur_op, 4,i).i64; + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_ge_i(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = GET_REG(i->cur_op, 2,i).i64 >= GET_REG(i->cur_op, 4,i).i64; + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_cmp_i(INTERP i){ + MVMint64 a = GET_REG(i->cur_op, 2,i).i64, b = GET_REG(i->cur_op, 4,i).i64; + GET_REG(i->cur_op, 0,i).i64 = (a > b) - (a < b); + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_add_i(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = GET_REG(i->cur_op, 2,i).i64 + GET_REG(i->cur_op, 4,i).i64; + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_sub_i(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = GET_REG(i->cur_op, 2,i).i64 - GET_REG(i->cur_op, 4,i).i64; + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_mul_i(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = GET_REG(i->cur_op, 2,i).i64 * GET_REG(i->cur_op, 4,i).i64; + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_div_i(INTERP i){ + MVMint64 num = GET_REG(i->cur_op, 2,i).i64; + MVMint64 denom = GET_REG(i->cur_op, 4,i).i64; /* if we have a negative result, make sure we floor rather * than rounding towards zero. */ if (denom == 0) - MVM_exception_throw_adhoc(i.tc, "Division by zero"); + MVM_exception_throw_adhoc(i->tc, "Division by zero"); if ((num < 0) ^ (denom < 0)) { if ((num % denom) != 0) { - GET_REG(i.cur_op, 0,i).i64 = num / denom - 1; + GET_REG(i->cur_op, 0,i).i64 = num / denom - 1; } else { - GET_REG(i.cur_op, 0,i).i64 = num / denom; + GET_REG(i->cur_op, 0,i).i64 = num / denom; } } else { - GET_REG(i.cur_op, 0,i).i64 = num / denom; + GET_REG(i->cur_op, 0,i).i64 = num / denom; } - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_div_u(INTER i){ - GET_REG(i.cur_op, 0,i).u64 = GET_REG(i.cur_op, 2,i).u64 / GET_REG(i.cur_op, 4,i).u64; - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_mod_i(INTER i){ - MVMint64 numer = GET_REG(i.cur_op, 2,i).i64; - MVMint64 denom = GET_REG(i.cur_op, 4,i).i64; + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_div_u(INTERP i){ + GET_REG(i->cur_op, 0,i).u64 = GET_REG(i->cur_op, 2,i).u64 / GET_REG(i->cur_op, 4,i).u64; + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_mod_i(INTERP i){ + MVMint64 numer = GET_REG(i->cur_op, 2,i).i64; + MVMint64 denom = GET_REG(i->cur_op, 4,i).i64; if (denom == 0) - MVM_exception_throw_adhoc(i.tc, "Modulation by zero"); - GET_REG(i.cur_op, 0,i).i64 = numer % denom; - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_mod_u(INTER i){ - GET_REG(i.cur_op, 0,i).u64 = GET_REG(i.cur_op, 2,i).u64 % GET_REG(i.cur_op, 4,i).u64; - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_neg_i(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = -GET_REG(i.cur_op, 2,i).i64; - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_abs_i(INTER i){ - MVMint64 v = GET_REG(i.cur_op, 2,i).i64, mask = v >> 63; - GET_REG(i.cur_op, 0,i).i64 = (v + mask) ^ mask; - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_inc_i(INTER i){ - GET_REG(i.cur_op, 0,i).i64++; - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_inc_u(INTER i){ - GET_REG(i.cur_op, 0,i).u64++; - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_dec_i(INTER i){ - GET_REG(i.cur_op, 0,i).i64--; - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_dec_u(INTER i){ - GET_REG(i.cur_op, 0,i).u64--; - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_band_i(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = GET_REG(i.cur_op, 2,i).i64 & GET_REG(i.cur_op, 4,i).i64; - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_bor_i(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = GET_REG(i.cur_op, 2,i).i64 | GET_REG(i.cur_op, 4,i).i64; - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_bxor_i(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = GET_REG(i.cur_op, 2,i).i64 ^ GET_REG(i.cur_op, 4,i).i64; - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_bnot_i(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = ~GET_REG(i.cur_op, 2,i).i64; - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_blshift_i(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = GET_REG(i.cur_op, 2,i).i64 << GET_REG(i.cur_op, 4,i).i64; - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_brshift_i(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = GET_REG(i.cur_op, 2,i).i64 >> GET_REG(i.cur_op, 4,i).i64; - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_pow_i(INTER i){ - MVMint64 base = GET_REG(i.cur_op, 2,i).i64; - MVMint64 exp = GET_REG(i.cur_op, 4,i).i64; + MVM_exception_throw_adhoc(i->tc, "Modulation by zero"); + GET_REG(i->cur_op, 0,i).i64 = numer % denom; + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_mod_u(INTERP i){ + GET_REG(i->cur_op, 0,i).u64 = GET_REG(i->cur_op, 2,i).u64 % GET_REG(i->cur_op, 4,i).u64; + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_neg_i(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = -GET_REG(i->cur_op, 2,i).i64; + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_abs_i(INTERP i){ + MVMint64 v = GET_REG(i->cur_op, 2,i).i64, mask = v >> 63; + GET_REG(i->cur_op, 0,i).i64 = (v + mask) ^ mask; + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_inc_i(INTERP i){ + GET_REG(i->cur_op, 0,i).i64++; + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_inc_u(INTERP i){ + GET_REG(i->cur_op, 0,i).u64++; + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_dec_i(INTERP i){ + GET_REG(i->cur_op, 0,i).i64--; + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_dec_u(INTERP i){ + GET_REG(i->cur_op, 0,i).u64--; + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_band_i(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = GET_REG(i->cur_op, 2,i).i64 & GET_REG(i->cur_op, 4,i).i64; + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_bor_i(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = GET_REG(i->cur_op, 2,i).i64 | GET_REG(i->cur_op, 4,i).i64; + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_bxor_i(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = GET_REG(i->cur_op, 2,i).i64 ^ GET_REG(i->cur_op, 4,i).i64; + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_bnot_i(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = ~GET_REG(i->cur_op, 2,i).i64; + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_blshift_i(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = GET_REG(i->cur_op, 2,i).i64 << GET_REG(i->cur_op, 4,i).i64; + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_brshift_i(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = GET_REG(i->cur_op, 2,i).i64 >> GET_REG(i->cur_op, 4,i).i64; + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_pow_i(INTERP i){ + MVMint64 base = GET_REG(i->cur_op, 2,i).i64; + MVMint64 exp = GET_REG(i->cur_op, 4,i).i64; MVMint64 result = 1; /* "Exponentiation by squaring" */ if (exp < 0) { @@ -675,801 +671,801 @@ base *= base; } } - GET_REG(i.cur_op, 0,i).i64 = result; - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_not_i(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = GET_REG(i.cur_op, 2,i).i64 ? 0 : 1; - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_gcd_i(INTER i){ - MVMint64 a = labs(GET_REG(i.cur_op, 2,i).i64), b = labs(GET_REG(i.cur_op, 4,i).i64), c; + GET_REG(i->cur_op, 0,i).i64 = result; + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_not_i(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = GET_REG(i->cur_op, 2,i).i64 ? 0 : 1; + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_gcd_i(INTERP i){ + MVMint64 a = labs(GET_REG(i->cur_op, 2,i).i64), b = labs(GET_REG(i->cur_op, 4,i).i64), c; while ( b != 0 ) { c = a % b; a = b; b = c; } - GET_REG(i.cur_op, 0,i).i64 = a; - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_lcm_i(INTER i){ - MVMint64 a = GET_REG(i.cur_op, 2,i).i64, b = GET_REG(i.cur_op, 4,i).i64, c, a_ = a, b_ = b; + GET_REG(i->cur_op, 0,i).i64 = a; + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_lcm_i(INTERP i){ + MVMint64 a = GET_REG(i->cur_op, 2,i).i64, b = GET_REG(i->cur_op, 4,i).i64, c, a_ = a, b_ = b; while ( b != 0 ) { c = a % b; a = b; b = c; } c = a; - GET_REG(i.cur_op, 0,i).i64 = a_ / c * b_; - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_eq_n(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = GET_REG(i.cur_op, 2,i).n64 == GET_REG(i.cur_op, 4,i).n64; - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_ne_n(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = GET_REG(i.cur_op, 2,i).n64 != GET_REG(i.cur_op, 4,i).n64; - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_lt_n(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = GET_REG(i.cur_op, 2,i).n64 < GET_REG(i.cur_op, 4,i).n64; - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_le_n(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = GET_REG(i.cur_op, 2,i).n64 <= GET_REG(i.cur_op, 4,i).n64; - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_gt_n(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = GET_REG(i.cur_op, 2,i).n64 > GET_REG(i.cur_op, 4,i).n64; - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_ge_n(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = GET_REG(i.cur_op, 2,i).n64 >= GET_REG(i.cur_op, 4,i).n64; - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_cmp_n(INTER i){ - MVMnum64 a = GET_REG(i.cur_op, 2,i).n64, b = GET_REG(i.cur_op, 4,i).n64; - GET_REG(i.cur_op, 0,i).i64 = (a > b) - (a < b); - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_add_n(INTER i){ - GET_REG(i.cur_op, 0,i).n64 = GET_REG(i.cur_op, 2,i).n64 + GET_REG(i.cur_op, 4,i).n64; - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_sub_n(INTER i){ - GET_REG(i.cur_op, 0,i).n64 = GET_REG(i.cur_op, 2,i).n64 - GET_REG(i.cur_op, 4,i).n64; - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_mul_n(INTER i){ - GET_REG(i.cur_op, 0,i).n64 = GET_REG(i.cur_op, 2,i).n64 * GET_REG(i.cur_op, 4,i).n64; - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_div_n(INTER i){ - GET_REG(i.cur_op, 0,i).n64 = GET_REG(i.cur_op, 2,i).n64 / GET_REG(i.cur_op, 4,i).n64; - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_mod_n(INTER i){ - MVMnum64 a = GET_REG(i.cur_op, 2,i).n64; - MVMnum64 b = GET_REG(i.cur_op, 4,i).n64; - GET_REG(i.cur_op, 0,i).n64 = b == 0 ? a : a - b * floor(a / b); - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_neg_n(INTER i){ - GET_REG(i.cur_op, 0,i).n64 = -GET_REG(i.cur_op, 2,i).n64; - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_abs_n(INTER i){ + GET_REG(i->cur_op, 0,i).i64 = a_ / c * b_; + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_eq_n(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = GET_REG(i->cur_op, 2,i).n64 == GET_REG(i->cur_op, 4,i).n64; + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_ne_n(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = GET_REG(i->cur_op, 2,i).n64 != GET_REG(i->cur_op, 4,i).n64; + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_lt_n(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = GET_REG(i->cur_op, 2,i).n64 < GET_REG(i->cur_op, 4,i).n64; + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_le_n(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = GET_REG(i->cur_op, 2,i).n64 <= GET_REG(i->cur_op, 4,i).n64; + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_gt_n(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = GET_REG(i->cur_op, 2,i).n64 > GET_REG(i->cur_op, 4,i).n64; + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_ge_n(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = GET_REG(i->cur_op, 2,i).n64 >= GET_REG(i->cur_op, 4,i).n64; + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_cmp_n(INTERP i){ + MVMnum64 a = GET_REG(i->cur_op, 2,i).n64, b = GET_REG(i->cur_op, 4,i).n64; + GET_REG(i->cur_op, 0,i).i64 = (a > b) - (a < b); + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_add_n(INTERP i){ + GET_REG(i->cur_op, 0,i).n64 = GET_REG(i->cur_op, 2,i).n64 + GET_REG(i->cur_op, 4,i).n64; + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_sub_n(INTERP i){ + GET_REG(i->cur_op, 0,i).n64 = GET_REG(i->cur_op, 2,i).n64 - GET_REG(i->cur_op, 4,i).n64; + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_mul_n(INTERP i){ + GET_REG(i->cur_op, 0,i).n64 = GET_REG(i->cur_op, 2,i).n64 * GET_REG(i->cur_op, 4,i).n64; + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_div_n(INTERP i){ + GET_REG(i->cur_op, 0,i).n64 = GET_REG(i->cur_op, 2,i).n64 / GET_REG(i->cur_op, 4,i).n64; + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_mod_n(INTERP i){ + MVMnum64 a = GET_REG(i->cur_op, 2,i).n64; + MVMnum64 b = GET_REG(i->cur_op, 4,i).n64; + GET_REG(i->cur_op, 0,i).n64 = b == 0 ? a : a - b * floor(a / b); + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_neg_n(INTERP i){ + GET_REG(i->cur_op, 0,i).n64 = -GET_REG(i->cur_op, 2,i).n64; + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_abs_n(INTERP i){ { - MVMnum64 num = GET_REG(i.cur_op, 2,i).n64; + MVMnum64 num = GET_REG(i->cur_op, 2,i).n64; /* The 1.0/num logic checks for a negative zero */ if (num < 0 || (num == 0 && 1.0/num < 0) ) num = num * -1; - GET_REG(i.cur_op, 0,i).n64 = num; - i.cur_op += 4; + GET_REG(i->cur_op, 0,i).n64 = num; + i->cur_op += 4; } goto cbc_next(i); } -__code cbc_pow_n(INTER i){ - GET_REG(i.cur_op, 0,i).n64 = pow(GET_REG(i.cur_op, 2,i).n64, GET_REG(i.cur_op, 4,i).n64); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_ceil_n(INTER i){ - GET_REG(i.cur_op, 0,i).n64 = ceil(GET_REG(i.cur_op, 2,i).n64); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_floor_n(INTER i){ - GET_REG(i.cur_op, 0,i).n64 = floor(GET_REG(i.cur_op, 2,i).n64); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_sin_n(INTER i){ - GET_REG(i.cur_op, 0,i).n64 = sin(GET_REG(i.cur_op, 2,i).n64); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_asin_n(INTER i){ - GET_REG(i.cur_op, 0,i).n64 = asin(GET_REG(i.cur_op, 2,i).n64); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_cos_n(INTER i){ - GET_REG(i.cur_op, 0,i).n64 = cos(GET_REG(i.cur_op, 2,i).n64); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_acos_n(INTER i){ - GET_REG(i.cur_op, 0,i).n64 = acos(GET_REG(i.cur_op, 2,i).n64); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_tan_n(INTER i){ - GET_REG(i.cur_op, 0,i).n64 = tan(GET_REG(i.cur_op, 2,i).n64); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_atan_n(INTER i){ - GET_REG(i.cur_op, 0,i).n64 = atan(GET_REG(i.cur_op, 2,i).n64); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_atan2_n(INTER i){ - GET_REG(i.cur_op, 0,i).n64 = atan2(GET_REG(i.cur_op, 2,i).n64, - GET_REG(i.cur_op, 4,i).n64); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_sec_n(INTER i){ - GET_REG(i.cur_op, 0,i).n64 = 1.0 / cos(GET_REG(i.cur_op, 2,i).n64); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_asec_n(INTER i){ - GET_REG(i.cur_op, 0,i).n64 = acos(1.0 / GET_REG(i.cur_op, 2,i).n64); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_sinh_n(INTER i){ - GET_REG(i.cur_op, 0,i).n64 = sinh(GET_REG(i.cur_op, 2,i).n64); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_cosh_n(INTER i){ - GET_REG(i.cur_op, 0,i).n64 = cosh(GET_REG(i.cur_op, 2,i).n64); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_tanh_n(INTER i){ - GET_REG(i.cur_op, 0,i).n64 = tanh(GET_REG(i.cur_op, 2,i).n64); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_sech_n(INTER i){ - GET_REG(i.cur_op, 0,i).n64 = 1.0 / cosh(GET_REG(i.cur_op, 2,i).n64); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_sqrt_n(INTER i){ - GET_REG(i.cur_op, 0,i).n64 = sqrt(GET_REG(i.cur_op, 2,i).n64); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_log_n(INTER i){ - GET_REG(i.cur_op, 0,i).n64 = log(GET_REG(i.cur_op, 2,i).n64); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_exp_n(INTER i){ - GET_REG(i.cur_op, 0,i).n64 = exp(GET_REG(i.cur_op, 2,i).n64); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_coerce_in(INTER i){ - GET_REG(i.cur_op, 0,i).n64 = (MVMnum64)GET_REG(i.cur_op, 2,i).i64; - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_coerce_ni(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = (MVMint64)GET_REG(i.cur_op, 2,i).n64; - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_coerce_is(INTER i){ - GET_REG(i.cur_op, 0,i).s = MVM_coerce_i_s(i.tc, GET_REG(i.cur_op, 2,i).i64); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_coerce_ns(INTER i){ - GET_REG(i.cur_op, 0,i).s = MVM_coerce_n_s(i.tc, GET_REG(i.cur_op, 2,i).n64); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_coerce_si(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_coerce_s_i(i.tc, GET_REG(i.cur_op, 2,i).s); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_coerce_sn(INTER i){ - GET_REG(i.cur_op, 0,i).n64 = MVM_coerce_s_n(i.tc, GET_REG(i.cur_op, 2,i).s); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_smrt_numify(INTER i){ +__code cbc_pow_n(INTERP i){ + GET_REG(i->cur_op, 0,i).n64 = pow(GET_REG(i->cur_op, 2,i).n64, GET_REG(i->cur_op, 4,i).n64); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_ceil_n(INTERP i){ + GET_REG(i->cur_op, 0,i).n64 = ceil(GET_REG(i->cur_op, 2,i).n64); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_floor_n(INTERP i){ + GET_REG(i->cur_op, 0,i).n64 = floor(GET_REG(i->cur_op, 2,i).n64); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_sin_n(INTERP i){ + GET_REG(i->cur_op, 0,i).n64 = sin(GET_REG(i->cur_op, 2,i).n64); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_asin_n(INTERP i){ + GET_REG(i->cur_op, 0,i).n64 = asin(GET_REG(i->cur_op, 2,i).n64); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_cos_n(INTERP i){ + GET_REG(i->cur_op, 0,i).n64 = cos(GET_REG(i->cur_op, 2,i).n64); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_acos_n(INTERP i){ + GET_REG(i->cur_op, 0,i).n64 = acos(GET_REG(i->cur_op, 2,i).n64); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_tan_n(INTERP i){ + GET_REG(i->cur_op, 0,i).n64 = tan(GET_REG(i->cur_op, 2,i).n64); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_atan_n(INTERP i){ + GET_REG(i->cur_op, 0,i).n64 = atan(GET_REG(i->cur_op, 2,i).n64); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_atan2_n(INTERP i){ + GET_REG(i->cur_op, 0,i).n64 = atan2(GET_REG(i->cur_op, 2,i).n64, + GET_REG(i->cur_op, 4,i).n64); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_sec_n(INTERP i){ + GET_REG(i->cur_op, 0,i).n64 = 1.0 / cos(GET_REG(i->cur_op, 2,i).n64); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_asec_n(INTERP i){ + GET_REG(i->cur_op, 0,i).n64 = acos(1.0 / GET_REG(i->cur_op, 2,i).n64); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_sinh_n(INTERP i){ + GET_REG(i->cur_op, 0,i).n64 = sinh(GET_REG(i->cur_op, 2,i).n64); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_cosh_n(INTERP i){ + GET_REG(i->cur_op, 0,i).n64 = cosh(GET_REG(i->cur_op, 2,i).n64); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_tanh_n(INTERP i){ + GET_REG(i->cur_op, 0,i).n64 = tanh(GET_REG(i->cur_op, 2,i).n64); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_sech_n(INTERP i){ + GET_REG(i->cur_op, 0,i).n64 = 1.0 / cosh(GET_REG(i->cur_op, 2,i).n64); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_sqrt_n(INTERP i){ + GET_REG(i->cur_op, 0,i).n64 = sqrt(GET_REG(i->cur_op, 2,i).n64); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_log_n(INTERP i){ + GET_REG(i->cur_op, 0,i).n64 = log(GET_REG(i->cur_op, 2,i).n64); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_exp_n(INTERP i){ + GET_REG(i->cur_op, 0,i).n64 = exp(GET_REG(i->cur_op, 2,i).n64); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_coerce_in(INTERP i){ + GET_REG(i->cur_op, 0,i).n64 = (MVMnum64)GET_REG(i->cur_op, 2,i).i64; + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_coerce_ni(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = (MVMint64)GET_REG(i->cur_op, 2,i).n64; + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_coerce_is(INTERP i){ + GET_REG(i->cur_op, 0,i).s = MVM_coerce_i_s(i->tc, GET_REG(i->cur_op, 2,i).i64); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_coerce_ns(INTERP i){ + GET_REG(i->cur_op, 0,i).s = MVM_coerce_n_s(i->tc, GET_REG(i->cur_op, 2,i).n64); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_coerce_si(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_coerce_s_i(i->tc, GET_REG(i->cur_op, 2,i).s); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_coerce_sn(INTERP i){ + GET_REG(i->cur_op, 0,i).n64 = MVM_coerce_s_n(i->tc, GET_REG(i->cur_op, 2,i).s); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_smrt_numify(INTERP i){ /* Increment PC before calling coercer, as it may make * a method call to get the result. */ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; - MVMRegister *res = &GET_REG(i.cur_op, 0,i); - i.cur_op += 4; - MVM_coerce_smart_numify(i.tc, obj, res); - goto cbc_next(i); - } -__code cbc_smrt_strify(INTER i){ + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; + MVMRegister *res = &GET_REG(i->cur_op, 0,i); + i->cur_op += 4; + MVM_coerce_smart_numify(i->tc, obj, res); + goto cbc_next(i); + } +__code cbc_smrt_strify(INTERP i){ /* Increment PC before calling coercer, as it may make * a method call to get the result. */ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; - MVMRegister *res = &GET_REG(i.cur_op, 0,i); - i.cur_op += 4; - MVM_coerce_smart_stringify(i.tc, obj, res); - goto cbc_next(i); - } -__code cbc_prepargs(INTER i){ + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; + MVMRegister *res = &GET_REG(i->cur_op, 0,i); + i->cur_op += 4; + MVM_coerce_smart_stringify(i->tc, obj, res); + goto cbc_next(i); + } +__code cbc_prepargs(INTERP i){ /* Store callsite in the frame so that the GC knows how to mark * any arguments. Note that since none of the arg-setting ops can * trigger GC, there's no way the setup can be interrupted, so we * don't need to clear the args buffer before we start. */ - i.cur_callsite =i.cu->body.callsites[GET_UI16(i.cur_op, 0)]; - i.tc->cur_frame->cur_args_callsite = i.cur_callsite; - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_arg_i(INTER i){ - i.tc->cur_frame->args[GET_UI16(i.cur_op, 0)].i64 = GET_REG(i.cur_op, 2,i).i64; - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_arg_n(INTER i){ - i.tc->cur_frame->args[GET_UI16(i.cur_op, 0)].n64 = GET_REG(i.cur_op, 2,i).n64; - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_arg_s(INTER i){ - i.tc->cur_frame->args[GET_UI16(i.cur_op, 0)].s = GET_REG(i.cur_op, 2,i).s; - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_arg_o(INTER i){ - i.tc->cur_frame->args[GET_UI16(i.cur_op, 0)].o = GET_REG(i.cur_op, 2,i).o; - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_argconst_i(INTER i){ - i.tc->cur_frame->args[GET_UI16(i.cur_op, 0)].i64 = MVM_BC_get_I64(i.cur_op, 2); - i.cur_op += 10; - goto cbc_next(i); -} -__code cbc_argconst_n(INTER i){ - i.tc->cur_frame->args[GET_UI16(i.cur_op, 0)].n64 = MVM_BC_get_N64(i.cur_op, 2); - i.cur_op += 10; - goto cbc_next(i); -} -__code cbc_argconst_s(INTER i){ - i.tc->cur_frame->args[GET_UI16(i.cur_op, 0)].s = - MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 2)); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_invoke_v(INTER i){ - MVMObject *code = GET_REG(i.cur_op, 0,i).o; - MVMRegister *args = i.tc->cur_frame->args; + i->cur_callsite =i->cu->body.callsites[GET_UI16(i->cur_op, 0)]; + i->tc->cur_frame->cur_args_callsite = i->cur_callsite; + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_arg_i(INTERP i){ + i->tc->cur_frame->args[GET_UI16(i->cur_op, 0)].i64 = GET_REG(i->cur_op, 2,i).i64; + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_arg_n(INTERP i){ + i->tc->cur_frame->args[GET_UI16(i->cur_op, 0)].n64 = GET_REG(i->cur_op, 2,i).n64; + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_arg_s(INTERP i){ + i->tc->cur_frame->args[GET_UI16(i->cur_op, 0)].s = GET_REG(i->cur_op, 2,i).s; + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_arg_o(INTERP i){ + i->tc->cur_frame->args[GET_UI16(i->cur_op, 0)].o = GET_REG(i->cur_op, 2,i).o; + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_argconst_i(INTERP i){ + i->tc->cur_frame->args[GET_UI16(i->cur_op, 0)].i64 = MVM_BC_get_I64(i->cur_op, 2); + i->cur_op += 10; + goto cbc_next(i); +} +__code cbc_argconst_n(INTERP i){ + i->tc->cur_frame->args[GET_UI16(i->cur_op, 0)].n64 = MVM_BC_get_N64(i->cur_op, 2); + i->cur_op += 10; + goto cbc_next(i); +} +__code cbc_argconst_s(INTERP i){ + i->tc->cur_frame->args[GET_UI16(i->cur_op, 0)].s = + MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 2)); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_invoke_v(INTERP i){ + MVMObject *code = GET_REG(i->cur_op, 0,i).o; + MVMRegister *args = i->tc->cur_frame->args; MVMuint16 was_multi = 0; /* was_multi argument is MVMuint16* */ - code = MVM_frame_find_invokee_multi_ok(i.tc, code, &i.cur_callsite, args, + code = MVM_frame_find_invokee_multi_ok(i->tc, code, &i->cur_callsite, args, &was_multi); - if (MVM_spesh_log_is_logging(i.tc)) { - MVMROOT(i.tc, code, { + if (MVM_spesh_log_is_logging(i->tc)) { + MVMROOT(i->tc, code, { /* was_multi is MVMint16 */ - MVM_spesh_log_invoke_target(i.tc, code, was_multi); + MVM_spesh_log_invoke_target(i->tc, code, was_multi); }); } - i.tc->cur_frame->return_value = NULL; - i.tc->cur_frame->return_type = MVM_RETURN_VOID; - i.cur_op += 2; - i.tc->cur_frame->return_address = i.cur_op; - STABLE(code)->invoke(i.tc, code, i.cur_callsite, args); + i->tc->cur_frame->return_value = NULL; + i->tc->cur_frame->return_type = MVM_RETURN_VOID; + i->cur_op += 2; + i->tc->cur_frame->return_address = i->cur_op; + STABLE(code)->invoke(i->tc, code, i->cur_callsite, args); goto cbc_next(i); } -__code cbc_invoke_i(INTER i){ - MVMObject *code = GET_REG(i.cur_op, 2,i).o; - MVMRegister *args = i.tc->cur_frame->args; +__code cbc_invoke_i(INTERP i){ + MVMObject *code = GET_REG(i->cur_op, 2,i).o; + MVMRegister *args = i->tc->cur_frame->args; MVMuint16 was_multi = 0; - code = MVM_frame_find_invokee_multi_ok(i.tc, code, &i.cur_callsite, args, + code = MVM_frame_find_invokee_multi_ok(i->tc, code, &i->cur_callsite, args, &was_multi); - if (MVM_spesh_log_is_logging(i.tc)) { - MVMROOT(i.tc, code, { - MVM_spesh_log_invoke_target(i.tc, code, was_multi); + if (MVM_spesh_log_is_logging(i->tc)) { + MVMROOT(i->tc, code, { + MVM_spesh_log_invoke_target(i->tc, code, was_multi); }); } - i.tc->cur_frame->return_value = &GET_REG(i.cur_op, 0,i); - i.tc->cur_frame->return_type = MVM_RETURN_INT; - i.cur_op += 4; - i.tc->cur_frame->return_address = i.cur_op; - STABLE(code)->invoke(i.tc, code, i.cur_callsite, args); + i->tc->cur_frame->return_value = &GET_REG(i->cur_op, 0,i); + i->tc->cur_frame->return_type = MVM_RETURN_INT; + i->cur_op += 4; + i->tc->cur_frame->return_address = i->cur_op; + STABLE(code)->invoke(i->tc, code, i->cur_callsite, args); goto cbc_next(i); } -__code cbc_invoke_n(INTER i){ - MVMObject *code = GET_REG(i.cur_op, 2,i).o; - MVMRegister *args = i.tc->cur_frame->args; +__code cbc_invoke_n(INTERP i){ + MVMObject *code = GET_REG(i->cur_op, 2,i).o; + MVMRegister *args = i->tc->cur_frame->args; MVMuint16 was_multi = 0; - code = MVM_frame_find_invokee_multi_ok(i.tc, code, &i.cur_callsite, args, + code = MVM_frame_find_invokee_multi_ok(i->tc, code, &i->cur_callsite, args, &was_multi); - if (MVM_spesh_log_is_logging(i.tc)) { - MVMROOT(i.tc, code, { - MVM_spesh_log_invoke_target(i.tc, code, was_multi); + if (MVM_spesh_log_is_logging(i->tc)) { + MVMROOT(i->tc, code, { + MVM_spesh_log_invoke_target(i->tc, code, was_multi); }); } - i.tc->cur_frame->return_value = &GET_REG(i.cur_op, 0,i); - i.tc->cur_frame->return_type = MVM_RETURN_NUM; - i.cur_op += 4; - i.tc->cur_frame->return_address = i.cur_op; - STABLE(code)->invoke(i.tc, code, i.cur_callsite, args); + i->tc->cur_frame->return_value = &GET_REG(i->cur_op, 0,i); + i->tc->cur_frame->return_type = MVM_RETURN_NUM; + i->cur_op += 4; + i->tc->cur_frame->return_address = i->cur_op; + STABLE(code)->invoke(i->tc, code, i->cur_callsite, args); goto cbc_next(i); } -__code cbc_invoke_s(INTER i){ - MVMObject *code = GET_REG(i.cur_op, 2,i).o; - MVMRegister *args = i.tc->cur_frame->args; +__code cbc_invoke_s(INTERP i){ + MVMObject *code = GET_REG(i->cur_op, 2,i).o; + MVMRegister *args = i->tc->cur_frame->args; MVMuint16 was_multi = 0; - code = MVM_frame_find_invokee_multi_ok(i.tc, code, &i.cur_callsite, args, + code = MVM_frame_find_invokee_multi_ok(i->tc, code, &i->cur_callsite, args, &was_multi); - if (MVM_spesh_log_is_logging(i.tc)) { - MVMROOT(i.tc, code, { - MVM_spesh_log_invoke_target(i.tc, code, was_multi); + if (MVM_spesh_log_is_logging(i->tc)) { + MVMROOT(i->tc, code, { + MVM_spesh_log_invoke_target(i->tc, code, was_multi); }); } - i.tc->cur_frame->return_value = &GET_REG(i.cur_op, 0,i); - i.tc->cur_frame->return_type = MVM_RETURN_STR; - i.cur_op += 4; - i.tc->cur_frame->return_address = i.cur_op; - STABLE(code)->invoke(i.tc, code, i.cur_callsite, args); + i->tc->cur_frame->return_value = &GET_REG(i->cur_op, 0,i); + i->tc->cur_frame->return_type = MVM_RETURN_STR; + i->cur_op += 4; + i->tc->cur_frame->return_address = i->cur_op; + STABLE(code)->invoke(i->tc, code, i->cur_callsite, args); goto cbc_next(i); } -__code cbc_invoke_o(INTER i){ - MVMObject *code = GET_REG(i.cur_op, 2,i).o; - MVMRegister *args = i.tc->cur_frame->args; +__code cbc_invoke_o(INTERP i){ + MVMObject *code = GET_REG(i->cur_op, 2,i).o; + MVMRegister *args = i->tc->cur_frame->args; MVMuint16 was_multi = 0; - code = MVM_frame_find_invokee_multi_ok(i.tc, code, &i.cur_callsite, args, + code = MVM_frame_find_invokee_multi_ok(i->tc, code, &i->cur_callsite, args, &was_multi); - if (MVM_spesh_log_is_logging(i.tc)) { - MVMROOT(i.tc, code, { - MVM_spesh_log_invoke_target(i.tc, code, was_multi); + if (MVM_spesh_log_is_logging(i->tc)) { + MVMROOT(i->tc, code, { + MVM_spesh_log_invoke_target(i->tc, code, was_multi); }); } - i.tc->cur_frame->return_value = &GET_REG(i.cur_op, 0,i); - i.tc->cur_frame->return_type = MVM_RETURN_OBJ; - i.cur_op += 4; - i.tc->cur_frame->return_address = i.cur_op; - STABLE(code)->invoke(i.tc, code, i.cur_callsite, args); + i->tc->cur_frame->return_value = &GET_REG(i->cur_op, 0,i); + i->tc->cur_frame->return_type = MVM_RETURN_OBJ; + i->cur_op += 4; + i->tc->cur_frame->return_address = i->cur_op; + STABLE(code)->invoke(i->tc, code, i->cur_callsite, args); goto cbc_next(i); } -__code cbc_checkarity(INTER i){ - MVM_args_checkarity(i.tc, &i.tc->cur_frame->params, GET_UI16(i.cur_op, 0), GET_UI16(i.cur_op, 2)); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_param_rp_i(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_args_get_required_pos_int(i.tc, &i.tc->cur_frame->params, - GET_UI16(i.cur_op, 2)); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_param_rp_n(INTER i){ - GET_REG(i.cur_op, 0,i).n64 = MVM_args_get_pos_num(i.tc, &i.tc->cur_frame->params, - GET_UI16(i.cur_op, 2), MVM_ARG_REQUIRED).arg.n64; - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_param_rp_s(INTER i){ - GET_REG(i.cur_op, 0,i).s = MVM_args_get_required_pos_str(i.tc, &i.tc->cur_frame->params, - GET_UI16(i.cur_op, 2)); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_param_rp_o(INTER i){ - MVMuint16 arg_idx = GET_UI16(i.cur_op, 2); - MVMObject *param = MVM_args_get_required_pos_obj(i.tc, &i.tc->cur_frame->params, arg_idx); - GET_REG(i.cur_op, 0,i).o = param; - if (MVM_spesh_log_is_logging(i.tc)) - MVM_spesh_log_parameter(i.tc, arg_idx, param); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_param_op_i(INTER i){ +__code cbc_checkarity(INTERP i){ + MVM_args_checkarity(i->tc, &i->tc->cur_frame->params, GET_UI16(i->cur_op, 0), GET_UI16(i->cur_op, 2)); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_param_rp_i(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_args_get_required_pos_int(i->tc, &i->tc->cur_frame->params, + GET_UI16(i->cur_op, 2)); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_param_rp_n(INTERP i){ + GET_REG(i->cur_op, 0,i).n64 = MVM_args_get_pos_num(i->tc, &i->tc->cur_frame->params, + GET_UI16(i->cur_op, 2), MVM_ARG_REQUIRED).arg.n64; + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_param_rp_s(INTERP i){ + GET_REG(i->cur_op, 0,i).s = MVM_args_get_required_pos_str(i->tc, &i->tc->cur_frame->params, + GET_UI16(i->cur_op, 2)); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_param_rp_o(INTERP i){ + MVMuint16 arg_idx = GET_UI16(i->cur_op, 2); + MVMObject *param = MVM_args_get_required_pos_obj(i->tc, &i->tc->cur_frame->params, arg_idx); + GET_REG(i->cur_op, 0,i).o = param; + if (MVM_spesh_log_is_logging(i->tc)) + MVM_spesh_log_parameter(i->tc, arg_idx, param); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_param_op_i(INTERP i){ { - MVMArgInfo param = MVM_args_get_optional_pos_int(i.tc, &i.tc->cur_frame->params, - GET_UI16(i.cur_op, 2)); + MVMArgInfo param = MVM_args_get_optional_pos_int(i->tc, &i->tc->cur_frame->params, + GET_UI16(i->cur_op, 2)); if (param.exists) { - GET_REG(i.cur_op, 0,i).i64 = param.arg.i64; - i.cur_op = i.bytecode_start + GET_UI32(i.cur_op, 4); + GET_REG(i->cur_op, 0,i).i64 = param.arg.i64; + i->cur_op = i->bytecode_start + GET_UI32(i->cur_op, 4); } else { - i.cur_op += 8; + i->cur_op += 8; } goto cbc_next(i); } } -__code cbc_param_op_n(INTER i){ - MVMArgInfo param = MVM_args_get_pos_num(i.tc, &i.tc->cur_frame->params, - GET_UI16(i.cur_op, 2), MVM_ARG_OPTIONAL); +__code cbc_param_op_n(INTERP i){ + MVMArgInfo param = MVM_args_get_pos_num(i->tc, &i->tc->cur_frame->params, + GET_UI16(i->cur_op, 2), MVM_ARG_OPTIONAL); if (param.exists) { - GET_REG(i.cur_op, 0,i).n64 = param.arg.n64; - i.cur_op = i.bytecode_start + GET_UI32(i.cur_op, 4); + GET_REG(i->cur_op, 0,i).n64 = param.arg.n64; + i->cur_op = i->bytecode_start + GET_UI32(i->cur_op, 4); } else { - i.cur_op += 8; + i->cur_op += 8; } goto cbc_next(i); } -__code cbc_param_op_s(INTER i){ +__code cbc_param_op_s(INTERP i){ { - MVMArgInfo param = MVM_args_get_optional_pos_str(i.tc, &i.tc->cur_frame->params, - GET_UI16(i.cur_op, 2)); + MVMArgInfo param = MVM_args_get_optional_pos_str(i->tc, &i->tc->cur_frame->params, + GET_UI16(i->cur_op, 2)); if (param.exists) { - GET_REG(i.cur_op, 0,i).s = param.arg.s; - i.cur_op = i.bytecode_start + GET_UI32(i.cur_op, 4); + GET_REG(i->cur_op, 0,i).s = param.arg.s; + i->cur_op = i->bytecode_start + GET_UI32(i->cur_op, 4); } else { - i.cur_op += 8; + i->cur_op += 8; } goto cbc_next(i); } } -__code cbc_param_op_o(INTER i){ +__code cbc_param_op_o(INTERP i){ - MVMuint16 arg_idx = GET_UI16(i.cur_op, 2); - MVMArgInfo param = MVM_args_get_optional_pos_obj(i.tc, &i.tc->cur_frame->params, arg_idx); + MVMuint16 arg_idx = GET_UI16(i->cur_op, 2); + MVMArgInfo param = MVM_args_get_optional_pos_obj(i->tc, &i->tc->cur_frame->params, arg_idx); if (param.exists) { - GET_REG(i.cur_op, 0,i).o = param.arg.o; - if (MVM_spesh_log_is_logging(i.tc)) - MVM_spesh_log_parameter(i.tc, arg_idx, param.arg.o); - i.cur_op = i.bytecode_start + GET_UI32(i.cur_op, 4); + GET_REG(i->cur_op, 0,i).o = param.arg.o; + if (MVM_spesh_log_is_logging(i->tc)) + MVM_spesh_log_parameter(i->tc, arg_idx, param.arg.o); + i->cur_op = i->bytecode_start + GET_UI32(i->cur_op, 4); } else { - i.cur_op += 8; + i->cur_op += 8; } goto cbc_next(i); } -__code cbc_param_rn_i(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_args_get_named_int(i.tc, &i.tc->cur_frame->params, - MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 2)), MVM_ARG_REQUIRED).arg.i64; - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_param_rn_n(INTER i){ - GET_REG(i.cur_op, 0,i).n64 = MVM_args_get_named_num(i.tc, &i.tc->cur_frame->params, - MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 2)), MVM_ARG_REQUIRED).arg.n64; - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_param_rn_s(INTER i){ - GET_REG(i.cur_op, 0,i).s = MVM_args_get_named_str(i.tc, &i.tc->cur_frame->params, - MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 2)), MVM_ARG_REQUIRED).arg.s; - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_param_rn_o(INTER i){ - MVMArgInfo param = MVM_args_get_named_obj(i.tc, &i.tc->cur_frame->params, - MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 2)), MVM_ARG_REQUIRED); - GET_REG(i.cur_op, 0,i).o = param.arg.o; - if (MVM_spesh_log_is_logging(i.tc)) - MVM_spesh_log_parameter(i.tc, param.arg_idx, param.arg.o); - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_param_on_i(INTER i){ - MVMArgInfo param = MVM_args_get_named_int(i.tc, &i.tc->cur_frame->params, - MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 2)), MVM_ARG_OPTIONAL); +__code cbc_param_rn_i(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_args_get_named_int(i->tc, &i->tc->cur_frame->params, + MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 2)), MVM_ARG_REQUIRED).arg.i64; + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_param_rn_n(INTERP i){ + GET_REG(i->cur_op, 0,i).n64 = MVM_args_get_named_num(i->tc, &i->tc->cur_frame->params, + MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 2)), MVM_ARG_REQUIRED).arg.n64; + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_param_rn_s(INTERP i){ + GET_REG(i->cur_op, 0,i).s = MVM_args_get_named_str(i->tc, &i->tc->cur_frame->params, + MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 2)), MVM_ARG_REQUIRED).arg.s; + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_param_rn_o(INTERP i){ + MVMArgInfo param = MVM_args_get_named_obj(i->tc, &i->tc->cur_frame->params, + MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 2)), MVM_ARG_REQUIRED); + GET_REG(i->cur_op, 0,i).o = param.arg.o; + if (MVM_spesh_log_is_logging(i->tc)) + MVM_spesh_log_parameter(i->tc, param.arg_idx, param.arg.o); + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_param_on_i(INTERP i){ + MVMArgInfo param = MVM_args_get_named_int(i->tc, &i->tc->cur_frame->params, + MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 2)), MVM_ARG_OPTIONAL); if (param.exists) { - GET_REG(i.cur_op, 0,i).i64 = param.arg.i64; - i.cur_op = i.bytecode_start + GET_UI32(i.cur_op, 6); + GET_REG(i->cur_op, 0,i).i64 = param.arg.i64; + i->cur_op = i->bytecode_start + GET_UI32(i->cur_op, 6); } else { - i.cur_op += 10; + i->cur_op += 10; } goto cbc_next(i); } -__code cbc_param_on_n(INTER i){ - MVMArgInfo param = MVM_args_get_named_num(i.tc, &i.tc->cur_frame->params, - MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 2)), MVM_ARG_OPTIONAL); +__code cbc_param_on_n(INTERP i){ + MVMArgInfo param = MVM_args_get_named_num(i->tc, &i->tc->cur_frame->params, + MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 2)), MVM_ARG_OPTIONAL); if (param.exists) { - GET_REG(i.cur_op, 0,i).n64 = param.arg.n64; - i.cur_op = i.bytecode_start + GET_UI32(i.cur_op, 6); + GET_REG(i->cur_op, 0,i).n64 = param.arg.n64; + i->cur_op = i->bytecode_start + GET_UI32(i->cur_op, 6); } else { - i.cur_op += 10; + i->cur_op += 10; } goto cbc_next(i); } -__code cbc_param_on_s(INTER i){ - MVMArgInfo param = MVM_args_get_named_str(i.tc, &i.tc->cur_frame->params, - MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 2)), MVM_ARG_OPTIONAL); +__code cbc_param_on_s(INTERP i){ + MVMArgInfo param = MVM_args_get_named_str(i->tc, &i->tc->cur_frame->params, + MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 2)), MVM_ARG_OPTIONAL); if (param.exists) { - GET_REG(i.cur_op, 0,i).s = param.arg.s; - i.cur_op = i.bytecode_start + GET_UI32(i.cur_op, 6); + GET_REG(i->cur_op, 0,i).s = param.arg.s; + i->cur_op = i->bytecode_start + GET_UI32(i->cur_op, 6); } else { - i.cur_op += 10; + i->cur_op += 10; } goto cbc_next(i); } -__code cbc_param_on_o(INTER i){ - MVMArgInfo param = MVM_args_get_named_obj(i.tc, &i.tc->cur_frame->params, - MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 2)), MVM_ARG_OPTIONAL); +__code cbc_param_on_o(INTERP i){ + MVMArgInfo param = MVM_args_get_named_obj(i->tc, &i->tc->cur_frame->params, + MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 2)), MVM_ARG_OPTIONAL); if (param.exists) { - GET_REG(i.cur_op, 0,i).o = param.arg.o; - if (MVM_spesh_log_is_logging(i.tc)) - MVM_spesh_log_parameter(i.tc, param.arg_idx, param.arg.o); - i.cur_op = i.bytecode_start + GET_UI32(i.cur_op, 6); + GET_REG(i->cur_op, 0,i).o = param.arg.o; + if (MVM_spesh_log_is_logging(i->tc)) + MVM_spesh_log_parameter(i->tc, param.arg_idx, param.arg.o); + i->cur_op = i->bytecode_start + GET_UI32(i->cur_op, 6); } else { - i.cur_op += 10; + i->cur_op += 10; } goto cbc_next(i); } -__code cbc_param_sp(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_args_slurpy_positional(i.tc, &i.tc->cur_frame->params, GET_UI16(i.cur_op, 2)); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_param_sn(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_args_slurpy_named(i.tc, &i.tc->cur_frame->params); - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_getcode(INTER i){ - GET_REG(i.cur_op, 0,i).o =i.cu->body.coderefs[GET_UI16(i.cur_op, 2)]; - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_caller(INTER i){ - MVMFrame *caller = i.tc->cur_frame; - MVMint64 depth = GET_REG(i.cur_op, 2,i).i64; +__code cbc_param_sp(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_args_slurpy_positional(i->tc, &i->tc->cur_frame->params, GET_UI16(i->cur_op, 2)); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_param_sn(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_args_slurpy_named(i->tc, &i->tc->cur_frame->params); + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_getcode(INTERP i){ + GET_REG(i->cur_op, 0,i).o =i->cu->body.coderefs[GET_UI16(i->cur_op, 2)]; + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_caller(INTERP i){ + MVMFrame *caller = i->tc->cur_frame; + MVMint64 depth = GET_REG(i->cur_op, 2,i).i64; while (caller && depth-- > 0) /* keep the > 0. */ caller = caller->caller; - GET_REG(i.cur_op, 0,i).o = caller ? caller->code_ref : i.tc->instance->VMNull; + GET_REG(i->cur_op, 0,i).o = caller ? caller->code_ref : i->tc->instance->VMNull; - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_capturelex(INTER i){ - MVM_frame_capturelex(i.tc, GET_REG(i.cur_op, 0,i).o); - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_takeclosure(INTER i){ - (i.reg_base[*((MVMuint16 *)(i.cur_op + 0))]).o = MVM_frame_takeclosure(i.tc, GET_REG(i.cur_op, 2,i).o); - //MVMObject* tmp_base = MVM_frame_takeclosure(i.tc,GET_REG(i.cur_op,2,i).o); - //GET_REG(i.cur_op, 0,i).o = MVM_frame_takeclosure(i.tc, GET_REG(i.cur_op, 2,i).o); - //GET_REG(i.cur_op,0,i).o = tmp_base; - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_exception(INTER i){ - GET_REG(i.cur_op, 0,i).o = i.tc->active_handlers - ? i.tc->active_handlers->ex_obj - : i.tc->instance->VMNull; - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_bindexmessage(INTER i){ - MVMObject *ex = GET_REG(i.cur_op, 0,i).o; + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_capturelex(INTERP i){ + MVM_frame_capturelex(i->tc, GET_REG(i->cur_op, 0,i).o); + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_takeclosure(INTERP i){ + (i->reg_base[*((MVMuint16 *)(i->cur_op + 0))]).o = MVM_frame_takeclosure(i->tc, GET_REG(i->cur_op, 2,i).o); + //MVMObject* tmp_base = MVM_frame_takeclosure(i->tc,GET_REG(i->cur_op,2,i).o); + //GET_REG(i->cur_op, 0,i).o = MVM_frame_takeclosure(i->tc, GET_REG(i->cur_op, 2,i).o); + //GET_REG(i->cur_op,0,i).o = tmp_base; + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_exception(INTERP i){ + GET_REG(i->cur_op, 0,i).o = i->tc->active_handlers + ? i->tc->active_handlers->ex_obj + : i->tc->instance->VMNull; + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_bindexmessage(INTERP i){ + MVMObject *ex = GET_REG(i->cur_op, 0,i).o; if (IS_CONCRETE(ex) && REPR(ex)->ID == MVM_REPR_ID_MVMException) { - MVM_ASSIGN_REF(i.tc, &(ex->header), ((MVMException *)ex)->body.message, - GET_REG(i.cur_op, 2,i).s); + MVM_ASSIGN_REF(i->tc, &(ex->header), ((MVMException *)ex)->body.message, + GET_REG(i->cur_op, 2,i).s); } else { - MVM_exception_throw_adhoc(i.tc, "bindexmessage needs a VMException, got %s (%s)", REPR(ex)->name, MVM_6model_get_debug_name(i.tc, ex)); + MVM_exception_throw_adhoc(i->tc, "bindexmessage needs a VMException, got %s (%s)", REPR(ex)->name, MVM_6model_get_debug_name(i->tc, ex)); } - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_bindexpayload(INTER i){ - MVMObject *ex = GET_REG(i.cur_op, 0,i).o; - MVM_bind_exception_payload(i.tc, ex, GET_REG(i.cur_op, 2,i).o); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_bindexcategory(INTER i){ - MVMObject *ex = GET_REG(i.cur_op, 0,i).o; - MVM_bind_exception_category(i.tc, ex, GET_REG(i.cur_op, 2,i).i64); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_getexmessage(INTER i){ - MVMObject *ex = GET_REG(i.cur_op, 2,i).o; + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_bindexpayload(INTERP i){ + MVMObject *ex = GET_REG(i->cur_op, 0,i).o; + MVM_bind_exception_payload(i->tc, ex, GET_REG(i->cur_op, 2,i).o); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_bindexcategory(INTERP i){ + MVMObject *ex = GET_REG(i->cur_op, 0,i).o; + MVM_bind_exception_category(i->tc, ex, GET_REG(i->cur_op, 2,i).i64); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_getexmessage(INTERP i){ + MVMObject *ex = GET_REG(i->cur_op, 2,i).o; if (IS_CONCRETE(ex) && REPR(ex)->ID == MVM_REPR_ID_MVMException) - GET_REG(i.cur_op, 0,i).s = ((MVMException *)ex)->body.message; + GET_REG(i->cur_op, 0,i).s = ((MVMException *)ex)->body.message; else - MVM_exception_throw_adhoc(i.tc, "getexmessage needs a VMException, got %s (%s)", REPR(ex)->name, MVM_6model_get_debug_name(i.tc, ex)); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_getexpayload(INTER i){ - MVMObject *ex = GET_REG(i.cur_op, 2,i).o; - GET_REG(i.cur_op, 0,i).o = MVM_get_exception_payload(i.tc, ex); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_getexcategory(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_get_exception_category(i.tc, GET_REG(i.cur_op, 2,i).o); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_throwdyn(INTER i){ - MVMRegister *rr = &GET_REG(i.cur_op, 0,i); - MVMObject *ex_obj = GET_REG(i.cur_op, 2,i).o; - i.cur_op += 4; - MVM_exception_throwobj(i.tc, MVM_EX_THROW_DYN, ex_obj, rr); - goto cbc_next(i); - } -__code cbc_throwlex(INTER i){ - MVMRegister *rr = &GET_REG(i.cur_op, 0,i); - MVMObject *ex_obj = GET_REG(i.cur_op, 2,i).o; - i.cur_op += 4; - MVM_exception_throwobj(i.tc, MVM_EX_THROW_LEX, ex_obj, rr); - goto cbc_next(i); - } -__code cbc_throwlexotic(INTER i){ - MVMRegister *rr = &GET_REG(i.cur_op, 0,i); - MVMObject *ex_obj = GET_REG(i.cur_op, 2,i).o; - i.cur_op += 4; - MVM_exception_throwobj(i.tc, MVM_EX_THROW_LEXOTIC, ex_obj, rr); - goto cbc_next(i); - } -__code cbc_throwcatdyn(INTER i){ - MVMRegister *rr = &GET_REG(i.cur_op, 0,i); - MVMuint32 cat = (MVMuint32)MVM_BC_get_I64(i.cur_op, 2); - i.cur_op += 4; - MVM_exception_throwcat(i.tc, MVM_EX_THROW_DYN, cat, rr); - goto cbc_next(i); - } -__code cbc_throwcatlex(INTER i){ - MVMRegister *rr = &GET_REG(i.cur_op, 0,i); - MVMuint32 cat = (MVMuint32)MVM_BC_get_I64(i.cur_op, 2); - i.cur_op += 4; - MVM_exception_throwcat(i.tc, MVM_EX_THROW_LEX, cat, rr); - goto cbc_next(i); - } -__code cbc_throwcatlexotic(INTER i){ - MVMRegister *rr = &GET_REG(i.cur_op, 0,i); - MVMuint32 cat = (MVMuint32)MVM_BC_get_I64(i.cur_op, 2); - i.cur_op += 4; - MVM_exception_throwcat(i.tc, MVM_EX_THROW_LEXOTIC, cat, rr); - goto cbc_next(i); - } -__code cbc_die(INTER i){ - MVMRegister *rr = &GET_REG(i.cur_op, 0,i); - MVMString *str = GET_REG(i.cur_op, 2,i).s; - i.cur_op += 4; - MVM_exception_die(i.tc, str, rr); - goto cbc_next(i); - } -__code cbc_rethrow(INTER i){ - MVM_exception_throwobj(i.tc, MVM_EX_THROW_DYN, GET_REG(i.cur_op, 0,i).o, NULL); - goto cbc_next(i); - } -__code cbc_resume(INTER i){ - /* Expect that resume will set the PC, so don't update i.cur_op + MVM_exception_throw_adhoc(i->tc, "getexmessage needs a VMException, got %s (%s)", REPR(ex)->name, MVM_6model_get_debug_name(i->tc, ex)); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_getexpayload(INTERP i){ + MVMObject *ex = GET_REG(i->cur_op, 2,i).o; + GET_REG(i->cur_op, 0,i).o = MVM_get_exception_payload(i->tc, ex); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_getexcategory(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_get_exception_category(i->tc, GET_REG(i->cur_op, 2,i).o); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_throwdyn(INTERP i){ + MVMRegister *rr = &GET_REG(i->cur_op, 0,i); + MVMObject *ex_obj = GET_REG(i->cur_op, 2,i).o; + i->cur_op += 4; + MVM_exception_throwobj(i->tc, MVM_EX_THROW_DYN, ex_obj, rr); + goto cbc_next(i); + } +__code cbc_throwlex(INTERP i){ + MVMRegister *rr = &GET_REG(i->cur_op, 0,i); + MVMObject *ex_obj = GET_REG(i->cur_op, 2,i).o; + i->cur_op += 4; + MVM_exception_throwobj(i->tc, MVM_EX_THROW_LEX, ex_obj, rr); + goto cbc_next(i); + } +__code cbc_throwlexotic(INTERP i){ + MVMRegister *rr = &GET_REG(i->cur_op, 0,i); + MVMObject *ex_obj = GET_REG(i->cur_op, 2,i).o; + i->cur_op += 4; + MVM_exception_throwobj(i->tc, MVM_EX_THROW_LEXOTIC, ex_obj, rr); + goto cbc_next(i); + } +__code cbc_throwcatdyn(INTERP i){ + MVMRegister *rr = &GET_REG(i->cur_op, 0,i); + MVMuint32 cat = (MVMuint32)MVM_BC_get_I64(i->cur_op, 2); + i->cur_op += 4; + MVM_exception_throwcat(i->tc, MVM_EX_THROW_DYN, cat, rr); + goto cbc_next(i); + } +__code cbc_throwcatlex(INTERP i){ + MVMRegister *rr = &GET_REG(i->cur_op, 0,i); + MVMuint32 cat = (MVMuint32)MVM_BC_get_I64(i->cur_op, 2); + i->cur_op += 4; + MVM_exception_throwcat(i->tc, MVM_EX_THROW_LEX, cat, rr); + goto cbc_next(i); + } +__code cbc_throwcatlexotic(INTERP i){ + MVMRegister *rr = &GET_REG(i->cur_op, 0,i); + MVMuint32 cat = (MVMuint32)MVM_BC_get_I64(i->cur_op, 2); + i->cur_op += 4; + MVM_exception_throwcat(i->tc, MVM_EX_THROW_LEXOTIC, cat, rr); + goto cbc_next(i); + } +__code cbc_die(INTERP i){ + MVMRegister *rr = &GET_REG(i->cur_op, 0,i); + MVMString *str = GET_REG(i->cur_op, 2,i).s; + i->cur_op += 4; + MVM_exception_die(i->tc, str, rr); + goto cbc_next(i); + } +__code cbc_rethrow(INTERP i){ + MVM_exception_throwobj(i->tc, MVM_EX_THROW_DYN, GET_REG(i->cur_op, 0,i).o, NULL); + goto cbc_next(i); + } +__code cbc_resume(INTERP i){ + /* Expect that resume will set the PC, so don't update i->cur_op * here. */ - MVM_exception_resume(i.tc, GET_REG(i.cur_op, 0,i).o); - goto cbc_next(i); -} -__code cbc_takehandlerresult(INTER i){ - GET_REG(i.cur_op, 0,i).o = i.tc->last_handler_result - ? i.tc->last_handler_result - : i.tc->instance->VMNull; - i.tc->last_handler_result = NULL; - i.cur_op += 2; - goto cbc_next(i); - } -__code cbc_backtracestrings(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_exception_backtrace_strings(i.tc, GET_REG(i.cur_op, 2,i).o); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_usecapture(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_args_use_capture(i.tc, i.tc->cur_frame); - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_savecapture(INTER i){ + MVM_exception_resume(i->tc, GET_REG(i->cur_op, 0,i).o); + goto cbc_next(i); +} +__code cbc_takehandlerresult(INTERP i){ + GET_REG(i->cur_op, 0,i).o = i->tc->last_handler_result + ? i->tc->last_handler_result + : i->tc->instance->VMNull; + i->tc->last_handler_result = NULL; + i->cur_op += 2; + goto cbc_next(i); + } +__code cbc_backtracestrings(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_exception_backtrace_strings(i->tc, GET_REG(i->cur_op, 2,i).o); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_usecapture(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_args_use_capture(i->tc, i->tc->cur_frame); + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_savecapture(INTERP i){ /* Create a new call capture object. */ - GET_REG(i.cur_op, 0,i).o = MVM_args_save_capture(i.tc, i.tc->cur_frame); - i.cur_op += 2; - goto cbc_next(i); - } -__code cbc_captureposelems(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; + GET_REG(i->cur_op, 0,i).o = MVM_args_save_capture(i->tc, i->tc->cur_frame); + i->cur_op += 2; + goto cbc_next(i); + } +__code cbc_captureposelems(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; if (IS_CONCRETE(obj) && REPR(obj)->ID == MVM_REPR_ID_MVMCallCapture) { MVMCallCapture *cc = (MVMCallCapture *)obj; - GET_REG(i.cur_op, 0,i).i64 = cc->body.apc->num_pos; + GET_REG(i->cur_op, 0,i).i64 = cc->body.apc->num_pos; } else { - MVM_exception_throw_adhoc(i.tc, "captureposelems needs a MVMCallCapture"); + MVM_exception_throw_adhoc(i->tc, "captureposelems needs a MVMCallCapture"); } - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_captureposarg(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_captureposarg(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; if (IS_CONCRETE(obj) && REPR(obj)->ID == MVM_REPR_ID_MVMCallCapture) { MVMCallCapture *cc = (MVMCallCapture *)obj; - GET_REG(i.cur_op, 0,i).o = MVM_args_get_required_pos_obj(i.tc, cc->body.apc, - (MVMuint32)GET_REG(i.cur_op, 4,i).i64); + GET_REG(i->cur_op, 0,i).o = MVM_args_get_required_pos_obj(i->tc, cc->body.apc, + (MVMuint32)GET_REG(i->cur_op, 4,i).i64); } else { - MVM_exception_throw_adhoc(i.tc, "captureposarg needs a MVMCallCapture"); + MVM_exception_throw_adhoc(i->tc, "captureposarg needs a MVMCallCapture"); } - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_captureposarg_i(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_captureposarg_i(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; if (IS_CONCRETE(obj) && REPR(obj)->ID == MVM_REPR_ID_MVMCallCapture) { MVMCallCapture *cc = (MVMCallCapture *)obj; - GET_REG(i.cur_op, 0,i).i64 = MVM_args_get_required_pos_int(i.tc, cc->body.apc, - (MVMuint32)GET_REG(i.cur_op, 4,i).i64); + GET_REG(i->cur_op, 0,i).i64 = MVM_args_get_required_pos_int(i->tc, cc->body.apc, + (MVMuint32)GET_REG(i->cur_op, 4,i).i64); } else { - MVM_exception_throw_adhoc(i.tc, "captureposarg_i needs a MVMCallCapture"); + MVM_exception_throw_adhoc(i->tc, "captureposarg_i needs a MVMCallCapture"); } - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_captureposarg_n(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_captureposarg_n(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; if (IS_CONCRETE(obj) && REPR(obj)->ID == MVM_REPR_ID_MVMCallCapture) { MVMCallCapture *cc = (MVMCallCapture *)obj; - GET_REG(i.cur_op, 0,i).n64 = MVM_args_get_pos_num(i.tc, cc->body.apc, - (MVMuint32)GET_REG(i.cur_op, 4,i).i64, MVM_ARG_REQUIRED).arg.n64; + GET_REG(i->cur_op, 0,i).n64 = MVM_args_get_pos_num(i->tc, cc->body.apc, + (MVMuint32)GET_REG(i->cur_op, 4,i).i64, MVM_ARG_REQUIRED).arg.n64; } else { - MVM_exception_throw_adhoc(i.tc, "captureposarg_n needs a MVMCallCapture"); + MVM_exception_throw_adhoc(i->tc, "captureposarg_n needs a MVMCallCapture"); } - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_captureposarg_s(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_captureposarg_s(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; if (IS_CONCRETE(obj) && REPR(obj)->ID == MVM_REPR_ID_MVMCallCapture) { MVMCallCapture *cc = (MVMCallCapture *)obj; - GET_REG(i.cur_op, 0,i).s = MVM_args_get_required_pos_str(i.tc, cc->body.apc, - (MVMuint32)GET_REG(i.cur_op, 4,i).i64); + GET_REG(i->cur_op, 0,i).s = MVM_args_get_required_pos_str(i->tc, cc->body.apc, + (MVMuint32)GET_REG(i->cur_op, 4,i).i64); } else { - MVM_exception_throw_adhoc(i.tc, "captureposarg_s needs a MVMCallCapture"); + MVM_exception_throw_adhoc(i->tc, "captureposarg_s needs a MVMCallCapture"); } - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_captureposprimspec(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; - MVMint64 j = GET_REG(i.cur_op, 4,i).i64; + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_captureposprimspec(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; + MVMint64 j = GET_REG(i->cur_op, 4,i).i64; if (IS_CONCRETE(obj) && REPR(obj)->ID == MVM_REPR_ID_MVMCallCapture) { MVMCallCapture *cc = (MVMCallCapture *)obj; if (j >= 0 && j < cc->body.apc->num_pos) { @@ -1478,506 +1474,506 @@ : cc->body.apc->callsite->arg_flags; switch (arg_flags[j] & MVM_CALLSITE_ARG_MASK) { case MVM_CALLSITE_ARG_INT: - GET_REG(i.cur_op, 0,i).i64 = MVM_STORAGE_SPEC_BP_INT; + GET_REG(i->cur_op, 0,i).i64 = MVM_STORAGE_SPEC_BP_INT; break; case MVM_CALLSITE_ARG_NUM: - GET_REG(i.cur_op, 0,i).i64 = MVM_STORAGE_SPEC_BP_NUM; + GET_REG(i->cur_op, 0,i).i64 = MVM_STORAGE_SPEC_BP_NUM; break; case MVM_CALLSITE_ARG_STR: - GET_REG(i.cur_op, 0,i).i64 = MVM_STORAGE_SPEC_BP_STR; + GET_REG(i->cur_op, 0,i).i64 = MVM_STORAGE_SPEC_BP_STR; break; default: - GET_REG(i.cur_op, 0,i).i64 = MVM_STORAGE_SPEC_BP_NONE; + GET_REG(i->cur_op, 0,i).i64 = MVM_STORAGE_SPEC_BP_NONE; break; } } else { - MVM_exception_throw_adhoc(i.tc, + MVM_exception_throw_adhoc(i->tc, "Bad argument index given to captureposprimspec"); } } else { - MVM_exception_throw_adhoc(i.tc, "captureposprimspec needs a MVMCallCapture"); + MVM_exception_throw_adhoc(i->tc, "captureposprimspec needs a MVMCallCapture"); } - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_captureexistsnamed(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_captureexistsnamed(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; if (IS_CONCRETE(obj) && REPR(obj)->ID == MVM_REPR_ID_MVMCallCapture) { MVMCallCapture *cc = (MVMCallCapture *)obj; - GET_REG(i.cur_op, 0,i).i64 = MVM_args_has_named(i.tc, cc->body.apc, - GET_REG(i.cur_op, 4,i).s); + GET_REG(i->cur_op, 0,i).i64 = MVM_args_has_named(i->tc, cc->body.apc, + GET_REG(i->cur_op, 4,i).s); } else { - MVM_exception_throw_adhoc(i.tc, "captureexistsnamed needs a MVMCallCapture"); + MVM_exception_throw_adhoc(i->tc, "captureexistsnamed needs a MVMCallCapture"); } - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_capturehasnameds(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_capturehasnameds(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; if (IS_CONCRETE(obj) && REPR(obj)->ID == MVM_REPR_ID_MVMCallCapture) { /* If positionals count doesn't mai->tch arg count, we must * have some named args. */ MVMCallCapture *cc = (MVMCallCapture *)obj; - GET_REG(i.cur_op, 0,i).i64 = cc->body.apc->arg_count != cc->body.apc->num_pos; + GET_REG(i->cur_op, 0,i).i64 = cc->body.apc->arg_count != cc->body.apc->num_pos; } else { - MVM_exception_throw_adhoc(i.tc, "capturehasnameds needs a MVMCallCapture"); + MVM_exception_throw_adhoc(i->tc, "capturehasnameds needs a MVMCallCapture"); } - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_invokewithcapture(INTER i){ + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_invokewithcapture(INTERP i){ MVMObject *cobj; - cobj = GET_REG(i.cur_op, 4,i).o; + cobj = GET_REG(i->cur_op, 4,i).o; if (IS_CONCRETE(cobj) && REPR(cobj)->ID == MVM_REPR_ID_MVMCallCapture) { - MVMObject *code = GET_REG(i.cur_op, 2,i).o; + MVMObject *code = GET_REG(i->cur_op, 2,i).o; MVMCallCapture *cc = (MVMCallCapture *)cobj; - MVMFrameExtra *e = MVM_frame_extra(i.tc, i.tc->cur_frame); - code = MVM_frame_find_invokee(i.tc, code, NULL); - i.tc->cur_frame->return_value = &GET_REG(i.cur_op, 0,i); - i.tc->cur_frame->return_type = MVM_RETURN_OBJ; - i.cur_op += 6; - i.tc->cur_frame->return_address = i.cur_op; - MVMROOT(i.tc, cobj, { - STABLE(code)->invoke(i.tc, code, cc->body.apc->callsite, + MVMFrameExtra *e = MVM_frame_extra(i->tc, i->tc->cur_frame); + code = MVM_frame_find_invokee(i->tc, code, NULL); + i->tc->cur_frame->return_value = &GET_REG(i->cur_op, 0,i); + i->tc->cur_frame->return_type = MVM_RETURN_OBJ; + i->cur_op += 6; + i->tc->cur_frame->return_address = i->cur_op; + MVMROOT(i->tc, cobj, { + STABLE(code)->invoke(i->tc, code, cc->body.apc->callsite, cc->body.apc->args); }); - if (MVM_FRAME_IS_ON_CALLSTACK(i.tc, i.tc->cur_frame)) { + if (MVM_FRAME_IS_ON_CALLSTACK(i->tc, i->tc->cur_frame)) { e->invoked_call_capture = cobj; } else { - MVM_ASSIGN_REF(i.tc, &(i.tc->cur_frame->header), + MVM_ASSIGN_REF(i->tc, &(i->tc->cur_frame->header), e->invoked_call_capture, cobj); } } else { - MVM_exception_throw_adhoc(i.tc, "invokewithcapture needs a MVMCallCapture"); + MVM_exception_throw_adhoc(i->tc, "invokewithcapture needs a MVMCallCapture"); } goto cbc_next(i); } -__code cbc_multicacheadd(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_multi_cache_add(i.tc, GET_REG(i.cur_op, 2,i).o, - GET_REG(i.cur_op, 4,i).o, GET_REG(i.cur_op, 6,i).o); - i.cur_op += 8; - goto cbc_next(i); -} -__code cbc_multicachefind(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_multi_cache_find(i.tc, GET_REG(i.cur_op, 2,i).o, - GET_REG(i.cur_op, 4,i).o); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_null_s(INTER i){ - GET_REG(i.cur_op, 0,i).s = NULL; - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_isnull_s(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = GET_REG(i.cur_op, 2,i).s ? 0 : 1; - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_eq_s(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_string_equal(i.tc, - GET_REG(i.cur_op, 2,i).s, GET_REG(i.cur_op, 4,i).s); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_ne_s(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = (MVMint64)(MVM_string_equal(i.tc, - GET_REG(i.cur_op, 2,i).s, GET_REG(i.cur_op, 4,i).s)? 0 : 1); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_gt_s(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_string_compare(i.tc, - GET_REG(i.cur_op, 2,i).s, GET_REG(i.cur_op, 4,i).s) == 1; - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_ge_s(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_string_compare(i.tc, - GET_REG(i.cur_op, 2,i).s, GET_REG(i.cur_op, 4,i).s) >= 0; - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_lt_s(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_string_compare(i.tc, - GET_REG(i.cur_op, 2,i).s, GET_REG(i.cur_op, 4,i).s) == -1; - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_le_s(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_string_compare(i.tc, - GET_REG(i.cur_op, 2,i).s, GET_REG(i.cur_op, 4,i).s) <= 0; - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_cmp_s(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_string_compare(i.tc, - GET_REG(i.cur_op, 2,i).s, GET_REG(i.cur_op, 4,i).s); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_unicmp_s(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_unicode_string_compare(i.tc, - GET_REG(i.cur_op, 2,i).s, GET_REG(i.cur_op, 4,i).s, - GET_REG(i.cur_op, 6,i).i64, GET_REG(i.cur_op, 8,i).i64, - GET_REG(i.cur_op, 10,i).i64); - i.cur_op += 12; - goto cbc_next(i); -} -__code cbc_eqat_s(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_string_equal_at(i.tc, - GET_REG(i.cur_op, 2,i).s, GET_REG(i.cur_op, 4,i).s, - GET_REG(i.cur_op, 6,i).i64); - i.cur_op += 8; - goto cbc_next(i); -} -__code cbc_eqatic_s(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_string_equal_at_ignore_case(i.tc, - GET_REG(i.cur_op, 2,i).s, GET_REG(i.cur_op, 4,i).s, - GET_REG(i.cur_op, 6,i).i64); - i.cur_op += 8; - goto cbc_next(i); -} -__code cbc_eqaticim_s(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_string_equal_at_ignore_case_ignore_mark(i.tc, - GET_REG(i.cur_op, 2,i).s, GET_REG(i.cur_op, 4,i).s, - GET_REG(i.cur_op, 6,i).i64); - i.cur_op += 8; - goto cbc_next(i); -} -__code cbc_haveat_s(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_string_have_at(i.tc, - GET_REG(i.cur_op, 2,i).s, GET_REG(i.cur_op, 4,i).i64, - GET_REG(i.cur_op, 6,i).i64, GET_REG(i.cur_op, 8,i).s, - GET_REG(i.cur_op, 10,i).i64); - i.cur_op += 12; - goto cbc_next(i); -} -__code cbc_concat_s(INTER i){ - GET_REG(i.cur_op, 0,i).s = MVM_string_concatenate(i.tc, - GET_REG(i.cur_op, 2,i).s, GET_REG(i.cur_op, 4,i).s); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_repeat_s(INTER i){ - GET_REG(i.cur_op, 0,i).s = MVM_string_repeat(i.tc, - GET_REG(i.cur_op, 2,i).s, GET_REG(i.cur_op, 4,i).i64); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_substr_s(INTER i){ - GET_REG(i.cur_op, 0,i).s = MVM_string_substring(i.tc, - GET_REG(i.cur_op, 2,i).s, GET_REG(i.cur_op, 4,i).i64, - GET_REG(i.cur_op, 6,i).i64); - i.cur_op += 8; - goto cbc_next(i); -} -__code cbc_index_s(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_string_index(i.tc, - GET_REG(i.cur_op, 2,i).s, GET_REG(i.cur_op, 4,i).s, GET_REG(i.cur_op, 6,i).i64); - i.cur_op += 8; - goto cbc_next(i); -} -__code cbc_indexic_s(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_string_index_ignore_case(i.tc, - GET_REG(i.cur_op, 2,i).s, GET_REG(i.cur_op, 4,i).s, GET_REG(i.cur_op, 6,i).i64); - i.cur_op += 8; - goto cbc_next(i); -} -__code cbc_indexicim_s(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_string_index_ignore_case_ignore_mark(i.tc, - GET_REG(i.cur_op, 2,i).s, GET_REG(i.cur_op, 4,i).s, GET_REG(i.cur_op, 6,i).i64); - i.cur_op += 8; - goto cbc_next(i); -} -__code cbc_graphs_s(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_string_graphs(i.tc, GET_REG(i.cur_op, 2,i).s); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_codes_s(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_string_codes(i.tc, GET_REG(i.cur_op, 2,i).s); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_getcp_s(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_string_get_grapheme_at(i.tc, - GET_REG(i.cur_op, 2,i).s, GET_REG(i.cur_op, 4,i).i64); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_indexcp_s(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_string_index_of_grapheme(i.tc, - GET_REG(i.cur_op, 2,i).s, GET_REG(i.cur_op, 4,i).i64); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_uc(INTER i){ - GET_REG(i.cur_op, 0,i).s = MVM_string_uc(i.tc, - GET_REG(i.cur_op, 2,i).s); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_lc(INTER i){ - GET_REG(i.cur_op, 0,i).s = MVM_string_lc(i.tc, - GET_REG(i.cur_op, 2,i).s); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_tc(INTER i){ - GET_REG(i.cur_op, 0,i).s = MVM_string_tc(i.tc, - GET_REG(i.cur_op, 2,i).s); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_split(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_string_split(i.tc, - GET_REG(i.cur_op, 2,i).s, GET_REG(i.cur_op, 4,i).s); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_join(INTER i){ - GET_REG(i.cur_op, 0,i).s = MVM_string_join(i.tc, - GET_REG(i.cur_op, 2,i).s, GET_REG(i.cur_op, 4,i).o); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_getcpbyname(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_unicode_lookup_by_name(i.tc, - GET_REG(i.cur_op, 2,i).s); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_getstrfromname(INTER i){ - GET_REG(i.cur_op, 0,i).s = MVM_unicode_string_from_name(i.tc, - GET_REG(i.cur_op, 2,i).s); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_indexat(INTER i){ +__code cbc_multicacheadd(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_multi_cache_add(i->tc, GET_REG(i->cur_op, 2,i).o, + GET_REG(i->cur_op, 4,i).o, GET_REG(i->cur_op, 6,i).o); + i->cur_op += 8; + goto cbc_next(i); +} +__code cbc_multicachefind(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_multi_cache_find(i->tc, GET_REG(i->cur_op, 2,i).o, + GET_REG(i->cur_op, 4,i).o); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_null_s(INTERP i){ + GET_REG(i->cur_op, 0,i).s = NULL; + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_isnull_s(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = GET_REG(i->cur_op, 2,i).s ? 0 : 1; + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_eq_s(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_string_equal(i->tc, + GET_REG(i->cur_op, 2,i).s, GET_REG(i->cur_op, 4,i).s); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_ne_s(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = (MVMint64)(MVM_string_equal(i->tc, + GET_REG(i->cur_op, 2,i).s, GET_REG(i->cur_op, 4,i).s)? 0 : 1); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_gt_s(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_string_compare(i->tc, + GET_REG(i->cur_op, 2,i).s, GET_REG(i->cur_op, 4,i).s) == 1; + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_ge_s(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_string_compare(i->tc, + GET_REG(i->cur_op, 2,i).s, GET_REG(i->cur_op, 4,i).s) >= 0; + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_lt_s(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_string_compare(i->tc, + GET_REG(i->cur_op, 2,i).s, GET_REG(i->cur_op, 4,i).s) == -1; + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_le_s(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_string_compare(i->tc, + GET_REG(i->cur_op, 2,i).s, GET_REG(i->cur_op, 4,i).s) <= 0; + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_cmp_s(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_string_compare(i->tc, + GET_REG(i->cur_op, 2,i).s, GET_REG(i->cur_op, 4,i).s); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_unicmp_s(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_unicode_string_compare(i->tc, + GET_REG(i->cur_op, 2,i).s, GET_REG(i->cur_op, 4,i).s, + GET_REG(i->cur_op, 6,i).i64, GET_REG(i->cur_op, 8,i).i64, + GET_REG(i->cur_op, 10,i).i64); + i->cur_op += 12; + goto cbc_next(i); +} +__code cbc_eqat_s(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_string_equal_at(i->tc, + GET_REG(i->cur_op, 2,i).s, GET_REG(i->cur_op, 4,i).s, + GET_REG(i->cur_op, 6,i).i64); + i->cur_op += 8; + goto cbc_next(i); +} +__code cbc_eqatic_s(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_string_equal_at_ignore_case(i->tc, + GET_REG(i->cur_op, 2,i).s, GET_REG(i->cur_op, 4,i).s, + GET_REG(i->cur_op, 6,i).i64); + i->cur_op += 8; + goto cbc_next(i); +} +__code cbc_eqaticim_s(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_string_equal_at_ignore_case_ignore_mark(i->tc, + GET_REG(i->cur_op, 2,i).s, GET_REG(i->cur_op, 4,i).s, + GET_REG(i->cur_op, 6,i).i64); + i->cur_op += 8; + goto cbc_next(i); +} +__code cbc_haveat_s(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_string_have_at(i->tc, + GET_REG(i->cur_op, 2,i).s, GET_REG(i->cur_op, 4,i).i64, + GET_REG(i->cur_op, 6,i).i64, GET_REG(i->cur_op, 8,i).s, + GET_REG(i->cur_op, 10,i).i64); + i->cur_op += 12; + goto cbc_next(i); +} +__code cbc_concat_s(INTERP i){ + GET_REG(i->cur_op, 0,i).s = MVM_string_concatenate(i->tc, + GET_REG(i->cur_op, 2,i).s, GET_REG(i->cur_op, 4,i).s); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_repeat_s(INTERP i){ + GET_REG(i->cur_op, 0,i).s = MVM_string_repeat(i->tc, + GET_REG(i->cur_op, 2,i).s, GET_REG(i->cur_op, 4,i).i64); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_substr_s(INTERP i){ + GET_REG(i->cur_op, 0,i).s = MVM_string_substring(i->tc, + GET_REG(i->cur_op, 2,i).s, GET_REG(i->cur_op, 4,i).i64, + GET_REG(i->cur_op, 6,i).i64); + i->cur_op += 8; + goto cbc_next(i); +} +__code cbc_index_s(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_string_index(i->tc, + GET_REG(i->cur_op, 2,i).s, GET_REG(i->cur_op, 4,i).s, GET_REG(i->cur_op, 6,i).i64); + i->cur_op += 8; + goto cbc_next(i); +} +__code cbc_indexic_s(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_string_index_ignore_case(i->tc, + GET_REG(i->cur_op, 2,i).s, GET_REG(i->cur_op, 4,i).s, GET_REG(i->cur_op, 6,i).i64); + i->cur_op += 8; + goto cbc_next(i); +} +__code cbc_indexicim_s(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_string_index_ignore_case_ignore_mark(i->tc, + GET_REG(i->cur_op, 2,i).s, GET_REG(i->cur_op, 4,i).s, GET_REG(i->cur_op, 6,i).i64); + i->cur_op += 8; + goto cbc_next(i); +} +__code cbc_graphs_s(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_string_graphs(i->tc, GET_REG(i->cur_op, 2,i).s); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_codes_s(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_string_codes(i->tc, GET_REG(i->cur_op, 2,i).s); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_getcp_s(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_string_get_grapheme_at(i->tc, + GET_REG(i->cur_op, 2,i).s, GET_REG(i->cur_op, 4,i).i64); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_indexcp_s(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_string_index_of_grapheme(i->tc, + GET_REG(i->cur_op, 2,i).s, GET_REG(i->cur_op, 4,i).i64); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_uc(INTERP i){ + GET_REG(i->cur_op, 0,i).s = MVM_string_uc(i->tc, + GET_REG(i->cur_op, 2,i).s); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_lc(INTERP i){ + GET_REG(i->cur_op, 0,i).s = MVM_string_lc(i->tc, + GET_REG(i->cur_op, 2,i).s); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_tc(INTERP i){ + GET_REG(i->cur_op, 0,i).s = MVM_string_tc(i->tc, + GET_REG(i->cur_op, 2,i).s); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_split(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_string_split(i->tc, + GET_REG(i->cur_op, 2,i).s, GET_REG(i->cur_op, 4,i).s); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_join(INTERP i){ + GET_REG(i->cur_op, 0,i).s = MVM_string_join(i->tc, + GET_REG(i->cur_op, 2,i).s, GET_REG(i->cur_op, 4,i).o); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_getcpbyname(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_unicode_lookup_by_name(i->tc, + GET_REG(i->cur_op, 2,i).s); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_getstrfromname(INTERP i){ + GET_REG(i->cur_op, 0,i).s = MVM_unicode_string_from_name(i->tc, + GET_REG(i->cur_op, 2,i).s); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_indexat(INTERP i){ /* branches on *failure* to mai->tch in the constant string, to save an instruction in regexes */ - if (MVM_string_char_at_in_string(i.tc, GET_REG(i.cur_op, 0,i).s, - GET_REG(i.cur_op, 2,i).i64, - MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 4))) >= 0) - i.cur_op += 12; + if (MVM_string_char_at_in_string(i->tc, GET_REG(i->cur_op, 0,i).s, + GET_REG(i->cur_op, 2,i).i64, + MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 4))) >= 0) + i->cur_op += 12; else - i.cur_op = i.bytecode_start + GET_UI32(i.cur_op, 8); - GC_SYNC_POINT(i.tc); - goto cbc_next(i); -} -__code cbc_indexnat(INTER i){ + i->cur_op = i->bytecode_start + GET_UI32(i->cur_op, 8); + GC_SYNC_POINT(i->tc); + goto cbc_next(i); +} +__code cbc_indexnat(INTERP i){ /* branches on *failure* to mai->tch in the constant string, to save an instruction in regexes */ - if (MVM_string_char_at_in_string(i.tc, GET_REG(i.cur_op, 0,i).s, - GET_REG(i.cur_op, 2,i).i64, - MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 4))) == -1) - i.cur_op += 12; + if (MVM_string_char_at_in_string(i->tc, GET_REG(i->cur_op, 0,i).s, + GET_REG(i->cur_op, 2,i).i64, + MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 4))) == -1) + i->cur_op += 12; else - i.cur_op = i.bytecode_start + GET_UI32(i.cur_op, 8); - GC_SYNC_POINT(i.tc); - goto cbc_next(i); -} -__code cbc_unipropcode(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = (MVMint64)MVM_unicode_name_to_property_code(i.tc, - GET_REG(i.cur_op, 2,i).s); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_unipvalcode(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = (MVMint64)MVM_unicode_name_to_property_value_code(i.tc, - GET_REG(i.cur_op, 2,i).i64, GET_REG(i.cur_op, 4,i).s); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_hasuniprop(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_string_offset_has_unicode_property_value(i.tc, - GET_REG(i.cur_op, 2,i).s, GET_REG(i.cur_op, 4,i).i64, GET_REG(i.cur_op, 6,i).i64, - GET_REG(i.cur_op, 8,i).i64); - i.cur_op += 10; - goto cbc_next(i); -} -__code cbc_hasunipropc(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_string_offset_has_unicode_property_value(i.tc, - GET_REG(i.cur_op, 2,i).s, GET_REG(i.cur_op, 4,i).i64, (MVMint64)GET_UI16(i.cur_op, 6), - (MVMint64)GET_UI16(i.cur_op, 8)); - i.cur_op += 10; - goto cbc_next(i); -} -__code cbc_chars(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_string_graphs(i.tc, GET_REG(i.cur_op, 2,i).s); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_chr(INTER i){ - GET_REG(i.cur_op, 0,i).s = MVM_string_chr(i.tc, (MVMCodepoint)GET_REG(i.cur_op, 2,i).i64); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_ordfirst(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_string_ord_at(i.tc, GET_REG(i.cur_op, 2,i).s, 0); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_ordat(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_string_ord_at(i.tc, GET_REG(i.cur_op, 2,i).s, GET_REG(i.cur_op, 4,i).i64); - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_rindexfrom(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_string_index_from_end(i.tc, - GET_REG(i.cur_op, 2,i).s, GET_REG(i.cur_op, 4,i).s, GET_REG(i.cur_op, 6,i).i64); - i.cur_op += 8; - goto cbc_next(i); -} -__code cbc_escape(INTER i){ - GET_REG(i.cur_op, 0,i).s = MVM_string_escape(i.tc, - GET_REG(i.cur_op, 2,i).s); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_flip(INTER i){ - GET_REG(i.cur_op, 0,i).s = MVM_string_flip(i.tc, - GET_REG(i.cur_op, 2,i).s); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_setbuffersize_fh(INTER i){ - MVM_io_set_buffer_size(i.tc, GET_REG(i.cur_op, 0,i).o, GET_REG(i.cur_op, 2,i).i64); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_iscclass(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_string_is_cclass(i.tc, - GET_REG(i.cur_op, 2,i).i64, GET_REG(i.cur_op, 4,i).s, - GET_REG(i.cur_op, 6,i).i64); - i.cur_op += 8; - goto cbc_next(i); -} -__code cbc_findcclass(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_string_find_cclass(i.tc, - GET_REG(i.cur_op, 2,i).i64, GET_REG(i.cur_op, 4,i).s, - GET_REG(i.cur_op, 6,i).i64, GET_REG(i.cur_op, 8,i).i64); - i.cur_op += 10; - goto cbc_next(i); -} -__code cbc_findnotcclass(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_string_find_not_cclass(i.tc, - GET_REG(i.cur_op, 2,i).i64, GET_REG(i.cur_op, 4,i).s, - GET_REG(i.cur_op, 6,i).i64, GET_REG(i.cur_op, 8,i).i64); - i.cur_op += 10; - goto cbc_next(i); -} -__code cbc_nfafromstatelist(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_nfa_from_statelist(i.tc, - GET_REG(i.cur_op, 2,i).o, GET_REG(i.cur_op, 4,i).o); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_nfarunproto(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_nfa_run_proto(i.tc, - GET_REG(i.cur_op, 2,i).o, GET_REG(i.cur_op, 4,i).s, - GET_REG(i.cur_op, 6,i).i64); - i.cur_op += 8; - goto cbc_next(i); -} -__code cbc_nfarunalt(INTER i){ - MVM_nfa_run_alt(i.tc, GET_REG(i.cur_op, 0,i).o, - GET_REG(i.cur_op, 2,i).s, GET_REG(i.cur_op, 4,i).i64, - GET_REG(i.cur_op, 6,i).o, GET_REG(i.cur_op, 8,i).o, - GET_REG(i.cur_op, 10,i).o); - i.cur_op += 12; - goto cbc_next(i); -} -__code cbc_radix(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_radix(i.tc, - GET_REG(i.cur_op, 2,i).i64, GET_REG(i.cur_op, 4,i).s, - GET_REG(i.cur_op, 6,i).i64, GET_REG(i.cur_op, 8,i).i64); - i.cur_op += 10; - goto cbc_next(i); -} -__code cbc_encode(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_string_encode_to_buf(i.tc, GET_REG(i.cur_op, 2,i).s, - GET_REG(i.cur_op, 4,i).s, GET_REG(i.cur_op, 6,i).o, NULL); - i.cur_op += 8; - goto cbc_next(i); -} -__code cbc_decode(INTER i){ - GET_REG(i.cur_op, 0,i).s = MVM_string_decode_from_buf(i.tc, - GET_REG(i.cur_op, 2,i).o, GET_REG(i.cur_op, 4,i).s); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_istrue_s(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_coerce_istrue_s(i.tc, GET_REG(i.cur_op, 2,i).s); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_isfalse_s(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_coerce_istrue_s(i.tc, GET_REG(i.cur_op, 2,i).s) ? 0 : 1; - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_null(INTER i){ - GET_REG(i.cur_op, 0,i).o = i.tc->instance->VMNull; - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_isnull(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; - GET_REG(i.cur_op, 0,i).i64 = MVM_is_null(i.tc, obj); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_ifnonnull(INTER i){ - if (MVM_is_null(i.tc, GET_REG(i.cur_op, 0,i).o)) - i.cur_op += 6; + i->cur_op = i->bytecode_start + GET_UI32(i->cur_op, 8); + GC_SYNC_POINT(i->tc); + goto cbc_next(i); +} +__code cbc_unipropcode(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = (MVMint64)MVM_unicode_name_to_property_code(i->tc, + GET_REG(i->cur_op, 2,i).s); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_unipvalcode(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = (MVMint64)MVM_unicode_name_to_property_value_code(i->tc, + GET_REG(i->cur_op, 2,i).i64, GET_REG(i->cur_op, 4,i).s); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_hasuniprop(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_string_offset_has_unicode_property_value(i->tc, + GET_REG(i->cur_op, 2,i).s, GET_REG(i->cur_op, 4,i).i64, GET_REG(i->cur_op, 6,i).i64, + GET_REG(i->cur_op, 8,i).i64); + i->cur_op += 10; + goto cbc_next(i); +} +__code cbc_hasunipropc(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_string_offset_has_unicode_property_value(i->tc, + GET_REG(i->cur_op, 2,i).s, GET_REG(i->cur_op, 4,i).i64, (MVMint64)GET_UI16(i->cur_op, 6), + (MVMint64)GET_UI16(i->cur_op, 8)); + i->cur_op += 10; + goto cbc_next(i); +} +__code cbc_chars(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_string_graphs(i->tc, GET_REG(i->cur_op, 2,i).s); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_chr(INTERP i){ + GET_REG(i->cur_op, 0,i).s = MVM_string_chr(i->tc, (MVMCodepoint)GET_REG(i->cur_op, 2,i).i64); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_ordfirst(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_string_ord_at(i->tc, GET_REG(i->cur_op, 2,i).s, 0); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_ordat(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_string_ord_at(i->tc, GET_REG(i->cur_op, 2,i).s, GET_REG(i->cur_op, 4,i).i64); + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_rindexfrom(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_string_index_from_end(i->tc, + GET_REG(i->cur_op, 2,i).s, GET_REG(i->cur_op, 4,i).s, GET_REG(i->cur_op, 6,i).i64); + i->cur_op += 8; + goto cbc_next(i); +} +__code cbc_escape(INTERP i){ + GET_REG(i->cur_op, 0,i).s = MVM_string_escape(i->tc, + GET_REG(i->cur_op, 2,i).s); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_flip(INTERP i){ + GET_REG(i->cur_op, 0,i).s = MVM_string_flip(i->tc, + GET_REG(i->cur_op, 2,i).s); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_setbuffersize_fh(INTERP i){ + MVM_io_set_buffer_size(i->tc, GET_REG(i->cur_op, 0,i).o, GET_REG(i->cur_op, 2,i).i64); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_iscclass(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_string_is_cclass(i->tc, + GET_REG(i->cur_op, 2,i).i64, GET_REG(i->cur_op, 4,i).s, + GET_REG(i->cur_op, 6,i).i64); + i->cur_op += 8; + goto cbc_next(i); +} +__code cbc_findcclass(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_string_find_cclass(i->tc, + GET_REG(i->cur_op, 2,i).i64, GET_REG(i->cur_op, 4,i).s, + GET_REG(i->cur_op, 6,i).i64, GET_REG(i->cur_op, 8,i).i64); + i->cur_op += 10; + goto cbc_next(i); +} +__code cbc_findnotcclass(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_string_find_not_cclass(i->tc, + GET_REG(i->cur_op, 2,i).i64, GET_REG(i->cur_op, 4,i).s, + GET_REG(i->cur_op, 6,i).i64, GET_REG(i->cur_op, 8,i).i64); + i->cur_op += 10; + goto cbc_next(i); +} +__code cbc_nfafromstatelist(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_nfa_from_statelist(i->tc, + GET_REG(i->cur_op, 2,i).o, GET_REG(i->cur_op, 4,i).o); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_nfarunproto(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_nfa_run_proto(i->tc, + GET_REG(i->cur_op, 2,i).o, GET_REG(i->cur_op, 4,i).s, + GET_REG(i->cur_op, 6,i).i64); + i->cur_op += 8; + goto cbc_next(i); +} +__code cbc_nfarunalt(INTERP i){ + MVM_nfa_run_alt(i->tc, GET_REG(i->cur_op, 0,i).o, + GET_REG(i->cur_op, 2,i).s, GET_REG(i->cur_op, 4,i).i64, + GET_REG(i->cur_op, 6,i).o, GET_REG(i->cur_op, 8,i).o, + GET_REG(i->cur_op, 10,i).o); + i->cur_op += 12; + goto cbc_next(i); +} +__code cbc_radix(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_radix(i->tc, + GET_REG(i->cur_op, 2,i).i64, GET_REG(i->cur_op, 4,i).s, + GET_REG(i->cur_op, 6,i).i64, GET_REG(i->cur_op, 8,i).i64); + i->cur_op += 10; + goto cbc_next(i); +} +__code cbc_encode(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_string_encode_to_buf(i->tc, GET_REG(i->cur_op, 2,i).s, + GET_REG(i->cur_op, 4,i).s, GET_REG(i->cur_op, 6,i).o, NULL); + i->cur_op += 8; + goto cbc_next(i); +} +__code cbc_decode(INTERP i){ + GET_REG(i->cur_op, 0,i).s = MVM_string_decode_from_buf(i->tc, + GET_REG(i->cur_op, 2,i).o, GET_REG(i->cur_op, 4,i).s); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_istrue_s(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_coerce_istrue_s(i->tc, GET_REG(i->cur_op, 2,i).s); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_isfalse_s(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_coerce_istrue_s(i->tc, GET_REG(i->cur_op, 2,i).s) ? 0 : 1; + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_null(INTERP i){ + GET_REG(i->cur_op, 0,i).o = i->tc->instance->VMNull; + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_isnull(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; + GET_REG(i->cur_op, 0,i).i64 = MVM_is_null(i->tc, obj); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_ifnonnull(INTERP i){ + if (MVM_is_null(i->tc, GET_REG(i->cur_op, 0,i).o)) + i->cur_op += 6; else - i.cur_op = i.bytecode_start + GET_UI32(i.cur_op, 2); - GC_SYNC_POINT(i.tc); - goto cbc_next(i); -} -__code cbc_findmeth(INTER i){ + i->cur_op = i->bytecode_start + GET_UI32(i->cur_op, 2); + GC_SYNC_POINT(i->tc); + goto cbc_next(i); +} +__code cbc_findmeth(INTERP i){ /* Increment PC first, as we may make a method call. */ - MVMRegister *res = &GET_REG(i.cur_op, 0,i); - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; - MVMString *name = MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 4)); - i.cur_op += 8; - MVM_6model_find_method(i.tc, obj, name, res, 1); - goto cbc_next(i); - } -__code cbc_findmeth_s(INTER i){ + MVMRegister *res = &GET_REG(i->cur_op, 0,i); + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; + MVMString *name = MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 4)); + i->cur_op += 8; + MVM_6model_find_method(i->tc, obj, name, res, 1); + goto cbc_next(i); + } +__code cbc_findmeth_s(INTERP i){ /* Increment PC first, as we may make a method call. */ - MVMRegister *res = &GET_REG(i.cur_op, 0,i); - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; - MVMString *name = GET_REG(i.cur_op, 4,i).s; - i.cur_op += 6; - MVM_6model_find_method(i.tc, obj, name, res, 1); - goto cbc_next(i); - } -__code cbc_can(INTER i){ + MVMRegister *res = &GET_REG(i->cur_op, 0,i); + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; + MVMString *name = GET_REG(i->cur_op, 4,i).s; + i->cur_op += 6; + MVM_6model_find_method(i->tc, obj, name, res, 1); + goto cbc_next(i); + } +__code cbc_can(INTERP i){ /* Increment PC first, as we may make a method call. */ - MVMRegister *res = &GET_REG(i.cur_op, 0,i); - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; - MVMString *name = MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 4)); - i.cur_op += 8; - MVM_6model_can_method(i.tc, obj, name, res); - goto cbc_next(i); - } -__code cbc_can_s(INTER i){ + MVMRegister *res = &GET_REG(i->cur_op, 0,i); + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; + MVMString *name = MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 4)); + i->cur_op += 8; + MVM_6model_can_method(i->tc, obj, name, res); + goto cbc_next(i); + } +__code cbc_can_s(INTERP i){ /* Increment PC first, as we may make a method call. */ - MVMRegister *res = &GET_REG(i.cur_op, 0,i); - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; - MVMString *name = GET_REG(i.cur_op, 4,i).s; - i.cur_op += 6; - MVM_6model_can_method(i.tc, obj, name, res); - goto cbc_next(i); - } -__code cbc_create(INTER i){ + MVMRegister *res = &GET_REG(i->cur_op, 0,i); + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; + MVMString *name = GET_REG(i->cur_op, 4,i).s; + i->cur_op += 6; + MVM_6model_can_method(i->tc, obj, name, res); + goto cbc_next(i); + } +__code cbc_create(INTERP i){ /* Ordering here matters. We write the object into the * register before calling initialize. This is because * if initialize allocates, obj may have moved after @@ -1985,1186 +1981,1186 @@ * the initial allocate call also. This saves us having * to put things on the temporary stack. The GC will * know to update it in the register if it moved. */ - MVMObject *type = GET_REG(i.cur_op, 2,i).o; - MVMObject *obj = REPR(type)->allocate(i.tc, STABLE(type)); - GET_REG(i.cur_op, 0,i).o = obj; + MVMObject *type = GET_REG(i->cur_op, 2,i).o; + MVMObject *obj = REPR(type)->allocate(i->tc, STABLE(type)); + GET_REG(i->cur_op, 0,i).o = obj; if (REPR(obj)->initialize) - REPR(obj)->initialize(i.tc, STABLE(obj), obj, OBJECT_BODY(obj)); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_clone(INTER i){ - MVMObject *value = GET_REG(i.cur_op, 2,i).o; + REPR(obj)->initialize(i->tc, STABLE(obj), obj, OBJECT_BODY(obj)); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_clone(INTERP i){ + MVMObject *value = GET_REG(i->cur_op, 2,i).o; if (IS_CONCRETE(value)) { - MVMROOT(i.tc, value, { - MVMObject *cloned = REPR(value)->allocate(i.tc, STABLE(value)); + MVMROOT(i->tc, value, { + MVMObject *cloned = REPR(value)->allocate(i->tc, STABLE(value)); /* Ordering here matters. We write the object into the * register before calling copy_to. This is because * if copy_to allocates, obj may have moved after * we called it. This saves us having to put things on * the temporary stack. The GC will know to update it * in the register if it moved. */ - GET_REG(i.cur_op, 0,i).o = cloned; - REPR(value)->copy_to(i.tc, STABLE(value), OBJECT_BODY(value), cloned, OBJECT_BODY(cloned)); + GET_REG(i->cur_op, 0,i).o = cloned; + REPR(value)->copy_to(i->tc, STABLE(value), OBJECT_BODY(value), cloned, OBJECT_BODY(cloned)); }); } else { - GET_REG(i.cur_op, 0,i).o = value; + GET_REG(i->cur_op, 0,i).o = value; } - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_isconcrete(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; - GET_REG(i.cur_op, 0,i).i64 = obj && IS_CONCRETE(obj) ? 1 : 0; - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_rebless(INTER i){ - if (!REPR(GET_REG(i.cur_op, 2,i).o)->change_type) { - MVM_exception_throw_adhoc(i.tc, "This REPR cannot change type"); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_isconcrete(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; + GET_REG(i->cur_op, 0,i).i64 = obj && IS_CONCRETE(obj) ? 1 : 0; + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_rebless(INTERP i){ + if (!REPR(GET_REG(i->cur_op, 2,i).o)->change_type) { + MVM_exception_throw_adhoc(i->tc, "This REPR cannot change type"); } - REPR(GET_REG(i.cur_op, 2,i).o)->change_type(i.tc, GET_REG(i.cur_op, 2,i).o, GET_REG(i.cur_op, 4,i).o); - GET_REG(i.cur_op, 0,i).o = GET_REG(i.cur_op, 2,i).o; - MVM_SC_WB_OBJ(i.tc, GET_REG(i.cur_op, 0,i).o); - i.cur_op += 6; - MVM_spesh_deopt_all(i.tc); - goto cbc_next(i); -} -__code cbc_istype(INTER i){ + REPR(GET_REG(i->cur_op, 2,i).o)->change_type(i->tc, GET_REG(i->cur_op, 2,i).o, GET_REG(i->cur_op, 4,i).o); + GET_REG(i->cur_op, 0,i).o = GET_REG(i->cur_op, 2,i).o; + MVM_SC_WB_OBJ(i->tc, GET_REG(i->cur_op, 0,i).o); + i->cur_op += 6; + MVM_spesh_deopt_all(i->tc); + goto cbc_next(i); +} +__code cbc_istype(INTERP i){ /* Increment PC first, as we may make a method call. */ - MVMRegister *res = &GET_REG(i.cur_op, 0,i); - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; - MVMObject *type = GET_REG(i.cur_op, 4,i).o; - i.cur_op += 6; - MVM_6model_istype(i.tc, obj, type, res); - goto cbc_next(i); - } -__code cbc_objprimspec(INTER i){ - MVMObject *type = GET_REG(i.cur_op, 2,i).o; + MVMRegister *res = &GET_REG(i->cur_op, 0,i); + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; + MVMObject *type = GET_REG(i->cur_op, 4,i).o; + i->cur_op += 6; + MVM_6model_istype(i->tc, obj, type, res); + goto cbc_next(i); + } +__code cbc_objprimspec(INTERP i){ + MVMObject *type = GET_REG(i->cur_op, 2,i).o; if (type) { - const MVMStorageSpec *ss = REPR(type)->get_storage_spec(i.tc, STABLE(type)); - GET_REG(i.cur_op, 0,i).i64 = ss->boxed_primitive; + const MVMStorageSpec *ss = REPR(type)->get_storage_spec(i->tc, STABLE(type)); + GET_REG(i->cur_op, 0,i).i64 = ss->boxed_primitive; } else { - GET_REG(i.cur_op, 0,i).i64 = 0; + GET_REG(i->cur_op, 0,i).i64 = 0; } - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_gethow(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_6model_get_how(i.tc, - STABLE(GET_REG(i.cur_op, 2,i).o)); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_getwhat(INTER i){ - GET_REG(i.cur_op, 0,i).o = STABLE(GET_REG(i.cur_op, 2,i).o)->WHAT; - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_getwho(INTER i){ - MVMObject *who = STABLE(GET_REG(i.cur_op, 2,i).o)->WHO; - GET_REG(i.cur_op, 0,i).o = who ? who : i.tc->instance->VMNull; - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_setwho(INTER i){ - MVMSTable *st = STABLE(GET_REG(i.cur_op, 2,i).o); - MVM_ASSIGN_REF(i.tc, &(st->header), st->WHO, GET_REG(i.cur_op, 4,i).o); - GET_REG(i.cur_op, 0,i).o = GET_REG(i.cur_op, 2,i).o; - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_reprname(INTER i){ - const MVMREPROps *repr = REPR(GET_REG(i.cur_op, 2,i).o); - GET_REG(i.cur_op, 0,i).s = i.tc->instance->repr_list[repr->ID]->name; - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_getwhere(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = (MVMint64)GET_REG(i.cur_op, 2,i).o; - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_eqaddr(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = GET_REG(i.cur_op, 2,i).o == GET_REG(i.cur_op, 4,i).o ? 1 : 0; - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_bindattr_i(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 0,i).o; + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_gethow(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_6model_get_how(i->tc, + STABLE(GET_REG(i->cur_op, 2,i).o)); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_getwhat(INTERP i){ + GET_REG(i->cur_op, 0,i).o = STABLE(GET_REG(i->cur_op, 2,i).o)->WHAT; + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_getwho(INTERP i){ + MVMObject *who = STABLE(GET_REG(i->cur_op, 2,i).o)->WHO; + GET_REG(i->cur_op, 0,i).o = who ? who : i->tc->instance->VMNull; + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_setwho(INTERP i){ + MVMSTable *st = STABLE(GET_REG(i->cur_op, 2,i).o); + MVM_ASSIGN_REF(i->tc, &(st->header), st->WHO, GET_REG(i->cur_op, 4,i).o); + GET_REG(i->cur_op, 0,i).o = GET_REG(i->cur_op, 2,i).o; + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_reprname(INTERP i){ + const MVMREPROps *repr = REPR(GET_REG(i->cur_op, 2,i).o); + GET_REG(i->cur_op, 0,i).s = i->tc->instance->repr_list[repr->ID]->name; + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_getwhere(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = (MVMint64)GET_REG(i->cur_op, 2,i).o; + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_eqaddr(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = GET_REG(i->cur_op, 2,i).o == GET_REG(i->cur_op, 4,i).o ? 1 : 0; + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_bindattr_i(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 0,i).o; if (!IS_CONCRETE(obj)) - MVM_exception_throw_adhoc(i.tc, "Cannot bind attributes in a %s type object", MVM_6model_get_debug_name(i.tc, obj)); - REPR(obj)->attr_funcs.bind_attribute(i.tc, + MVM_exception_throw_adhoc(i->tc, "Cannot bind attributes in a %s type object", MVM_6model_get_debug_name(i->tc, obj)); + REPR(obj)->attr_funcs.bind_attribute(i->tc, STABLE(obj), obj, OBJECT_BODY(obj), - GET_REG(i.cur_op, 2,i).o, MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 4)), - GET_I16(i.cur_op, 10), GET_REG(i.cur_op, 8,i), MVM_reg_int64); - MVM_SC_WB_OBJ(i.tc, obj); - i.cur_op += 12; - goto cbc_next(i); - } -__code cbc_bindattr_n(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 0,i).o; + GET_REG(i->cur_op, 2,i).o, MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 4)), + GET_I16(i->cur_op, 10), GET_REG(i->cur_op, 8,i), MVM_reg_int64); + MVM_SC_WB_OBJ(i->tc, obj); + i->cur_op += 12; + goto cbc_next(i); + } +__code cbc_bindattr_n(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 0,i).o; if (!IS_CONCRETE(obj)) - MVM_exception_throw_adhoc(i.tc, "Cannot bind attributes in a %s type object", MVM_6model_get_debug_name(i.tc, obj)); - REPR(obj)->attr_funcs.bind_attribute(i.tc, + MVM_exception_throw_adhoc(i->tc, "Cannot bind attributes in a %s type object", MVM_6model_get_debug_name(i->tc, obj)); + REPR(obj)->attr_funcs.bind_attribute(i->tc, STABLE(obj), obj, OBJECT_BODY(obj), - GET_REG(i.cur_op, 2,i).o, MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 4)), - GET_I16(i.cur_op, 10), GET_REG(i.cur_op, 8,i), MVM_reg_num64); - MVM_SC_WB_OBJ(i.tc, obj); - i.cur_op += 12; - goto cbc_next(i); - } -__code cbc_bindattr_s(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 0,i).o; + GET_REG(i->cur_op, 2,i).o, MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 4)), + GET_I16(i->cur_op, 10), GET_REG(i->cur_op, 8,i), MVM_reg_num64); + MVM_SC_WB_OBJ(i->tc, obj); + i->cur_op += 12; + goto cbc_next(i); + } +__code cbc_bindattr_s(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 0,i).o; if (!IS_CONCRETE(obj)) - MVM_exception_throw_adhoc(i.tc, "Cannot bind attributes in a %s type object", MVM_6model_get_debug_name(i.tc, obj)); - REPR(obj)->attr_funcs.bind_attribute(i.tc, + MVM_exception_throw_adhoc(i->tc, "Cannot bind attributes in a %s type object", MVM_6model_get_debug_name(i->tc, obj)); + REPR(obj)->attr_funcs.bind_attribute(i->tc, STABLE(obj), obj, OBJECT_BODY(obj), - GET_REG(i.cur_op, 2,i).o, MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 4)), - GET_I16(i.cur_op, 10), GET_REG(i.cur_op, 8,i), MVM_reg_str); - MVM_SC_WB_OBJ(i.tc, obj); - i.cur_op += 12; - goto cbc_next(i); - } -__code cbc_bindattr_o(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 0,i).o; + GET_REG(i->cur_op, 2,i).o, MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 4)), + GET_I16(i->cur_op, 10), GET_REG(i->cur_op, 8,i), MVM_reg_str); + MVM_SC_WB_OBJ(i->tc, obj); + i->cur_op += 12; + goto cbc_next(i); + } +__code cbc_bindattr_o(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 0,i).o; if (!IS_CONCRETE(obj)) - MVM_exception_throw_adhoc(i.tc, "Cannot bind attributes in a %s type object", MVM_6model_get_debug_name(i.tc, obj)); - REPR(obj)->attr_funcs.bind_attribute(i.tc, + MVM_exception_throw_adhoc(i->tc, "Cannot bind attributes in a %s type object", MVM_6model_get_debug_name(i->tc, obj)); + REPR(obj)->attr_funcs.bind_attribute(i->tc, STABLE(obj), obj, OBJECT_BODY(obj), - GET_REG(i.cur_op, 2,i).o, MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 4)), - GET_I16(i.cur_op, 10), GET_REG(i.cur_op, 8,i), MVM_reg_obj); - MVM_SC_WB_OBJ(i.tc, obj); - i.cur_op += 12; - goto cbc_next(i); - } -__code cbc_bindattrs_i(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 0,i).o; + GET_REG(i->cur_op, 2,i).o, MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 4)), + GET_I16(i->cur_op, 10), GET_REG(i->cur_op, 8,i), MVM_reg_obj); + MVM_SC_WB_OBJ(i->tc, obj); + i->cur_op += 12; + goto cbc_next(i); + } +__code cbc_bindattrs_i(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 0,i).o; if (!IS_CONCRETE(obj)) - MVM_exception_throw_adhoc(i.tc, "Cannot bind attributes in a %s type object", MVM_6model_get_debug_name(i.tc, obj)); - REPR(obj)->attr_funcs.bind_attribute(i.tc, + MVM_exception_throw_adhoc(i->tc, "Cannot bind attributes in a %s type object", MVM_6model_get_debug_name(i->tc, obj)); + REPR(obj)->attr_funcs.bind_attribute(i->tc, STABLE(obj), obj, OBJECT_BODY(obj), - GET_REG(i.cur_op, 2,i).o, GET_REG(i.cur_op, 4,i).s, - -1, GET_REG(i.cur_op, 6,i), MVM_reg_int64); - MVM_SC_WB_OBJ(i.tc, obj); - i.cur_op += 8; - goto cbc_next(i); - } -__code cbc_bindattrs_n(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 0,i).o; + GET_REG(i->cur_op, 2,i).o, GET_REG(i->cur_op, 4,i).s, + -1, GET_REG(i->cur_op, 6,i), MVM_reg_int64); + MVM_SC_WB_OBJ(i->tc, obj); + i->cur_op += 8; + goto cbc_next(i); + } +__code cbc_bindattrs_n(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 0,i).o; if (!IS_CONCRETE(obj)) - MVM_exception_throw_adhoc(i.tc, "Cannot bind attributes in a %s type object", MVM_6model_get_debug_name(i.tc, obj)); - REPR(obj)->attr_funcs.bind_attribute(i.tc, + MVM_exception_throw_adhoc(i->tc, "Cannot bind attributes in a %s type object", MVM_6model_get_debug_name(i->tc, obj)); + REPR(obj)->attr_funcs.bind_attribute(i->tc, STABLE(obj), obj, OBJECT_BODY(obj), - GET_REG(i.cur_op, 2,i).o, GET_REG(i.cur_op, 4,i).s, - -1, GET_REG(i.cur_op, 6,i), MVM_reg_num64); - MVM_SC_WB_OBJ(i.tc, obj); - i.cur_op += 8; - goto cbc_next(i); - } -__code cbc_bindattrs_s(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 0,i).o; + GET_REG(i->cur_op, 2,i).o, GET_REG(i->cur_op, 4,i).s, + -1, GET_REG(i->cur_op, 6,i), MVM_reg_num64); + MVM_SC_WB_OBJ(i->tc, obj); + i->cur_op += 8; + goto cbc_next(i); + } +__code cbc_bindattrs_s(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 0,i).o; if (!IS_CONCRETE(obj)) - MVM_exception_throw_adhoc(i.tc, "Cannot bind attributes in a %s type object", MVM_6model_get_debug_name(i.tc, obj)); - REPR(obj)->attr_funcs.bind_attribute(i.tc, + MVM_exception_throw_adhoc(i->tc, "Cannot bind attributes in a %s type object", MVM_6model_get_debug_name(i->tc, obj)); + REPR(obj)->attr_funcs.bind_attribute(i->tc, STABLE(obj), obj, OBJECT_BODY(obj), - GET_REG(i.cur_op, 2,i).o, GET_REG(i.cur_op, 4,i).s, - -1, GET_REG(i.cur_op, 6,i), MVM_reg_str); - MVM_SC_WB_OBJ(i.tc, obj); - i.cur_op += 8; - goto cbc_next(i); - } -__code cbc_bindattrs_o(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 0,i).o; + GET_REG(i->cur_op, 2,i).o, GET_REG(i->cur_op, 4,i).s, + -1, GET_REG(i->cur_op, 6,i), MVM_reg_str); + MVM_SC_WB_OBJ(i->tc, obj); + i->cur_op += 8; + goto cbc_next(i); + } +__code cbc_bindattrs_o(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 0,i).o; if (!IS_CONCRETE(obj)) - MVM_exception_throw_adhoc(i.tc, "Cannot bind attributes in a %s type object", MVM_6model_get_debug_name(i.tc, obj)); - REPR(obj)->attr_funcs.bind_attribute(i.tc, + MVM_exception_throw_adhoc(i->tc, "Cannot bind attributes in a %s type object", MVM_6model_get_debug_name(i->tc, obj)); + REPR(obj)->attr_funcs.bind_attribute(i->tc, STABLE(obj), obj, OBJECT_BODY(obj), - GET_REG(i.cur_op, 2,i).o, GET_REG(i.cur_op, 4,i).s, - -1, GET_REG(i.cur_op, 6,i), MVM_reg_obj); - MVM_SC_WB_OBJ(i.tc, obj); - i.cur_op += 8; - goto cbc_next(i); - } -__code cbc_getattr_i(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; + GET_REG(i->cur_op, 2,i).o, GET_REG(i->cur_op, 4,i).s, + -1, GET_REG(i->cur_op, 6,i), MVM_reg_obj); + MVM_SC_WB_OBJ(i->tc, obj); + i->cur_op += 8; + goto cbc_next(i); + } +__code cbc_getattr_i(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; if (!IS_CONCRETE(obj)) - MVM_exception_throw_adhoc(i.tc, "Cannot look up attributes in a %s type object", MVM_6model_get_debug_name(i.tc, obj)); - REPR(obj)->attr_funcs.get_attribute(i.tc, + MVM_exception_throw_adhoc(i->tc, "Cannot look up attributes in a %s type object", MVM_6model_get_debug_name(i->tc, obj)); + REPR(obj)->attr_funcs.get_attribute(i->tc, STABLE(obj), obj, OBJECT_BODY(obj), - GET_REG(i.cur_op, 4,i).o, MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 6)), - GET_I16(i.cur_op, 10), &GET_REG(i.cur_op, 0,i), MVM_reg_int64); - i.cur_op += 12; - goto cbc_next(i); - } -__code cbc_getattr_n(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; + GET_REG(i->cur_op, 4,i).o, MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 6)), + GET_I16(i->cur_op, 10), &GET_REG(i->cur_op, 0,i), MVM_reg_int64); + i->cur_op += 12; + goto cbc_next(i); + } +__code cbc_getattr_n(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; if (!IS_CONCRETE(obj)) - MVM_exception_throw_adhoc(i.tc, "Cannot look up attributes in a %s type object", MVM_6model_get_debug_name(i.tc, obj)); - REPR(obj)->attr_funcs.get_attribute(i.tc, + MVM_exception_throw_adhoc(i->tc, "Cannot look up attributes in a %s type object", MVM_6model_get_debug_name(i->tc, obj)); + REPR(obj)->attr_funcs.get_attribute(i->tc, STABLE(obj), obj, OBJECT_BODY(obj), - GET_REG(i.cur_op, 4,i).o, MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 6)), - GET_I16(i.cur_op, 10), &GET_REG(i.cur_op, 0,i), MVM_reg_num64); - i.cur_op += 12; - goto cbc_next(i); - } -__code cbc_getattr_s(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; + GET_REG(i->cur_op, 4,i).o, MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 6)), + GET_I16(i->cur_op, 10), &GET_REG(i->cur_op, 0,i), MVM_reg_num64); + i->cur_op += 12; + goto cbc_next(i); + } +__code cbc_getattr_s(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; if (!IS_CONCRETE(obj)) - MVM_exception_throw_adhoc(i.tc, "Cannot look up attributes in a %s type object", MVM_6model_get_debug_name(i.tc, obj)); - REPR(obj)->attr_funcs.get_attribute(i.tc, + MVM_exception_throw_adhoc(i->tc, "Cannot look up attributes in a %s type object", MVM_6model_get_debug_name(i->tc, obj)); + REPR(obj)->attr_funcs.get_attribute(i->tc, STABLE(obj), obj, OBJECT_BODY(obj), - GET_REG(i.cur_op, 4,i).o, MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 6)), - GET_I16(i.cur_op, 10), &GET_REG(i.cur_op, 0,i), MVM_reg_str); - i.cur_op += 12; - goto cbc_next(i); - } -__code cbc_getattr_o(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; + GET_REG(i->cur_op, 4,i).o, MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 6)), + GET_I16(i->cur_op, 10), &GET_REG(i->cur_op, 0,i), MVM_reg_str); + i->cur_op += 12; + goto cbc_next(i); + } +__code cbc_getattr_o(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; if (!IS_CONCRETE(obj)) - MVM_exception_throw_adhoc(i.tc, "Cannot look up attributes in a %s type object", MVM_6model_get_debug_name(i.tc, obj)); - REPR(obj)->attr_funcs.get_attribute(i.tc, + MVM_exception_throw_adhoc(i->tc, "Cannot look up attributes in a %s type object", MVM_6model_get_debug_name(i->tc, obj)); + REPR(obj)->attr_funcs.get_attribute(i->tc, STABLE(obj), obj, OBJECT_BODY(obj), - GET_REG(i.cur_op, 4,i).o, MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 6)), - GET_I16(i.cur_op, 10), &GET_REG(i.cur_op, 0,i), MVM_reg_obj); - if (MVM_spesh_log_is_logging(i.tc)) - MVM_spesh_log_type(i.tc, GET_REG(i.cur_op, 0,i).o); - i.cur_op += 12; - goto cbc_next(i); - } -__code cbc_getattrs_i(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; + GET_REG(i->cur_op, 4,i).o, MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 6)), + GET_I16(i->cur_op, 10), &GET_REG(i->cur_op, 0,i), MVM_reg_obj); + if (MVM_spesh_log_is_logging(i->tc)) + MVM_spesh_log_type(i->tc, GET_REG(i->cur_op, 0,i).o); + i->cur_op += 12; + goto cbc_next(i); + } +__code cbc_getattrs_i(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; if (!IS_CONCRETE(obj)) - MVM_exception_throw_adhoc(i.tc, "Cannot look up attributes in a %s type object", MVM_6model_get_debug_name(i.tc, obj)); - REPR(obj)->attr_funcs.get_attribute(i.tc, + MVM_exception_throw_adhoc(i->tc, "Cannot look up attributes in a %s type object", MVM_6model_get_debug_name(i->tc, obj)); + REPR(obj)->attr_funcs.get_attribute(i->tc, STABLE(obj), obj, OBJECT_BODY(obj), - GET_REG(i.cur_op, 4,i).o, GET_REG(i.cur_op, 6,i).s, - -1, &GET_REG(i.cur_op, 0,i), MVM_reg_int64); - i.cur_op += 8; - goto cbc_next(i); - } -__code cbc_getattrs_n(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; + GET_REG(i->cur_op, 4,i).o, GET_REG(i->cur_op, 6,i).s, + -1, &GET_REG(i->cur_op, 0,i), MVM_reg_int64); + i->cur_op += 8; + goto cbc_next(i); + } +__code cbc_getattrs_n(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; if (!IS_CONCRETE(obj)) - MVM_exception_throw_adhoc(i.tc, "Cannot look up attributes in a %s type object", MVM_6model_get_debug_name(i.tc, obj)); - REPR(obj)->attr_funcs.get_attribute(i.tc, + MVM_exception_throw_adhoc(i->tc, "Cannot look up attributes in a %s type object", MVM_6model_get_debug_name(i->tc, obj)); + REPR(obj)->attr_funcs.get_attribute(i->tc, STABLE(obj), obj, OBJECT_BODY(obj), - GET_REG(i.cur_op, 4,i).o, GET_REG(i.cur_op, 6,i).s, - -1, &GET_REG(i.cur_op, 0,i), MVM_reg_num64); - i.cur_op += 8; - goto cbc_next(i); - } -__code cbc_getattrs_s(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; + GET_REG(i->cur_op, 4,i).o, GET_REG(i->cur_op, 6,i).s, + -1, &GET_REG(i->cur_op, 0,i), MVM_reg_num64); + i->cur_op += 8; + goto cbc_next(i); + } +__code cbc_getattrs_s(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; if (!IS_CONCRETE(obj)) - MVM_exception_throw_adhoc(i.tc, "Cannot look up attributes in a %s type object", MVM_6model_get_debug_name(i.tc, obj)); - REPR(obj)->attr_funcs.get_attribute(i.tc, + MVM_exception_throw_adhoc(i->tc, "Cannot look up attributes in a %s type object", MVM_6model_get_debug_name(i->tc, obj)); + REPR(obj)->attr_funcs.get_attribute(i->tc, STABLE(obj), obj, OBJECT_BODY(obj), - GET_REG(i.cur_op, 4,i).o, GET_REG(i.cur_op, 6,i).s, - -1, &GET_REG(i.cur_op, 0,i), MVM_reg_str); - i.cur_op += 8; - goto cbc_next(i); - } -__code cbc_getattrs_o(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; + GET_REG(i->cur_op, 4,i).o, GET_REG(i->cur_op, 6,i).s, + -1, &GET_REG(i->cur_op, 0,i), MVM_reg_str); + i->cur_op += 8; + goto cbc_next(i); + } +__code cbc_getattrs_o(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; if (!IS_CONCRETE(obj)) - MVM_exception_throw_adhoc(i.tc, "Cannot look up attributes in a %s type object", MVM_6model_get_debug_name(i.tc, obj)); - REPR(obj)->attr_funcs.get_attribute(i.tc, + MVM_exception_throw_adhoc(i->tc, "Cannot look up attributes in a %s type object", MVM_6model_get_debug_name(i->tc, obj)); + REPR(obj)->attr_funcs.get_attribute(i->tc, STABLE(obj), obj, OBJECT_BODY(obj), - GET_REG(i.cur_op, 4,i).o, GET_REG(i.cur_op, 6,i).s, - -1, &GET_REG(i.cur_op, 0,i), MVM_reg_obj); - if (MVM_spesh_log_is_logging(i.tc)) - MVM_spesh_log_type(i.tc, GET_REG(i.cur_op, 0,i).o); - i.cur_op += 8; - goto cbc_next(i); - } -__code cbc_attrinited(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; + GET_REG(i->cur_op, 4,i).o, GET_REG(i->cur_op, 6,i).s, + -1, &GET_REG(i->cur_op, 0,i), MVM_reg_obj); + if (MVM_spesh_log_is_logging(i->tc)) + MVM_spesh_log_type(i->tc, GET_REG(i->cur_op, 0,i).o); + i->cur_op += 8; + goto cbc_next(i); + } +__code cbc_attrinited(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; if (!IS_CONCRETE(obj)) - MVM_exception_throw_adhoc(i.tc, "Cannot look up attributes in a %s type object", MVM_6model_get_debug_name(i.tc, obj)); - GET_REG(i.cur_op, 0,i).i64 = REPR(obj)->attr_funcs.is_attribute_initialized(i.tc, + MVM_exception_throw_adhoc(i->tc, "Cannot look up attributes in a %s type object", MVM_6model_get_debug_name(i->tc, obj)); + GET_REG(i->cur_op, 0,i).i64 = REPR(obj)->attr_funcs.is_attribute_initialized(i->tc, STABLE(obj), OBJECT_BODY(obj), - GET_REG(i.cur_op, 4,i).o, GET_REG(i.cur_op, 6,i).s, MVM_NO_HINT); - i.cur_op += 8; - goto cbc_next(i); - } -__code cbc_box_i(INTER i){ - MVM_box_int(i.tc, GET_REG(i.cur_op, 2,i).i64, GET_REG(i.cur_op, 4,i).o, - &GET_REG(i.cur_op, 0,i)); - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_box_n(INTER i){ - MVM_box_num(i.tc, GET_REG(i.cur_op, 2,i).n64, GET_REG(i.cur_op, 4,i).o, - &GET_REG(i.cur_op, 0,i)); - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_box_s(INTER i){ - MVM_box_str(i.tc, GET_REG(i.cur_op, 2,i).s, GET_REG(i.cur_op, 4,i).o, &GET_REG(i.cur_op, 0,i)); - i.cur_op += 6; + GET_REG(i->cur_op, 4,i).o, GET_REG(i->cur_op, 6,i).s, MVM_NO_HINT); + i->cur_op += 8; + goto cbc_next(i); + } +__code cbc_box_i(INTERP i){ + MVM_box_int(i->tc, GET_REG(i->cur_op, 2,i).i64, GET_REG(i->cur_op, 4,i).o, + &GET_REG(i->cur_op, 0,i)); + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_box_n(INTERP i){ + MVM_box_num(i->tc, GET_REG(i->cur_op, 2,i).n64, GET_REG(i->cur_op, 4,i).o, + &GET_REG(i->cur_op, 0,i)); + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_box_s(INTERP i){ + MVM_box_str(i->tc, GET_REG(i->cur_op, 2,i).s, GET_REG(i->cur_op, 4,i).o, &GET_REG(i->cur_op, 0,i)); + i->cur_op += 6; goto cbc_next(i); } -__code cbc_unbox_i(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; +__code cbc_unbox_i(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; if (!IS_CONCRETE(obj)) - MVM_exception_throw_adhoc(i.tc, "Cannot unbox a type object (%s) to an int.", MVM_6model_get_debug_name(i.tc, obj)); - GET_REG(i.cur_op, 0,i).i64 = REPR(obj)->box_funcs.get_int(i.tc, + MVM_exception_throw_adhoc(i->tc, "Cannot unbox a type object (%s) to an int.", MVM_6model_get_debug_name(i->tc, obj)); + GET_REG(i->cur_op, 0,i).i64 = REPR(obj)->box_funcs.get_int(i->tc, STABLE(obj), obj, OBJECT_BODY(obj)); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_unbox_n(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_unbox_n(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; if (!IS_CONCRETE(obj)) - MVM_exception_throw_adhoc(i.tc, "Cannot unbox a type object (%s) to a num.", MVM_6model_get_debug_name(i.tc, obj)); - GET_REG(i.cur_op, 0,i).n64 = REPR(obj)->box_funcs.get_num(i.tc, + MVM_exception_throw_adhoc(i->tc, "Cannot unbox a type object (%s) to a num.", MVM_6model_get_debug_name(i->tc, obj)); + GET_REG(i->cur_op, 0,i).n64 = REPR(obj)->box_funcs.get_num(i->tc, STABLE(obj), obj, OBJECT_BODY(obj)); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_unbox_s(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_unbox_s(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; if (!IS_CONCRETE(obj)) - MVM_exception_throw_adhoc(i.tc, "Cannot unbox a type object (%s) to a str.", MVM_6model_get_debug_name(i.tc, obj)); - GET_REG(i.cur_op, 0,i).s = REPR(obj)->box_funcs.get_str(i.tc, + MVM_exception_throw_adhoc(i->tc, "Cannot unbox a type object (%s) to a str.", MVM_6model_get_debug_name(i->tc, obj)); + GET_REG(i->cur_op, 0,i).s = REPR(obj)->box_funcs.get_str(i->tc, STABLE(obj), obj, OBJECT_BODY(obj)); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_atpos_i(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; - REPR(obj)->pos_funcs.at_pos(i.tc, STABLE(obj), obj, - OBJECT_BODY(obj), GET_REG(i.cur_op, 4,i).i64, - &GET_REG(i.cur_op, 0,i), MVM_reg_int64); - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_atpos_n(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; - REPR(obj)->pos_funcs.at_pos(i.tc, STABLE(obj), obj, - OBJECT_BODY(obj), GET_REG(i.cur_op, 4,i).i64, - &GET_REG(i.cur_op, 0,i), MVM_reg_num64); - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_atpos_s(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; - REPR(obj)->pos_funcs.at_pos(i.tc, STABLE(obj), obj, - OBJECT_BODY(obj), GET_REG(i.cur_op, 4,i).i64, - &GET_REG(i.cur_op, 0,i), MVM_reg_str); - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_atpos_o(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_atpos_i(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; + REPR(obj)->pos_funcs.at_pos(i->tc, STABLE(obj), obj, + OBJECT_BODY(obj), GET_REG(i->cur_op, 4,i).i64, + &GET_REG(i->cur_op, 0,i), MVM_reg_int64); + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_atpos_n(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; + REPR(obj)->pos_funcs.at_pos(i->tc, STABLE(obj), obj, + OBJECT_BODY(obj), GET_REG(i->cur_op, 4,i).i64, + &GET_REG(i->cur_op, 0,i), MVM_reg_num64); + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_atpos_s(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; + REPR(obj)->pos_funcs.at_pos(i->tc, STABLE(obj), obj, + OBJECT_BODY(obj), GET_REG(i->cur_op, 4,i).i64, + &GET_REG(i->cur_op, 0,i), MVM_reg_str); + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_atpos_o(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; if (IS_CONCRETE(obj)) - REPR(obj)->pos_funcs.at_pos(i.tc, STABLE(obj), obj, - OBJECT_BODY(obj), GET_REG(i.cur_op, 4,i).i64, - &GET_REG(i.cur_op, 0,i), MVM_reg_obj); + REPR(obj)->pos_funcs.at_pos(i->tc, STABLE(obj), obj, + OBJECT_BODY(obj), GET_REG(i->cur_op, 4,i).i64, + &GET_REG(i->cur_op, 0,i), MVM_reg_obj); else - GET_REG(i.cur_op, 0,i).o = i.tc->instance->VMNull; - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_bindpos_i(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 0,i).o; - REPR(obj)->pos_funcs.bind_pos(i.tc, STABLE(obj), obj, - OBJECT_BODY(obj), GET_REG(i.cur_op, 2,i).i64, - GET_REG(i.cur_op, 4,i), MVM_reg_int64); - MVM_SC_WB_OBJ(i.tc, obj); - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_bindpos_n(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 0,i).o; - REPR(obj)->pos_funcs.bind_pos(i.tc, STABLE(obj), obj, - OBJECT_BODY(obj), GET_REG(i.cur_op, 2,i).i64, - GET_REG(i.cur_op, 4,i), MVM_reg_num64); - MVM_SC_WB_OBJ(i.tc, obj); - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_bindpos_s(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 0,i).o; - REPR(obj)->pos_funcs.bind_pos(i.tc, STABLE(obj), obj, - OBJECT_BODY(obj), GET_REG(i.cur_op, 2,i).i64, - GET_REG(i.cur_op, 4,i), MVM_reg_str); - MVM_SC_WB_OBJ(i.tc, obj); - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_bindpos_o(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 0,i).o; - REPR(obj)->pos_funcs.bind_pos(i.tc, STABLE(obj), obj, - OBJECT_BODY(obj), GET_REG(i.cur_op, 2,i).i64, - GET_REG(i.cur_op, 4,i), MVM_reg_obj); - MVM_SC_WB_OBJ(i.tc, obj); - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_push_i(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 0,i).o; - REPR(obj)->pos_funcs.push(i.tc, STABLE(obj), obj, - OBJECT_BODY(obj), GET_REG(i.cur_op, 2,i), MVM_reg_int64); - MVM_SC_WB_OBJ(i.tc, GET_REG(i.cur_op, 0,i).o); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_push_n(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 0,i).o; - REPR(obj)->pos_funcs.push(i.tc, STABLE(obj), obj, - OBJECT_BODY(obj), GET_REG(i.cur_op, 2,i), MVM_reg_num64); - MVM_SC_WB_OBJ(i.tc, GET_REG(i.cur_op, 0,i).o); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_push_s(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 0,i).o; - REPR(obj)->pos_funcs.push(i.tc, STABLE(obj), obj, - OBJECT_BODY(obj), GET_REG(i.cur_op, 2,i), MVM_reg_str); - MVM_SC_WB_OBJ(i.tc, GET_REG(i.cur_op, 0,i).o); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_push_o(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 0,i).o; - REPR(obj)->pos_funcs.push(i.tc, STABLE(obj), obj, - OBJECT_BODY(obj), GET_REG(i.cur_op, 2,i), MVM_reg_obj); - MVM_SC_WB_OBJ(i.tc, GET_REG(i.cur_op, 0,i).o); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_pop_i(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; - REPR(obj)->pos_funcs.pop(i.tc, STABLE(obj), obj, - OBJECT_BODY(obj), &GET_REG(i.cur_op, 0,i), MVM_reg_int64); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_pop_n(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; - REPR(obj)->pos_funcs.pop(i.tc, STABLE(obj), obj, - OBJECT_BODY(obj), &GET_REG(i.cur_op, 0,i), MVM_reg_num64); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_pop_s(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; - REPR(obj)->pos_funcs.pop(i.tc, STABLE(obj), obj, - OBJECT_BODY(obj), &GET_REG(i.cur_op, 0,i), MVM_reg_str); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_pop_o(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; - REPR(obj)->pos_funcs.pop(i.tc, STABLE(obj), obj, - OBJECT_BODY(obj), &GET_REG(i.cur_op, 0,i), MVM_reg_obj); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_shift_i(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; - REPR(obj)->pos_funcs.shift(i.tc, STABLE(obj), obj, - OBJECT_BODY(obj), &GET_REG(i.cur_op, 0,i), MVM_reg_int64); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_shift_n(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; - REPR(obj)->pos_funcs.shift(i.tc, STABLE(obj), obj, - OBJECT_BODY(obj), &GET_REG(i.cur_op, 0,i), MVM_reg_num64); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_shift_s(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; - REPR(obj)->pos_funcs.shift(i.tc, STABLE(obj), obj, - OBJECT_BODY(obj), &GET_REG(i.cur_op, 0,i), MVM_reg_str); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_shift_o(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; - REPR(obj)->pos_funcs.shift(i.tc, STABLE(obj), obj, - OBJECT_BODY(obj), &GET_REG(i.cur_op, 0,i), MVM_reg_obj); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_unshift_i(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 0,i).o; - REPR(obj)->pos_funcs.unshift(i.tc, STABLE(obj), obj, - OBJECT_BODY(obj), GET_REG(i.cur_op, 2,i), MVM_reg_int64); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_unshift_n(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 0,i).o; - REPR(obj)->pos_funcs.unshift(i.tc, STABLE(obj), obj, - OBJECT_BODY(obj), GET_REG(i.cur_op, 2,i), MVM_reg_num64); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_unshift_s(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 0,i).o; - REPR(obj)->pos_funcs.unshift(i.tc, STABLE(obj), obj, - OBJECT_BODY(obj), GET_REG(i.cur_op, 2,i), MVM_reg_str); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_unshift_o(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 0,i).o; - REPR(obj)->pos_funcs.unshift(i.tc, STABLE(obj), obj, - OBJECT_BODY(obj), GET_REG(i.cur_op, 2,i), MVM_reg_obj); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_splice(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 0,i).o; - REPR(obj)->pos_funcs.splice(i.tc, STABLE(obj), obj, - OBJECT_BODY(obj), GET_REG(i.cur_op, 2,i).o, - GET_REG(i.cur_op, 4,i).i64, GET_REG(i.cur_op, 6,i).i64); - i.cur_op += 8; - goto cbc_next(i); - } -__code cbc_setelemspos(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 0,i).o; - REPR(obj)->pos_funcs.set_elems(i.tc, STABLE(obj), obj, - OBJECT_BODY(obj), GET_REG(i.cur_op, 2,i).i64); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_existspos(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_repr_exists_pos(i.tc, - GET_REG(i.cur_op, 2,i).o, GET_REG(i.cur_op, 4,i).i64); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_atkey_i(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; - REPR(obj)->ass_funcs.at_key(i.tc, STABLE(obj), obj, OBJECT_BODY(obj), - (MVMObject *)GET_REG(i.cur_op, 4,i).s, &GET_REG(i.cur_op, 0,i), MVM_reg_int64); - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_atkey_n(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; - REPR(obj)->ass_funcs.at_key(i.tc, STABLE(obj), obj, OBJECT_BODY(obj), - (MVMObject *)GET_REG(i.cur_op, 4,i).s, &GET_REG(i.cur_op, 0,i), MVM_reg_num64); - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_atkey_s(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; - REPR(obj)->ass_funcs.at_key(i.tc, STABLE(obj), obj, OBJECT_BODY(obj), - (MVMObject *)GET_REG(i.cur_op, 4,i).s, &GET_REG(i.cur_op, 0,i), MVM_reg_str); - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_atkey_o(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; + GET_REG(i->cur_op, 0,i).o = i->tc->instance->VMNull; + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_bindpos_i(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 0,i).o; + REPR(obj)->pos_funcs.bind_pos(i->tc, STABLE(obj), obj, + OBJECT_BODY(obj), GET_REG(i->cur_op, 2,i).i64, + GET_REG(i->cur_op, 4,i), MVM_reg_int64); + MVM_SC_WB_OBJ(i->tc, obj); + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_bindpos_n(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 0,i).o; + REPR(obj)->pos_funcs.bind_pos(i->tc, STABLE(obj), obj, + OBJECT_BODY(obj), GET_REG(i->cur_op, 2,i).i64, + GET_REG(i->cur_op, 4,i), MVM_reg_num64); + MVM_SC_WB_OBJ(i->tc, obj); + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_bindpos_s(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 0,i).o; + REPR(obj)->pos_funcs.bind_pos(i->tc, STABLE(obj), obj, + OBJECT_BODY(obj), GET_REG(i->cur_op, 2,i).i64, + GET_REG(i->cur_op, 4,i), MVM_reg_str); + MVM_SC_WB_OBJ(i->tc, obj); + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_bindpos_o(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 0,i).o; + REPR(obj)->pos_funcs.bind_pos(i->tc, STABLE(obj), obj, + OBJECT_BODY(obj), GET_REG(i->cur_op, 2,i).i64, + GET_REG(i->cur_op, 4,i), MVM_reg_obj); + MVM_SC_WB_OBJ(i->tc, obj); + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_push_i(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 0,i).o; + REPR(obj)->pos_funcs.push(i->tc, STABLE(obj), obj, + OBJECT_BODY(obj), GET_REG(i->cur_op, 2,i), MVM_reg_int64); + MVM_SC_WB_OBJ(i->tc, GET_REG(i->cur_op, 0,i).o); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_push_n(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 0,i).o; + REPR(obj)->pos_funcs.push(i->tc, STABLE(obj), obj, + OBJECT_BODY(obj), GET_REG(i->cur_op, 2,i), MVM_reg_num64); + MVM_SC_WB_OBJ(i->tc, GET_REG(i->cur_op, 0,i).o); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_push_s(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 0,i).o; + REPR(obj)->pos_funcs.push(i->tc, STABLE(obj), obj, + OBJECT_BODY(obj), GET_REG(i->cur_op, 2,i), MVM_reg_str); + MVM_SC_WB_OBJ(i->tc, GET_REG(i->cur_op, 0,i).o); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_push_o(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 0,i).o; + REPR(obj)->pos_funcs.push(i->tc, STABLE(obj), obj, + OBJECT_BODY(obj), GET_REG(i->cur_op, 2,i), MVM_reg_obj); + MVM_SC_WB_OBJ(i->tc, GET_REG(i->cur_op, 0,i).o); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_pop_i(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; + REPR(obj)->pos_funcs.pop(i->tc, STABLE(obj), obj, + OBJECT_BODY(obj), &GET_REG(i->cur_op, 0,i), MVM_reg_int64); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_pop_n(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; + REPR(obj)->pos_funcs.pop(i->tc, STABLE(obj), obj, + OBJECT_BODY(obj), &GET_REG(i->cur_op, 0,i), MVM_reg_num64); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_pop_s(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; + REPR(obj)->pos_funcs.pop(i->tc, STABLE(obj), obj, + OBJECT_BODY(obj), &GET_REG(i->cur_op, 0,i), MVM_reg_str); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_pop_o(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; + REPR(obj)->pos_funcs.pop(i->tc, STABLE(obj), obj, + OBJECT_BODY(obj), &GET_REG(i->cur_op, 0,i), MVM_reg_obj); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_shift_i(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; + REPR(obj)->pos_funcs.shift(i->tc, STABLE(obj), obj, + OBJECT_BODY(obj), &GET_REG(i->cur_op, 0,i), MVM_reg_int64); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_shift_n(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; + REPR(obj)->pos_funcs.shift(i->tc, STABLE(obj), obj, + OBJECT_BODY(obj), &GET_REG(i->cur_op, 0,i), MVM_reg_num64); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_shift_s(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; + REPR(obj)->pos_funcs.shift(i->tc, STABLE(obj), obj, + OBJECT_BODY(obj), &GET_REG(i->cur_op, 0,i), MVM_reg_str); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_shift_o(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; + REPR(obj)->pos_funcs.shift(i->tc, STABLE(obj), obj, + OBJECT_BODY(obj), &GET_REG(i->cur_op, 0,i), MVM_reg_obj); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_unshift_i(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 0,i).o; + REPR(obj)->pos_funcs.unshift(i->tc, STABLE(obj), obj, + OBJECT_BODY(obj), GET_REG(i->cur_op, 2,i), MVM_reg_int64); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_unshift_n(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 0,i).o; + REPR(obj)->pos_funcs.unshift(i->tc, STABLE(obj), obj, + OBJECT_BODY(obj), GET_REG(i->cur_op, 2,i), MVM_reg_num64); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_unshift_s(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 0,i).o; + REPR(obj)->pos_funcs.unshift(i->tc, STABLE(obj), obj, + OBJECT_BODY(obj), GET_REG(i->cur_op, 2,i), MVM_reg_str); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_unshift_o(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 0,i).o; + REPR(obj)->pos_funcs.unshift(i->tc, STABLE(obj), obj, + OBJECT_BODY(obj), GET_REG(i->cur_op, 2,i), MVM_reg_obj); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_splice(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 0,i).o; + REPR(obj)->pos_funcs.splice(i->tc, STABLE(obj), obj, + OBJECT_BODY(obj), GET_REG(i->cur_op, 2,i).o, + GET_REG(i->cur_op, 4,i).i64, GET_REG(i->cur_op, 6,i).i64); + i->cur_op += 8; + goto cbc_next(i); + } +__code cbc_setelemspos(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 0,i).o; + REPR(obj)->pos_funcs.set_elems(i->tc, STABLE(obj), obj, + OBJECT_BODY(obj), GET_REG(i->cur_op, 2,i).i64); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_existspos(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_repr_exists_pos(i->tc, + GET_REG(i->cur_op, 2,i).o, GET_REG(i->cur_op, 4,i).i64); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_atkey_i(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; + REPR(obj)->ass_funcs.at_key(i->tc, STABLE(obj), obj, OBJECT_BODY(obj), + (MVMObject *)GET_REG(i->cur_op, 4,i).s, &GET_REG(i->cur_op, 0,i), MVM_reg_int64); + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_atkey_n(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; + REPR(obj)->ass_funcs.at_key(i->tc, STABLE(obj), obj, OBJECT_BODY(obj), + (MVMObject *)GET_REG(i->cur_op, 4,i).s, &GET_REG(i->cur_op, 0,i), MVM_reg_num64); + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_atkey_s(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; + REPR(obj)->ass_funcs.at_key(i->tc, STABLE(obj), obj, OBJECT_BODY(obj), + (MVMObject *)GET_REG(i->cur_op, 4,i).s, &GET_REG(i->cur_op, 0,i), MVM_reg_str); + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_atkey_o(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; if (IS_CONCRETE(obj)) - REPR(obj)->ass_funcs.at_key(i.tc, STABLE(obj), obj, OBJECT_BODY(obj), - (MVMObject *)GET_REG(i.cur_op, 4,i).s, &GET_REG(i.cur_op, 0,i), MVM_reg_obj); + REPR(obj)->ass_funcs.at_key(i->tc, STABLE(obj), obj, OBJECT_BODY(obj), + (MVMObject *)GET_REG(i->cur_op, 4,i).s, &GET_REG(i->cur_op, 0,i), MVM_reg_obj); else - GET_REG(i.cur_op, 0,i).o = i.tc->instance->VMNull; - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_bindkey_i(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 0,i).o; - REPR(obj)->ass_funcs.bind_key(i.tc, STABLE(obj), obj, - OBJECT_BODY(obj), (MVMObject *)GET_REG(i.cur_op, 2,i).s, - GET_REG(i.cur_op, 4,i), MVM_reg_int64); - MVM_SC_WB_OBJ(i.tc, obj); - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_bindkey_n(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 0,i).o; - REPR(obj)->ass_funcs.bind_key(i.tc, STABLE(obj), obj, - OBJECT_BODY(obj), (MVMObject *)GET_REG(i.cur_op, 2,i).s, - GET_REG(i.cur_op, 4,i), MVM_reg_num64); - MVM_SC_WB_OBJ(i.tc, obj); - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_bindkey_s(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 0,i).o; - REPR(obj)->ass_funcs.bind_key(i.tc, STABLE(obj), obj, - OBJECT_BODY(obj), (MVMObject *)GET_REG(i.cur_op, 2,i).s, - GET_REG(i.cur_op, 4,i), MVM_reg_str); - MVM_SC_WB_OBJ(i.tc, obj); - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_bindkey_o(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 0,i).o; - REPR(obj)->ass_funcs.bind_key(i.tc, STABLE(obj), obj, - OBJECT_BODY(obj), (MVMObject *)GET_REG(i.cur_op, 2,i).s, - GET_REG(i.cur_op, 4,i), MVM_reg_obj); - MVM_SC_WB_OBJ(i.tc, obj); - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_existskey(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; - GET_REG(i.cur_op, 0,i).i64 = REPR(obj)->ass_funcs.exists_key(i.tc, + GET_REG(i->cur_op, 0,i).o = i->tc->instance->VMNull; + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_bindkey_i(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 0,i).o; + REPR(obj)->ass_funcs.bind_key(i->tc, STABLE(obj), obj, + OBJECT_BODY(obj), (MVMObject *)GET_REG(i->cur_op, 2,i).s, + GET_REG(i->cur_op, 4,i), MVM_reg_int64); + MVM_SC_WB_OBJ(i->tc, obj); + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_bindkey_n(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 0,i).o; + REPR(obj)->ass_funcs.bind_key(i->tc, STABLE(obj), obj, + OBJECT_BODY(obj), (MVMObject *)GET_REG(i->cur_op, 2,i).s, + GET_REG(i->cur_op, 4,i), MVM_reg_num64); + MVM_SC_WB_OBJ(i->tc, obj); + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_bindkey_s(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 0,i).o; + REPR(obj)->ass_funcs.bind_key(i->tc, STABLE(obj), obj, + OBJECT_BODY(obj), (MVMObject *)GET_REG(i->cur_op, 2,i).s, + GET_REG(i->cur_op, 4,i), MVM_reg_str); + MVM_SC_WB_OBJ(i->tc, obj); + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_bindkey_o(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 0,i).o; + REPR(obj)->ass_funcs.bind_key(i->tc, STABLE(obj), obj, + OBJECT_BODY(obj), (MVMObject *)GET_REG(i->cur_op, 2,i).s, + GET_REG(i->cur_op, 4,i), MVM_reg_obj); + MVM_SC_WB_OBJ(i->tc, obj); + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_existskey(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; + GET_REG(i->cur_op, 0,i).i64 = REPR(obj)->ass_funcs.exists_key(i->tc, STABLE(obj), obj, OBJECT_BODY(obj), - (MVMObject *)GET_REG(i.cur_op, 4,i).s); - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_deletekey(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 0,i).o; - REPR(obj)->ass_funcs.delete_key(i.tc, STABLE(obj), obj, - OBJECT_BODY(obj), (MVMObject *)GET_REG(i.cur_op, 2,i).s); - MVM_SC_WB_OBJ(i.tc, obj); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_elems(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; - GET_REG(i.cur_op, 0,i).i64 = (MVMint64)REPR(obj)->elems(i.tc, STABLE(obj), obj, OBJECT_BODY(obj)); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_knowhow(INTER i){ - GET_REG(i.cur_op, 0,i).o = i.tc->instance->KnowHOW; - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_knowhowattr(INTER i){ - GET_REG(i.cur_op, 0,i).o = i.tc->instance->KnowHOWAttribute; - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_newtype(INTER i){ - MVMObject *how = GET_REG(i.cur_op, 2,i).o; - MVMString *repr_name = GET_REG(i.cur_op, 4,i).s; - const MVMREPROps *repr = MVM_repr_get_by_name(i.tc, repr_name); - GET_REG(i.cur_op, 0,i).o = repr->type_object_for(i.tc, how); - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_composetype(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; - REPR(obj)->compose(i.tc, STABLE(obj), GET_REG(i.cur_op, 4,i).o); - GET_REG(i.cur_op, 0,i).o = GET_REG(i.cur_op, 2,i).o; - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_setmethcache(INTER i){ - MVMObject *iter = MVM_iter(i.tc, GET_REG(i.cur_op, 2,i).o); + (MVMObject *)GET_REG(i->cur_op, 4,i).s); + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_deletekey(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 0,i).o; + REPR(obj)->ass_funcs.delete_key(i->tc, STABLE(obj), obj, + OBJECT_BODY(obj), (MVMObject *)GET_REG(i->cur_op, 2,i).s); + MVM_SC_WB_OBJ(i->tc, obj); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_elems(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; + GET_REG(i->cur_op, 0,i).i64 = (MVMint64)REPR(obj)->elems(i->tc, STABLE(obj), obj, OBJECT_BODY(obj)); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_knowhow(INTERP i){ + GET_REG(i->cur_op, 0,i).o = i->tc->instance->KnowHOW; + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_knowhowattr(INTERP i){ + GET_REG(i->cur_op, 0,i).o = i->tc->instance->KnowHOWAttribute; + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_newtype(INTERP i){ + MVMObject *how = GET_REG(i->cur_op, 2,i).o; + MVMString *repr_name = GET_REG(i->cur_op, 4,i).s; + const MVMREPROps *repr = MVM_repr_get_by_name(i->tc, repr_name); + GET_REG(i->cur_op, 0,i).o = repr->type_object_for(i->tc, how); + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_composetype(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; + REPR(obj)->compose(i->tc, STABLE(obj), GET_REG(i->cur_op, 4,i).o); + GET_REG(i->cur_op, 0,i).o = GET_REG(i->cur_op, 2,i).o; + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_setmethcache(INTERP i){ + MVMObject *iter = MVM_iter(i->tc, GET_REG(i->cur_op, 2,i).o); MVMObject *cache; MVMSTable *stable; - MVMROOT(i.tc, iter, { - cache = MVM_repr_alloc_init(i.tc, i.tc->instance->boot_types.BOOTHash); + MVMROOT(i->tc, iter, { + cache = MVM_repr_alloc_init(i->tc, i->tc->instance->boot_types.BOOTHash); }); - while (MVM_iter_istrue(i.tc, (MVMIter *)iter)) { + while (MVM_iter_istrue(i->tc, (MVMIter *)iter)) { MVMRegister result; - REPR(iter)->pos_funcs.shift(i.tc, STABLE(iter), iter, + REPR(iter)->pos_funcs.shift(i->tc, STABLE(iter), iter, OBJECT_BODY(iter), &result, MVM_reg_obj); - MVM_repr_bind_key_o(i.tc, cache, MVM_iterkey_s(i.tc, (MVMIter *)iter), - MVM_iterval(i.tc, (MVMIter *)iter)); + MVM_repr_bind_key_o(i->tc, cache, MVM_iterkey_s(i->tc, (MVMIter *)iter), + MVM_iterval(i->tc, (MVMIter *)iter)); } - stable = STABLE(GET_REG(i.cur_op, 0,i).o); - MVM_ASSIGN_REF(i.tc, &(stable->header), stable->method_cache, cache); + stable = STABLE(GET_REG(i->cur_op, 0,i).o); + MVM_ASSIGN_REF(i->tc, &(stable->header), stable->method_cache, cache); stable->method_cache_sc = NULL; - MVM_SC_WB_ST(i.tc, stable); + MVM_SC_WB_ST(i->tc, stable); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_setmethcacheauth(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 0,i).o; + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_setmethcacheauth(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 0,i).o; MVMint64 new_flags = STABLE(obj)->mode_flags & (~MVM_METHOD_CACHE_AUTHORITATIVE); - MVMint64 flag = GET_REG(i.cur_op, 2,i).i64; + MVMint64 flag = GET_REG(i->cur_op, 2,i).i64; if (flag != 0) new_flags |= MVM_METHOD_CACHE_AUTHORITATIVE; STABLE(obj)->mode_flags = new_flags; - MVM_SC_WB_ST(i.tc, STABLE(obj)); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_settypecache(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 0,i).o; - MVMObject *types = GET_REG(i.cur_op, 2,i).o; + MVM_SC_WB_ST(i->tc, STABLE(obj)); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_settypecache(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 0,i).o; + MVMObject *types = GET_REG(i->cur_op, 2,i).o; MVMSTable *st = STABLE(obj); - MVMint64 j, elems = REPR(types)->elems(i.tc, STABLE(types), types, OBJECT_BODY(types)); + MVMint64 j, elems = REPR(types)->elems(i->tc, STABLE(types), types, OBJECT_BODY(types)); MVMObject **cache = MVM_malloc(sizeof(MVMObject *) * elems); for (j = 0; j < elems; j++) { - MVM_ASSIGN_REF(i.tc, &(st->header), cache[j], MVM_repr_at_pos_o(i.tc, types, j)); + MVM_ASSIGN_REF(i->tc, &(st->header), cache[j], MVM_repr_at_pos_o(i->tc, types, j)); } /* technically this free isn't thread safe */ if (st->type_check_cache) MVM_free(st->type_check_cache); st->type_check_cache = cache; st->type_check_cache_length = (MVMuint16)elems; - MVM_SC_WB_ST(i.tc, st); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_settypecheckmode(INTER i){ - MVMSTable *st = STABLE(GET_REG(i.cur_op, 0,i).o); - st->mode_flags = GET_REG(i.cur_op, 2,i).i64 | + MVM_SC_WB_ST(i->tc, st); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_settypecheckmode(INTERP i){ + MVMSTable *st = STABLE(GET_REG(i->cur_op, 0,i).o); + st->mode_flags = GET_REG(i->cur_op, 2,i).i64 | (st->mode_flags & (~MVM_TYPE_CHECK_CACHE_FLAG_MASK)); - MVM_SC_WB_ST(i.tc, st); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_setboolspec(INTER i){ - MVMSTable *st = GET_REG(i.cur_op, 0,i).o->st; + MVM_SC_WB_ST(i->tc, st); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_setboolspec(INTERP i){ + MVMSTable *st = GET_REG(i->cur_op, 0,i).o->st; MVMBoolificationSpec *bs = MVM_malloc(sizeof(MVMBoolificationSpec)); MVMBoolificationSpec *orig_bs = st->boolification_spec; - bs->mode = (MVMuint32)GET_REG(i.cur_op, 2,i).i64; - MVM_ASSIGN_REF(i.tc, &(st->header), bs->method, GET_REG(i.cur_op, 4,i).o); + bs->mode = (MVMuint32)GET_REG(i->cur_op, 2,i).i64; + MVM_ASSIGN_REF(i->tc, &(st->header), bs->method, GET_REG(i->cur_op, 4,i).o); st->boolification_spec = bs; MVM_free(orig_bs); - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_istrue(INTER i){ + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_istrue(INTERP i){ /* Increment PC first then call coerce, since it may want to * do an invocation. */ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; - MVMRegister *res = &GET_REG(i.cur_op, 0,i); - i.cur_op += 4; - MVM_coerce_istrue(i.tc, obj, res, NULL, NULL, 0); - goto cbc_next(i); - } -__code cbc_isfalse(INTER i){ + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; + MVMRegister *res = &GET_REG(i->cur_op, 0,i); + i->cur_op += 4; + MVM_coerce_istrue(i->tc, obj, res, NULL, NULL, 0); + goto cbc_next(i); + } +__code cbc_isfalse(INTERP i){ /* Increment PC first then call coerce, since it may want to * do an invocation. */ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; - MVMRegister *res = &GET_REG(i.cur_op, 0,i); - i.cur_op += 4; - MVM_coerce_istrue(i.tc, obj, res, NULL, NULL, 1); - goto cbc_next(i); - } -__code cbc_bootint(INTER i){ - GET_REG(i.cur_op, 0,i).o = i.tc->instance->boot_types.BOOTInt; - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_bootnum(INTER i){ - GET_REG(i.cur_op, 0,i).o = i.tc->instance->boot_types.BOOTNum; - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_bootstr(INTER i){ - GET_REG(i.cur_op, 0,i).o = i.tc->instance->boot_types.BOOTStr; - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_bootarray(INTER i){ - GET_REG(i.cur_op, 0,i).o = i.tc->instance->boot_types.BOOTArray; - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_bootintarray(INTER i){ - GET_REG(i.cur_op, 0,i).o = i.tc->instance->boot_types.BOOTIntArray; - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_bootnumarray(INTER i){ - GET_REG(i.cur_op, 0,i).o = i.tc->instance->boot_types.BOOTNumArray; - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_bootstrarray(INTER i){ - GET_REG(i.cur_op, 0,i).o = i.tc->instance->boot_types.BOOTStrArray; - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_boothash(INTER i){ - GET_REG(i.cur_op, 0,i).o = i.tc->instance->boot_types.BOOTHash; - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_isint(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; - GET_REG(i.cur_op, 0,i).i64 = obj && REPR(obj)->ID == MVM_REPR_ID_P6int ? 1 : 0; - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_isnum(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; - GET_REG(i.cur_op, 0,i).i64 = obj && REPR(obj)->ID == MVM_REPR_ID_P6num ? 1 : 0; - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_isstr(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; - GET_REG(i.cur_op, 0,i).i64 = obj && REPR(obj)->ID == MVM_REPR_ID_P6str ? 1 : 0; - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_islist(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; - GET_REG(i.cur_op, 0,i).i64 = obj && REPR(obj)->ID == MVM_REPR_ID_VMArray ? 1 : 0; - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_ishash(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; - GET_REG(i.cur_op, 0,i).i64 = obj && REPR(obj)->ID == MVM_REPR_ID_MVMHash ? 1 : 0; - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_sethllconfig(INTER i){ - MVM_hll_set_config(i.tc, GET_REG(i.cur_op, 0,i).s, GET_REG(i.cur_op, 2,i).o); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_hllboxtype_i(INTER i){ - GET_REG(i.cur_op, 0,i).o =i.cu->body.hll_config->int_box_type; - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_hllboxtype_n(INTER i){ - GET_REG(i.cur_op, 0,i).o =i.cu->body.hll_config->num_box_type; - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_hllboxtype_s(INTER i){ - GET_REG(i.cur_op, 0,i).o =i.cu->body.hll_config->str_box_type; - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_hlllist(INTER i){ - GET_REG(i.cur_op, 0,i).o =i.cu->body.hll_config->slurpy_array_type; - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_hllhash(INTER i){ - GET_REG(i.cur_op, 0,i).o =i.cu->body.hll_config->slurpy_hash_type; - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_getcomp(INTER i){ - MVMObject *obj = i.tc->instance->compiler_registry; - uv_mutex_lock(&i.tc->instance->mutex_compiler_registry); - GET_REG(i.cur_op, 0,i).o = MVM_repr_at_key_o(i.tc, obj, GET_REG(i.cur_op, 2,i).s); - uv_mutex_unlock(&i.tc->instance->mutex_compiler_registry); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_bindcomp(INTER i){ - MVMObject *obj = i.tc->instance->compiler_registry; - uv_mutex_lock(&i.tc->instance->mutex_compiler_registry); - REPR(obj)->ass_funcs.bind_key(i.tc, STABLE(obj), obj, OBJECT_BODY(obj), - (MVMObject *)GET_REG(i.cur_op, 2,i).s, GET_REG(i.cur_op, 4,i), MVM_reg_obj); - uv_mutex_unlock(&i.tc->instance->mutex_compiler_registry); - GET_REG(i.cur_op, 0,i).o = GET_REG(i.cur_op, 4,i).o; - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_getcurhllsym(INTER i){ - MVMString *hll_name = i.tc->cur_frame->static_info->body.cu->body.hll_name; - GET_REG(i.cur_op, 0,i).o = MVM_hll_sym_get(i.tc, hll_name, GET_REG(i.cur_op, 2,i).s); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_bindcurhllsym(INTER i){ - MVMObject *syms = i.tc->instance->hll_syms, *hash; - MVMString *hll_name = i.tc->cur_frame->static_info->body.cu->body.hll_name; - uv_mutex_lock(&i.tc->instance->mutex_hll_syms); - hash = MVM_repr_at_key_o(i.tc, syms, hll_name); - if (MVM_is_null(i.tc, hash)) { - hash = MVM_repr_alloc_init(i.tc, i.tc->instance->boot_types.BOOTHash); + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; + MVMRegister *res = &GET_REG(i->cur_op, 0,i); + i->cur_op += 4; + MVM_coerce_istrue(i->tc, obj, res, NULL, NULL, 1); + goto cbc_next(i); + } +__code cbc_bootint(INTERP i){ + GET_REG(i->cur_op, 0,i).o = i->tc->instance->boot_types.BOOTInt; + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_bootnum(INTERP i){ + GET_REG(i->cur_op, 0,i).o = i->tc->instance->boot_types.BOOTNum; + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_bootstr(INTERP i){ + GET_REG(i->cur_op, 0,i).o = i->tc->instance->boot_types.BOOTStr; + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_bootarray(INTERP i){ + GET_REG(i->cur_op, 0,i).o = i->tc->instance->boot_types.BOOTArray; + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_bootintarray(INTERP i){ + GET_REG(i->cur_op, 0,i).o = i->tc->instance->boot_types.BOOTIntArray; + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_bootnumarray(INTERP i){ + GET_REG(i->cur_op, 0,i).o = i->tc->instance->boot_types.BOOTNumArray; + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_bootstrarray(INTERP i){ + GET_REG(i->cur_op, 0,i).o = i->tc->instance->boot_types.BOOTStrArray; + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_boothash(INTERP i){ + GET_REG(i->cur_op, 0,i).o = i->tc->instance->boot_types.BOOTHash; + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_isint(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; + GET_REG(i->cur_op, 0,i).i64 = obj && REPR(obj)->ID == MVM_REPR_ID_P6int ? 1 : 0; + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_isnum(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; + GET_REG(i->cur_op, 0,i).i64 = obj && REPR(obj)->ID == MVM_REPR_ID_P6num ? 1 : 0; + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_isstr(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; + GET_REG(i->cur_op, 0,i).i64 = obj && REPR(obj)->ID == MVM_REPR_ID_P6str ? 1 : 0; + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_islist(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; + GET_REG(i->cur_op, 0,i).i64 = obj && REPR(obj)->ID == MVM_REPR_ID_VMArray ? 1 : 0; + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_ishash(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; + GET_REG(i->cur_op, 0,i).i64 = obj && REPR(obj)->ID == MVM_REPR_ID_MVMHash ? 1 : 0; + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_sethllconfig(INTERP i){ + MVM_hll_set_config(i->tc, GET_REG(i->cur_op, 0,i).s, GET_REG(i->cur_op, 2,i).o); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_hllboxtype_i(INTERP i){ + GET_REG(i->cur_op, 0,i).o =i->cu->body.hll_config->int_box_type; + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_hllboxtype_n(INTERP i){ + GET_REG(i->cur_op, 0,i).o =i->cu->body.hll_config->num_box_type; + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_hllboxtype_s(INTERP i){ + GET_REG(i->cur_op, 0,i).o =i->cu->body.hll_config->str_box_type; + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_hlllist(INTERP i){ + GET_REG(i->cur_op, 0,i).o =i->cu->body.hll_config->slurpy_array_type; + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_hllhash(INTERP i){ + GET_REG(i->cur_op, 0,i).o =i->cu->body.hll_config->slurpy_hash_type; + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_getcomp(INTERP i){ + MVMObject *obj = i->tc->instance->compiler_registry; + uv_mutex_lock(&i->tc->instance->mutex_compiler_registry); + GET_REG(i->cur_op, 0,i).o = MVM_repr_at_key_o(i->tc, obj, GET_REG(i->cur_op, 2,i).s); + uv_mutex_unlock(&i->tc->instance->mutex_compiler_registry); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_bindcomp(INTERP i){ + MVMObject *obj = i->tc->instance->compiler_registry; + uv_mutex_lock(&i->tc->instance->mutex_compiler_registry); + REPR(obj)->ass_funcs.bind_key(i->tc, STABLE(obj), obj, OBJECT_BODY(obj), + (MVMObject *)GET_REG(i->cur_op, 2,i).s, GET_REG(i->cur_op, 4,i), MVM_reg_obj); + uv_mutex_unlock(&i->tc->instance->mutex_compiler_registry); + GET_REG(i->cur_op, 0,i).o = GET_REG(i->cur_op, 4,i).o; + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_getcurhllsym(INTERP i){ + MVMString *hll_name = i->tc->cur_frame->static_info->body.cu->body.hll_name; + GET_REG(i->cur_op, 0,i).o = MVM_hll_sym_get(i->tc, hll_name, GET_REG(i->cur_op, 2,i).s); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_bindcurhllsym(INTERP i){ + MVMObject *syms = i->tc->instance->hll_syms, *hash; + MVMString *hll_name = i->tc->cur_frame->static_info->body.cu->body.hll_name; + uv_mutex_lock(&i->tc->instance->mutex_hll_syms); + hash = MVM_repr_at_key_o(i->tc, syms, hll_name); + if (MVM_is_null(i->tc, hash)) { + hash = MVM_repr_alloc_init(i->tc, i->tc->instance->boot_types.BOOTHash); /* must re-get syms in case it moved */ - syms = i.tc->instance->hll_syms; - hll_name = i.tc->cur_frame->static_info->body.cu->body.hll_name; - MVM_repr_bind_key_o(i.tc, syms, hll_name, hash); + syms = i->tc->instance->hll_syms; + hll_name = i->tc->cur_frame->static_info->body.cu->body.hll_name; + MVM_repr_bind_key_o(i->tc, syms, hll_name, hash); } - MVM_repr_bind_key_o(i.tc, hash, GET_REG(i.cur_op, 2,i).s, GET_REG(i.cur_op, 4,i).o); - GET_REG(i.cur_op, 0,i).o = GET_REG(i.cur_op, 4,i).o; - uv_mutex_unlock(&i.tc->instance->mutex_hll_syms); - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_gethllsym(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_hll_sym_get(i.tc, - GET_REG(i.cur_op, 2,i).s, GET_REG(i.cur_op, 4,i).s); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_bindhllsym(INTER i){ - MVMObject *syms = i.tc->instance->hll_syms; - MVMString *hll_name = GET_REG(i.cur_op, 0,i).s; + MVM_repr_bind_key_o(i->tc, hash, GET_REG(i->cur_op, 2,i).s, GET_REG(i->cur_op, 4,i).o); + GET_REG(i->cur_op, 0,i).o = GET_REG(i->cur_op, 4,i).o; + uv_mutex_unlock(&i->tc->instance->mutex_hll_syms); + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_gethllsym(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_hll_sym_get(i->tc, + GET_REG(i->cur_op, 2,i).s, GET_REG(i->cur_op, 4,i).s); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_bindhllsym(INTERP i){ + MVMObject *syms = i->tc->instance->hll_syms; + MVMString *hll_name = GET_REG(i->cur_op, 0,i).s; MVMObject *hash; - uv_mutex_lock(&i.tc->instance->mutex_hll_syms); - hash = MVM_repr_at_key_o(i.tc, syms, hll_name); - if (MVM_is_null(i.tc, hash)) { - hash = MVM_repr_alloc_init(i.tc, i.tc->instance->boot_types.BOOTHash); + uv_mutex_lock(&i->tc->instance->mutex_hll_syms); + hash = MVM_repr_at_key_o(i->tc, syms, hll_name); + if (MVM_is_null(i->tc, hash)) { + hash = MVM_repr_alloc_init(i->tc, i->tc->instance->boot_types.BOOTHash); /* must re-get syms and HLL name in case it moved */ - syms = i.tc->instance->hll_syms; - hll_name = GET_REG(i.cur_op, 0,i).s; - MVM_repr_bind_key_o(i.tc, syms, hll_name, hash); + syms = i->tc->instance->hll_syms; + hll_name = GET_REG(i->cur_op, 0,i).s; + MVM_repr_bind_key_o(i->tc, syms, hll_name, hash); } - MVM_repr_bind_key_o(i.tc, hash, GET_REG(i.cur_op, 2,i).s, GET_REG(i.cur_op, 4,i).o); - uv_mutex_unlock(&i.tc->instance->mutex_hll_syms); - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_settypehll(INTER i){ - STABLE(GET_REG(i.cur_op, 0,i).o)->hll_owner = MVM_hll_get_config_for(i.tc, - GET_REG(i.cur_op, 2,i).s); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_settypehllrole(INTER i){ - STABLE(GET_REG(i.cur_op, 0,i).o)->hll_role = GET_REG(i.cur_op, 2,i).i64; - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_hllize(INTER i){ + MVM_repr_bind_key_o(i->tc, hash, GET_REG(i->cur_op, 2,i).s, GET_REG(i->cur_op, 4,i).o); + uv_mutex_unlock(&i->tc->instance->mutex_hll_syms); + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_settypehll(INTERP i){ + STABLE(GET_REG(i->cur_op, 0,i).o)->hll_owner = MVM_hll_get_config_for(i->tc, + GET_REG(i->cur_op, 2,i).s); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_settypehllrole(INTERP i){ + STABLE(GET_REG(i->cur_op, 0,i).o)->hll_role = GET_REG(i->cur_op, 2,i).i64; + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_hllize(INTERP i){ /* Increment PC before mapping, as it may invoke. */ - MVMRegister *res_reg = &GET_REG(i.cur_op, 0,i); - MVMObject *mapee = GET_REG(i.cur_op, 2,i).o; - i.cur_op += 4; - MVM_hll_map(i.tc, mapee, MVM_hll_current(i.tc), res_reg); - goto cbc_next(i); - } -__code cbc_hllizefor(INTER i){ + MVMRegister *res_reg = &GET_REG(i->cur_op, 0,i); + MVMObject *mapee = GET_REG(i->cur_op, 2,i).o; + i->cur_op += 4; + MVM_hll_map(i->tc, mapee, MVM_hll_current(i->tc), res_reg); + goto cbc_next(i); + } +__code cbc_hllizefor(INTERP i){ /* Increment PC before mapping, as it may invoke. */ - MVMRegister *res_reg = &GET_REG(i.cur_op, 0,i); - MVMObject *mapee = GET_REG(i.cur_op, 2,i).o; - MVMString *hll = GET_REG(i.cur_op, 4,i).s; - i.cur_op += 6; - MVM_hll_map(i.tc, mapee, MVM_hll_get_config_for(i.tc, hll), res_reg); - goto cbc_next(i); - } -__code cbc_usecompileehllconfig(INTER i){ - MVM_hll_enter_compilee_mode(i.tc); - goto cbc_next(i); -} -__code cbc_usecompilerhllconfig(INTER i){ - MVM_hll_leave_compilee_mode(i.tc); - goto cbc_next(i); -} -__code cbc_iter(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_iter(i.tc, GET_REG(i.cur_op, 2,i).o); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_iterkey_s(INTER i){ - GET_REG(i.cur_op, 0,i).s = MVM_iterkey_s(i.tc, (MVMIter *)GET_REG(i.cur_op, 2,i).o); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_iterval(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_iterval(i.tc, (MVMIter *)GET_REG(i.cur_op, 2,i).o); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_getcodename(INTER i){ - MVMObject *co = GET_REG(i.cur_op, 2,i).o; + MVMRegister *res_reg = &GET_REG(i->cur_op, 0,i); + MVMObject *mapee = GET_REG(i->cur_op, 2,i).o; + MVMString *hll = GET_REG(i->cur_op, 4,i).s; + i->cur_op += 6; + MVM_hll_map(i->tc, mapee, MVM_hll_get_config_for(i->tc, hll), res_reg); + goto cbc_next(i); + } +__code cbc_usecompileehllconfig(INTERP i){ + MVM_hll_enter_compilee_mode(i->tc); + goto cbc_next(i); +} +__code cbc_usecompilerhllconfig(INTERP i){ + MVM_hll_leave_compilee_mode(i->tc); + goto cbc_next(i); +} +__code cbc_iter(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_iter(i->tc, GET_REG(i->cur_op, 2,i).o); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_iterkey_s(INTERP i){ + GET_REG(i->cur_op, 0,i).s = MVM_iterkey_s(i->tc, (MVMIter *)GET_REG(i->cur_op, 2,i).o); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_iterval(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_iterval(i->tc, (MVMIter *)GET_REG(i->cur_op, 2,i).o); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_getcodename(INTERP i){ + MVMObject *co = GET_REG(i->cur_op, 2,i).o; if (REPR(co)->ID != MVM_REPR_ID_MVMCode || !IS_CONCRETE(co)) - MVM_exception_throw_adhoc(i.tc, "gei->tcodename requires a concrete code object"); - GET_REG(i.cur_op, 0,i).s = ((MVMCode *)co)->body.name; - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_iscoderef(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = !GET_REG(i.cur_op, 2,i).o || - STABLE(GET_REG(i.cur_op, 2,i).o)->invoke == MVM_6model_invoke_default ? 0 : 1; - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_getcodeobj(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; - GET_REG(i.cur_op, 0,i).o = MVM_frame_get_code_object(i.tc, (MVMCode *)obj); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_setcodeobj(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 0,i).o; + MVM_exception_throw_adhoc(i->tc, "gei->tcodename requires a concrete code object"); + GET_REG(i->cur_op, 0,i).s = ((MVMCode *)co)->body.name; + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_iscoderef(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = !GET_REG(i->cur_op, 2,i).o || + STABLE(GET_REG(i->cur_op, 2,i).o)->invoke == MVM_6model_invoke_default ? 0 : 1; + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_getcodeobj(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; + GET_REG(i->cur_op, 0,i).o = MVM_frame_get_code_object(i->tc, (MVMCode *)obj); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_setcodeobj(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 0,i).o; if (REPR(obj)->ID == MVM_REPR_ID_MVMCode) { - MVM_ASSIGN_REF(i.tc, &(obj->header), ((MVMCode *)obj)->body.code_object, - GET_REG(i.cur_op, 2,i).o); + MVM_ASSIGN_REF(i->tc, &(obj->header), ((MVMCode *)obj)->body.code_object, + GET_REG(i->cur_op, 2,i).o); } else { - MVM_exception_throw_adhoc(i.tc, "sei->tcodeobj needs a code ref"); + MVM_exception_throw_adhoc(i->tc, "sei->tcodeobj needs a code ref"); } - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_setcodename(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 0,i).o; + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_setcodename(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 0,i).o; if (REPR(obj)->ID == MVM_REPR_ID_MVMCode) { - MVM_ASSIGN_REF(i.tc, &(obj->header), ((MVMCode *)obj)->body.name, - GET_REG(i.cur_op, 2,i).s); + MVM_ASSIGN_REF(i->tc, &(obj->header), ((MVMCode *)obj)->body.name, + GET_REG(i->cur_op, 2,i).s); } else { - MVM_exception_throw_adhoc(i.tc, "sei->tcodename needs a code ref"); + MVM_exception_throw_adhoc(i->tc, "sei->tcodename needs a code ref"); } - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_forceouterctx(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 0,i).o, *ctx = GET_REG(i.cur_op, 2,i).o; + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_forceouterctx(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 0,i).o, *ctx = GET_REG(i->cur_op, 2,i).o; MVMFrame *orig; MVMFrame *context; MVMStaticFrame *sf; if (REPR(obj)->ID != MVM_REPR_ID_MVMCode || !IS_CONCRETE(obj)) { - MVM_exception_throw_adhoc(i.tc, "forceouterctx needs a code ref"); + MVM_exception_throw_adhoc(i->tc, "forceouterctx needs a code ref"); } if (REPR(ctx)->ID != MVM_REPR_ID_MVMContext || !IS_CONCRETE(ctx)) { - MVM_exception_throw_adhoc(i.tc, "forceouterctx needs a context"); + MVM_exception_throw_adhoc(i->tc, "forceouterctx needs a context"); } orig = ((MVMCode *)obj)->body.outer; sf = ((MVMCode *)obj)->body.sf; context = ((MVMContext *)ctx)->body.context; - MVM_ASSIGN_REF(i.tc, &(((MVMObject *)sf)->header), sf->body.outer, context->static_info); + MVM_ASSIGN_REF(i->tc, &(((MVMObject *)sf)->header), sf->body.outer, context->static_info); if (orig != context) - MVM_ASSIGN_REF(i.tc, &(obj->header), ((MVMCode *)obj)->body.outer, context); + MVM_ASSIGN_REF(i->tc, &(obj->header), ((MVMCode *)obj)->body.outer, context); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_setinvokespec(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 0,i).o, *ch = GET_REG(i.cur_op, 2,i).o, - *invocation_handler = GET_REG(i.cur_op, 6,i).o; - MVMString *name = GET_REG(i.cur_op, 4,i).s; + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_setinvokespec(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 0,i).o, *ch = GET_REG(i->cur_op, 2,i).o, + *invocation_handler = GET_REG(i->cur_op, 6,i).o; + MVMString *name = GET_REG(i->cur_op, 4,i).s; MVMInvocationSpec *is = MVM_calloc(1, sizeof(MVMInvocationSpec)); MVMSTable *st = STABLE(obj); - MVM_ASSIGN_REF(i.tc, &(st->header), is->class_handle, ch); - MVM_ASSIGN_REF(i.tc, &(st->header), is->attr_name, name); + MVM_ASSIGN_REF(i->tc, &(st->header), is->class_handle, ch); + MVM_ASSIGN_REF(i->tc, &(st->header), is->attr_name, name); if (ch && name) - is->hint = REPR(ch)->attr_funcs.hint_for(i.tc, STABLE(ch), ch, name); - MVM_ASSIGN_REF(i.tc, &(st->header), is->invocation_handler, invocation_handler); + is->hint = REPR(ch)->attr_funcs.hint_for(i->tc, STABLE(ch), ch, name); + MVM_ASSIGN_REF(i->tc, &(st->header), is->invocation_handler, invocation_handler); /* XXX not thread safe, but this should occur on non-shared objects anyway... */ if (st->invocation_spec) MVM_free(st->invocation_spec); st->invocation_spec = is; - i.cur_op += 8; - goto cbc_next(i); - } -__code cbc_isinvokable(INTER i){ - MVMSTable *st = STABLE(GET_REG(i.cur_op, 2,i).o); - GET_REG(i.cur_op, 0,i).i64 = st->invoke == MVM_6model_invoke_default + i->cur_op += 8; + goto cbc_next(i); + } +__code cbc_isinvokable(INTERP i){ + MVMSTable *st = STABLE(GET_REG(i->cur_op, 2,i).o); + GET_REG(i->cur_op, 0,i).i64 = st->invoke == MVM_6model_invoke_default ? (st->invocation_spec ? 1 : 0) : 1; - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_freshcoderef(INTER i){ - MVMObject * const cr = GET_REG(i.cur_op, 2,i).o; + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_freshcoderef(INTERP i){ + MVMObject * const cr = GET_REG(i->cur_op, 2,i).o; MVMCode *ncr; if (REPR(cr)->ID != MVM_REPR_ID_MVMCode) - MVM_exception_throw_adhoc(i.tc, "freshcoderef requires a coderef"); - ncr = (MVMCode *)(GET_REG(i.cur_op, 0,i).o = MVM_repr_clone(i.tc, cr)); - MVMROOT(i.tc, ncr, { + MVM_exception_throw_adhoc(i->tc, "freshcoderef requires a coderef"); + ncr = (MVMCode *)(GET_REG(i->cur_op, 0,i).o = MVM_repr_clone(i->tc, cr)); + MVMROOT(i->tc, ncr, { MVMStaticFrame *nsf; if (!ncr->body.sf->body.fully_deserialized) - MVM_bytecode_finish_frame(i.tc, ncr->body.sf->body.cu, ncr->body.sf, 0); - nsf = (MVMStaticFrame *)MVM_repr_clone(i.tc, + MVM_bytecode_finish_frame(i->tc, ncr->body.sf->body.cu, ncr->body.sf, 0); + nsf = (MVMStaticFrame *)MVM_repr_clone(i->tc, (MVMObject *)ncr->body.sf); - MVM_ASSIGN_REF(i.tc, &(ncr->common.header), ncr->body.sf, nsf); - MVM_ASSIGN_REF(i.tc, &(ncr->common.header), ncr->body.sf->body.static_code, ncr); + MVM_ASSIGN_REF(i->tc, &(ncr->common.header), ncr->body.sf, nsf); + MVM_ASSIGN_REF(i->tc, &(ncr->common.header), ncr->body.sf->body.static_code, ncr); }); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_markcodestatic(INTER i){ - MVMObject * const cr = GET_REG(i.cur_op, 0,i).o; + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_markcodestatic(INTERP i){ + MVMObject * const cr = GET_REG(i->cur_op, 0,i).o; if (REPR(cr)->ID != MVM_REPR_ID_MVMCode) - MVM_exception_throw_adhoc(i.tc, "markcodestatic requires a coderef"); + MVM_exception_throw_adhoc(i->tc, "markcodestatic requires a coderef"); ((MVMCode *)cr)->body.is_static = 1; - i.cur_op += 2; - goto cbc_next(i); - } -__code cbc_markcodestub(INTER i){ - MVMObject * const cr = GET_REG(i.cur_op, 0,i).o; + i->cur_op += 2; + goto cbc_next(i); + } +__code cbc_markcodestub(INTERP i){ + MVMObject * const cr = GET_REG(i->cur_op, 0,i).o; if (REPR(cr)->ID != MVM_REPR_ID_MVMCode) - MVM_exception_throw_adhoc(i.tc, "markcodestub requires a coderef"); + MVM_exception_throw_adhoc(i->tc, "markcodestub requires a coderef"); ((MVMCode *)cr)->body.is_compiler_stub = 1; - i.cur_op += 2; - goto cbc_next(i); - } -__code cbc_getstaticcode(INTER i){ - MVMObject * const cr = GET_REG(i.cur_op, 2,i).o; + i->cur_op += 2; + goto cbc_next(i); + } +__code cbc_getstaticcode(INTERP i){ + MVMObject * const cr = GET_REG(i->cur_op, 2,i).o; if (REPR(cr)->ID != MVM_REPR_ID_MVMCode) - MVM_exception_throw_adhoc(i.tc, "getstaticcode requires a static coderef"); - GET_REG(i.cur_op, 0,i).o = (MVMObject *)((MVMCode *)cr)->body.sf->body.static_code; - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_getcodecuid(INTER i){ - MVMObject * const cr = GET_REG(i.cur_op, 2,i).o; + MVM_exception_throw_adhoc(i->tc, "getstaticcode requires a static coderef"); + GET_REG(i->cur_op, 0,i).o = (MVMObject *)((MVMCode *)cr)->body.sf->body.static_code; + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_getcodecuid(INTERP i){ + MVMObject * const cr = GET_REG(i->cur_op, 2,i).o; if (REPR(cr)->ID != MVM_REPR_ID_MVMCode || !IS_CONCRETE(cr)) - MVM_exception_throw_adhoc(i.tc, "gei->tcodecuid requires a static coderef"); - GET_REG(i.cur_op, 0,i).s = ((MVMCode *)cr)->body.sf->body.cuuid; - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_setdispatcher(INTER i){ - i.tc->cur_dispatcher = GET_REG(i.cur_op, 0,i).o; - i.tc->cur_dispatcher_for = NULL; - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_takedispatcher(INTER i){ - MVMObject *disp = i.tc->cur_dispatcher; - MVMObject *disp_for = i.tc->cur_dispatcher_for; - MVMObject *cur_code = i.tc->cur_frame->code_ref; + MVM_exception_throw_adhoc(i->tc, "gei->tcodecuid requires a static coderef"); + GET_REG(i->cur_op, 0,i).s = ((MVMCode *)cr)->body.sf->body.cuuid; + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_setdispatcher(INTERP i){ + i->tc->cur_dispatcher = GET_REG(i->cur_op, 0,i).o; + i->tc->cur_dispatcher_for = NULL; + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_takedispatcher(INTERP i){ + MVMObject *disp = i->tc->cur_dispatcher; + MVMObject *disp_for = i->tc->cur_dispatcher_for; + MVMObject *cur_code = i->tc->cur_frame->code_ref; if (disp && (!disp_for || disp_for == cur_code)) { - GET_REG(i.cur_op, 0,i).o = disp; - i.tc->cur_dispatcher = NULL; + GET_REG(i->cur_op, 0,i).o = disp; + i->tc->cur_dispatcher = NULL; } else { - GET_REG(i.cur_op, 0,i).o = i.tc->instance->VMNull; + GET_REG(i->cur_op, 0,i).o = i->tc->instance->VMNull; } - i.cur_op += 2; - goto cbc_next(i); - } -__code cbc_assign(INTER i){ - MVMObject *cont = GET_REG(i.cur_op, 0,i).o; - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; + i->cur_op += 2; + goto cbc_next(i); + } +__code cbc_assign(INTERP i){ + MVMObject *cont = GET_REG(i->cur_op, 0,i).o; + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; const MVMContainerSpec *spec = STABLE(cont)->container_spec; - i.cur_op += 4; + i->cur_op += 4; if (spec) { - spec->store(i.tc, cont, obj); + spec->store(i->tc, cont, obj); } else { - MVM_exception_throw_adhoc(i.tc, "Cannot assign to an immutable value"); + MVM_exception_throw_adhoc(i->tc, "Cannot assign to an immutable value"); } goto cbc_next(i); } -__code cbc_assignunchecked(INTER i){ - MVMObject *cont = GET_REG(i.cur_op, 0,i).o; - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; +__code cbc_assignunchecked(INTERP i){ + MVMObject *cont = GET_REG(i->cur_op, 0,i).o; + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; const MVMContainerSpec *spec = STABLE(cont)->container_spec; - i.cur_op += 4; + i->cur_op += 4; if (spec) { - spec->store_unchecked(i.tc, cont, obj); + spec->store_unchecked(i->tc, cont, obj); } else { - MVM_exception_throw_adhoc(i.tc, "Cannot assign to an immutable value"); + MVM_exception_throw_adhoc(i->tc, "Cannot assign to an immutable value"); } goto cbc_next(i); } -__code cbc_iscont(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; - GET_REG(i.cur_op, 0,i).i64 = MVM_is_null(i.tc, obj) || STABLE(obj)->container_spec == NULL ? 0 : 1; - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_decont(INTER i){ - MVMuint8 *prev_op = i.cur_op; - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; - MVMRegister *r = &GET_REG(i.cur_op, 0,i); - i.cur_op += 4; +__code cbc_iscont(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; + GET_REG(i->cur_op, 0,i).i64 = MVM_is_null(i->tc, obj) || STABLE(obj)->container_spec == NULL ? 0 : 1; + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_decont(INTERP i){ + MVMuint8 *prev_op = i->cur_op; + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; + MVMRegister *r = &GET_REG(i->cur_op, 0,i); + i->cur_op += 4; if (obj && IS_CONCRETE(obj) && STABLE(obj)->container_spec) { - STABLE(obj)->container_spec->fetch(i.tc, obj, r); - if (MVM_spesh_log_is_logging(i.tc)) - MVM_spesh_log_decont(i.tc, prev_op, r->o); + STABLE(obj)->container_spec->fetch(i->tc, obj, r); + if (MVM_spesh_log_is_logging(i->tc)) + MVM_spesh_log_decont(i->tc, prev_op, r->o); } else { r->o = obj; @@ -3172,2262 +3168,2262 @@ goto cbc_next(i); } // still no tail call trouble on waste -void cbc_setcontspec0(INTER i){ - MVMSTable *st = STABLE(GET_REG(i.cur_op, 0,i).o); - MVMString *name = GET_REG(i.cur_op, 2,i).s; - const MVMContainerConfigurer *cc = MVM_6model_get_container_config(i.tc, name); +void cbc_setcontspec0(INTERP i){ + MVMSTable *st = STABLE(GET_REG(i->cur_op, 0,i).o); + MVMString *name = GET_REG(i->cur_op, 2,i).s; + const MVMContainerConfigurer *cc = MVM_6model_get_container_config(i->tc, name); if (cc == NULL) { - char *c_name = MVM_string_utf8_encode_C_string(i.tc, name); - c_name = MVM_string_utf8_encode_C_string(i.tc, name); + char *c_name = MVM_string_utf8_encode_C_string(i->tc, name); + c_name = MVM_string_utf8_encode_C_string(i->tc, name); char *waste[] = { c_name, NULL }; waste[0] = c_name; - MVM_exception_throw_adhoc_free(i.tc, waste, "Cannot use unknown container spec %s", + MVM_exception_throw_adhoc_free(i->tc, waste, "Cannot use unknown container spec %s", c_name); } if (st->container_spec) - MVM_exception_throw_adhoc(i.tc, + MVM_exception_throw_adhoc(i->tc, "Cannot change a type's container specification"); - cc->set_container_spec(i.tc, st); - cc->configure_container_spec(i.tc, st, GET_REG(i.cur_op, 4,i).o); - i.cur_op += 6; + cc->set_container_spec(i->tc, st); + cc->configure_container_spec(i->tc, st, GET_REG(i->cur_op, 4,i).o); + i->cur_op += 6; return; } -__code cbc_setcontspec(INTER i){ +__code cbc_setcontspec(INTERP i){ cbc_setcontspec0(i); goto cbc_next(i); } -__code cbc_sha1(INTER i){ - GET_REG(i.cur_op, 0,i).s = MVM_sha1(i.tc, - GET_REG(i.cur_op, 2,i).s); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_createsc(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_sc_create(i.tc, - GET_REG(i.cur_op, 2,i).s); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_scsetobj(INTER i){ - MVMObject *sc = GET_REG(i.cur_op, 0,i).o; - MVMObject *obj = GET_REG(i.cur_op, 4,i).o; +__code cbc_sha1(INTERP i){ + GET_REG(i->cur_op, 0,i).s = MVM_sha1(i->tc, + GET_REG(i->cur_op, 2,i).s); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_createsc(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_sc_create(i->tc, + GET_REG(i->cur_op, 2,i).s); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_scsetobj(INTERP i){ + MVMObject *sc = GET_REG(i->cur_op, 0,i).o; + MVMObject *obj = GET_REG(i->cur_op, 4,i).o; if (REPR(sc)->ID != MVM_REPR_ID_SCRef) - MVM_exception_throw_adhoc(i.tc, + MVM_exception_throw_adhoc(i->tc, "Must provide an SCRef operand to scsetobj"); - MVM_sc_set_object(i.tc, (MVMSerializationContext *)sc, - GET_REG(i.cur_op, 2,i).i64, obj); - if (MVM_sc_get_stable_sc(i.tc, STABLE(obj)) == NULL) { + MVM_sc_set_object(i->tc, (MVMSerializationContext *)sc, + GET_REG(i->cur_op, 2,i).i64, obj); + if (MVM_sc_get_stable_sc(i->tc, STABLE(obj)) == NULL) { /* Need to claim the SC also; typical case for new type objects. */ MVMSTable *st = STABLE(obj); - MVM_sc_set_stable_sc(i.tc, st, (MVMSerializationContext *)sc); - MVM_sc_push_stable(i.tc, (MVMSerializationContext *)sc, st); + MVM_sc_set_stable_sc(i->tc, st, (MVMSerializationContext *)sc); + MVM_sc_push_stable(i->tc, (MVMSerializationContext *)sc, st); } - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_scsetcode(INTER i){ - MVMObject *sc = GET_REG(i.cur_op, 0,i).o; - MVMObject *code = GET_REG(i.cur_op, 4,i).o; + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_scsetcode(INTERP i){ + MVMObject *sc = GET_REG(i->cur_op, 0,i).o; + MVMObject *code = GET_REG(i->cur_op, 4,i).o; if (REPR(sc)->ID != MVM_REPR_ID_SCRef) - MVM_exception_throw_adhoc(i.tc, + MVM_exception_throw_adhoc(i->tc, "Must provide an SCRef operand to scsei->tcode"); - MVM_sc_set_obj_sc(i.tc, code, (MVMSerializationContext *)sc); - MVM_sc_set_code(i.tc, (MVMSerializationContext *)sc, - GET_REG(i.cur_op, 2,i).i64, code); - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_scgetobj(INTER i){ - MVMObject *sc = GET_REG(i.cur_op, 2,i).o; + MVM_sc_set_obj_sc(i->tc, code, (MVMSerializationContext *)sc); + MVM_sc_set_code(i->tc, (MVMSerializationContext *)sc, + GET_REG(i->cur_op, 2,i).i64, code); + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_scgetobj(INTERP i){ + MVMObject *sc = GET_REG(i->cur_op, 2,i).o; if (REPR(sc)->ID != MVM_REPR_ID_SCRef) - MVM_exception_throw_adhoc(i.tc, + MVM_exception_throw_adhoc(i->tc, "Must provide an SCRef operand to scgetobj"); - GET_REG(i.cur_op, 0,i).o = MVM_sc_get_object(i.tc, - (MVMSerializationContext *)sc, GET_REG(i.cur_op, 4,i).i64); - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_scgethandle(INTER i){ - MVMObject *sc = GET_REG(i.cur_op, 2,i).o; + GET_REG(i->cur_op, 0,i).o = MVM_sc_get_object(i->tc, + (MVMSerializationContext *)sc, GET_REG(i->cur_op, 4,i).i64); + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_scgethandle(INTERP i){ + MVMObject *sc = GET_REG(i->cur_op, 2,i).o; if (REPR(sc)->ID != MVM_REPR_ID_SCRef) - MVM_exception_throw_adhoc(i.tc, + MVM_exception_throw_adhoc(i->tc, "Must provide an SCRef operand to scgethandle"); - GET_REG(i.cur_op, 0,i).s = MVM_sc_get_handle(i.tc, + GET_REG(i->cur_op, 0,i).s = MVM_sc_get_handle(i->tc, (MVMSerializationContext *)sc); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_scgetobjidx(INTER i){ - MVMObject *sc = GET_REG(i.cur_op, 2,i).o; + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_scgetobjidx(INTERP i){ + MVMObject *sc = GET_REG(i->cur_op, 2,i).o; if (REPR(sc)->ID != MVM_REPR_ID_SCRef) - MVM_exception_throw_adhoc(i.tc, + MVM_exception_throw_adhoc(i->tc, "Must provide an SCRef operand to scgetobjidx"); - GET_REG(i.cur_op, 0,i).i64 = MVM_sc_find_object_idx(i.tc, - (MVMSerializationContext *)sc, GET_REG(i.cur_op, 4,i).o); - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_scsetdesc(INTER i){ - MVMObject *sc = GET_REG(i.cur_op, 0,i).o; - MVMString *desc = GET_REG(i.cur_op, 2,i).s; + GET_REG(i->cur_op, 0,i).i64 = MVM_sc_find_object_idx(i->tc, + (MVMSerializationContext *)sc, GET_REG(i->cur_op, 4,i).o); + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_scsetdesc(INTERP i){ + MVMObject *sc = GET_REG(i->cur_op, 0,i).o; + MVMString *desc = GET_REG(i->cur_op, 2,i).s; if (REPR(sc)->ID != MVM_REPR_ID_SCRef) - MVM_exception_throw_adhoc(i.tc, + MVM_exception_throw_adhoc(i->tc, "Must provide an SCRef operand to scsetdesc"); - MVM_sc_set_description(i.tc, (MVMSerializationContext *)sc, desc); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_scobjcount(INTER i){ - MVMObject *sc = GET_REG(i.cur_op, 2,i).o; + MVM_sc_set_description(i->tc, (MVMSerializationContext *)sc, desc); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_scobjcount(INTERP i){ + MVMObject *sc = GET_REG(i->cur_op, 2,i).o; if (REPR(sc)->ID != MVM_REPR_ID_SCRef) - MVM_exception_throw_adhoc(i.tc, + MVM_exception_throw_adhoc(i->tc, "Must provide an SCRef operand to scobjcount"); - GET_REG(i.cur_op, 0,i).i64 = MVM_sc_get_object_count(i.tc, + GET_REG(i->cur_op, 0,i).i64 = MVM_sc_get_object_count(i->tc, (MVMSerializationContext *)sc); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_setobjsc(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 0,i).o; - MVMObject *sc = GET_REG(i.cur_op, 2,i).o; + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_setobjsc(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 0,i).o; + MVMObject *sc = GET_REG(i->cur_op, 2,i).o; if (REPR(sc)->ID != MVM_REPR_ID_SCRef) - MVM_exception_throw_adhoc(i.tc, + MVM_exception_throw_adhoc(i->tc, "Must provide an SCRef operand to setobjsc"); - MVM_sc_set_obj_sc(i.tc, obj, (MVMSerializationContext *)sc); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_getobjsc(INTER i){ - GET_REG(i.cur_op, 0,i).o = (MVMObject *)MVM_sc_get_obj_sc(i.tc, GET_REG(i.cur_op, 2,i).o); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_serialize(INTER i){ - MVMObject *sc = GET_REG(i.cur_op, 2,i).o; - MVMObject *obj = GET_REG(i.cur_op, 4,i).o; + MVM_sc_set_obj_sc(i->tc, obj, (MVMSerializationContext *)sc); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_getobjsc(INTERP i){ + GET_REG(i->cur_op, 0,i).o = (MVMObject *)MVM_sc_get_obj_sc(i->tc, GET_REG(i->cur_op, 2,i).o); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_serialize(INTERP i){ + MVMObject *sc = GET_REG(i->cur_op, 2,i).o; + MVMObject *obj = GET_REG(i->cur_op, 4,i).o; if (REPR(sc)->ID != MVM_REPR_ID_SCRef) - MVM_exception_throw_adhoc(i.tc, + MVM_exception_throw_adhoc(i->tc, "Must provide an SCRef operand to serialize"); - GET_REG(i.cur_op, 0,i).s = MVM_serialization_serialize(i.tc, (MVMSerializationContext *)sc, obj); - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_deserialize(INTER i){ - MVMString *blob = GET_REG(i.cur_op, 0,i).s; - MVMObject *sc = GET_REG(i.cur_op, 2,i).o; - MVMObject *sh = GET_REG(i.cur_op, 4,i).o; - MVMObject *cr = GET_REG(i.cur_op, 6,i).o; - MVMObject *conf = GET_REG(i.cur_op, 8,i).o; + GET_REG(i->cur_op, 0,i).s = MVM_serialization_serialize(i->tc, (MVMSerializationContext *)sc, obj); + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_deserialize(INTERP i){ + MVMString *blob = GET_REG(i->cur_op, 0,i).s; + MVMObject *sc = GET_REG(i->cur_op, 2,i).o; + MVMObject *sh = GET_REG(i->cur_op, 4,i).o; + MVMObject *cr = GET_REG(i->cur_op, 6,i).o; + MVMObject *conf = GET_REG(i->cur_op, 8,i).o; if (REPR(sc)->ID != MVM_REPR_ID_SCRef) - MVM_exception_throw_adhoc(i.tc, + MVM_exception_throw_adhoc(i->tc, "Must provide an SCRef operand to deserialize"); - MVM_serialization_deserialize(i.tc, (MVMSerializationContext *)sc, + MVM_serialization_deserialize(i->tc, (MVMSerializationContext *)sc, sh, cr, conf, blob); - i.cur_op += 10; - goto cbc_next(i); - } -__code cbc_wval(INTER i){ - MVMuint16 dep = GET_UI16(i.cur_op, 2); - MVMuint16 idx = GET_UI16(i.cur_op, 4); - GET_REG(i.cur_op, 0,i).o = MVM_sc_get_sc_object(i.tc,i.cu, dep, idx); - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_wval_wide(INTER i){ - MVMuint16 dep = GET_UI16(i.cur_op, 2); - MVMuint64 idx = MVM_BC_get_I64(i.cur_op, 4); - GET_REG(i.cur_op, 0,i).o = MVM_sc_get_sc_object(i.tc,i.cu, dep, idx); - i.cur_op += 12; - goto cbc_next(i); - } -__code cbc_scwbdisable(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = ++i.tc->sc_wb_disable_depth; - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_scwbenable(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = --i.tc->sc_wb_disable_depth; - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_pushcompsc(INTER i){ - MVMObject * const sc = GET_REG(i.cur_op, 0,i).o; + i->cur_op += 10; + goto cbc_next(i); + } +__code cbc_wval(INTERP i){ + MVMuint16 dep = GET_UI16(i->cur_op, 2); + MVMuint16 idx = GET_UI16(i->cur_op, 4); + GET_REG(i->cur_op, 0,i).o = MVM_sc_get_sc_object(i->tc,i->cu, dep, idx); + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_wval_wide(INTERP i){ + MVMuint16 dep = GET_UI16(i->cur_op, 2); + MVMuint64 idx = MVM_BC_get_I64(i->cur_op, 4); + GET_REG(i->cur_op, 0,i).o = MVM_sc_get_sc_object(i->tc,i->cu, dep, idx); + i->cur_op += 12; + goto cbc_next(i); + } +__code cbc_scwbdisable(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = ++i->tc->sc_wb_disable_depth; + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_scwbenable(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = --i->tc->sc_wb_disable_depth; + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_pushcompsc(INTERP i){ + MVMObject * const sc = GET_REG(i->cur_op, 0,i).o; if (REPR(sc)->ID != MVM_REPR_ID_SCRef) - MVM_exception_throw_adhoc(i.tc, "Can only push an SCRef with pushcompsc"); - if (MVM_is_null(i.tc, i.tc->compiling_scs)) { - MVMROOT(i.tc, sc, { - i.tc->compiling_scs = MVM_repr_alloc_init(i.tc, i.tc->instance->boot_types.BOOTArray); + MVM_exception_throw_adhoc(i->tc, "Can only push an SCRef with pushcompsc"); + if (MVM_is_null(i->tc, i->tc->compiling_scs)) { + MVMROOT(i->tc, sc, { + i->tc->compiling_scs = MVM_repr_alloc_init(i->tc, i->tc->instance->boot_types.BOOTArray); }); } - MVM_repr_unshift_o(i.tc, i.tc->compiling_scs, sc); - i.cur_op += 2; - goto cbc_next(i); - } -__code cbc_popcompsc(INTER i){ - MVMObject * const scs = i.tc->compiling_scs; - if (MVM_is_null(i.tc, scs) || MVM_repr_elems(i.tc, scs) == 0) - MVM_exception_throw_adhoc(i.tc, "No current compiling SC"); - GET_REG(i.cur_op, 0,i).o = MVM_repr_shift_o(i.tc, i.tc->compiling_scs); - i.cur_op += 2; - goto cbc_next(i); - } -__code cbc_scgetdesc(INTER i){ - MVMObject *sc = GET_REG(i.cur_op, 2,i).o; + MVM_repr_unshift_o(i->tc, i->tc->compiling_scs, sc); + i->cur_op += 2; + goto cbc_next(i); + } +__code cbc_popcompsc(INTERP i){ + MVMObject * const scs = i->tc->compiling_scs; + if (MVM_is_null(i->tc, scs) || MVM_repr_elems(i->tc, scs) == 0) + MVM_exception_throw_adhoc(i->tc, "No current compiling SC"); + GET_REG(i->cur_op, 0,i).o = MVM_repr_shift_o(i->tc, i->tc->compiling_scs); + i->cur_op += 2; + goto cbc_next(i); + } +__code cbc_scgetdesc(INTERP i){ + MVMObject *sc = GET_REG(i->cur_op, 2,i).o; if (REPR(sc)->ID != MVM_REPR_ID_SCRef) - MVM_exception_throw_adhoc(i.tc, + MVM_exception_throw_adhoc(i->tc, "Must provide an SCRef operand to scgetdesc"); - GET_REG(i.cur_op, 0,i).s = MVM_sc_get_description(i.tc, + GET_REG(i->cur_op, 0,i).s = MVM_sc_get_description(i->tc, (MVMSerializationContext *)sc); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_loadbytecode(INTER i){ + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_loadbytecode(INTERP i){ /* This op will end up returning into the runloop to run * deserialization and load code, so make sure we're done * processing this op really. */ - MVMString *filename = GET_REG(i.cur_op, 2,i).s; - GET_REG(i.cur_op, 0,i).s = filename; - i.cur_op += 4; + MVMString *filename = GET_REG(i->cur_op, 2,i).s; + GET_REG(i->cur_op, 0,i).s = filename; + i->cur_op += 4; /* Set up return (really continuation after load) address * and enter bytecode loading process. */ - i.tc->cur_frame->return_address = i.cur_op; - MVM_load_bytecode(i.tc, filename); - goto cbc_next(i); - } -__code cbc_loadbytecodebuffer(INTER i){ + i->tc->cur_frame->return_address = i->cur_op; + MVM_load_bytecode(i->tc, filename); + goto cbc_next(i); + } +__code cbc_loadbytecodebuffer(INTERP i){ /* This op will end up returning into the runloop to run * deserialization and load code, so make sure we're done * processing this op really. */ - MVMObject *buffer = GET_REG(i.cur_op, 0,i).o; - i.cur_op += 2; + MVMObject *buffer = GET_REG(i->cur_op, 0,i).o; + i->cur_op += 2; /* Set up return (really continuation after load) address * and enter bytecode loading process. */ - i.tc->cur_frame->return_address = i.cur_op; - MVM_load_bytecode_buffer(i.tc, buffer); - goto cbc_next(i); - } -__code cbc_loadbytecodefh(INTER i){ + i->tc->cur_frame->return_address = i->cur_op; + MVM_load_bytecode_buffer(i->tc, buffer); + goto cbc_next(i); + } +__code cbc_loadbytecodefh(INTERP i){ /* This op will end up returning into the runloop to run * deserialization and load code, so make sure we're done * processing this op really. */ - MVMObject *file = GET_REG(i.cur_op, 0,i).o; - MVMString *filename = GET_REG(i.cur_op, 2,i).s; - i.cur_op += 4; + MVMObject *file = GET_REG(i->cur_op, 0,i).o; + MVMString *filename = GET_REG(i->cur_op, 2,i).s; + i->cur_op += 4; /* Set up return (really continuation after load) address * and enter bytecode loading process. */ - i.tc->cur_frame->return_address = i.cur_op; - MVM_load_bytecode_fh(i.tc, file, filename); - goto cbc_next(i); - } -__code cbc_masttofile(INTER i){ - MVM_mast_to_file(i.tc, GET_REG(i.cur_op, 0,i).o, - GET_REG(i.cur_op, 2,i).o, GET_REG(i.cur_op, 4,i).s); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_masttocu(INTER i){ + i->tc->cur_frame->return_address = i->cur_op; + MVM_load_bytecode_fh(i->tc, file, filename); + goto cbc_next(i); + } +__code cbc_masttofile(INTERP i){ + MVM_mast_to_file(i->tc, GET_REG(i->cur_op, 0,i).o, + GET_REG(i->cur_op, 2,i).o, GET_REG(i->cur_op, 4,i).s); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_masttocu(INTERP i){ /* This op will end up returning into the runloop to run * deserialization and load code, so make sure we're done * processing this op really. */ - MVMObject *node = GET_REG(i.cur_op, 2,i).o; - MVMObject *types = GET_REG(i.cur_op, 4,i).o; - MVMRegister *result_reg = &GET_REG(i.cur_op, 0,i); - i.cur_op += 6; + MVMObject *node = GET_REG(i->cur_op, 2,i).o; + MVMObject *types = GET_REG(i->cur_op, 4,i).o; + MVMRegister *result_reg = &GET_REG(i->cur_op, 0,i); + i->cur_op += 6; /* Set up return (really continuation after load) address * and enter bytecode loading process. */ - i.tc->cur_frame->return_address = i.cur_op; - MVM_mast_to_cu(i.tc, node, types, result_reg); - goto cbc_next(i); - } -__code cbc_iscompunit(INTER i){ - MVMObject *maybe_cu = GET_REG(i.cur_op, 2,i).o; - GET_REG(i.cur_op, 0,i).i64 = REPR(maybe_cu)->ID == MVM_REPR_ID_MVMCompUnit; - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_compunitmainline(INTER i){ - MVMObject *maybe_cu = GET_REG(i.cur_op, 2,i).o; + i->tc->cur_frame->return_address = i->cur_op; + MVM_mast_to_cu(i->tc, node, types, result_reg); + goto cbc_next(i); + } +__code cbc_iscompunit(INTERP i){ + MVMObject *maybe_cu = GET_REG(i->cur_op, 2,i).o; + GET_REG(i->cur_op, 0,i).i64 = REPR(maybe_cu)->ID == MVM_REPR_ID_MVMCompUnit; + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_compunitmainline(INTERP i){ + MVMObject *maybe_cu = GET_REG(i->cur_op, 2,i).o; if (REPR(maybe_cu)->ID == MVM_REPR_ID_MVMCompUnit) { MVMCompUnit *cu = (MVMCompUnit *)maybe_cu; - GET_REG(i.cur_op, 0,i).o = cu->body.coderefs[0]; + GET_REG(i->cur_op, 0,i).o = cu->body.coderefs[0]; } else { - MVM_exception_throw_adhoc(i.tc, "compunitmainline requires an MVMCompUnit"); + MVM_exception_throw_adhoc(i->tc, "compunitmainline requires an MVMCompUnit"); } - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_compunitcodes(INTER i){ - MVMObject * const result = MVM_repr_alloc_init(i.tc, MVM_hll_current(i.tc)->slurpy_array_type); - MVMCompUnit * const maybe_cu = (MVMCompUnit *)GET_REG(i.cur_op, 2,i).o; + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_compunitcodes(INTERP i){ + MVMObject * const result = MVM_repr_alloc_init(i->tc, MVM_hll_current(i->tc)->slurpy_array_type); + MVMCompUnit * const maybe_cu = (MVMCompUnit *)GET_REG(i->cur_op, 2,i).o; if (REPR(maybe_cu)->ID == MVM_REPR_ID_MVMCompUnit) { const MVMuint32 num_frames = maybe_cu->body.num_frames; MVMObject ** const coderefs = maybe_cu->body.coderefs; MVMuint32 j; for (j = 0; j < num_frames; j++) { - MVM_repr_push_o(i.tc, result, coderefs[j]); + MVM_repr_push_o(i->tc, result, coderefs[j]); } - GET_REG(i.cur_op, 0,i).o = result; + GET_REG(i->cur_op, 0,i).o = result; } else { - MVM_exception_throw_adhoc(i.tc, "compunii->tcodes requires an MVMCompUnit"); + MVM_exception_throw_adhoc(i->tc, "compunii->tcodes requires an MVMCompUnit"); } - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_ctx(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_frame_context_wrapper(i.tc, i.tc->cur_frame); - i.cur_op += 2; - goto cbc_next(i); - } -__code cbc_ctxouter(INTER i){ - MVMObject *this_ctx = GET_REG(i.cur_op, 2,i).o; + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_ctx(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_frame_context_wrapper(i->tc, i->tc->cur_frame); + i->cur_op += 2; + goto cbc_next(i); + } +__code cbc_ctxouter(INTERP i){ + MVMObject *this_ctx = GET_REG(i->cur_op, 2,i).o; MVMFrame *frame; if (!IS_CONCRETE(this_ctx) || REPR(this_ctx)->ID != MVM_REPR_ID_MVMContext) { - MVM_exception_throw_adhoc(i.tc, "ctxouter needs an MVMContext"); + MVM_exception_throw_adhoc(i->tc, "ctxouter needs an MVMContext"); } if ((frame = ((MVMContext *)this_ctx)->body.context->outer)) - GET_REG(i.cur_op, 0,i).o = MVM_frame_context_wrapper(i.tc, frame); + GET_REG(i->cur_op, 0,i).o = MVM_frame_context_wrapper(i->tc, frame); else - GET_REG(i.cur_op, 0,i).o = i.tc->instance->VMNull; - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_ctxcaller(INTER i){ - MVMObject *this_ctx = GET_REG(i.cur_op, 2,i).o, *ctx = NULL; + GET_REG(i->cur_op, 0,i).o = i->tc->instance->VMNull; + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_ctxcaller(INTERP i){ + MVMObject *this_ctx = GET_REG(i->cur_op, 2,i).o, *ctx = NULL; MVMFrame *frame; if (!IS_CONCRETE(this_ctx) || REPR(this_ctx)->ID != MVM_REPR_ID_MVMContext) { - MVM_exception_throw_adhoc(i.tc, "ctxcaller needs an MVMContext"); + MVM_exception_throw_adhoc(i->tc, "ctxcaller needs an MVMContext"); } if ((frame = ((MVMContext *)this_ctx)->body.context->caller)) - ctx = MVM_frame_context_wrapper(i.tc, frame); - GET_REG(i.cur_op, 0,i).o = ctx ? ctx : i.tc->instance->VMNull; - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_ctxlexpad(INTER i){ - MVMObject *this_ctx = GET_REG(i.cur_op, 2,i).o; + ctx = MVM_frame_context_wrapper(i->tc, frame); + GET_REG(i->cur_op, 0,i).o = ctx ? ctx : i->tc->instance->VMNull; + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_ctxlexpad(INTERP i){ + MVMObject *this_ctx = GET_REG(i->cur_op, 2,i).o; if (!IS_CONCRETE(this_ctx) || REPR(this_ctx)->ID != MVM_REPR_ID_MVMContext) { - MVM_exception_throw_adhoc(i.tc, "ctxlexpad needs an MVMContext"); + MVM_exception_throw_adhoc(i->tc, "ctxlexpad needs an MVMContext"); } - GET_REG(i.cur_op, 0,i).o = this_ctx; - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_curcode(INTER i){ - GET_REG(i.cur_op, 0,i).o = i.tc->cur_frame->code_ref; - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_callercode(INTER i){ - GET_REG(i.cur_op, 0,i).o = i.tc->cur_frame->caller - ? i.tc->cur_frame->caller->code_ref - : i.tc->instance->VMNull; - i.cur_op += 2; - goto cbc_next(i); - } -__code cbc_add_I(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_bigint_add(i.tc, GET_REG(i.cur_op, 6,i).o, - GET_REG(i.cur_op, 2,i).o, GET_REG(i.cur_op, 4,i).o); - i.cur_op += 8; - goto cbc_next(i); -} -__code cbc_sub_I(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_bigint_sub(i.tc, GET_REG(i.cur_op, 6,i).o, - GET_REG(i.cur_op, 2,i).o, GET_REG(i.cur_op, 4,i).o); - i.cur_op += 8; - goto cbc_next(i); -} -__code cbc_mul_I(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_bigint_mul(i.tc, GET_REG(i.cur_op, 6,i).o, - GET_REG(i.cur_op, 2,i).o, GET_REG(i.cur_op, 4,i).o); - i.cur_op += 8; - goto cbc_next(i); -} -__code cbc_div_I(INTER i){ - MVMObject * const type = GET_REG(i.cur_op, 6,i).o; - GET_REG(i.cur_op, 0,i).o = MVM_bigint_div(i.tc, type, GET_REG(i.cur_op, 2,i).o, GET_REG(i.cur_op, 4,i).o); - i.cur_op += 8; - goto cbc_next(i); - } -__code cbc_mod_I(INTER i){ - MVMObject * const type = GET_REG(i.cur_op, 6,i).o; - GET_REG(i.cur_op, 0,i).o = MVM_bigint_mod(i.tc, type, GET_REG(i.cur_op, 2,i).o, GET_REG(i.cur_op, 4,i).o); - i.cur_op += 8; - goto cbc_next(i); - } -__code cbc_neg_I(INTER i){ - MVMObject * const type = GET_REG(i.cur_op, 4,i).o; - MVMObject * const result = MVM_repr_alloc_init(i.tc, type); - MVM_bigint_neg(i.tc, result, GET_REG(i.cur_op, 2,i).o); - GET_REG(i.cur_op, 0,i).o = result; - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_abs_I(INTER i){ - MVMObject * const type = GET_REG(i.cur_op, 4,i).o; - MVMObject * const result = MVM_repr_alloc_init(i.tc, type); - MVM_bigint_abs(i.tc, result, GET_REG(i.cur_op, 2,i).o); - GET_REG(i.cur_op, 0,i).o = result; - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_cmp_I(INTER i){ - MVMObject *a = GET_REG(i.cur_op, 2,i).o, *b = GET_REG(i.cur_op, 4,i).o; - GET_REG(i.cur_op, 0,i).i64 = MVM_bigint_cmp(i.tc, a, b); - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_eq_I(INTER i){ - MVMObject *a = GET_REG(i.cur_op, 2,i).o, *b = GET_REG(i.cur_op, 4,i).o; - GET_REG(i.cur_op, 0,i).i64 = MP_EQ == MVM_bigint_cmp(i.tc, a, b); - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_ne_I(INTER i){ - MVMObject *a = GET_REG(i.cur_op, 2,i).o, *b = GET_REG(i.cur_op, 4,i).o; - GET_REG(i.cur_op, 0,i).i64 = MP_EQ != MVM_bigint_cmp(i.tc, a, b); - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_lt_I(INTER i){ - MVMObject *a = GET_REG(i.cur_op, 2,i).o, *b = GET_REG(i.cur_op, 4,i).o; - GET_REG(i.cur_op, 0,i).i64 = MP_LT == MVM_bigint_cmp(i.tc, a, b); - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_le_I(INTER i){ - MVMObject *a = GET_REG(i.cur_op, 2,i).o, *b = GET_REG(i.cur_op, 4,i).o; - GET_REG(i.cur_op, 0,i).i64 = MP_GT != MVM_bigint_cmp(i.tc, a, b); - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_gt_I(INTER i){ - MVMObject *a = GET_REG(i.cur_op, 2,i).o, *b = GET_REG(i.cur_op, 4,i).o; - GET_REG(i.cur_op, 0,i).i64 = MP_GT == MVM_bigint_cmp(i.tc, a, b); - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_ge_I(INTER i){ - MVMObject *a = GET_REG(i.cur_op, 2,i).o, *b = GET_REG(i.cur_op, 4,i).o; - GET_REG(i.cur_op, 0,i).i64 = MP_LT != MVM_bigint_cmp(i.tc, a, b); - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_bor_I(INTER i){ - MVMObject * const type = GET_REG(i.cur_op, 6,i).o; - GET_REG(i.cur_op, 0,i).o = MVM_bigint_or(i.tc, type, GET_REG(i.cur_op, 2,i).o, GET_REG(i.cur_op, 4,i).o); - i.cur_op += 8; - goto cbc_next(i); - } -__code cbc_bxor_I(INTER i){ - MVMObject * const type = GET_REG(i.cur_op, 6,i).o; - GET_REG(i.cur_op, 0,i).o = MVM_bigint_xor(i.tc, type, GET_REG(i.cur_op, 2,i).o, GET_REG(i.cur_op, 4,i).o); - i.cur_op += 8; - goto cbc_next(i); - } -__code cbc_band_I(INTER i){ - MVMObject * const type = GET_REG(i.cur_op, 6,i).o; - GET_REG(i.cur_op, 0,i).o = MVM_bigint_and(i.tc, type, GET_REG(i.cur_op, 2,i).o, GET_REG(i.cur_op, 4,i).o); - i.cur_op += 8; - goto cbc_next(i); - } -__code cbc_bnot_I(INTER i){ - MVMObject * const type = GET_REG(i.cur_op, 4,i).o; - GET_REG(i.cur_op, 0,i).o = MVM_bigint_not(i.tc, type, GET_REG(i.cur_op, 2,i).o); - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_blshift_I(INTER i){ - MVMObject * const type = GET_REG(i.cur_op, 6,i).o; - GET_REG(i.cur_op, 0,i).o = MVM_bigint_shl(i.tc, type, GET_REG(i.cur_op, 2,i).o, GET_REG(i.cur_op, 4,i).i64); - i.cur_op += 8; - goto cbc_next(i); - } -__code cbc_brshift_I(INTER i){ - MVMObject * const type = GET_REG(i.cur_op, 6,i).o; - GET_REG(i.cur_op, 0,i).o = MVM_bigint_shr(i.tc, type, GET_REG(i.cur_op, 2,i).o, GET_REG(i.cur_op, 4,i).i64); - i.cur_op += 8; - goto cbc_next(i); - } -__code cbc_pow_I(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_bigint_pow(i.tc, GET_REG(i.cur_op, 2,i).o, - GET_REG(i.cur_op, 4,i).o, GET_REG(i.cur_op, 6,i).o, GET_REG(i.cur_op, 8,i).o); - i.cur_op += 10; - goto cbc_next(i); -} -__code cbc_gcd_I(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_bigint_gcd(i.tc, GET_REG(i.cur_op, 6,i).o, GET_REG(i.cur_op, 2,i).o, GET_REG(i.cur_op, 4,i).o); - i.cur_op += 8; - goto cbc_next(i); - } -__code cbc_lcm_I(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_bigint_lcm(i.tc, GET_REG(i.cur_op, 6,i).o, - GET_REG(i.cur_op, 2,i).o, GET_REG(i.cur_op, 4,i).o); - i.cur_op += 8; - goto cbc_next(i); -} -__code cbc_expmod_I(INTER i){ - MVMObject * const type = GET_REG(i.cur_op, 8,i).o; - MVMObject * const result = MVM_repr_alloc_init(i.tc, type); - MVM_bigint_expmod(i.tc, result, GET_REG(i.cur_op, 2,i).o, GET_REG(i.cur_op, 4,i).o, GET_REG(i.cur_op, 6,i).o); - GET_REG(i.cur_op, 0,i).o = result; - i.cur_op += 10; - goto cbc_next(i); - } -__code cbc_isprime_I(INTER i){ - MVMObject *a = GET_REG(i.cur_op, 2,i).o; - MVMint64 b = GET_REG(i.cur_op, 4,i).i64; - GET_REG(i.cur_op, 0,i).i64 = MVM_bigint_is_prime(i.tc, a, b); - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_rand_I(INTER i){ - MVMObject * const type = GET_REG(i.cur_op, 4,i).o; - GET_REG(i.cur_op, 0,i).o = MVM_bigint_rand(i.tc, type, GET_REG(i.cur_op, 2,i).o); - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_coerce_In(INTER i){ - MVMObject *a = GET_REG(i.cur_op, 2,i).o; - GET_REG(i.cur_op, 0,i).n64 = MVM_bigint_to_num(i.tc, a); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_coerce_Is(INTER i){ - GET_REG(i.cur_op, 0,i).s = MVM_bigint_to_str(i.tc, GET_REG(i.cur_op, 2,i).o, 10); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_coerce_nI(INTER i){ - MVMObject * const type = GET_REG(i.cur_op, 4,i).o; - GET_REG(i.cur_op, 0,i).o = MVM_bigint_from_num(i.tc, type, GET_REG(i.cur_op, 2,i).n64); - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_coerce_sI(INTER i){ - MVMString *s = GET_REG(i.cur_op, 2,i).s; - MVMObject *type = GET_REG(i.cur_op, 4,i).o; - char *buf = MVM_string_ascii_encode(i.tc, s, NULL, 0); - MVMObject *a = MVM_repr_alloc_init(i.tc, type); - MVM_bigint_from_str(i.tc, a, buf); + GET_REG(i->cur_op, 0,i).o = this_ctx; + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_curcode(INTERP i){ + GET_REG(i->cur_op, 0,i).o = i->tc->cur_frame->code_ref; + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_callercode(INTERP i){ + GET_REG(i->cur_op, 0,i).o = i->tc->cur_frame->caller + ? i->tc->cur_frame->caller->code_ref + : i->tc->instance->VMNull; + i->cur_op += 2; + goto cbc_next(i); + } +__code cbc_add_I(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_bigint_add(i->tc, GET_REG(i->cur_op, 6,i).o, + GET_REG(i->cur_op, 2,i).o, GET_REG(i->cur_op, 4,i).o); + i->cur_op += 8; + goto cbc_next(i); +} +__code cbc_sub_I(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_bigint_sub(i->tc, GET_REG(i->cur_op, 6,i).o, + GET_REG(i->cur_op, 2,i).o, GET_REG(i->cur_op, 4,i).o); + i->cur_op += 8; + goto cbc_next(i); +} +__code cbc_mul_I(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_bigint_mul(i->tc, GET_REG(i->cur_op, 6,i).o, + GET_REG(i->cur_op, 2,i).o, GET_REG(i->cur_op, 4,i).o); + i->cur_op += 8; + goto cbc_next(i); +} +__code cbc_div_I(INTERP i){ + MVMObject * const type = GET_REG(i->cur_op, 6,i).o; + GET_REG(i->cur_op, 0,i).o = MVM_bigint_div(i->tc, type, GET_REG(i->cur_op, 2,i).o, GET_REG(i->cur_op, 4,i).o); + i->cur_op += 8; + goto cbc_next(i); + } +__code cbc_mod_I(INTERP i){ + MVMObject * const type = GET_REG(i->cur_op, 6,i).o; + GET_REG(i->cur_op, 0,i).o = MVM_bigint_mod(i->tc, type, GET_REG(i->cur_op, 2,i).o, GET_REG(i->cur_op, 4,i).o); + i->cur_op += 8; + goto cbc_next(i); + } +__code cbc_neg_I(INTERP i){ + MVMObject * const type = GET_REG(i->cur_op, 4,i).o; + MVMObject * const result = MVM_repr_alloc_init(i->tc, type); + MVM_bigint_neg(i->tc, result, GET_REG(i->cur_op, 2,i).o); + GET_REG(i->cur_op, 0,i).o = result; + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_abs_I(INTERP i){ + MVMObject * const type = GET_REG(i->cur_op, 4,i).o; + MVMObject * const result = MVM_repr_alloc_init(i->tc, type); + MVM_bigint_abs(i->tc, result, GET_REG(i->cur_op, 2,i).o); + GET_REG(i->cur_op, 0,i).o = result; + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_cmp_I(INTERP i){ + MVMObject *a = GET_REG(i->cur_op, 2,i).o, *b = GET_REG(i->cur_op, 4,i).o; + GET_REG(i->cur_op, 0,i).i64 = MVM_bigint_cmp(i->tc, a, b); + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_eq_I(INTERP i){ + MVMObject *a = GET_REG(i->cur_op, 2,i).o, *b = GET_REG(i->cur_op, 4,i).o; + GET_REG(i->cur_op, 0,i).i64 = MP_EQ == MVM_bigint_cmp(i->tc, a, b); + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_ne_I(INTERP i){ + MVMObject *a = GET_REG(i->cur_op, 2,i).o, *b = GET_REG(i->cur_op, 4,i).o; + GET_REG(i->cur_op, 0,i).i64 = MP_EQ != MVM_bigint_cmp(i->tc, a, b); + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_lt_I(INTERP i){ + MVMObject *a = GET_REG(i->cur_op, 2,i).o, *b = GET_REG(i->cur_op, 4,i).o; + GET_REG(i->cur_op, 0,i).i64 = MP_LT == MVM_bigint_cmp(i->tc, a, b); + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_le_I(INTERP i){ + MVMObject *a = GET_REG(i->cur_op, 2,i).o, *b = GET_REG(i->cur_op, 4,i).o; + GET_REG(i->cur_op, 0,i).i64 = MP_GT != MVM_bigint_cmp(i->tc, a, b); + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_gt_I(INTERP i){ + MVMObject *a = GET_REG(i->cur_op, 2,i).o, *b = GET_REG(i->cur_op, 4,i).o; + GET_REG(i->cur_op, 0,i).i64 = MP_GT == MVM_bigint_cmp(i->tc, a, b); + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_ge_I(INTERP i){ + MVMObject *a = GET_REG(i->cur_op, 2,i).o, *b = GET_REG(i->cur_op, 4,i).o; + GET_REG(i->cur_op, 0,i).i64 = MP_LT != MVM_bigint_cmp(i->tc, a, b); + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_bor_I(INTERP i){ + MVMObject * const type = GET_REG(i->cur_op, 6,i).o; + GET_REG(i->cur_op, 0,i).o = MVM_bigint_or(i->tc, type, GET_REG(i->cur_op, 2,i).o, GET_REG(i->cur_op, 4,i).o); + i->cur_op += 8; + goto cbc_next(i); + } +__code cbc_bxor_I(INTERP i){ + MVMObject * const type = GET_REG(i->cur_op, 6,i).o; + GET_REG(i->cur_op, 0,i).o = MVM_bigint_xor(i->tc, type, GET_REG(i->cur_op, 2,i).o, GET_REG(i->cur_op, 4,i).o); + i->cur_op += 8; + goto cbc_next(i); + } +__code cbc_band_I(INTERP i){ + MVMObject * const type = GET_REG(i->cur_op, 6,i).o; + GET_REG(i->cur_op, 0,i).o = MVM_bigint_and(i->tc, type, GET_REG(i->cur_op, 2,i).o, GET_REG(i->cur_op, 4,i).o); + i->cur_op += 8; + goto cbc_next(i); + } +__code cbc_bnot_I(INTERP i){ + MVMObject * const type = GET_REG(i->cur_op, 4,i).o; + GET_REG(i->cur_op, 0,i).o = MVM_bigint_not(i->tc, type, GET_REG(i->cur_op, 2,i).o); + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_blshift_I(INTERP i){ + MVMObject * const type = GET_REG(i->cur_op, 6,i).o; + GET_REG(i->cur_op, 0,i).o = MVM_bigint_shl(i->tc, type, GET_REG(i->cur_op, 2,i).o, GET_REG(i->cur_op, 4,i).i64); + i->cur_op += 8; + goto cbc_next(i); + } +__code cbc_brshift_I(INTERP i){ + MVMObject * const type = GET_REG(i->cur_op, 6,i).o; + GET_REG(i->cur_op, 0,i).o = MVM_bigint_shr(i->tc, type, GET_REG(i->cur_op, 2,i).o, GET_REG(i->cur_op, 4,i).i64); + i->cur_op += 8; + goto cbc_next(i); + } +__code cbc_pow_I(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_bigint_pow(i->tc, GET_REG(i->cur_op, 2,i).o, + GET_REG(i->cur_op, 4,i).o, GET_REG(i->cur_op, 6,i).o, GET_REG(i->cur_op, 8,i).o); + i->cur_op += 10; + goto cbc_next(i); +} +__code cbc_gcd_I(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_bigint_gcd(i->tc, GET_REG(i->cur_op, 6,i).o, GET_REG(i->cur_op, 2,i).o, GET_REG(i->cur_op, 4,i).o); + i->cur_op += 8; + goto cbc_next(i); + } +__code cbc_lcm_I(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_bigint_lcm(i->tc, GET_REG(i->cur_op, 6,i).o, + GET_REG(i->cur_op, 2,i).o, GET_REG(i->cur_op, 4,i).o); + i->cur_op += 8; + goto cbc_next(i); +} +__code cbc_expmod_I(INTERP i){ + MVMObject * const type = GET_REG(i->cur_op, 8,i).o; + MVMObject * const result = MVM_repr_alloc_init(i->tc, type); + MVM_bigint_expmod(i->tc, result, GET_REG(i->cur_op, 2,i).o, GET_REG(i->cur_op, 4,i).o, GET_REG(i->cur_op, 6,i).o); + GET_REG(i->cur_op, 0,i).o = result; + i->cur_op += 10; + goto cbc_next(i); + } +__code cbc_isprime_I(INTERP i){ + MVMObject *a = GET_REG(i->cur_op, 2,i).o; + MVMint64 b = GET_REG(i->cur_op, 4,i).i64; + GET_REG(i->cur_op, 0,i).i64 = MVM_bigint_is_prime(i->tc, a, b); + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_rand_I(INTERP i){ + MVMObject * const type = GET_REG(i->cur_op, 4,i).o; + GET_REG(i->cur_op, 0,i).o = MVM_bigint_rand(i->tc, type, GET_REG(i->cur_op, 2,i).o); + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_coerce_In(INTERP i){ + MVMObject *a = GET_REG(i->cur_op, 2,i).o; + GET_REG(i->cur_op, 0,i).n64 = MVM_bigint_to_num(i->tc, a); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_coerce_Is(INTERP i){ + GET_REG(i->cur_op, 0,i).s = MVM_bigint_to_str(i->tc, GET_REG(i->cur_op, 2,i).o, 10); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_coerce_nI(INTERP i){ + MVMObject * const type = GET_REG(i->cur_op, 4,i).o; + GET_REG(i->cur_op, 0,i).o = MVM_bigint_from_num(i->tc, type, GET_REG(i->cur_op, 2,i).n64); + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_coerce_sI(INTERP i){ + MVMString *s = GET_REG(i->cur_op, 2,i).s; + MVMObject *type = GET_REG(i->cur_op, 4,i).o; + char *buf = MVM_string_ascii_encode(i->tc, s, NULL, 0); + MVMObject *a = MVM_repr_alloc_init(i->tc, type); + MVM_bigint_from_str(i->tc, a, buf); MVM_free(buf); - GET_REG(i.cur_op, 0,i).o = a; - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_isbig_I(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_bigint_is_big(i.tc, GET_REG(i.cur_op, 2,i).o); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_bool_I(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_bigint_bool(i.tc, GET_REG(i.cur_op, 2,i).o); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_base_I(INTER i){ - GET_REG(i.cur_op, 0,i).s = MVM_bigint_to_str(i.tc, GET_REG(i.cur_op, 2,i).o, GET_REG(i.cur_op, 4,i).i64); - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_radix_I(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_bigint_radix(i.tc, - GET_REG(i.cur_op, 2,i).i64, GET_REG(i.cur_op, 4,i).s, - GET_REG(i.cur_op, 6,i).i64, GET_REG(i.cur_op, 8,i).i64, GET_REG(i.cur_op, 10,i).o); - i.cur_op += 12; - goto cbc_next(i); -} -__code cbc_div_In(INTER i){ - MVMObject *a = GET_REG(i.cur_op, 2,i).o, *b = GET_REG(i.cur_op, 4,i).o; - GET_REG(i.cur_op, 0,i).n64 = MVM_bigint_div_num(i.tc, a, b); - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_copy_f(INTER i){ - MVM_file_copy(i.tc, GET_REG(i.cur_op, 0,i).s, GET_REG(i.cur_op, 2,i).s); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_append_f(INTER i){ - MVM_exception_throw_adhoc(i.tc, "append is not supported"); - goto cbc_next(i); -} -__code cbc_rename_f(INTER i){ - MVM_file_rename(i.tc, GET_REG(i.cur_op, 0,i).s, GET_REG(i.cur_op, 2,i).s); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_delete_f(INTER i){ - MVM_file_delete(i.tc, GET_REG(i.cur_op, 0,i).s); - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_chmod_f(INTER i){ - MVM_file_chmod(i.tc, GET_REG(i.cur_op, 0,i).s, GET_REG(i.cur_op, 2,i).i64); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_exists_f(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_file_exists(i.tc, GET_REG(i.cur_op, 2,i).s, 0); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_mkdir(INTER i){ - MVM_dir_mkdir(i.tc, GET_REG(i.cur_op, 0,i).s, GET_REG(i.cur_op, 2,i).i64); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_rmdir(INTER i){ - MVM_dir_rmdir(i.tc, GET_REG(i.cur_op, 0,i).s); - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_open_dir(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_dir_open(i.tc, GET_REG(i.cur_op, 2,i).s); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_read_dir(INTER i){ - GET_REG(i.cur_op, 0,i).s = MVM_dir_read(i.tc, GET_REG(i.cur_op, 2,i).o); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_close_dir(INTER i){ - MVM_dir_close(i.tc, GET_REG(i.cur_op, 0,i).o); - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_open_fh(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_file_open_fh(i.tc, GET_REG(i.cur_op, 2,i).s, GET_REG(i.cur_op, 4,i).s); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_close_fh(INTER i){ - MVM_io_close(i.tc, GET_REG(i.cur_op, 0,i).o); - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_seek_fh(INTER i){ - MVM_io_seek(i.tc, GET_REG(i.cur_op, 0,i).o, GET_REG(i.cur_op, 2,i).i64, - GET_REG(i.cur_op, 4,i).i64); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_lock_fh(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_io_lock(i.tc, GET_REG(i.cur_op, 2,i).o, - GET_REG(i.cur_op, 4,i).i64); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_unlock_fh(INTER i){ - MVM_io_unlock(i.tc, GET_REG(i.cur_op, 0,i).o); - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_sync_fh(INTER i){ - MVM_io_flush(i.tc, GET_REG(i.cur_op, 0,i).o, 1); - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_trunc_fh(INTER i){ - MVM_io_truncate(i.tc, GET_REG(i.cur_op, 0,i).o, GET_REG(i.cur_op, 2,i).i64); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_eof_fh(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_io_eof(i.tc, GET_REG(i.cur_op, 2,i).o); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_getstdin(INTER i){ - if (MVM_is_null(i.tc, i.tc->instance->stdin_handle)) - MVM_exception_throw_adhoc(i.tc, "STDIN filehandle was never initialized"); - GET_REG(i.cur_op, 0,i).o = i.tc->instance->stdin_handle; - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_getstdout(INTER i){ - if (MVM_is_null(i.tc, i.tc->instance->stdout_handle)) - MVM_exception_throw_adhoc(i.tc, "STDOUT filehandle was never initialized"); - GET_REG(i.cur_op, 0,i).o = i.tc->instance->stdout_handle; - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_getstderr(INTER i){ - if (MVM_is_null(i.tc, i.tc->instance->stderr_handle)) - MVM_exception_throw_adhoc(i.tc, "STDERR filehandle was never initialized"); - GET_REG(i.cur_op, 0,i).o = i.tc->instance->stderr_handle; - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_connect_sk(INTER i){ - MVM_io_connect(i.tc, GET_REG(i.cur_op, 0,i).o, - GET_REG(i.cur_op, 2,i).s, GET_REG(i.cur_op, 4,i).i64); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_socket(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_io_socket_create(i.tc, GET_REG(i.cur_op, 2,i).i64); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_getport_sk(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_io_getport(i.tc, GET_REG(i.cur_op, 2,i).o); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_bind_sk(INTER i){ - MVM_io_bind(i.tc, GET_REG(i.cur_op, 0,i).o, - GET_REG(i.cur_op, 2,i).s, GET_REG(i.cur_op, 4,i).i64, (int)GET_REG(i.cur_op, 6,i).i64); - i.cur_op += 8; - goto cbc_next(i); -} -__code cbc_accept_sk(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_io_accept(i.tc, GET_REG(i.cur_op, 2,i).o); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_decodetocodes(INTER i){ + GET_REG(i->cur_op, 0,i).o = a; + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_isbig_I(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_bigint_is_big(i->tc, GET_REG(i->cur_op, 2,i).o); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_bool_I(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_bigint_bool(i->tc, GET_REG(i->cur_op, 2,i).o); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_base_I(INTERP i){ + GET_REG(i->cur_op, 0,i).s = MVM_bigint_to_str(i->tc, GET_REG(i->cur_op, 2,i).o, GET_REG(i->cur_op, 4,i).i64); + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_radix_I(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_bigint_radix(i->tc, + GET_REG(i->cur_op, 2,i).i64, GET_REG(i->cur_op, 4,i).s, + GET_REG(i->cur_op, 6,i).i64, GET_REG(i->cur_op, 8,i).i64, GET_REG(i->cur_op, 10,i).o); + i->cur_op += 12; + goto cbc_next(i); +} +__code cbc_div_In(INTERP i){ + MVMObject *a = GET_REG(i->cur_op, 2,i).o, *b = GET_REG(i->cur_op, 4,i).o; + GET_REG(i->cur_op, 0,i).n64 = MVM_bigint_div_num(i->tc, a, b); + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_copy_f(INTERP i){ + MVM_file_copy(i->tc, GET_REG(i->cur_op, 0,i).s, GET_REG(i->cur_op, 2,i).s); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_append_f(INTERP i){ + MVM_exception_throw_adhoc(i->tc, "append is not supported"); + goto cbc_next(i); +} +__code cbc_rename_f(INTERP i){ + MVM_file_rename(i->tc, GET_REG(i->cur_op, 0,i).s, GET_REG(i->cur_op, 2,i).s); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_delete_f(INTERP i){ + MVM_file_delete(i->tc, GET_REG(i->cur_op, 0,i).s); + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_chmod_f(INTERP i){ + MVM_file_chmod(i->tc, GET_REG(i->cur_op, 0,i).s, GET_REG(i->cur_op, 2,i).i64); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_exists_f(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_file_exists(i->tc, GET_REG(i->cur_op, 2,i).s, 0); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_mkdir(INTERP i){ + MVM_dir_mkdir(i->tc, GET_REG(i->cur_op, 0,i).s, GET_REG(i->cur_op, 2,i).i64); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_rmdir(INTERP i){ + MVM_dir_rmdir(i->tc, GET_REG(i->cur_op, 0,i).s); + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_open_dir(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_dir_open(i->tc, GET_REG(i->cur_op, 2,i).s); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_read_dir(INTERP i){ + GET_REG(i->cur_op, 0,i).s = MVM_dir_read(i->tc, GET_REG(i->cur_op, 2,i).o); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_close_dir(INTERP i){ + MVM_dir_close(i->tc, GET_REG(i->cur_op, 0,i).o); + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_open_fh(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_file_open_fh(i->tc, GET_REG(i->cur_op, 2,i).s, GET_REG(i->cur_op, 4,i).s); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_close_fh(INTERP i){ + MVM_io_close(i->tc, GET_REG(i->cur_op, 0,i).o); + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_seek_fh(INTERP i){ + MVM_io_seek(i->tc, GET_REG(i->cur_op, 0,i).o, GET_REG(i->cur_op, 2,i).i64, + GET_REG(i->cur_op, 4,i).i64); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_lock_fh(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_io_lock(i->tc, GET_REG(i->cur_op, 2,i).o, + GET_REG(i->cur_op, 4,i).i64); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_unlock_fh(INTERP i){ + MVM_io_unlock(i->tc, GET_REG(i->cur_op, 0,i).o); + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_sync_fh(INTERP i){ + MVM_io_flush(i->tc, GET_REG(i->cur_op, 0,i).o, 1); + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_trunc_fh(INTERP i){ + MVM_io_truncate(i->tc, GET_REG(i->cur_op, 0,i).o, GET_REG(i->cur_op, 2,i).i64); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_eof_fh(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_io_eof(i->tc, GET_REG(i->cur_op, 2,i).o); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_getstdin(INTERP i){ + if (MVM_is_null(i->tc, i->tc->instance->stdin_handle)) + MVM_exception_throw_adhoc(i->tc, "STDIN filehandle was never initialized"); + GET_REG(i->cur_op, 0,i).o = i->tc->instance->stdin_handle; + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_getstdout(INTERP i){ + if (MVM_is_null(i->tc, i->tc->instance->stdout_handle)) + MVM_exception_throw_adhoc(i->tc, "STDOUT filehandle was never initialized"); + GET_REG(i->cur_op, 0,i).o = i->tc->instance->stdout_handle; + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_getstderr(INTERP i){ + if (MVM_is_null(i->tc, i->tc->instance->stderr_handle)) + MVM_exception_throw_adhoc(i->tc, "STDERR filehandle was never initialized"); + GET_REG(i->cur_op, 0,i).o = i->tc->instance->stderr_handle; + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_connect_sk(INTERP i){ + MVM_io_connect(i->tc, GET_REG(i->cur_op, 0,i).o, + GET_REG(i->cur_op, 2,i).s, GET_REG(i->cur_op, 4,i).i64); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_socket(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_io_socket_create(i->tc, GET_REG(i->cur_op, 2,i).i64); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_getport_sk(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_io_getport(i->tc, GET_REG(i->cur_op, 2,i).o); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_bind_sk(INTERP i){ + MVM_io_bind(i->tc, GET_REG(i->cur_op, 0,i).o, + GET_REG(i->cur_op, 2,i).s, GET_REG(i->cur_op, 4,i).i64, (int)GET_REG(i->cur_op, 6,i).i64); + i->cur_op += 8; + goto cbc_next(i); +} +__code cbc_accept_sk(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_io_accept(i->tc, GET_REG(i->cur_op, 2,i).o); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_decodetocodes(INTERP i){ goto cbc_encodefromcodes(i); } -__code cbc_encodefromcodes(INTER i){ - MVM_exception_throw_adhoc(i.tc, "NYI"); +__code cbc_encodefromcodes(INTERP i){ + MVM_exception_throw_adhoc(i->tc, "NYI"); goto cbc_print(i); } -__code cbc_print(INTER i){ - MVM_string_print(i.tc, GET_REG(i.cur_op, 0,i).s); - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_say(INTER i){ - MVM_string_say(i.tc, GET_REG(i.cur_op, 0,i).s); - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_tell_fh(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_io_tell(i.tc, GET_REG(i.cur_op, 2,i).o); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_stat(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_file_stat(i.tc, GET_REG(i.cur_op, 2,i).s, GET_REG(i.cur_op, 4,i).i64, 0); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_tryfindmeth(INTER i){ - MVMRegister *res = &GET_REG(i.cur_op, 0,i); - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; - MVMString *name = MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 4)); - i.cur_op += 8; - MVM_6model_find_method(i.tc, obj, name, res, 0); - goto cbc_next(i); - } -__code cbc_tryfindmeth_s(INTER i){ - MVMRegister *res = &GET_REG(i.cur_op, 0,i); - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; - MVMString *name = GET_REG(i.cur_op, 4,i).s; - i.cur_op += 6; - MVM_6model_find_method(i.tc, obj, name, res, 0); - goto cbc_next(i); - } -__code cbc_chdir(INTER i){ - MVM_dir_chdir(i.tc, GET_REG(i.cur_op, 0,i).s); - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_srand(INTER i){ - MVM_proc_seed(i.tc, GET_REG(i.cur_op, 0,i).i64); - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_rand_i(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_proc_rand_i(i.tc); - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_rand_n(INTER i){ - GET_REG(i.cur_op, 0,i).n64 = MVM_proc_rand_n(i.tc); - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_time_i(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_proc_time_i(i.tc); - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_sleep(INTER i){ - MVM_gc_mark_thread_blocked(i.tc); - MVM_platform_sleep(GET_REG(i.cur_op, 0,i).n64); - MVM_gc_mark_thread_unblocked(i.tc); - i.cur_op += 2; - goto cbc_next(i); - } -__code cbc_newthread(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_thread_new(i.tc, GET_REG(i.cur_op, 2,i).o, - GET_REG(i.cur_op, 4,i).i64); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_threadjoin(INTER i){ - MVM_thread_join(i.tc, GET_REG(i.cur_op, 0,i).o); - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_time_n(INTER i){ - GET_REG(i.cur_op, 0,i).n64 = MVM_proc_time_n(i.tc); - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_exit(INTER i){ - MVMint64 exit_code = GET_REG(i.cur_op, 0,i).i64; - MVM_io_flush_standard_handles(i.tc); +__code cbc_print(INTERP i){ + MVM_string_print(i->tc, GET_REG(i->cur_op, 0,i).s); + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_say(INTERP i){ + MVM_string_say(i->tc, GET_REG(i->cur_op, 0,i).s); + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_tell_fh(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_io_tell(i->tc, GET_REG(i->cur_op, 2,i).o); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_stat(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_file_stat(i->tc, GET_REG(i->cur_op, 2,i).s, GET_REG(i->cur_op, 4,i).i64, 0); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_tryfindmeth(INTERP i){ + MVMRegister *res = &GET_REG(i->cur_op, 0,i); + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; + MVMString *name = MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 4)); + i->cur_op += 8; + MVM_6model_find_method(i->tc, obj, name, res, 0); + goto cbc_next(i); + } +__code cbc_tryfindmeth_s(INTERP i){ + MVMRegister *res = &GET_REG(i->cur_op, 0,i); + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; + MVMString *name = GET_REG(i->cur_op, 4,i).s; + i->cur_op += 6; + MVM_6model_find_method(i->tc, obj, name, res, 0); + goto cbc_next(i); + } +__code cbc_chdir(INTERP i){ + MVM_dir_chdir(i->tc, GET_REG(i->cur_op, 0,i).s); + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_srand(INTERP i){ + MVM_proc_seed(i->tc, GET_REG(i->cur_op, 0,i).i64); + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_rand_i(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_proc_rand_i(i->tc); + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_rand_n(INTERP i){ + GET_REG(i->cur_op, 0,i).n64 = MVM_proc_rand_n(i->tc); + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_time_i(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_proc_time_i(i->tc); + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_sleep(INTERP i){ + MVM_gc_mark_thread_blocked(i->tc); + MVM_platform_sleep(GET_REG(i->cur_op, 0,i).n64); + MVM_gc_mark_thread_unblocked(i->tc); + i->cur_op += 2; + goto cbc_next(i); + } +__code cbc_newthread(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_thread_new(i->tc, GET_REG(i->cur_op, 2,i).o, + GET_REG(i->cur_op, 4,i).i64); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_threadjoin(INTERP i){ + MVM_thread_join(i->tc, GET_REG(i->cur_op, 0,i).o); + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_time_n(INTERP i){ + GET_REG(i->cur_op, 0,i).n64 = MVM_proc_time_n(i->tc); + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_exit(INTERP i){ + MVMint64 exit_code = GET_REG(i->cur_op, 0,i).i64; + MVM_io_flush_standard_handles(i->tc); exit(exit_code); goto cbc_next(i); } -__code cbc_cwd(INTER i){ - GET_REG(i.cur_op, 0,i).s = MVM_dir_cwd(i.tc); - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_clargs(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_proc_clargs(i.tc); - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_getenvhash(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_proc_getenvhash(i.tc); - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_loadlib(INTER i){ - MVMString *name = GET_REG(i.cur_op, 0,i).s; - MVMString *path = GET_REG(i.cur_op, 2,i).s; - MVM_dll_load(i.tc, name, path); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_freelib(INTER i){ - MVMString *name = GET_REG(i.cur_op, 0,i).s; - MVM_dll_free(i.tc, name); - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_findsym(INTER i){ - MVMString *lib = GET_REG(i.cur_op, 2,i).s; - MVMString *sym = GET_REG(i.cur_op, 4,i).s; - MVMObject *obj = MVM_dll_find_symbol(i.tc, lib, sym); - if (MVM_is_null(i.tc, obj)) - MVM_exception_throw_adhoc(i.tc, "symbol not found in DLL"); +__code cbc_cwd(INTERP i){ + GET_REG(i->cur_op, 0,i).s = MVM_dir_cwd(i->tc); + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_clargs(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_proc_clargs(i->tc); + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_getenvhash(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_proc_getenvhash(i->tc); + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_loadlib(INTERP i){ + MVMString *name = GET_REG(i->cur_op, 0,i).s; + MVMString *path = GET_REG(i->cur_op, 2,i).s; + MVM_dll_load(i->tc, name, path); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_freelib(INTERP i){ + MVMString *name = GET_REG(i->cur_op, 0,i).s; + MVM_dll_free(i->tc, name); + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_findsym(INTERP i){ + MVMString *lib = GET_REG(i->cur_op, 2,i).s; + MVMString *sym = GET_REG(i->cur_op, 4,i).s; + MVMObject *obj = MVM_dll_find_symbol(i->tc, lib, sym); + if (MVM_is_null(i->tc, obj)) + MVM_exception_throw_adhoc(i->tc, "symbol not found in DLL"); - GET_REG(i.cur_op, 0,i).o = obj; - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_dropsym(INTER i){ - MVM_dll_drop_symbol(i.tc, GET_REG(i.cur_op, 0,i).o); - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_loadext(INTER i){ - MVMString *lib = GET_REG(i.cur_op, 0,i).s; - MVMString *ext = GET_REG(i.cur_op, 2,i).s; - MVM_ext_load(i.tc, lib, ext); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_backendconfig(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_backend_config(i.tc); - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_getlexouter(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_frame_find_lexical_by_name_outer(i.tc, - GET_REG(i.cur_op, 2,i).s); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_getlexrel(INTER i){ - MVMObject *ctx = GET_REG(i.cur_op, 2,i).o; + GET_REG(i->cur_op, 0,i).o = obj; + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_dropsym(INTERP i){ + MVM_dll_drop_symbol(i->tc, GET_REG(i->cur_op, 0,i).o); + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_loadext(INTERP i){ + MVMString *lib = GET_REG(i->cur_op, 0,i).s; + MVMString *ext = GET_REG(i->cur_op, 2,i).s; + MVM_ext_load(i->tc, lib, ext); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_backendconfig(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_backend_config(i->tc); + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_getlexouter(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_frame_find_lexical_by_name_outer(i->tc, + GET_REG(i->cur_op, 2,i).s); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_getlexrel(INTERP i){ + MVMObject *ctx = GET_REG(i->cur_op, 2,i).o; MVMRegister *r; if (REPR(ctx)->ID != MVM_REPR_ID_MVMContext || !IS_CONCRETE(ctx)) - MVM_exception_throw_adhoc(i.tc, "getlexrel needs a context"); - r = MVM_frame_find_lexical_by_name_rel(i.tc, - GET_REG(i.cur_op, 4,i).s, ((MVMContext *)ctx)->body.context); - GET_REG(i.cur_op, 0,i).o = r ? r->o : i.tc->instance->VMNull; - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_getlexreldyn(INTER i){ - MVMObject *ctx = GET_REG(i.cur_op, 2,i).o; + MVM_exception_throw_adhoc(i->tc, "getlexrel needs a context"); + r = MVM_frame_find_lexical_by_name_rel(i->tc, + GET_REG(i->cur_op, 4,i).s, ((MVMContext *)ctx)->body.context); + GET_REG(i->cur_op, 0,i).o = r ? r->o : i->tc->instance->VMNull; + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_getlexreldyn(INTERP i){ + MVMObject *ctx = GET_REG(i->cur_op, 2,i).o; if (REPR(ctx)->ID != MVM_REPR_ID_MVMContext || !IS_CONCRETE(ctx)) - MVM_exception_throw_adhoc(i.tc, "getlexreldyn needs a context"); - GET_REG(i.cur_op, 0,i).o = MVM_frame_getdynlex(i.tc, GET_REG(i.cur_op, 4,i).s, + MVM_exception_throw_adhoc(i->tc, "getlexreldyn needs a context"); + GET_REG(i->cur_op, 0,i).o = MVM_frame_getdynlex(i->tc, GET_REG(i->cur_op, 4,i).s, ((MVMContext *)ctx)->body.context); - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_getlexrelcaller(INTER i){ - MVMObject *ctx = GET_REG(i.cur_op, 2,i).o; + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_getlexrelcaller(INTERP i){ + MVMObject *ctx = GET_REG(i->cur_op, 2,i).o; MVMRegister *res; if (REPR(ctx)->ID != MVM_REPR_ID_MVMContext || !IS_CONCRETE(ctx)) - MVM_exception_throw_adhoc(i.tc, "getlexrelcaller needs a context"); - res = MVM_frame_find_lexical_by_name_rel_caller(i.tc, GET_REG(i.cur_op, 4,i).s, + MVM_exception_throw_adhoc(i->tc, "getlexrelcaller needs a context"); + res = MVM_frame_find_lexical_by_name_rel_caller(i->tc, GET_REG(i->cur_op, 4,i).s, ((MVMContext *)ctx)->body.context); - GET_REG(i.cur_op, 0,i).o = res ? res->o : i.tc->instance->VMNull; - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_getlexcaller(INTER i){ - MVMRegister *res = MVM_frame_find_lexical_by_name_rel_caller(i.tc, - GET_REG(i.cur_op, 2,i).s, i.tc->cur_frame->caller); - GET_REG(i.cur_op, 0,i).o = res ? res->o : i.tc->instance->VMNull; - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_bitand_s(INTER i){ - GET_REG(i.cur_op, 0,i).s = MVM_string_bitand(i.tc, - GET_REG(i.cur_op, 2,i).s, GET_REG(i.cur_op, 4,i).s); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_bitor_s(INTER i){ - GET_REG(i.cur_op, 0,i).s = MVM_string_bitor(i.tc, - GET_REG(i.cur_op, 2,i).s, GET_REG(i.cur_op, 4,i).s); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_bitxor_s(INTER i){ - GET_REG(i.cur_op, 0,i).s = MVM_string_bitxor(i.tc, - GET_REG(i.cur_op, 2,i).s, GET_REG(i.cur_op, 4,i).s); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_isnanorinf(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_num_isnanorinf(i.tc, GET_REG(i.cur_op, 2,i).n64); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_inf(INTER i){ - GET_REG(i.cur_op, 0,i).n64 = MVM_num_posinf(i.tc); - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_neginf(INTER i){ - GET_REG(i.cur_op, 0,i).n64 = MVM_num_neginf(i.tc); - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_nan(INTER i){ - GET_REG(i.cur_op, 0,i).n64 = MVM_num_nan(i.tc); - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_getpid(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_proc_getpid(i.tc); - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_filereadable(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_file_isreadable(i.tc, GET_REG(i.cur_op, 2,i).s,0); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_filewritable(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_file_iswritable(i.tc, GET_REG(i.cur_op, 2,i).s,0); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_fileexecutable(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_file_isexecutable(i.tc, GET_REG(i.cur_op, 2,i).s,0); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_capturenamedshash(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; + GET_REG(i->cur_op, 0,i).o = res ? res->o : i->tc->instance->VMNull; + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_getlexcaller(INTERP i){ + MVMRegister *res = MVM_frame_find_lexical_by_name_rel_caller(i->tc, + GET_REG(i->cur_op, 2,i).s, i->tc->cur_frame->caller); + GET_REG(i->cur_op, 0,i).o = res ? res->o : i->tc->instance->VMNull; + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_bitand_s(INTERP i){ + GET_REG(i->cur_op, 0,i).s = MVM_string_bitand(i->tc, + GET_REG(i->cur_op, 2,i).s, GET_REG(i->cur_op, 4,i).s); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_bitor_s(INTERP i){ + GET_REG(i->cur_op, 0,i).s = MVM_string_bitor(i->tc, + GET_REG(i->cur_op, 2,i).s, GET_REG(i->cur_op, 4,i).s); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_bitxor_s(INTERP i){ + GET_REG(i->cur_op, 0,i).s = MVM_string_bitxor(i->tc, + GET_REG(i->cur_op, 2,i).s, GET_REG(i->cur_op, 4,i).s); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_isnanorinf(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_num_isnanorinf(i->tc, GET_REG(i->cur_op, 2,i).n64); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_inf(INTERP i){ + GET_REG(i->cur_op, 0,i).n64 = MVM_num_posinf(i->tc); + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_neginf(INTERP i){ + GET_REG(i->cur_op, 0,i).n64 = MVM_num_neginf(i->tc); + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_nan(INTERP i){ + GET_REG(i->cur_op, 0,i).n64 = MVM_num_nan(i->tc); + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_getpid(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_proc_getpid(i->tc); + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_filereadable(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_file_isreadable(i->tc, GET_REG(i->cur_op, 2,i).s,0); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_filewritable(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_file_iswritable(i->tc, GET_REG(i->cur_op, 2,i).s,0); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_fileexecutable(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_file_isexecutable(i->tc, GET_REG(i->cur_op, 2,i).s,0); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_capturenamedshash(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; if (IS_CONCRETE(obj) && REPR(obj)->ID == MVM_REPR_ID_MVMCallCapture) { MVMCallCapture *cc = (MVMCallCapture *)obj; - GET_REG(i.cur_op, 0,i).o = MVM_args_slurpy_named(i.tc, cc->body.apc); + GET_REG(i->cur_op, 0,i).o = MVM_args_slurpy_named(i->tc, cc->body.apc); } else { - MVM_exception_throw_adhoc(i.tc, "capturehasnameds needs a MVMCallCapture"); + MVM_exception_throw_adhoc(i->tc, "capturehasnameds needs a MVMCallCapture"); } - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_read_fhb(INTER i){ - MVM_io_read_bytes(i.tc, GET_REG(i.cur_op, 0,i).o, GET_REG(i.cur_op, 2,i).o, - GET_REG(i.cur_op, 4,i).i64); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_write_fhb(INTER i){ - MVM_io_write_bytes(i.tc, GET_REG(i.cur_op, 0,i).o, GET_REG(i.cur_op, 2,i).o); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_replace(INTER i){ - GET_REG(i.cur_op, 0,i).s = MVM_string_replace(i.tc, - GET_REG(i.cur_op, 2,i).s, GET_REG(i.cur_op, 4,i).i64, GET_REG(i.cur_op, 6,i).i64, GET_REG(i.cur_op, 8,i).s); - i.cur_op += 10; - goto cbc_next(i); -} -__code cbc_newexception(INTER i){ - GET_REG(i.cur_op, 0,i).o = (MVMObject *)MVM_repr_alloc_init(i.tc, - i.tc->instance->boot_types.BOOTException); - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_permit(INTER i){ - MVM_io_eventloop_permit(i.tc, GET_REG(i.cur_op, 0,i).o, GET_REG(i.cur_op, 2,i).i64, - GET_REG(i.cur_op, 4,i).i64); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_backtrace(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_exception_backtrace(i.tc, GET_REG(i.cur_op, 2,i).o); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_symlink(INTER i){ - MVM_file_symlink(i.tc, GET_REG(i.cur_op, 0,i).s, GET_REG(i.cur_op, 2,i).s); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_link(INTER i){ - MVM_file_link(i.tc, GET_REG(i.cur_op, 0,i).s, GET_REG(i.cur_op, 2,i).s); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_gethostname(INTER i){ - GET_REG(i.cur_op, 0,i).s = MVM_io_get_hostname(i.tc); - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_exreturnafterunwind(INTER i){ - MVMObject *ex = GET_REG(i.cur_op, 0,i).o; - MVM_exception_returnafterunwind(i.tc, ex); - i.cur_op += 2; - goto cbc_next(i); - } -__code cbc_continuationreset(INTER i){ - MVMRegister *res = &GET_REG(i.cur_op, 0,i); - MVMObject *tag = GET_REG(i.cur_op, 2,i).o; - MVMObject *code = GET_REG(i.cur_op, 4,i).o; - i.cur_op += 6; - MVM_continuation_reset(i.tc, tag, code, res); - goto cbc_next(i); - } -__code cbc_continuationcontrol(INTER i){ - MVMRegister *res = &GET_REG(i.cur_op, 0,i); - MVMint64 protect = GET_REG(i.cur_op, 2,i).i64; - MVMObject *tag = GET_REG(i.cur_op, 4,i).o; - MVMObject *code = GET_REG(i.cur_op, 6,i).o; - i.cur_op += 8; - MVM_continuation_control(i.tc, protect, tag, code, res); - goto cbc_next(i); - } -__code cbc_continuationinvoke(INTER i){ - MVMRegister *res = &GET_REG(i.cur_op, 0,i); - MVMObject *cont = GET_REG(i.cur_op, 2,i).o; - MVMObject *code = GET_REG(i.cur_op, 4,i).o; - i.cur_op += 6; - MVM_continuation_invoke(i.tc, (MVMContinuation *)cont, code, res); - goto cbc_next(i); - } -__code cbc_randscale_n(INTER i){ - GET_REG(i.cur_op, 0,i).n64 = MVM_proc_rand_n(i.tc) * GET_REG(i.cur_op, 2,i).n64; - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_uniisblock(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = (MVMint64)MVM_unicode_is_in_block(i.tc, - GET_REG(i.cur_op, 2,i).s, GET_REG(i.cur_op, 4,i).i64, GET_REG(i.cur_op, 6,i).s); - i.cur_op += 8; - goto cbc_next(i); -} -__code cbc_assertparamcheck(INTER i){ - MVMint64 ok = GET_REG(i.cur_op, 0,i).i64; - i.cur_op += 2; + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_read_fhb(INTERP i){ + MVM_io_read_bytes(i->tc, GET_REG(i->cur_op, 0,i).o, GET_REG(i->cur_op, 2,i).o, + GET_REG(i->cur_op, 4,i).i64); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_write_fhb(INTERP i){ + MVM_io_write_bytes(i->tc, GET_REG(i->cur_op, 0,i).o, GET_REG(i->cur_op, 2,i).o); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_replace(INTERP i){ + GET_REG(i->cur_op, 0,i).s = MVM_string_replace(i->tc, + GET_REG(i->cur_op, 2,i).s, GET_REG(i->cur_op, 4,i).i64, GET_REG(i->cur_op, 6,i).i64, GET_REG(i->cur_op, 8,i).s); + i->cur_op += 10; + goto cbc_next(i); +} +__code cbc_newexception(INTERP i){ + GET_REG(i->cur_op, 0,i).o = (MVMObject *)MVM_repr_alloc_init(i->tc, + i->tc->instance->boot_types.BOOTException); + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_permit(INTERP i){ + MVM_io_eventloop_permit(i->tc, GET_REG(i->cur_op, 0,i).o, GET_REG(i->cur_op, 2,i).i64, + GET_REG(i->cur_op, 4,i).i64); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_backtrace(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_exception_backtrace(i->tc, GET_REG(i->cur_op, 2,i).o); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_symlink(INTERP i){ + MVM_file_symlink(i->tc, GET_REG(i->cur_op, 0,i).s, GET_REG(i->cur_op, 2,i).s); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_link(INTERP i){ + MVM_file_link(i->tc, GET_REG(i->cur_op, 0,i).s, GET_REG(i->cur_op, 2,i).s); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_gethostname(INTERP i){ + GET_REG(i->cur_op, 0,i).s = MVM_io_get_hostname(i->tc); + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_exreturnafterunwind(INTERP i){ + MVMObject *ex = GET_REG(i->cur_op, 0,i).o; + MVM_exception_returnafterunwind(i->tc, ex); + i->cur_op += 2; + goto cbc_next(i); + } +__code cbc_continuationreset(INTERP i){ + MVMRegister *res = &GET_REG(i->cur_op, 0,i); + MVMObject *tag = GET_REG(i->cur_op, 2,i).o; + MVMObject *code = GET_REG(i->cur_op, 4,i).o; + i->cur_op += 6; + MVM_continuation_reset(i->tc, tag, code, res); + goto cbc_next(i); + } +__code cbc_continuationcontrol(INTERP i){ + MVMRegister *res = &GET_REG(i->cur_op, 0,i); + MVMint64 protect = GET_REG(i->cur_op, 2,i).i64; + MVMObject *tag = GET_REG(i->cur_op, 4,i).o; + MVMObject *code = GET_REG(i->cur_op, 6,i).o; + i->cur_op += 8; + MVM_continuation_control(i->tc, protect, tag, code, res); + goto cbc_next(i); + } +__code cbc_continuationinvoke(INTERP i){ + MVMRegister *res = &GET_REG(i->cur_op, 0,i); + MVMObject *cont = GET_REG(i->cur_op, 2,i).o; + MVMObject *code = GET_REG(i->cur_op, 4,i).o; + i->cur_op += 6; + MVM_continuation_invoke(i->tc, (MVMContinuation *)cont, code, res); + goto cbc_next(i); + } +__code cbc_randscale_n(INTERP i){ + GET_REG(i->cur_op, 0,i).n64 = MVM_proc_rand_n(i->tc) * GET_REG(i->cur_op, 2,i).n64; + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_uniisblock(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = (MVMint64)MVM_unicode_is_in_block(i->tc, + GET_REG(i->cur_op, 2,i).s, GET_REG(i->cur_op, 4,i).i64, GET_REG(i->cur_op, 6,i).s); + i->cur_op += 8; + goto cbc_next(i); +} +__code cbc_assertparamcheck(INTERP i){ + MVMint64 ok = GET_REG(i->cur_op, 0,i).i64; + i->cur_op += 2; if (!ok) - MVM_args_bind_failed(i.tc); - goto cbc_next(i); - } -__code cbc_hintfor(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; - GET_REG(i.cur_op, 0,i).i64 = REPR(obj)->attr_funcs.hint_for(i.tc, + MVM_args_bind_failed(i->tc); + goto cbc_next(i); + } +__code cbc_hintfor(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; + GET_REG(i->cur_op, 0,i).i64 = REPR(obj)->attr_funcs.hint_for(i->tc, STABLE(obj), obj, - GET_REG(i.cur_op, 4,i).s); - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_paramnamesused(INTER i){ - MVMArgProcContext *ctx = &i.tc->cur_frame->params; + GET_REG(i->cur_op, 4,i).s); + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_paramnamesused(INTERP i){ + MVMArgProcContext *ctx = &i->tc->cur_frame->params; if (ctx->callsite->num_pos != ctx->callsite->arg_count) - MVM_args_assert_nameds_used(i.tc, ctx); - goto cbc_next(i); - } -__code cbc_getuniname(INTER i){ - GET_REG(i.cur_op, 0,i).s = MVM_unicode_get_name(i.tc, GET_REG(i.cur_op, 2,i).i64); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_getuniprop_int(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_unicode_codepoint_get_property_int(i.tc, - GET_REG(i.cur_op, 2,i).i64, GET_REG(i.cur_op, 4,i).i64); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_getuniprop_bool(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_unicode_codepoint_get_property_bool(i.tc, - GET_REG(i.cur_op, 2,i).i64, GET_REG(i.cur_op, 4,i).i64); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_getuniprop_str(INTER i){ - GET_REG(i.cur_op, 0,i).s = MVM_unicode_codepoint_get_property_str(i.tc, - GET_REG(i.cur_op, 2,i).i64, GET_REG(i.cur_op, 4,i).i64); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_matchuniprop(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_unicode_codepoint_has_property_value(i.tc, - GET_REG(i.cur_op, 2,i).i64, GET_REG(i.cur_op, 4,i).i64, - GET_REG(i.cur_op, 6,i).i64); - i.cur_op += 8; - goto cbc_next(i); -} -__code cbc_nativecallbuild(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_nativecall_build(i.tc, GET_REG(i.cur_op, 2,i).o, GET_REG(i.cur_op, 4,i).s, - GET_REG(i.cur_op, 6,i).s, GET_REG(i.cur_op, 8,i).s, - GET_REG(i.cur_op, 10,i).o, GET_REG(i.cur_op, 12,i).o); - i.cur_op += 14; - goto cbc_next(i); -} -__code cbc_nativecallinvoke(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_nativecall_invoke(i.tc, GET_REG(i.cur_op, 2,i).o, - GET_REG(i.cur_op, 4,i).o, GET_REG(i.cur_op, 6,i).o); - i.cur_op += 8; - goto cbc_next(i); -} -__code cbc_nativecallrefresh(INTER i){ - MVM_nativecall_refresh(i.tc, GET_REG(i.cur_op, 0,i).o); - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_threadrun(INTER i){ - MVM_thread_run(i.tc, GET_REG(i.cur_op, 0,i).o); - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_threadid(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_thread_id(i.tc, GET_REG(i.cur_op, 2,i).o); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_threadyield(INTER i){ - MVM_thread_yield(i.tc); - goto cbc_next(i); -} -__code cbc_currentthread(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_thread_current(i.tc); - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_lock(INTER i){ - MVM_reentrantmutex_lock_checked(i.tc, GET_REG(i.cur_op, 0,i).o); - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_unlock(INTER i){ - MVM_reentrantmutex_unlock_checked(i.tc, GET_REG(i.cur_op, 0,i).o); - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_semacquire(INTER i){ - MVMObject *sem = GET_REG(i.cur_op, 0,i).o; + MVM_args_assert_nameds_used(i->tc, ctx); + goto cbc_next(i); + } +__code cbc_getuniname(INTERP i){ + GET_REG(i->cur_op, 0,i).s = MVM_unicode_get_name(i->tc, GET_REG(i->cur_op, 2,i).i64); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_getuniprop_int(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_unicode_codepoint_get_property_int(i->tc, + GET_REG(i->cur_op, 2,i).i64, GET_REG(i->cur_op, 4,i).i64); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_getuniprop_bool(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_unicode_codepoint_get_property_bool(i->tc, + GET_REG(i->cur_op, 2,i).i64, GET_REG(i->cur_op, 4,i).i64); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_getuniprop_str(INTERP i){ + GET_REG(i->cur_op, 0,i).s = MVM_unicode_codepoint_get_property_str(i->tc, + GET_REG(i->cur_op, 2,i).i64, GET_REG(i->cur_op, 4,i).i64); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_matchuniprop(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_unicode_codepoint_has_property_value(i->tc, + GET_REG(i->cur_op, 2,i).i64, GET_REG(i->cur_op, 4,i).i64, + GET_REG(i->cur_op, 6,i).i64); + i->cur_op += 8; + goto cbc_next(i); +} +__code cbc_nativecallbuild(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_nativecall_build(i->tc, GET_REG(i->cur_op, 2,i).o, GET_REG(i->cur_op, 4,i).s, + GET_REG(i->cur_op, 6,i).s, GET_REG(i->cur_op, 8,i).s, + GET_REG(i->cur_op, 10,i).o, GET_REG(i->cur_op, 12,i).o); + i->cur_op += 14; + goto cbc_next(i); +} +__code cbc_nativecallinvoke(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_nativecall_invoke(i->tc, GET_REG(i->cur_op, 2,i).o, + GET_REG(i->cur_op, 4,i).o, GET_REG(i->cur_op, 6,i).o); + i->cur_op += 8; + goto cbc_next(i); +} +__code cbc_nativecallrefresh(INTERP i){ + MVM_nativecall_refresh(i->tc, GET_REG(i->cur_op, 0,i).o); + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_threadrun(INTERP i){ + MVM_thread_run(i->tc, GET_REG(i->cur_op, 0,i).o); + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_threadid(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_thread_id(i->tc, GET_REG(i->cur_op, 2,i).o); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_threadyield(INTERP i){ + MVM_thread_yield(i->tc); + goto cbc_next(i); +} +__code cbc_currentthread(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_thread_current(i->tc); + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_lock(INTERP i){ + MVM_reentrantmutex_lock_checked(i->tc, GET_REG(i->cur_op, 0,i).o); + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_unlock(INTERP i){ + MVM_reentrantmutex_unlock_checked(i->tc, GET_REG(i->cur_op, 0,i).o); + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_semacquire(INTERP i){ + MVMObject *sem = GET_REG(i->cur_op, 0,i).o; if (REPR(sem)->ID == MVM_REPR_ID_Semaphore && IS_CONCRETE(sem)) - MVM_semaphore_acquire(i.tc, (MVMSemaphore *)sem); + MVM_semaphore_acquire(i->tc, (MVMSemaphore *)sem); else - MVM_exception_throw_adhoc(i.tc, + MVM_exception_throw_adhoc(i->tc, "semacquire requires a concrete object with REPR Semaphore"); - i.cur_op += 2; - goto cbc_next(i); - } -__code cbc_semtryacquire(INTER i){ - MVMObject *sem = GET_REG(i.cur_op, 2,i).o; + i->cur_op += 2; + goto cbc_next(i); + } +__code cbc_semtryacquire(INTERP i){ + MVMObject *sem = GET_REG(i->cur_op, 2,i).o; if (REPR(sem)->ID == MVM_REPR_ID_Semaphore && IS_CONCRETE(sem)) - GET_REG(i.cur_op, 0,i).i64 = MVM_semaphore_tryacquire(i.tc, + GET_REG(i->cur_op, 0,i).i64 = MVM_semaphore_tryacquire(i->tc, (MVMSemaphore *)sem); else - MVM_exception_throw_adhoc(i.tc, + MVM_exception_throw_adhoc(i->tc, "semtryacquire requires a concrete object with REPR Semaphore"); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_semrelease(INTER i){ - MVMObject *sem = GET_REG(i.cur_op, 0,i).o; + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_semrelease(INTERP i){ + MVMObject *sem = GET_REG(i->cur_op, 0,i).o; if (REPR(sem)->ID == MVM_REPR_ID_Semaphore && IS_CONCRETE(sem)) - MVM_semaphore_release(i.tc, (MVMSemaphore *)sem); + MVM_semaphore_release(i->tc, (MVMSemaphore *)sem); else - MVM_exception_throw_adhoc(i.tc, + MVM_exception_throw_adhoc(i->tc, "semrelease requires a concrete object with REPR Semaphore"); - i.cur_op += 2; - goto cbc_next(i); - } -__code cbc_getlockcondvar(INTER i){ - MVMObject *lock = GET_REG(i.cur_op, 2,i).o; + i->cur_op += 2; + goto cbc_next(i); + } +__code cbc_getlockcondvar(INTERP i){ + MVMObject *lock = GET_REG(i->cur_op, 2,i).o; if (REPR(lock)->ID == MVM_REPR_ID_ReentrantMutex && IS_CONCRETE(lock)) - GET_REG(i.cur_op, 0,i).o = MVM_conditionvariable_from_lock(i.tc, - (MVMReentrantMutex *)lock, GET_REG(i.cur_op, 4,i).o); + GET_REG(i->cur_op, 0,i).o = MVM_conditionvariable_from_lock(i->tc, + (MVMReentrantMutex *)lock, GET_REG(i->cur_op, 4,i).o); else - MVM_exception_throw_adhoc(i.tc, + MVM_exception_throw_adhoc(i->tc, "getlockcondvar requires a concrete object with REPR ReentrantMutex"); - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_condwait(INTER i){ - MVMObject *cv = GET_REG(i.cur_op, 0,i).o; + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_condwait(INTERP i){ + MVMObject *cv = GET_REG(i->cur_op, 0,i).o; if (REPR(cv)->ID == MVM_REPR_ID_ConditionVariable && IS_CONCRETE(cv)) - MVM_conditionvariable_wait(i.tc, (MVMConditionVariable *)cv); + MVM_conditionvariable_wait(i->tc, (MVMConditionVariable *)cv); else - MVM_exception_throw_adhoc(i.tc, + MVM_exception_throw_adhoc(i->tc, "condwait requires a concrete object with REPR ConditionVariable"); - i.cur_op += 2; - goto cbc_next(i); - } -__code cbc_condsignalone(INTER i){ - MVMObject *cv = GET_REG(i.cur_op, 0,i).o; + i->cur_op += 2; + goto cbc_next(i); + } +__code cbc_condsignalone(INTERP i){ + MVMObject *cv = GET_REG(i->cur_op, 0,i).o; if (REPR(cv)->ID == MVM_REPR_ID_ConditionVariable && IS_CONCRETE(cv)) - MVM_conditionvariable_signal_one(i.tc, (MVMConditionVariable *)cv); + MVM_conditionvariable_signal_one(i->tc, (MVMConditionVariable *)cv); else - MVM_exception_throw_adhoc(i.tc, + MVM_exception_throw_adhoc(i->tc, "condsignalone requires a concrete object with REPR ConditionVariable"); - i.cur_op += 2; - goto cbc_next(i); - } -__code cbc_condsignalall(INTER i){ - MVMObject *cv = GET_REG(i.cur_op, 0,i).o; + i->cur_op += 2; + goto cbc_next(i); + } +__code cbc_condsignalall(INTERP i){ + MVMObject *cv = GET_REG(i->cur_op, 0,i).o; if (REPR(cv)->ID == MVM_REPR_ID_ConditionVariable && IS_CONCRETE(cv)) - MVM_conditionvariable_signal_all(i.tc, (MVMConditionVariable *)cv); + MVM_conditionvariable_signal_all(i->tc, (MVMConditionVariable *)cv); else - MVM_exception_throw_adhoc(i.tc, + MVM_exception_throw_adhoc(i->tc, "condsignalall requires a concrete object with REPR ConditionVariable"); - i.cur_op += 2; - goto cbc_next(i); - } -__code cbc_queuepoll(INTER i){ - MVMObject *queue = GET_REG(i.cur_op, 2,i).o; + i->cur_op += 2; + goto cbc_next(i); + } +__code cbc_queuepoll(INTERP i){ + MVMObject *queue = GET_REG(i->cur_op, 2,i).o; if (REPR(queue)->ID == MVM_REPR_ID_ConcBlockingQueue && IS_CONCRETE(queue)) - GET_REG(i.cur_op, 0,i).o = MVM_concblockingqueue_poll(i.tc, + GET_REG(i->cur_op, 0,i).o = MVM_concblockingqueue_poll(i->tc, (MVMConcBlockingQueue *)queue); else - MVM_exception_throw_adhoc(i.tc, + MVM_exception_throw_adhoc(i->tc, "queuepoll requires a concrete object with REPR ConcBlockingQueue"); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_setmultispec(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 0,i).o; - MVMObject *ch = GET_REG(i.cur_op, 2,i).o; - MVMString *valid_attr = GET_REG(i.cur_op, 4,i).s; - MVMString *cache_attr = GET_REG(i.cur_op, 6,i).s; + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_setmultispec(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 0,i).o; + MVMObject *ch = GET_REG(i->cur_op, 2,i).o; + MVMString *valid_attr = GET_REG(i->cur_op, 4,i).s; + MVMString *cache_attr = GET_REG(i->cur_op, 6,i).s; MVMSTable *st = STABLE(obj); MVMInvocationSpec *is = st->invocation_spec; if (!is) - MVM_exception_throw_adhoc(i.tc, + MVM_exception_throw_adhoc(i->tc, "Can only use setmultispec after setinvokespec"); - MVM_ASSIGN_REF(i.tc, &(st->header), is->md_class_handle, ch); - MVM_ASSIGN_REF(i.tc, &(st->header), is->md_valid_attr_name, valid_attr); - MVM_ASSIGN_REF(i.tc, &(st->header), is->md_cache_attr_name, cache_attr); - is->md_valid_hint = REPR(ch)->attr_funcs.hint_for(i.tc, STABLE(ch), ch, + MVM_ASSIGN_REF(i->tc, &(st->header), is->md_class_handle, ch); + MVM_ASSIGN_REF(i->tc, &(st->header), is->md_valid_attr_name, valid_attr); + MVM_ASSIGN_REF(i->tc, &(st->header), is->md_cache_attr_name, cache_attr); + is->md_valid_hint = REPR(ch)->attr_funcs.hint_for(i->tc, STABLE(ch), ch, valid_attr); - is->md_cache_hint = REPR(ch)->attr_funcs.hint_for(i.tc, STABLE(ch), ch, + is->md_cache_hint = REPR(ch)->attr_funcs.hint_for(i->tc, STABLE(ch), ch, cache_attr); - i.cur_op += 8; - goto cbc_next(i); - } -__code cbc_ctxouterskipthunks(INTER i){ - MVMObject *this_ctx = GET_REG(i.cur_op, 2,i).o; + i->cur_op += 8; + goto cbc_next(i); + } +__code cbc_ctxouterskipthunks(INTERP i){ + MVMObject *this_ctx = GET_REG(i->cur_op, 2,i).o; MVMFrame *frame; if (!IS_CONCRETE(this_ctx) || REPR(this_ctx)->ID != MVM_REPR_ID_MVMContext) { - MVM_exception_throw_adhoc(i.tc, "ctxouter needs an MVMContext"); + MVM_exception_throw_adhoc(i->tc, "ctxouter needs an MVMContext"); } frame = ((MVMContext *)this_ctx)->body.context->outer; while (frame && frame->static_info->body.is_thunk) frame = frame->caller; if (frame) - GET_REG(i.cur_op, 0,i).o = MVM_frame_context_wrapper(i.tc, frame); + GET_REG(i->cur_op, 0,i).o = MVM_frame_context_wrapper(i->tc, frame); else - GET_REG(i.cur_op, 0,i).o = i.tc->instance->VMNull; - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_ctxcallerskipthunks(INTER i){ - MVMObject *this_ctx = GET_REG(i.cur_op, 2,i).o, *ctx = NULL; + GET_REG(i->cur_op, 0,i).o = i->tc->instance->VMNull; + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_ctxcallerskipthunks(INTERP i){ + MVMObject *this_ctx = GET_REG(i->cur_op, 2,i).o, *ctx = NULL; MVMFrame *frame; if (!IS_CONCRETE(this_ctx) || REPR(this_ctx)->ID != MVM_REPR_ID_MVMContext) { - MVM_exception_throw_adhoc(i.tc, "ctxcaller needs an MVMContext"); + MVM_exception_throw_adhoc(i->tc, "ctxcaller needs an MVMContext"); } frame = ((MVMContext *)this_ctx)->body.context->caller; while (frame && frame->static_info->body.is_thunk) frame = frame->caller; if (frame) - ctx = MVM_frame_context_wrapper(i.tc, frame); - GET_REG(i.cur_op, 0,i).o = ctx ? ctx : i.tc->instance->VMNull; - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_timer(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_io_timer_create(i.tc, GET_REG(i.cur_op, 2,i).o, - GET_REG(i.cur_op, 4,i).o, GET_REG(i.cur_op, 6,i).i64, - GET_REG(i.cur_op, 8,i).i64, GET_REG(i.cur_op, 10,i).o); - i.cur_op += 12; - goto cbc_next(i); -} -__code cbc_cancel(INTER i){ - MVM_io_eventloop_cancel_work(i.tc, GET_REG(i.cur_op, 0,i).o, NULL, NULL); - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_signal(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_io_signal_handle(i.tc, GET_REG(i.cur_op, 2,i).o, - GET_REG(i.cur_op, 4,i).o, GET_REG(i.cur_op, 6,i).i64, GET_REG(i.cur_op, 8,i).o); - i.cur_op += 10; - goto cbc_next(i); -} -__code cbc_watchfile(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_io_file_watch(i.tc, GET_REG(i.cur_op, 2,i).o, - GET_REG(i.cur_op, 4,i).o, GET_REG(i.cur_op, 6,i).s, GET_REG(i.cur_op, 8,i).o); - i.cur_op += 10; - goto cbc_next(i); -} -__code cbc_asyncconnect(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_io_socket_connect_async(i.tc, - GET_REG(i.cur_op, 2,i).o, GET_REG(i.cur_op, 4,i).o, GET_REG(i.cur_op, 6,i).s, - GET_REG(i.cur_op, 8,i).i64, GET_REG(i.cur_op, 10,i).o); - i.cur_op += 12; - goto cbc_next(i); -} -__code cbc_asynclisten(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_io_socket_listen_async(i.tc, - GET_REG(i.cur_op, 2,i).o, GET_REG(i.cur_op, 4,i).o, GET_REG(i.cur_op, 6,i).s, - GET_REG(i.cur_op, 8,i).i64, (int)GET_REG(i.cur_op, 10,i).i64, GET_REG(i.cur_op, 12,i).o); - i.cur_op += 14; - goto cbc_next(i); -} -__code cbc_asyncwritebytes(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_io_write_bytes_async(i.tc, GET_REG(i.cur_op, 2,i).o, - GET_REG(i.cur_op, 4,i).o, GET_REG(i.cur_op, 6,i).o, GET_REG(i.cur_op, 8,i).o, - GET_REG(i.cur_op, 10,i).o); - i.cur_op += 12; - goto cbc_next(i); -} -__code cbc_asyncreadbytes(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_io_read_bytes_async(i.tc, GET_REG(i.cur_op, 2,i).o, - GET_REG(i.cur_op, 4,i).o, GET_REG(i.cur_op, 6,i).o, GET_REG(i.cur_op, 8,i).o, - GET_REG(i.cur_op, 10,i).o); - i.cur_op += 12; - goto cbc_next(i); -} -__code cbc_getlexstatic_o(INTER i){ - MVMRegister *found = MVM_frame_find_lexical_by_name(i.tc, - GET_REG(i.cur_op, 2,i).s, MVM_reg_obj); + ctx = MVM_frame_context_wrapper(i->tc, frame); + GET_REG(i->cur_op, 0,i).o = ctx ? ctx : i->tc->instance->VMNull; + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_timer(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_io_timer_create(i->tc, GET_REG(i->cur_op, 2,i).o, + GET_REG(i->cur_op, 4,i).o, GET_REG(i->cur_op, 6,i).i64, + GET_REG(i->cur_op, 8,i).i64, GET_REG(i->cur_op, 10,i).o); + i->cur_op += 12; + goto cbc_next(i); +} +__code cbc_cancel(INTERP i){ + MVM_io_eventloop_cancel_work(i->tc, GET_REG(i->cur_op, 0,i).o, NULL, NULL); + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_signal(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_io_signal_handle(i->tc, GET_REG(i->cur_op, 2,i).o, + GET_REG(i->cur_op, 4,i).o, GET_REG(i->cur_op, 6,i).i64, GET_REG(i->cur_op, 8,i).o); + i->cur_op += 10; + goto cbc_next(i); +} +__code cbc_watchfile(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_io_file_watch(i->tc, GET_REG(i->cur_op, 2,i).o, + GET_REG(i->cur_op, 4,i).o, GET_REG(i->cur_op, 6,i).s, GET_REG(i->cur_op, 8,i).o); + i->cur_op += 10; + goto cbc_next(i); +} +__code cbc_asyncconnect(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_io_socket_connect_async(i->tc, + GET_REG(i->cur_op, 2,i).o, GET_REG(i->cur_op, 4,i).o, GET_REG(i->cur_op, 6,i).s, + GET_REG(i->cur_op, 8,i).i64, GET_REG(i->cur_op, 10,i).o); + i->cur_op += 12; + goto cbc_next(i); +} +__code cbc_asynclisten(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_io_socket_listen_async(i->tc, + GET_REG(i->cur_op, 2,i).o, GET_REG(i->cur_op, 4,i).o, GET_REG(i->cur_op, 6,i).s, + GET_REG(i->cur_op, 8,i).i64, (int)GET_REG(i->cur_op, 10,i).i64, GET_REG(i->cur_op, 12,i).o); + i->cur_op += 14; + goto cbc_next(i); +} +__code cbc_asyncwritebytes(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_io_write_bytes_async(i->tc, GET_REG(i->cur_op, 2,i).o, + GET_REG(i->cur_op, 4,i).o, GET_REG(i->cur_op, 6,i).o, GET_REG(i->cur_op, 8,i).o, + GET_REG(i->cur_op, 10,i).o); + i->cur_op += 12; + goto cbc_next(i); +} +__code cbc_asyncreadbytes(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_io_read_bytes_async(i->tc, GET_REG(i->cur_op, 2,i).o, + GET_REG(i->cur_op, 4,i).o, GET_REG(i->cur_op, 6,i).o, GET_REG(i->cur_op, 8,i).o, + GET_REG(i->cur_op, 10,i).o); + i->cur_op += 12; + goto cbc_next(i); +} +__code cbc_getlexstatic_o(INTERP i){ + MVMRegister *found = MVM_frame_find_lexical_by_name(i->tc, + GET_REG(i->cur_op, 2,i).s, MVM_reg_obj); if (found) { - GET_REG(i.cur_op, 0,i).o = found->o; - if (MVM_spesh_log_is_logging(i.tc)) - MVM_spesh_log_static(i.tc, found->o); + GET_REG(i->cur_op, 0,i).o = found->o; + if (MVM_spesh_log_is_logging(i->tc)) + MVM_spesh_log_static(i->tc, found->o); } else { - GET_REG(i.cur_op, 0,i).o = i.tc->instance->VMNull; + GET_REG(i->cur_op, 0,i).o = i->tc->instance->VMNull; } - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_getlexperinvtype_o(INTER i){ - MVMRegister *found = MVM_frame_find_lexical_by_name(i.tc, - GET_REG(i.cur_op, 2,i).s, MVM_reg_obj); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_getlexperinvtype_o(INTERP i){ + MVMRegister *found = MVM_frame_find_lexical_by_name(i->tc, + GET_REG(i->cur_op, 2,i).s, MVM_reg_obj); if (found) { - GET_REG(i.cur_op, 0,i).o = found->o; - if (MVM_spesh_log_is_logging(i.tc)) - MVM_spesh_log_type(i.tc, found->o); + GET_REG(i->cur_op, 0,i).o = found->o; + if (MVM_spesh_log_is_logging(i->tc)) + MVM_spesh_log_type(i->tc, found->o); } else { - GET_REG(i.cur_op, 0,i).o = i.tc->instance->VMNull; + GET_REG(i->cur_op, 0,i).o = i->tc->instance->VMNull; } - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_execname(INTER i){ - GET_REG(i.cur_op, 0,i).s = MVM_executable_name(i.tc); - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_const_i64_16(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = GET_I16(i.cur_op, 2); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_const_i64_32(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = GET_I32(i.cur_op, 2); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_isnonnull(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; - GET_REG(i.cur_op, 0,i).i64 = !MVM_is_null(i.tc, obj); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_param_rn2_i(INTER i){ - MVMArgInfo param = MVM_args_get_named_int(i.tc, &i.tc->cur_frame->params, - MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 2)), MVM_ARG_OPTIONAL); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_execname(INTERP i){ + GET_REG(i->cur_op, 0,i).s = MVM_executable_name(i->tc); + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_const_i64_16(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = GET_I16(i->cur_op, 2); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_const_i64_32(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = GET_I32(i->cur_op, 2); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_isnonnull(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; + GET_REG(i->cur_op, 0,i).i64 = !MVM_is_null(i->tc, obj); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_param_rn2_i(INTERP i){ + MVMArgInfo param = MVM_args_get_named_int(i->tc, &i->tc->cur_frame->params, + MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 2)), MVM_ARG_OPTIONAL); if (param.exists) - GET_REG(i.cur_op, 0,i).i64 = param.arg.i64; + GET_REG(i->cur_op, 0,i).i64 = param.arg.i64; else - GET_REG(i.cur_op, 0,i).i64 = MVM_args_get_named_int(i.tc, &i.tc->cur_frame->params, - MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 6)), MVM_ARG_REQUIRED).arg.i64; - i.cur_op += 10; - goto cbc_next(i); - } -__code cbc_param_rn2_n(INTER i){ - MVMArgInfo param = MVM_args_get_named_num(i.tc, &i.tc->cur_frame->params, - MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 2)), MVM_ARG_OPTIONAL); + GET_REG(i->cur_op, 0,i).i64 = MVM_args_get_named_int(i->tc, &i->tc->cur_frame->params, + MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 6)), MVM_ARG_REQUIRED).arg.i64; + i->cur_op += 10; + goto cbc_next(i); + } +__code cbc_param_rn2_n(INTERP i){ + MVMArgInfo param = MVM_args_get_named_num(i->tc, &i->tc->cur_frame->params, + MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 2)), MVM_ARG_OPTIONAL); if (param.exists) - GET_REG(i.cur_op, 0,i).n64 = param.arg.n64; + GET_REG(i->cur_op, 0,i).n64 = param.arg.n64; else - GET_REG(i.cur_op, 0,i).n64 = MVM_args_get_named_num(i.tc, &i.tc->cur_frame->params, - MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 6)), MVM_ARG_REQUIRED).arg.n64; - i.cur_op += 10; - goto cbc_next(i); - } -__code cbc_param_rn2_s(INTER i){ - MVMArgInfo param = MVM_args_get_named_str(i.tc, &i.tc->cur_frame->params, - MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 2)), MVM_ARG_OPTIONAL); + GET_REG(i->cur_op, 0,i).n64 = MVM_args_get_named_num(i->tc, &i->tc->cur_frame->params, + MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 6)), MVM_ARG_REQUIRED).arg.n64; + i->cur_op += 10; + goto cbc_next(i); + } +__code cbc_param_rn2_s(INTERP i){ + MVMArgInfo param = MVM_args_get_named_str(i->tc, &i->tc->cur_frame->params, + MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 2)), MVM_ARG_OPTIONAL); if (param.exists) - GET_REG(i.cur_op, 0,i).s = param.arg.s; + GET_REG(i->cur_op, 0,i).s = param.arg.s; else - GET_REG(i.cur_op, 0,i).s = MVM_args_get_named_str(i.tc, &i.tc->cur_frame->params, - MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 6)), MVM_ARG_REQUIRED).arg.s; - i.cur_op += 10; - goto cbc_next(i); - } -__code cbc_param_rn2_o(INTER i){ - MVMArgInfo param = MVM_args_get_named_obj(i.tc, &i.tc->cur_frame->params, - MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 2)), MVM_ARG_OPTIONAL); + GET_REG(i->cur_op, 0,i).s = MVM_args_get_named_str(i->tc, &i->tc->cur_frame->params, + MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 6)), MVM_ARG_REQUIRED).arg.s; + i->cur_op += 10; + goto cbc_next(i); + } +__code cbc_param_rn2_o(INTERP i){ + MVMArgInfo param = MVM_args_get_named_obj(i->tc, &i->tc->cur_frame->params, + MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 2)), MVM_ARG_OPTIONAL); if (!param.exists) - param = MVM_args_get_named_obj(i.tc, &i.tc->cur_frame->params, - MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 6)), MVM_ARG_REQUIRED); - GET_REG(i.cur_op, 0,i).o = param.arg.o; - if (MVM_spesh_log_is_logging(i.tc)) - MVM_spesh_log_parameter(i.tc, param.arg_idx, param.arg.o); - i.cur_op += 10; - goto cbc_next(i); - } -__code cbc_param_on2_i(INTER i){ - MVMArgInfo param = MVM_args_get_named_int(i.tc, &i.tc->cur_frame->params, - MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 2)), MVM_ARG_OPTIONAL); + param = MVM_args_get_named_obj(i->tc, &i->tc->cur_frame->params, + MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 6)), MVM_ARG_REQUIRED); + GET_REG(i->cur_op, 0,i).o = param.arg.o; + if (MVM_spesh_log_is_logging(i->tc)) + MVM_spesh_log_parameter(i->tc, param.arg_idx, param.arg.o); + i->cur_op += 10; + goto cbc_next(i); + } +__code cbc_param_on2_i(INTERP i){ + MVMArgInfo param = MVM_args_get_named_int(i->tc, &i->tc->cur_frame->params, + MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 2)), MVM_ARG_OPTIONAL); if (!param.exists) - param = MVM_args_get_named_int(i.tc, &i.tc->cur_frame->params, - MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 6)), MVM_ARG_OPTIONAL); + param = MVM_args_get_named_int(i->tc, &i->tc->cur_frame->params, + MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 6)), MVM_ARG_OPTIONAL); if (param.exists) { - GET_REG(i.cur_op, 0,i).i64 = param.arg.i64; - i.cur_op = i.bytecode_start + GET_UI32(i.cur_op, 10); + GET_REG(i->cur_op, 0,i).i64 = param.arg.i64; + i->cur_op = i->bytecode_start + GET_UI32(i->cur_op, 10); } else { - i.cur_op += 14; + i->cur_op += 14; } goto cbc_next(i); } -__code cbc_param_on2_n(INTER i){ - MVMArgInfo param = MVM_args_get_named_num(i.tc, &i.tc->cur_frame->params, - MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 2)), MVM_ARG_OPTIONAL); +__code cbc_param_on2_n(INTERP i){ + MVMArgInfo param = MVM_args_get_named_num(i->tc, &i->tc->cur_frame->params, + MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 2)), MVM_ARG_OPTIONAL); if (!param.exists) - param = MVM_args_get_named_num(i.tc, &i.tc->cur_frame->params, - MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 6)), MVM_ARG_OPTIONAL); + param = MVM_args_get_named_num(i->tc, &i->tc->cur_frame->params, + MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 6)), MVM_ARG_OPTIONAL); if (param.exists) { - GET_REG(i.cur_op, 0,i).n64 = param.arg.n64; - i.cur_op = i.bytecode_start + GET_UI32(i.cur_op, 10); + GET_REG(i->cur_op, 0,i).n64 = param.arg.n64; + i->cur_op = i->bytecode_start + GET_UI32(i->cur_op, 10); } else { - i.cur_op += 14; + i->cur_op += 14; } goto cbc_next(i); } -__code cbc_param_on2_s(INTER i){ - MVMArgInfo param = MVM_args_get_named_str(i.tc, &i.tc->cur_frame->params, - MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 2)), MVM_ARG_OPTIONAL); +__code cbc_param_on2_s(INTERP i){ + MVMArgInfo param = MVM_args_get_named_str(i->tc, &i->tc->cur_frame->params, + MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 2)), MVM_ARG_OPTIONAL); if (!param.exists) - param = MVM_args_get_named_str(i.tc, &i.tc->cur_frame->params, - MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 6)), MVM_ARG_OPTIONAL); + param = MVM_args_get_named_str(i->tc, &i->tc->cur_frame->params, + MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 6)), MVM_ARG_OPTIONAL); if (param.exists) { - GET_REG(i.cur_op, 0,i).s = param.arg.s; - i.cur_op = i.bytecode_start + GET_UI32(i.cur_op, 10); + GET_REG(i->cur_op, 0,i).s = param.arg.s; + i->cur_op = i->bytecode_start + GET_UI32(i->cur_op, 10); } else { - i.cur_op += 14; + i->cur_op += 14; } goto cbc_next(i); } -__code cbc_param_on2_o(INTER i){ - MVMArgInfo param = MVM_args_get_named_obj(i.tc, &i.tc->cur_frame->params, - MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 2)), MVM_ARG_OPTIONAL); +__code cbc_param_on2_o(INTERP i){ + MVMArgInfo param = MVM_args_get_named_obj(i->tc, &i->tc->cur_frame->params, + MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 2)), MVM_ARG_OPTIONAL); if (!param.exists) - param = MVM_args_get_named_obj(i.tc, &i.tc->cur_frame->params, - MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 6)), MVM_ARG_OPTIONAL); + param = MVM_args_get_named_obj(i->tc, &i->tc->cur_frame->params, + MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 6)), MVM_ARG_OPTIONAL); if (param.exists) { - GET_REG(i.cur_op, 0,i).o = param.arg.o; - if (MVM_spesh_log_is_logging(i.tc)) - MVM_spesh_log_parameter(i.tc, param.arg_idx, param.arg.o); - i.cur_op = i.bytecode_start + GET_UI32(i.cur_op, 10); + GET_REG(i->cur_op, 0,i).o = param.arg.o; + if (MVM_spesh_log_is_logging(i->tc)) + MVM_spesh_log_parameter(i->tc, param.arg_idx, param.arg.o); + i->cur_op = i->bytecode_start + GET_UI32(i->cur_op, 10); } else { - i.cur_op += 14; + i->cur_op += 14; } goto cbc_next(i); } -__code cbc_osrpoint(INTER i){ - if (MVM_spesh_log_is_logging(i.tc)) - MVM_spesh_log_osr(i.tc); - MVM_spesh_osr_poll_for_result(i.tc); - goto cbc_next(i); -} -__code cbc_nativecallcast(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_nativecall_cast(i.tc, GET_REG(i.cur_op, 2,i).o, - GET_REG(i.cur_op, 4,i).o, GET_REG(i.cur_op, 6,i).o); - i.cur_op += 8; - goto cbc_next(i); -} -__code cbc_spawnprocasync(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_proc_spawn_async(i.tc, GET_REG(i.cur_op, 2,i).o, - GET_REG(i.cur_op, 4,i).o, GET_REG(i.cur_op, 6,i).s, - GET_REG(i.cur_op, 8,i).o, GET_REG(i.cur_op, 10,i).o); - i.cur_op += 12; - goto cbc_next(i); -} -__code cbc_killprocasync(INTER i){ - MVM_proc_kill_async(i.tc, GET_REG(i.cur_op, 0,i).o, GET_REG(i.cur_op, 2,i).i64); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_startprofile(INTER i){ - MVM_profile_start(i.tc, GET_REG(i.cur_op, 0,i).o); - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_endprofile(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_profile_end(i.tc); - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_objectid(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = (MVMint64)MVM_gc_object_id(i.tc, GET_REG(i.cur_op, 2,i).o); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_settypefinalize(INTER i){ - MVM_gc_finalize_set(i.tc, GET_REG(i.cur_op, 0,i).o, GET_REG(i.cur_op, 2,i).i64); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_force_gc(INTER i){ - MVM_gc_enter_from_allocator(i.tc); - goto cbc_next(i); -} -__code cbc_nativecallglobal(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_nativecall_global(i.tc, GET_REG(i.cur_op, 2,i).s, - GET_REG(i.cur_op, 4,i).s, GET_REG(i.cur_op, 6,i).o, GET_REG(i.cur_op, 8,i).o); - i.cur_op += 10; - goto cbc_next(i); -} -__code cbc_setparameterizer(INTER i){ - MVM_6model_parametric_setup(i.tc, GET_REG(i.cur_op, 0,i).o, GET_REG(i.cur_op, 2,i).o); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_parameterizetype(INTER i){ - MVMObject *type = GET_REG(i.cur_op, 2,i).o; - MVMObject *params = GET_REG(i.cur_op, 4,i).o; - MVMRegister *result = &(GET_REG(i.cur_op, 0,i)); - i.cur_op += 6; - MVM_6model_parametric_parameterize(i.tc, type, params, result); - goto cbc_next(i); - } -__code cbc_typeparameterized(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_6model_parametric_type_parameterized(i.tc, GET_REG(i.cur_op, 2,i).o); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_typeparameters(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_6model_parametric_type_parameters(i.tc, GET_REG(i.cur_op, 2,i).o); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_typeparameterat(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_6model_parametric_type_parameter_at(i.tc, - GET_REG(i.cur_op, 2,i).o, GET_REG(i.cur_op, 4,i).i64); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_readlink(INTER i){ - GET_REG(i.cur_op, 0,i).s = MVM_file_readlink(i.tc, GET_REG(i.cur_op, 2,i).s); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_lstat(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_file_stat(i.tc, GET_REG(i.cur_op, 2,i).s, GET_REG(i.cur_op, 4,i).i64, 1); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_iscont_i(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_6model_container_iscont_i(i.tc, - GET_REG(i.cur_op, 2,i).o); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_iscont_n(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_6model_container_iscont_n(i.tc, - GET_REG(i.cur_op, 2,i).o); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_iscont_s(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_6model_container_iscont_s(i.tc, - GET_REG(i.cur_op, 2,i).o); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_assign_i(INTER i){ - MVMObject *cont = GET_REG(i.cur_op, 0,i).o; - MVMint64 value = GET_REG(i.cur_op, 2,i).i64; - i.cur_op += 4; - MVM_6model_container_assign_i(i.tc, cont, value); - goto cbc_next(i); - } -__code cbc_assign_n(INTER i){ - MVMObject *cont = GET_REG(i.cur_op, 0,i).o; - MVMnum64 value = GET_REG(i.cur_op, 2,i).n64; - i.cur_op += 4; - MVM_6model_container_assign_n(i.tc, cont, value); - goto cbc_next(i); - } -__code cbc_assign_s(INTER i){ - MVMObject *cont = GET_REG(i.cur_op, 0,i).o; - MVMString *value = GET_REG(i.cur_op, 2,i).s; - i.cur_op += 4; - MVM_6model_container_assign_s(i.tc, cont, value); - goto cbc_next(i); - } -__code cbc_decont_i(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; - MVMRegister *r = &GET_REG(i.cur_op, 0,i); - i.cur_op += 4; - MVM_6model_container_decont_i(i.tc, obj, r); - goto cbc_next(i); - } -__code cbc_decont_n(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; - MVMRegister *r = &GET_REG(i.cur_op, 0,i); - i.cur_op += 4; - MVM_6model_container_decont_n(i.tc, obj, r); - goto cbc_next(i); - } -__code cbc_decont_s(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; - MVMRegister *r = &GET_REG(i.cur_op, 0,i); - i.cur_op += 4; - MVM_6model_container_decont_s(i.tc, obj, r); - goto cbc_next(i); - } -__code cbc_getrusage(INTER i){ - MVM_proc_getrusage(i.tc, GET_REG(i.cur_op, 0,i).o); - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_threadlockcount(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_thread_lock_count(i.tc, - GET_REG(i.cur_op, 2,i).o); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_getlexref_i(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_nativeref_lex_i(i.tc, - GET_UI16(i.cur_op, 4), GET_UI16(i.cur_op, 2)); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_getlexref_n(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_nativeref_lex_n(i.tc, - GET_UI16(i.cur_op, 4), GET_UI16(i.cur_op, 2)); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_getlexref_s(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_nativeref_lex_s(i.tc, - GET_UI16(i.cur_op, 4), GET_UI16(i.cur_op, 2)); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_getlexref_ni(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_nativeref_lex_name_i(i.tc, - MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 2))); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_getlexref_nn(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_nativeref_lex_name_n(i.tc, - MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 2))); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_getlexref_ns(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_nativeref_lex_name_s(i.tc, - MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 2))); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_atposref_i(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_nativeref_pos_i(i.tc, - GET_REG(i.cur_op, 2,i).o, GET_REG(i.cur_op, 4,i).i64); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_atposref_n(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_nativeref_pos_n(i.tc, - GET_REG(i.cur_op, 2,i).o, GET_REG(i.cur_op, 4,i).i64); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_atposref_s(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_nativeref_pos_s(i.tc, - GET_REG(i.cur_op, 2,i).o, GET_REG(i.cur_op, 4,i).i64); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_getattrref_i(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_nativeref_attr_i(i.tc, - GET_REG(i.cur_op, 2,i).o, GET_REG(i.cur_op, 4,i).o, - MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 6))); - i.cur_op += 12; - goto cbc_next(i); -} -__code cbc_getattrref_n(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_nativeref_attr_n(i.tc, - GET_REG(i.cur_op, 2,i).o, GET_REG(i.cur_op, 4,i).o, - MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 6))); - i.cur_op += 12; - goto cbc_next(i); -} -__code cbc_getattrref_s(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_nativeref_attr_s(i.tc, - GET_REG(i.cur_op, 2,i).o, GET_REG(i.cur_op, 4,i).o, - MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 6))); - i.cur_op += 12; - goto cbc_next(i); -} -__code cbc_getattrsref_i(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_nativeref_attr_i(i.tc, - GET_REG(i.cur_op, 2,i).o, GET_REG(i.cur_op, 4,i).o, - GET_REG(i.cur_op, 6,i).s); - i.cur_op += 8; - goto cbc_next(i); -} -__code cbc_getattrsref_n(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_nativeref_attr_n(i.tc, - GET_REG(i.cur_op, 2,i).o, GET_REG(i.cur_op, 4,i).o, - GET_REG(i.cur_op, 6,i).s); - i.cur_op += 8; - goto cbc_next(i); -} -__code cbc_getattrsref_s(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_nativeref_attr_s(i.tc, - GET_REG(i.cur_op, 2,i).o, GET_REG(i.cur_op, 4,i).o, - GET_REG(i.cur_op, 6,i).s); - i.cur_op += 8; - goto cbc_next(i); -} -__code cbc_nativecallsizeof(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_nativecall_sizeof(i.tc, GET_REG(i.cur_op, 2,i).o); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_encodenorm(INTER i){ - MVM_exception_throw_adhoc(i.tc, "NYI"); +__code cbc_osrpoint(INTERP i){ + if (MVM_spesh_log_is_logging(i->tc)) + MVM_spesh_log_osr(i->tc); + MVM_spesh_osr_poll_for_result(i->tc); + goto cbc_next(i); +} +__code cbc_nativecallcast(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_nativecall_cast(i->tc, GET_REG(i->cur_op, 2,i).o, + GET_REG(i->cur_op, 4,i).o, GET_REG(i->cur_op, 6,i).o); + i->cur_op += 8; + goto cbc_next(i); +} +__code cbc_spawnprocasync(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_proc_spawn_async(i->tc, GET_REG(i->cur_op, 2,i).o, + GET_REG(i->cur_op, 4,i).o, GET_REG(i->cur_op, 6,i).s, + GET_REG(i->cur_op, 8,i).o, GET_REG(i->cur_op, 10,i).o); + i->cur_op += 12; + goto cbc_next(i); +} +__code cbc_killprocasync(INTERP i){ + MVM_proc_kill_async(i->tc, GET_REG(i->cur_op, 0,i).o, GET_REG(i->cur_op, 2,i).i64); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_startprofile(INTERP i){ + MVM_profile_start(i->tc, GET_REG(i->cur_op, 0,i).o); + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_endprofile(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_profile_end(i->tc); + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_objectid(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = (MVMint64)MVM_gc_object_id(i->tc, GET_REG(i->cur_op, 2,i).o); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_settypefinalize(INTERP i){ + MVM_gc_finalize_set(i->tc, GET_REG(i->cur_op, 0,i).o, GET_REG(i->cur_op, 2,i).i64); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_force_gc(INTERP i){ + MVM_gc_enter_from_allocator(i->tc); + goto cbc_next(i); +} +__code cbc_nativecallglobal(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_nativecall_global(i->tc, GET_REG(i->cur_op, 2,i).s, + GET_REG(i->cur_op, 4,i).s, GET_REG(i->cur_op, 6,i).o, GET_REG(i->cur_op, 8,i).o); + i->cur_op += 10; + goto cbc_next(i); +} +__code cbc_setparameterizer(INTERP i){ + MVM_6model_parametric_setup(i->tc, GET_REG(i->cur_op, 0,i).o, GET_REG(i->cur_op, 2,i).o); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_parameterizetype(INTERP i){ + MVMObject *type = GET_REG(i->cur_op, 2,i).o; + MVMObject *params = GET_REG(i->cur_op, 4,i).o; + MVMRegister *result = &(GET_REG(i->cur_op, 0,i)); + i->cur_op += 6; + MVM_6model_parametric_parameterize(i->tc, type, params, result); + goto cbc_next(i); + } +__code cbc_typeparameterized(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_6model_parametric_type_parameterized(i->tc, GET_REG(i->cur_op, 2,i).o); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_typeparameters(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_6model_parametric_type_parameters(i->tc, GET_REG(i->cur_op, 2,i).o); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_typeparameterat(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_6model_parametric_type_parameter_at(i->tc, + GET_REG(i->cur_op, 2,i).o, GET_REG(i->cur_op, 4,i).i64); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_readlink(INTERP i){ + GET_REG(i->cur_op, 0,i).s = MVM_file_readlink(i->tc, GET_REG(i->cur_op, 2,i).s); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_lstat(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_file_stat(i->tc, GET_REG(i->cur_op, 2,i).s, GET_REG(i->cur_op, 4,i).i64, 1); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_iscont_i(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_6model_container_iscont_i(i->tc, + GET_REG(i->cur_op, 2,i).o); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_iscont_n(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_6model_container_iscont_n(i->tc, + GET_REG(i->cur_op, 2,i).o); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_iscont_s(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_6model_container_iscont_s(i->tc, + GET_REG(i->cur_op, 2,i).o); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_assign_i(INTERP i){ + MVMObject *cont = GET_REG(i->cur_op, 0,i).o; + MVMint64 value = GET_REG(i->cur_op, 2,i).i64; + i->cur_op += 4; + MVM_6model_container_assign_i(i->tc, cont, value); + goto cbc_next(i); + } +__code cbc_assign_n(INTERP i){ + MVMObject *cont = GET_REG(i->cur_op, 0,i).o; + MVMnum64 value = GET_REG(i->cur_op, 2,i).n64; + i->cur_op += 4; + MVM_6model_container_assign_n(i->tc, cont, value); + goto cbc_next(i); + } +__code cbc_assign_s(INTERP i){ + MVMObject *cont = GET_REG(i->cur_op, 0,i).o; + MVMString *value = GET_REG(i->cur_op, 2,i).s; + i->cur_op += 4; + MVM_6model_container_assign_s(i->tc, cont, value); + goto cbc_next(i); + } +__code cbc_decont_i(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; + MVMRegister *r = &GET_REG(i->cur_op, 0,i); + i->cur_op += 4; + MVM_6model_container_decont_i(i->tc, obj, r); + goto cbc_next(i); + } +__code cbc_decont_n(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; + MVMRegister *r = &GET_REG(i->cur_op, 0,i); + i->cur_op += 4; + MVM_6model_container_decont_n(i->tc, obj, r); + goto cbc_next(i); + } +__code cbc_decont_s(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; + MVMRegister *r = &GET_REG(i->cur_op, 0,i); + i->cur_op += 4; + MVM_6model_container_decont_s(i->tc, obj, r); + goto cbc_next(i); + } +__code cbc_getrusage(INTERP i){ + MVM_proc_getrusage(i->tc, GET_REG(i->cur_op, 0,i).o); + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_threadlockcount(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_thread_lock_count(i->tc, + GET_REG(i->cur_op, 2,i).o); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_getlexref_i(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_nativeref_lex_i(i->tc, + GET_UI16(i->cur_op, 4), GET_UI16(i->cur_op, 2)); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_getlexref_n(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_nativeref_lex_n(i->tc, + GET_UI16(i->cur_op, 4), GET_UI16(i->cur_op, 2)); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_getlexref_s(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_nativeref_lex_s(i->tc, + GET_UI16(i->cur_op, 4), GET_UI16(i->cur_op, 2)); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_getlexref_ni(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_nativeref_lex_name_i(i->tc, + MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 2))); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_getlexref_nn(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_nativeref_lex_name_n(i->tc, + MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 2))); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_getlexref_ns(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_nativeref_lex_name_s(i->tc, + MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 2))); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_atposref_i(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_nativeref_pos_i(i->tc, + GET_REG(i->cur_op, 2,i).o, GET_REG(i->cur_op, 4,i).i64); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_atposref_n(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_nativeref_pos_n(i->tc, + GET_REG(i->cur_op, 2,i).o, GET_REG(i->cur_op, 4,i).i64); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_atposref_s(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_nativeref_pos_s(i->tc, + GET_REG(i->cur_op, 2,i).o, GET_REG(i->cur_op, 4,i).i64); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_getattrref_i(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_nativeref_attr_i(i->tc, + GET_REG(i->cur_op, 2,i).o, GET_REG(i->cur_op, 4,i).o, + MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 6))); + i->cur_op += 12; + goto cbc_next(i); +} +__code cbc_getattrref_n(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_nativeref_attr_n(i->tc, + GET_REG(i->cur_op, 2,i).o, GET_REG(i->cur_op, 4,i).o, + MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 6))); + i->cur_op += 12; + goto cbc_next(i); +} +__code cbc_getattrref_s(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_nativeref_attr_s(i->tc, + GET_REG(i->cur_op, 2,i).o, GET_REG(i->cur_op, 4,i).o, + MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 6))); + i->cur_op += 12; + goto cbc_next(i); +} +__code cbc_getattrsref_i(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_nativeref_attr_i(i->tc, + GET_REG(i->cur_op, 2,i).o, GET_REG(i->cur_op, 4,i).o, + GET_REG(i->cur_op, 6,i).s); + i->cur_op += 8; + goto cbc_next(i); +} +__code cbc_getattrsref_n(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_nativeref_attr_n(i->tc, + GET_REG(i->cur_op, 2,i).o, GET_REG(i->cur_op, 4,i).o, + GET_REG(i->cur_op, 6,i).s); + i->cur_op += 8; + goto cbc_next(i); +} +__code cbc_getattrsref_s(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_nativeref_attr_s(i->tc, + GET_REG(i->cur_op, 2,i).o, GET_REG(i->cur_op, 4,i).o, + GET_REG(i->cur_op, 6,i).s); + i->cur_op += 8; + goto cbc_next(i); +} +__code cbc_nativecallsizeof(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_nativecall_sizeof(i->tc, GET_REG(i->cur_op, 2,i).o); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_encodenorm(INTERP i){ + MVM_exception_throw_adhoc(i->tc, "NYI"); goto cbc_normalizecodes(i); } -__code cbc_normalizecodes(INTER i){ - MVM_unicode_normalize_codepoints(i.tc, GET_REG(i.cur_op, 0,i).o, GET_REG(i.cur_op, 4,i).o, - MVM_unicode_normalizer_form(i.tc, GET_REG(i.cur_op, 2,i).i64)); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_strfromcodes(INTER i){ - GET_REG(i.cur_op, 0,i).s = MVM_unicode_codepoints_to_nfg_string(i.tc, - GET_REG(i.cur_op, 2,i).o); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_strtocodes(INTER i){ - MVM_unicode_string_to_codepoints(i.tc, GET_REG(i.cur_op, 0,i).s, - MVM_unicode_normalizer_form(i.tc, GET_REG(i.cur_op, 2,i).i64), - GET_REG(i.cur_op, 4,i).o); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_getcodelocation(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_code_location(i.tc, GET_REG(i.cur_op, 2,i).o); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_eqatim_s(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_string_equal_at_ignore_mark(i.tc, - GET_REG(i.cur_op, 2,i).s, GET_REG(i.cur_op, 4,i).s, - GET_REG(i.cur_op, 6,i).i64); - i.cur_op += 8; - goto cbc_next(i); -} -__code cbc_ordbaseat(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_string_ord_basechar_at(i.tc, GET_REG(i.cur_op, 2,i).s, GET_REG(i.cur_op, 4,i).i64); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_neverrepossess(INTER i){ - MVM_6model_never_repossess(i.tc, GET_REG(i.cur_op, 0,i).o); - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_scdisclaim(INTER i){ - MVM_sc_disclaim(i.tc, (MVMSerializationContext *)GET_REG(i.cur_op, 0,i).o); - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_atpos2d_i(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_repr_at_pos_2d_i(i.tc, GET_REG(i.cur_op, 2,i).o, - GET_REG(i.cur_op, 4,i).i64, GET_REG(i.cur_op, 6,i).i64); - i.cur_op += 8; - goto cbc_next(i); -} -__code cbc_atpos2d_n(INTER i){ - GET_REG(i.cur_op, 0,i).n64 = MVM_repr_at_pos_2d_n(i.tc, GET_REG(i.cur_op, 2,i).o, - GET_REG(i.cur_op, 4,i).i64, GET_REG(i.cur_op, 6,i).i64); - i.cur_op += 8; - goto cbc_next(i); -} -__code cbc_atpos2d_s(INTER i){ - GET_REG(i.cur_op, 0,i).s = MVM_repr_at_pos_2d_s(i.tc, GET_REG(i.cur_op, 2,i).o, - GET_REG(i.cur_op, 4,i).i64, GET_REG(i.cur_op, 6,i).i64); - i.cur_op += 8; - goto cbc_next(i); -} -__code cbc_atpos2d_o(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_repr_at_pos_2d_o(i.tc, GET_REG(i.cur_op, 2,i).o, - GET_REG(i.cur_op, 4,i).i64, GET_REG(i.cur_op, 6,i).i64); - i.cur_op += 8; - goto cbc_next(i); -} -__code cbc_atpos3d_i(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_repr_at_pos_3d_i(i.tc, GET_REG(i.cur_op, 2,i).o, - GET_REG(i.cur_op, 4,i).i64, GET_REG(i.cur_op, 6,i).i64, GET_REG(i.cur_op, 8,i).i64); - i.cur_op += 10; - goto cbc_next(i); -} -__code cbc_atpos3d_n(INTER i){ - GET_REG(i.cur_op, 0,i).n64 = MVM_repr_at_pos_3d_n(i.tc, GET_REG(i.cur_op, 2,i).o, - GET_REG(i.cur_op, 4,i).i64, GET_REG(i.cur_op, 6,i).i64, GET_REG(i.cur_op, 8,i).i64); - i.cur_op += 10; - goto cbc_next(i); -} -__code cbc_atpos3d_s(INTER i){ - GET_REG(i.cur_op, 0,i).s = MVM_repr_at_pos_3d_s(i.tc, GET_REG(i.cur_op, 2,i).o, - GET_REG(i.cur_op, 4,i).i64, GET_REG(i.cur_op, 6,i).i64, GET_REG(i.cur_op, 8,i).i64); - i.cur_op += 10; - goto cbc_next(i); -} -__code cbc_atpos3d_o(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_repr_at_pos_3d_o(i.tc, GET_REG(i.cur_op, 2,i).o, - GET_REG(i.cur_op, 4,i).i64, GET_REG(i.cur_op, 6,i).i64, GET_REG(i.cur_op, 8,i).i64); - i.cur_op += 10; - goto cbc_next(i); -} -__code cbc_atposnd_i(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_repr_at_pos_multidim_i(i.tc, - GET_REG(i.cur_op, 2,i).o, GET_REG(i.cur_op, 4,i).o); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_atposnd_n(INTER i){ - GET_REG(i.cur_op, 0,i).n64 = MVM_repr_at_pos_multidim_n(i.tc, - GET_REG(i.cur_op, 2,i).o, GET_REG(i.cur_op, 4,i).o); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_atposnd_s(INTER i){ - GET_REG(i.cur_op, 0,i).s = MVM_repr_at_pos_multidim_s(i.tc, - GET_REG(i.cur_op, 2,i).o, GET_REG(i.cur_op, 4,i).o); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_atposnd_o(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_repr_at_pos_multidim_o(i.tc, - GET_REG(i.cur_op, 2,i).o, GET_REG(i.cur_op, 4,i).o); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_bindpos2d_i(INTER i){ - MVM_repr_bind_pos_2d_i(i.tc, GET_REG(i.cur_op, 0,i).o, - GET_REG(i.cur_op, 2,i).i64, GET_REG(i.cur_op, 4,i).i64, - GET_REG(i.cur_op, 6,i).i64); - i.cur_op += 8; - goto cbc_next(i); -} -__code cbc_bindpos2d_n(INTER i){ - MVM_repr_bind_pos_2d_n(i.tc, GET_REG(i.cur_op, 0,i).o, - GET_REG(i.cur_op, 2,i).i64, GET_REG(i.cur_op, 4,i).i64, - GET_REG(i.cur_op, 6,i).n64); - i.cur_op += 8; - goto cbc_next(i); -} -__code cbc_bindpos2d_s(INTER i){ - MVM_repr_bind_pos_2d_s(i.tc, GET_REG(i.cur_op, 0,i).o, - GET_REG(i.cur_op, 2,i).i64, GET_REG(i.cur_op, 4,i).i64, - GET_REG(i.cur_op, 6,i).s); - i.cur_op += 8; - goto cbc_next(i); -} -__code cbc_bindpos2d_o(INTER i){ - MVM_repr_bind_pos_2d_o(i.tc, GET_REG(i.cur_op, 0,i).o, - GET_REG(i.cur_op, 2,i).i64, GET_REG(i.cur_op, 4,i).i64, - GET_REG(i.cur_op, 6,i).o); - i.cur_op += 8; - goto cbc_next(i); -} -__code cbc_bindpos3d_i(INTER i){ - MVM_repr_bind_pos_3d_i(i.tc, GET_REG(i.cur_op, 0,i).o, - GET_REG(i.cur_op, 2,i).i64, GET_REG(i.cur_op, 4,i).i64, - GET_REG(i.cur_op, 6,i).i64, GET_REG(i.cur_op, 8,i).i64); - i.cur_op += 10; - goto cbc_next(i); -} -__code cbc_bindpos3d_n(INTER i){ - MVM_repr_bind_pos_3d_n(i.tc, GET_REG(i.cur_op, 0,i).o, - GET_REG(i.cur_op, 2,i).i64, GET_REG(i.cur_op, 4,i).i64, - GET_REG(i.cur_op, 6,i).i64, GET_REG(i.cur_op, 8,i).n64); - i.cur_op += 10; - goto cbc_next(i); -} -__code cbc_bindpos3d_s(INTER i){ - MVM_repr_bind_pos_3d_s(i.tc, GET_REG(i.cur_op, 0,i).o, - GET_REG(i.cur_op, 2,i).i64, GET_REG(i.cur_op, 4,i).i64, - GET_REG(i.cur_op, 6,i).i64, GET_REG(i.cur_op, 8,i).s); - i.cur_op += 10; - goto cbc_next(i); -} -__code cbc_bindpos3d_o(INTER i){ - MVM_repr_bind_pos_3d_o(i.tc, GET_REG(i.cur_op, 0,i).o, - GET_REG(i.cur_op, 2,i).i64, GET_REG(i.cur_op, 4,i).i64, - GET_REG(i.cur_op, 6,i).i64, GET_REG(i.cur_op, 8,i).o); - i.cur_op += 10; - goto cbc_next(i); -} -__code cbc_bindposnd_i(INTER i){ - MVM_repr_bind_pos_multidim_i(i.tc, GET_REG(i.cur_op, 0,i).o, - GET_REG(i.cur_op, 2,i).o, GET_REG(i.cur_op, 4,i).i64); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_bindposnd_n(INTER i){ - MVM_repr_bind_pos_multidim_n(i.tc, GET_REG(i.cur_op, 0,i).o, - GET_REG(i.cur_op, 2,i).o, GET_REG(i.cur_op, 4,i).n64); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_bindposnd_s(INTER i){ - MVM_repr_bind_pos_multidim_s(i.tc, GET_REG(i.cur_op, 0,i).o, - GET_REG(i.cur_op, 2,i).o, GET_REG(i.cur_op, 4,i).s); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_bindposnd_o(INTER i){ - MVM_repr_bind_pos_multidim_o(i.tc, GET_REG(i.cur_op, 0,i).o, - GET_REG(i.cur_op, 2,i).o, GET_REG(i.cur_op, 4,i).o); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_dimensions(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_repr_dimensions(i.tc, GET_REG(i.cur_op, 2,i).o); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_setdimensions(INTER i){ - MVM_repr_set_dimensions(i.tc, GET_REG(i.cur_op, 0,i).o, GET_REG(i.cur_op, 2,i).o); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_numdimensions(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_repr_num_dimensions(i.tc, GET_REG(i.cur_op, 2,i).o); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_ctxcode(INTER i){ - MVMObject *this_ctx = GET_REG(i.cur_op, 2,i).o; +__code cbc_normalizecodes(INTERP i){ + MVM_unicode_normalize_codepoints(i->tc, GET_REG(i->cur_op, 0,i).o, GET_REG(i->cur_op, 4,i).o, + MVM_unicode_normalizer_form(i->tc, GET_REG(i->cur_op, 2,i).i64)); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_strfromcodes(INTERP i){ + GET_REG(i->cur_op, 0,i).s = MVM_unicode_codepoints_to_nfg_string(i->tc, + GET_REG(i->cur_op, 2,i).o); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_strtocodes(INTERP i){ + MVM_unicode_string_to_codepoints(i->tc, GET_REG(i->cur_op, 0,i).s, + MVM_unicode_normalizer_form(i->tc, GET_REG(i->cur_op, 2,i).i64), + GET_REG(i->cur_op, 4,i).o); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_getcodelocation(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_code_location(i->tc, GET_REG(i->cur_op, 2,i).o); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_eqatim_s(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_string_equal_at_ignore_mark(i->tc, + GET_REG(i->cur_op, 2,i).s, GET_REG(i->cur_op, 4,i).s, + GET_REG(i->cur_op, 6,i).i64); + i->cur_op += 8; + goto cbc_next(i); +} +__code cbc_ordbaseat(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_string_ord_basechar_at(i->tc, GET_REG(i->cur_op, 2,i).s, GET_REG(i->cur_op, 4,i).i64); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_neverrepossess(INTERP i){ + MVM_6model_never_repossess(i->tc, GET_REG(i->cur_op, 0,i).o); + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_scdisclaim(INTERP i){ + MVM_sc_disclaim(i->tc, (MVMSerializationContext *)GET_REG(i->cur_op, 0,i).o); + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_atpos2d_i(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_repr_at_pos_2d_i(i->tc, GET_REG(i->cur_op, 2,i).o, + GET_REG(i->cur_op, 4,i).i64, GET_REG(i->cur_op, 6,i).i64); + i->cur_op += 8; + goto cbc_next(i); +} +__code cbc_atpos2d_n(INTERP i){ + GET_REG(i->cur_op, 0,i).n64 = MVM_repr_at_pos_2d_n(i->tc, GET_REG(i->cur_op, 2,i).o, + GET_REG(i->cur_op, 4,i).i64, GET_REG(i->cur_op, 6,i).i64); + i->cur_op += 8; + goto cbc_next(i); +} +__code cbc_atpos2d_s(INTERP i){ + GET_REG(i->cur_op, 0,i).s = MVM_repr_at_pos_2d_s(i->tc, GET_REG(i->cur_op, 2,i).o, + GET_REG(i->cur_op, 4,i).i64, GET_REG(i->cur_op, 6,i).i64); + i->cur_op += 8; + goto cbc_next(i); +} +__code cbc_atpos2d_o(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_repr_at_pos_2d_o(i->tc, GET_REG(i->cur_op, 2,i).o, + GET_REG(i->cur_op, 4,i).i64, GET_REG(i->cur_op, 6,i).i64); + i->cur_op += 8; + goto cbc_next(i); +} +__code cbc_atpos3d_i(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_repr_at_pos_3d_i(i->tc, GET_REG(i->cur_op, 2,i).o, + GET_REG(i->cur_op, 4,i).i64, GET_REG(i->cur_op, 6,i).i64, GET_REG(i->cur_op, 8,i).i64); + i->cur_op += 10; + goto cbc_next(i); +} +__code cbc_atpos3d_n(INTERP i){ + GET_REG(i->cur_op, 0,i).n64 = MVM_repr_at_pos_3d_n(i->tc, GET_REG(i->cur_op, 2,i).o, + GET_REG(i->cur_op, 4,i).i64, GET_REG(i->cur_op, 6,i).i64, GET_REG(i->cur_op, 8,i).i64); + i->cur_op += 10; + goto cbc_next(i); +} +__code cbc_atpos3d_s(INTERP i){ + GET_REG(i->cur_op, 0,i).s = MVM_repr_at_pos_3d_s(i->tc, GET_REG(i->cur_op, 2,i).o, + GET_REG(i->cur_op, 4,i).i64, GET_REG(i->cur_op, 6,i).i64, GET_REG(i->cur_op, 8,i).i64); + i->cur_op += 10; + goto cbc_next(i); +} +__code cbc_atpos3d_o(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_repr_at_pos_3d_o(i->tc, GET_REG(i->cur_op, 2,i).o, + GET_REG(i->cur_op, 4,i).i64, GET_REG(i->cur_op, 6,i).i64, GET_REG(i->cur_op, 8,i).i64); + i->cur_op += 10; + goto cbc_next(i); +} +__code cbc_atposnd_i(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_repr_at_pos_multidim_i(i->tc, + GET_REG(i->cur_op, 2,i).o, GET_REG(i->cur_op, 4,i).o); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_atposnd_n(INTERP i){ + GET_REG(i->cur_op, 0,i).n64 = MVM_repr_at_pos_multidim_n(i->tc, + GET_REG(i->cur_op, 2,i).o, GET_REG(i->cur_op, 4,i).o); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_atposnd_s(INTERP i){ + GET_REG(i->cur_op, 0,i).s = MVM_repr_at_pos_multidim_s(i->tc, + GET_REG(i->cur_op, 2,i).o, GET_REG(i->cur_op, 4,i).o); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_atposnd_o(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_repr_at_pos_multidim_o(i->tc, + GET_REG(i->cur_op, 2,i).o, GET_REG(i->cur_op, 4,i).o); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_bindpos2d_i(INTERP i){ + MVM_repr_bind_pos_2d_i(i->tc, GET_REG(i->cur_op, 0,i).o, + GET_REG(i->cur_op, 2,i).i64, GET_REG(i->cur_op, 4,i).i64, + GET_REG(i->cur_op, 6,i).i64); + i->cur_op += 8; + goto cbc_next(i); +} +__code cbc_bindpos2d_n(INTERP i){ + MVM_repr_bind_pos_2d_n(i->tc, GET_REG(i->cur_op, 0,i).o, + GET_REG(i->cur_op, 2,i).i64, GET_REG(i->cur_op, 4,i).i64, + GET_REG(i->cur_op, 6,i).n64); + i->cur_op += 8; + goto cbc_next(i); +} +__code cbc_bindpos2d_s(INTERP i){ + MVM_repr_bind_pos_2d_s(i->tc, GET_REG(i->cur_op, 0,i).o, + GET_REG(i->cur_op, 2,i).i64, GET_REG(i->cur_op, 4,i).i64, + GET_REG(i->cur_op, 6,i).s); + i->cur_op += 8; + goto cbc_next(i); +} +__code cbc_bindpos2d_o(INTERP i){ + MVM_repr_bind_pos_2d_o(i->tc, GET_REG(i->cur_op, 0,i).o, + GET_REG(i->cur_op, 2,i).i64, GET_REG(i->cur_op, 4,i).i64, + GET_REG(i->cur_op, 6,i).o); + i->cur_op += 8; + goto cbc_next(i); +} +__code cbc_bindpos3d_i(INTERP i){ + MVM_repr_bind_pos_3d_i(i->tc, GET_REG(i->cur_op, 0,i).o, + GET_REG(i->cur_op, 2,i).i64, GET_REG(i->cur_op, 4,i).i64, + GET_REG(i->cur_op, 6,i).i64, GET_REG(i->cur_op, 8,i).i64); + i->cur_op += 10; + goto cbc_next(i); +} +__code cbc_bindpos3d_n(INTERP i){ + MVM_repr_bind_pos_3d_n(i->tc, GET_REG(i->cur_op, 0,i).o, + GET_REG(i->cur_op, 2,i).i64, GET_REG(i->cur_op, 4,i).i64, + GET_REG(i->cur_op, 6,i).i64, GET_REG(i->cur_op, 8,i).n64); + i->cur_op += 10; + goto cbc_next(i); +} +__code cbc_bindpos3d_s(INTERP i){ + MVM_repr_bind_pos_3d_s(i->tc, GET_REG(i->cur_op, 0,i).o, + GET_REG(i->cur_op, 2,i).i64, GET_REG(i->cur_op, 4,i).i64, + GET_REG(i->cur_op, 6,i).i64, GET_REG(i->cur_op, 8,i).s); + i->cur_op += 10; + goto cbc_next(i); +} +__code cbc_bindpos3d_o(INTERP i){ + MVM_repr_bind_pos_3d_o(i->tc, GET_REG(i->cur_op, 0,i).o, + GET_REG(i->cur_op, 2,i).i64, GET_REG(i->cur_op, 4,i).i64, + GET_REG(i->cur_op, 6,i).i64, GET_REG(i->cur_op, 8,i).o); + i->cur_op += 10; + goto cbc_next(i); +} +__code cbc_bindposnd_i(INTERP i){ + MVM_repr_bind_pos_multidim_i(i->tc, GET_REG(i->cur_op, 0,i).o, + GET_REG(i->cur_op, 2,i).o, GET_REG(i->cur_op, 4,i).i64); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_bindposnd_n(INTERP i){ + MVM_repr_bind_pos_multidim_n(i->tc, GET_REG(i->cur_op, 0,i).o, + GET_REG(i->cur_op, 2,i).o, GET_REG(i->cur_op, 4,i).n64); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_bindposnd_s(INTERP i){ + MVM_repr_bind_pos_multidim_s(i->tc, GET_REG(i->cur_op, 0,i).o, + GET_REG(i->cur_op, 2,i).o, GET_REG(i->cur_op, 4,i).s); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_bindposnd_o(INTERP i){ + MVM_repr_bind_pos_multidim_o(i->tc, GET_REG(i->cur_op, 0,i).o, + GET_REG(i->cur_op, 2,i).o, GET_REG(i->cur_op, 4,i).o); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_dimensions(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_repr_dimensions(i->tc, GET_REG(i->cur_op, 2,i).o); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_setdimensions(INTERP i){ + MVM_repr_set_dimensions(i->tc, GET_REG(i->cur_op, 0,i).o, GET_REG(i->cur_op, 2,i).o); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_numdimensions(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_repr_num_dimensions(i->tc, GET_REG(i->cur_op, 2,i).o); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_ctxcode(INTERP i){ + MVMObject *this_ctx = GET_REG(i->cur_op, 2,i).o; if (IS_CONCRETE(this_ctx) && REPR(this_ctx)->ID == MVM_REPR_ID_MVMContext) { MVMObject *code_obj = ((MVMContext *)this_ctx)->body.context->code_ref; - GET_REG(i.cur_op, 0,i).o = code_obj ? code_obj : i.tc->instance->VMNull; - i.cur_op += 4; + GET_REG(i->cur_op, 0,i).o = code_obj ? code_obj : i->tc->instance->VMNull; + i->cur_op += 4; } else { - MVM_exception_throw_adhoc(i.tc, "ctxcode needs an MVMContext"); + MVM_exception_throw_adhoc(i->tc, "ctxcode needs an MVMContext"); } goto cbc_next(i); } -__code cbc_isrwcont(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; +__code cbc_isrwcont(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; MVMint64 is_rw = 0; - if (!MVM_is_null(i.tc, obj)) { + if (!MVM_is_null(i->tc, obj)) { const MVMContainerSpec *cs = STABLE(obj)->container_spec; - is_rw = cs && cs->can_store(i.tc, obj); + is_rw = cs && cs->can_store(i->tc, obj); } - GET_REG(i.cur_op, 0,i).i64 = is_rw; - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_fc(INTER i){ - GET_REG(i.cur_op, 0,i).s = MVM_string_fc(i.tc, GET_REG(i.cur_op, 2,i).s); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_encoderep(INTER i){ - GET_REG(i.cur_op, 8,i).o = MVM_string_encode_to_buf(i.tc, GET_REG(i.cur_op, 2,i).s, - GET_REG(i.cur_op, 4,i).s, GET_REG(i.cur_op, 8,i).o, GET_REG(i.cur_op, 6,i).s); - i.cur_op += 10; - goto cbc_next(i); -} -__code cbc_istty_fh(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_io_is_tty(i.tc, GET_REG(i.cur_op, 2,i).o); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_multidimref_i(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_nativeref_multidim_i(i.tc, - GET_REG(i.cur_op, 2,i).o, GET_REG(i.cur_op, 4,i).o); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_multidimref_n(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_nativeref_multidim_n(i.tc, - GET_REG(i.cur_op, 2,i).o, GET_REG(i.cur_op, 4,i).o); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_multidimref_s(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_nativeref_multidim_s(i.tc, - GET_REG(i.cur_op, 2,i).o, GET_REG(i.cur_op, 4,i).o); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_fileno_fh(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_io_fileno(i.tc, GET_REG(i.cur_op, 2,i).o); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_asyncudp(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_io_socket_udp_async(i.tc, - GET_REG(i.cur_op, 2,i).o, GET_REG(i.cur_op, 4,i).o, GET_REG(i.cur_op, 6,i).s, - GET_REG(i.cur_op, 8,i).i64, GET_REG(i.cur_op, 10,i).i64, - GET_REG(i.cur_op, 12,i).o); - i.cur_op += 14; - goto cbc_next(i); -} -__code cbc_asyncwritebytesto(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_io_write_bytes_to_async(i.tc, GET_REG(i.cur_op, 2,i).o, - GET_REG(i.cur_op, 4,i).o, GET_REG(i.cur_op, 6,i).o, GET_REG(i.cur_op, 8,i).o, - GET_REG(i.cur_op, 10,i).o, GET_REG(i.cur_op, 12,i).s, GET_REG(i.cur_op, 14,i).i64); - i.cur_op += 16; - goto cbc_next(i); -} -__code cbc_objprimbits(INTER i){ - MVMObject *type = GET_REG(i.cur_op, 2,i).o; + GET_REG(i->cur_op, 0,i).i64 = is_rw; + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_fc(INTERP i){ + GET_REG(i->cur_op, 0,i).s = MVM_string_fc(i->tc, GET_REG(i->cur_op, 2,i).s); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_encoderep(INTERP i){ + GET_REG(i->cur_op, 8,i).o = MVM_string_encode_to_buf(i->tc, GET_REG(i->cur_op, 2,i).s, + GET_REG(i->cur_op, 4,i).s, GET_REG(i->cur_op, 8,i).o, GET_REG(i->cur_op, 6,i).s); + i->cur_op += 10; + goto cbc_next(i); +} +__code cbc_istty_fh(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_io_is_tty(i->tc, GET_REG(i->cur_op, 2,i).o); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_multidimref_i(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_nativeref_multidim_i(i->tc, + GET_REG(i->cur_op, 2,i).o, GET_REG(i->cur_op, 4,i).o); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_multidimref_n(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_nativeref_multidim_n(i->tc, + GET_REG(i->cur_op, 2,i).o, GET_REG(i->cur_op, 4,i).o); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_multidimref_s(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_nativeref_multidim_s(i->tc, + GET_REG(i->cur_op, 2,i).o, GET_REG(i->cur_op, 4,i).o); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_fileno_fh(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_io_fileno(i->tc, GET_REG(i->cur_op, 2,i).o); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_asyncudp(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_io_socket_udp_async(i->tc, + GET_REG(i->cur_op, 2,i).o, GET_REG(i->cur_op, 4,i).o, GET_REG(i->cur_op, 6,i).s, + GET_REG(i->cur_op, 8,i).i64, GET_REG(i->cur_op, 10,i).i64, + GET_REG(i->cur_op, 12,i).o); + i->cur_op += 14; + goto cbc_next(i); +} +__code cbc_asyncwritebytesto(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_io_write_bytes_to_async(i->tc, GET_REG(i->cur_op, 2,i).o, + GET_REG(i->cur_op, 4,i).o, GET_REG(i->cur_op, 6,i).o, GET_REG(i->cur_op, 8,i).o, + GET_REG(i->cur_op, 10,i).o, GET_REG(i->cur_op, 12,i).s, GET_REG(i->cur_op, 14,i).i64); + i->cur_op += 16; + goto cbc_next(i); +} +__code cbc_objprimbits(INTERP i){ + MVMObject *type = GET_REG(i->cur_op, 2,i).o; if (type) { - const MVMStorageSpec *ss = REPR(type)->get_storage_spec(i.tc, STABLE(type)); - GET_REG(i.cur_op, 0,i).i64 = ss->boxed_primitive ? ss->bits : 0; + const MVMStorageSpec *ss = REPR(type)->get_storage_spec(i->tc, STABLE(type)); + GET_REG(i->cur_op, 0,i).i64 = ss->boxed_primitive ? ss->bits : 0; } else { - GET_REG(i.cur_op, 0,i).i64 = 0; + GET_REG(i->cur_op, 0,i).i64 = 0; } - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_objprimunsigned(INTER i){ - MVMObject *type = GET_REG(i.cur_op, 2,i).o; + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_objprimunsigned(INTERP i){ + MVMObject *type = GET_REG(i->cur_op, 2,i).o; if (type) { - const MVMStorageSpec *ss = REPR(type)->get_storage_spec(i.tc, STABLE(type)); - GET_REG(i.cur_op, 0,i).i64 = ss->boxed_primitive == 1 ? ss->is_unsigned : 0; + const MVMStorageSpec *ss = REPR(type)->get_storage_spec(i->tc, STABLE(type)); + GET_REG(i->cur_op, 0,i).i64 = ss->boxed_primitive == 1 ? ss->is_unsigned : 0; } else { - GET_REG(i.cur_op, 0,i).i64 = 0; + GET_REG(i->cur_op, 0,i).i64 = 0; } - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_getlexref_i32(INTER i){ + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_getlexref_i32(INTERP i){ goto cbc_getlexref_i16(i); } -__code cbc_getlexref_i16(INTER i){ +__code cbc_getlexref_i16(INTERP i){ goto cbc_getlexref_i8(i); } -__code cbc_getlexref_i8(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_nativeref_lex_i(i.tc, - GET_UI16(i.cur_op, 4), GET_UI16(i.cur_op, 2)); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_getlexref_n32(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_nativeref_lex_n(i.tc, - GET_UI16(i.cur_op, 4), GET_UI16(i.cur_op, 2)); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_box_u(INTER i){ - MVM_box_uint(i.tc, GET_REG(i.cur_op, 2,i).u64, GET_REG(i.cur_op, 4,i).o, - &GET_REG(i.cur_op, 0,i)); - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_unbox_u(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; +__code cbc_getlexref_i8(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_nativeref_lex_i(i->tc, + GET_UI16(i->cur_op, 4), GET_UI16(i->cur_op, 2)); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_getlexref_n32(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_nativeref_lex_n(i->tc, + GET_UI16(i->cur_op, 4), GET_UI16(i->cur_op, 2)); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_box_u(INTERP i){ + MVM_box_uint(i->tc, GET_REG(i->cur_op, 2,i).u64, GET_REG(i->cur_op, 4,i).o, + &GET_REG(i->cur_op, 0,i)); + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_unbox_u(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; if (!IS_CONCRETE(obj)) - MVM_exception_throw_adhoc(i.tc, "Cannot unbox a type object"); - GET_REG(i.cur_op, 0,i).u64 = REPR(obj)->box_funcs.get_uint(i.tc, + MVM_exception_throw_adhoc(i->tc, "Cannot unbox a type object"); + GET_REG(i->cur_op, 0,i).u64 = REPR(obj)->box_funcs.get_uint(i->tc, STABLE(obj), obj, OBJECT_BODY(obj)); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_coerce_iu(INTER i){ - GET_REG(i.cur_op, 0,i).u64 = (MVMuint64)GET_REG(i.cur_op, 2,i).i64; - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_coerce_ui(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = (MVMint64)GET_REG(i.cur_op, 2,i).u64; - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_coerce_nu(INTER i){ - GET_REG(i.cur_op, 0,i).u64 = (MVMuint64)GET_REG(i.cur_op, 2,i).n64; - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_coerce_un(INTER i){ - GET_REG(i.cur_op, 0,i).n64 = (MVMnum64)GET_REG(i.cur_op, 2,i).u64; - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_decont_u(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; - MVMRegister *r = &GET_REG(i.cur_op, 0,i); - i.cur_op += 4; - MVM_6model_container_decont_u(i.tc, obj, r); - goto cbc_next(i); - } -__code cbc_getlexref_u(INTER i){ + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_coerce_iu(INTERP i){ + GET_REG(i->cur_op, 0,i).u64 = (MVMuint64)GET_REG(i->cur_op, 2,i).i64; + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_coerce_ui(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = (MVMint64)GET_REG(i->cur_op, 2,i).u64; + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_coerce_nu(INTERP i){ + GET_REG(i->cur_op, 0,i).u64 = (MVMuint64)GET_REG(i->cur_op, 2,i).n64; + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_coerce_un(INTERP i){ + GET_REG(i->cur_op, 0,i).n64 = (MVMnum64)GET_REG(i->cur_op, 2,i).u64; + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_decont_u(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; + MVMRegister *r = &GET_REG(i->cur_op, 0,i); + i->cur_op += 4; + MVM_6model_container_decont_u(i->tc, obj, r); + goto cbc_next(i); + } +__code cbc_getlexref_u(INTERP i){ goto cbc_getlexref_u32(i); } -__code cbc_getlexref_u32(INTER i){ +__code cbc_getlexref_u32(INTERP i){ goto cbc_getlexref_u16(i); } -__code cbc_getlexref_u16(INTER i){ +__code cbc_getlexref_u16(INTERP i){ goto cbc_getlexref_u8(i); } -__code cbc_getlexref_u8(INTER i){ +__code cbc_getlexref_u8(INTERP i){ /* XXX Cheat should have a _u here. */ - GET_REG(i.cur_op, 0,i).o = MVM_nativeref_lex_i(i.tc, - GET_UI16(i.cur_op, 4), GET_UI16(i.cur_op, 2)); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_param_rp_u(INTER i){ - GET_REG(i.cur_op, 0,i).u64 = MVM_args_get_pos_uint(i.tc, &i.tc->cur_frame->params, - GET_UI16(i.cur_op, 2), MVM_ARG_REQUIRED).arg.u64; - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_param_op_u(INTER i){ - MVMArgInfo param = MVM_args_get_pos_uint(i.tc, &i.tc->cur_frame->params, - GET_UI16(i.cur_op, 2), MVM_ARG_OPTIONAL); + GET_REG(i->cur_op, 0,i).o = MVM_nativeref_lex_i(i->tc, + GET_UI16(i->cur_op, 4), GET_UI16(i->cur_op, 2)); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_param_rp_u(INTERP i){ + GET_REG(i->cur_op, 0,i).u64 = MVM_args_get_pos_uint(i->tc, &i->tc->cur_frame->params, + GET_UI16(i->cur_op, 2), MVM_ARG_REQUIRED).arg.u64; + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_param_op_u(INTERP i){ + MVMArgInfo param = MVM_args_get_pos_uint(i->tc, &i->tc->cur_frame->params, + GET_UI16(i->cur_op, 2), MVM_ARG_OPTIONAL); if (param.exists) { - GET_REG(i.cur_op, 0,i).u64 = param.arg.u64; - i.cur_op = i.bytecode_start + GET_UI32(i.cur_op, 4); + GET_REG(i->cur_op, 0,i).u64 = param.arg.u64; + i->cur_op = i->bytecode_start + GET_UI32(i->cur_op, 4); } else { - i.cur_op += 8; + i->cur_op += 8; } goto cbc_next(i); } -__code cbc_param_rn_u(INTER i){ - GET_REG(i.cur_op, 0,i).u64 = MVM_args_get_named_uint(i.tc, &i.tc->cur_frame->params, - MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 2)), MVM_ARG_REQUIRED).arg.u64; - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_param_on_u(INTER i){ - MVMArgInfo param = MVM_args_get_named_uint(i.tc, &i.tc->cur_frame->params, - MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 2)), MVM_ARG_OPTIONAL); +__code cbc_param_rn_u(INTERP i){ + GET_REG(i->cur_op, 0,i).u64 = MVM_args_get_named_uint(i->tc, &i->tc->cur_frame->params, + MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 2)), MVM_ARG_REQUIRED).arg.u64; + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_param_on_u(INTERP i){ + MVMArgInfo param = MVM_args_get_named_uint(i->tc, &i->tc->cur_frame->params, + MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 2)), MVM_ARG_OPTIONAL); if (param.exists) { - GET_REG(i.cur_op, 0,i).u64 = param.arg.u64; - i.cur_op = i.bytecode_start + GET_UI32(i.cur_op, 6); + GET_REG(i->cur_op, 0,i).u64 = param.arg.u64; + i->cur_op = i->bytecode_start + GET_UI32(i->cur_op, 6); } else { - i.cur_op += 10; + i->cur_op += 10; } goto cbc_next(i); } -__code cbc_param_rn2_u(INTER i){ - MVMArgInfo param = MVM_args_get_named_uint(i.tc, &i.tc->cur_frame->params, - MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 2)), MVM_ARG_OPTIONAL); +__code cbc_param_rn2_u(INTERP i){ + MVMArgInfo param = MVM_args_get_named_uint(i->tc, &i->tc->cur_frame->params, + MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 2)), MVM_ARG_OPTIONAL); if (param.exists) - GET_REG(i.cur_op, 0,i).u64 = param.arg.u64; + GET_REG(i->cur_op, 0,i).u64 = param.arg.u64; else - GET_REG(i.cur_op, 0,i).u64 = MVM_args_get_named_uint(i.tc, &i.tc->cur_frame->params, - MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 6)), MVM_ARG_REQUIRED).arg.u64; - i.cur_op += 10; - goto cbc_next(i); - } -__code cbc_param_on2_u(INTER i){ - MVMArgInfo param = MVM_args_get_named_uint(i.tc, &i.tc->cur_frame->params, - MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 2)), MVM_ARG_OPTIONAL); + GET_REG(i->cur_op, 0,i).u64 = MVM_args_get_named_uint(i->tc, &i->tc->cur_frame->params, + MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 6)), MVM_ARG_REQUIRED).arg.u64; + i->cur_op += 10; + goto cbc_next(i); + } +__code cbc_param_on2_u(INTERP i){ + MVMArgInfo param = MVM_args_get_named_uint(i->tc, &i->tc->cur_frame->params, + MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 2)), MVM_ARG_OPTIONAL); if (!param.exists) - param = MVM_args_get_named_uint(i.tc, &i.tc->cur_frame->params, - MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 6)), MVM_ARG_OPTIONAL); + param = MVM_args_get_named_uint(i->tc, &i->tc->cur_frame->params, + MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 6)), MVM_ARG_OPTIONAL); if (param.exists) { - GET_REG(i.cur_op, 0,i).u64 = param.arg.u64; - i.cur_op = i.bytecode_start + GET_UI32(i.cur_op, 10); + GET_REG(i->cur_op, 0,i).u64 = param.arg.u64; + i->cur_op = i->bytecode_start + GET_UI32(i->cur_op, 10); } else { - i.cur_op += 14; + i->cur_op += 14; } goto cbc_next(i); } -__code cbc_stat_time(INTER i){ - GET_REG(i.cur_op, 0,i).n64 = MVM_file_time(i.tc, GET_REG(i.cur_op, 2,i).s, GET_REG(i.cur_op, 4,i).i64, 0); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_lstat_time(INTER i){ - GET_REG(i.cur_op, 0,i).n64 = MVM_file_time(i.tc, GET_REG(i.cur_op, 2,i).s, GET_REG(i.cur_op, 4,i).i64, 1); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_setdebugtypename(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 0,i).o; - if (MVM_string_graphs(i.tc, GET_REG(i.cur_op, 2,i).s)) { - char *debugname = MVM_string_utf8_encode_C_string(i.tc, GET_REG(i.cur_op, 2,i).s); +__code cbc_stat_time(INTERP i){ + GET_REG(i->cur_op, 0,i).n64 = MVM_file_time(i->tc, GET_REG(i->cur_op, 2,i).s, GET_REG(i->cur_op, 4,i).i64, 0); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_lstat_time(INTERP i){ + GET_REG(i->cur_op, 0,i).n64 = MVM_file_time(i->tc, GET_REG(i->cur_op, 2,i).s, GET_REG(i->cur_op, 4,i).i64, 1); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_setdebugtypename(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 0,i).o; + if (MVM_string_graphs(i->tc, GET_REG(i->cur_op, 2,i).s)) { + char *debugname = MVM_string_utf8_encode_C_string(i->tc, GET_REG(i->cur_op, 2,i).s); if (STABLE(obj)->debug_name) { MVM_free(STABLE(obj)->debug_name); } @@ -5435,1042 +5431,1043 @@ } else { STABLE(obj)->debug_name = NULL; } - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_throwpayloadlex(INTER i){ - MVMRegister *rr = &GET_REG(i.cur_op, 0,i); - MVMuint32 cat = (MVMuint32)MVM_BC_get_I64(i.cur_op, 2); - MVMObject *payload = GET_REG(i.cur_op, 10,i).o; - i.cur_op += 12; - MVM_exception_throwpayload(i.tc, MVM_EX_THROW_LEX, cat, payload, rr); - goto cbc_next(i); - } -__code cbc_throwpayloadlexcaller(INTER i){ - MVMRegister *rr = &GET_REG(i.cur_op, 0,i); - MVMuint32 cat = (MVMuint32)MVM_BC_get_I64(i.cur_op, 2); - MVMObject *payload = GET_REG(i.cur_op, 10,i).o; - i.cur_op += 12; - MVM_exception_throwpayload(i.tc, MVM_EX_THROW_LEX_CALLER, cat, payload, rr); - goto cbc_next(i); - } -__code cbc_lastexpayload(INTER i){ - GET_REG(i.cur_op, 0,i).o = i.tc->last_payload; - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_cancelnotify(INTER i){ - MVM_io_eventloop_cancel_work(i.tc, GET_REG(i.cur_op, 0,i).o, - GET_REG(i.cur_op, 2,i).o, GET_REG(i.cur_op, 4,i).o); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_decoderconfigure(INTER i){ - MVMObject *decoder = GET_REG(i.cur_op, 0,i).o; - MVM_decoder_ensure_decoder(i.tc, decoder, "decoderconfigure"); - MVM_decoder_configure(i.tc, (MVMDecoder *)decoder, - GET_REG(i.cur_op, 2,i).s, GET_REG(i.cur_op, 4,i).o); - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_decodersetlineseps(INTER i){ - MVMObject *decoder = GET_REG(i.cur_op, 0,i).o; - MVM_decoder_ensure_decoder(i.tc, decoder, "decodersetlineseps"); - MVM_decoder_set_separators(i.tc, (MVMDecoder *)decoder, GET_REG(i.cur_op, 2,i).o); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_decoderaddbytes(INTER i){ - MVMObject *decoder = GET_REG(i.cur_op, 0,i).o; - MVM_decoder_ensure_decoder(i.tc, decoder, "decoderaddbytes"); - MVM_decoder_add_bytes(i.tc, (MVMDecoder *)decoder, GET_REG(i.cur_op, 2,i).o); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_decodertakechars(INTER i){ - MVMObject *decoder = GET_REG(i.cur_op, 2,i).o; - MVM_decoder_ensure_decoder(i.tc, decoder, "decodertakechars"); - GET_REG(i.cur_op, 0,i).s = MVM_decoder_take_chars(i.tc, (MVMDecoder *)decoder, - GET_REG(i.cur_op, 4,i).i64, 0); - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_indexim_s(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_string_index_ignore_mark(i.tc, - GET_REG(i.cur_op, 2,i).s, GET_REG(i.cur_op, 4,i).s, GET_REG(i.cur_op, 6,i).i64); - i.cur_op += 8; - goto cbc_next(i); - } -__code cbc_decodertakeallchars(INTER i){ - MVMObject *decoder = GET_REG(i.cur_op, 2,i).o; - MVM_decoder_ensure_decoder(i.tc, decoder, "decodertakeallchars"); - GET_REG(i.cur_op, 0,i).s = MVM_decoder_take_all_chars(i.tc, (MVMDecoder *)decoder); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_decodertakeavailablechars(INTER i){ - MVMObject *decoder = GET_REG(i.cur_op, 2,i).o; - MVM_decoder_ensure_decoder(i.tc, decoder, "decodertakeavailablechars"); - GET_REG(i.cur_op, 0,i).s = MVM_decoder_take_available_chars(i.tc, (MVMDecoder *)decoder); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_decodertakeline(INTER i){ - MVMObject *decoder = GET_REG(i.cur_op, 2,i).o; - MVM_decoder_ensure_decoder(i.tc, decoder, "decodertakeline"); - GET_REG(i.cur_op, 0,i).s = MVM_decoder_take_line(i.tc, (MVMDecoder *)decoder, - GET_REG(i.cur_op, 4,i).i64, GET_REG(i.cur_op, 6,i).i64); - i.cur_op += 8; - goto cbc_next(i); - } -__code cbc_decoderbytesavailable(INTER i){ - MVMObject *decoder = GET_REG(i.cur_op, 2,i).o; - MVM_decoder_ensure_decoder(i.tc, decoder, "decoderbytesavailable"); - GET_REG(i.cur_op, 0,i).i64 = MVM_decoder_bytes_available(i.tc, (MVMDecoder *)decoder); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_decodertakebytes(INTER i){ - MVMObject *decoder = GET_REG(i.cur_op, 2,i).o; - MVM_decoder_ensure_decoder(i.tc, decoder, "decodertakebytes"); - GET_REG(i.cur_op, 0,i).o = MVM_decoder_take_bytes(i.tc, (MVMDecoder *)decoder, - GET_REG(i.cur_op, 4,i).o, GET_REG(i.cur_op, 6,i).i64); - i.cur_op += 8; - goto cbc_next(i); - } -__code cbc_decoderempty(INTER i){ - MVMObject *decoder = GET_REG(i.cur_op, 2,i).o; - MVM_decoder_ensure_decoder(i.tc, decoder, "decoderempty"); - GET_REG(i.cur_op, 0,i).i64 = MVM_decoder_empty(i.tc, (MVMDecoder *)decoder); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_indexingoptimized(INTER i){ - GET_REG(i.cur_op, 0,i).s = MVM_string_indexing_optimized(i.tc, GET_REG(i.cur_op, 2,i).s); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_captureinnerlex(INTER i){ - MVM_frame_capture_inner(i.tc, GET_REG(i.cur_op, 0,i).o); - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_setdispatcherfor(INTER i){ - MVMObject *disp_for = GET_REG(i.cur_op, 2,i).o; - i.tc->cur_dispatcher = GET_REG(i.cur_op, 0,i).o; - i.tc->cur_dispatcher_for = REPR(disp_for)->ID == MVM_REPR_ID_MVMCode + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_throwpayloadlex(INTERP i){ + MVMRegister *rr = &GET_REG(i->cur_op, 0,i); + MVMuint32 cat = (MVMuint32)MVM_BC_get_I64(i->cur_op, 2); + MVMObject *payload = GET_REG(i->cur_op, 10,i).o; + i->cur_op += 12; + MVM_exception_throwpayload(i->tc, MVM_EX_THROW_LEX, cat, payload, rr); + goto cbc_next(i); + } +__code cbc_throwpayloadlexcaller(INTERP i){ + MVMRegister *rr = &GET_REG(i->cur_op, 0,i); + MVMuint32 cat = (MVMuint32)MVM_BC_get_I64(i->cur_op, 2); + MVMObject *payload = GET_REG(i->cur_op, 10,i).o; + i->cur_op += 12; + MVM_exception_throwpayload(i->tc, MVM_EX_THROW_LEX_CALLER, cat, payload, rr); + goto cbc_next(i); + } +__code cbc_lastexpayload(INTERP i){ + GET_REG(i->cur_op, 0,i).o = i->tc->last_payload; + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_cancelnotify(INTERP i){ + MVM_io_eventloop_cancel_work(i->tc, GET_REG(i->cur_op, 0,i).o, + GET_REG(i->cur_op, 2,i).o, GET_REG(i->cur_op, 4,i).o); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_decoderconfigure(INTERP i){ + MVMObject *decoder = GET_REG(i->cur_op, 0,i).o; + MVM_decoder_ensure_decoder(i->tc, decoder, "decoderconfigure"); + MVM_decoder_configure(i->tc, (MVMDecoder *)decoder, + GET_REG(i->cur_op, 2,i).s, GET_REG(i->cur_op, 4,i).o); + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_decodersetlineseps(INTERP i){ + MVMObject *decoder = GET_REG(i->cur_op, 0,i).o; + MVM_decoder_ensure_decoder(i->tc, decoder, "decodersetlineseps"); + MVM_decoder_set_separators(i->tc, (MVMDecoder *)decoder, GET_REG(i->cur_op, 2,i).o); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_decoderaddbytes(INTERP i){ + MVMObject *decoder = GET_REG(i->cur_op, 0,i).o; + MVM_decoder_ensure_decoder(i->tc, decoder, "decoderaddbytes"); + MVM_decoder_add_bytes(i->tc, (MVMDecoder *)decoder, GET_REG(i->cur_op, 2,i).o); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_decodertakechars(INTERP i){ + MVMObject *decoder = GET_REG(i->cur_op, 2,i).o; + MVM_decoder_ensure_decoder(i->tc, decoder, "decodertakechars"); + GET_REG(i->cur_op, 0,i).s = MVM_decoder_take_chars(i->tc, (MVMDecoder *)decoder, + GET_REG(i->cur_op, 4,i).i64, 0); + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_indexim_s(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_string_index_ignore_mark(i->tc, + GET_REG(i->cur_op, 2,i).s, GET_REG(i->cur_op, 4,i).s, GET_REG(i->cur_op, 6,i).i64); + i->cur_op += 8; + goto cbc_next(i); + } +__code cbc_decodertakeallchars(INTERP i){ + MVMObject *decoder = GET_REG(i->cur_op, 2,i).o; + MVM_decoder_ensure_decoder(i->tc, decoder, "decodertakeallchars"); + GET_REG(i->cur_op, 0,i).s = MVM_decoder_take_all_chars(i->tc, (MVMDecoder *)decoder); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_decodertakeavailablechars(INTERP i){ + MVMObject *decoder = GET_REG(i->cur_op, 2,i).o; + MVM_decoder_ensure_decoder(i->tc, decoder, "decodertakeavailablechars"); + GET_REG(i->cur_op, 0,i).s = MVM_decoder_take_available_chars(i->tc, (MVMDecoder *)decoder); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_decodertakeline(INTERP i){ + MVMObject *decoder = GET_REG(i->cur_op, 2,i).o; + MVM_decoder_ensure_decoder(i->tc, decoder, "decodertakeline"); + GET_REG(i->cur_op, 0,i).s = MVM_decoder_take_line(i->tc, (MVMDecoder *)decoder, + GET_REG(i->cur_op, 4,i).i64, GET_REG(i->cur_op, 6,i).i64); + i->cur_op += 8; + goto cbc_next(i); + } +__code cbc_decoderbytesavailable(INTERP i){ + MVMObject *decoder = GET_REG(i->cur_op, 2,i).o; + MVM_decoder_ensure_decoder(i->tc, decoder, "decoderbytesavailable"); + GET_REG(i->cur_op, 0,i).i64 = MVM_decoder_bytes_available(i->tc, (MVMDecoder *)decoder); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_decodertakebytes(INTERP i){ + MVMObject *decoder = GET_REG(i->cur_op, 2,i).o; + MVM_decoder_ensure_decoder(i->tc, decoder, "decodertakebytes"); + GET_REG(i->cur_op, 0,i).o = MVM_decoder_take_bytes(i->tc, (MVMDecoder *)decoder, + GET_REG(i->cur_op, 4,i).o, GET_REG(i->cur_op, 6,i).i64); + i->cur_op += 8; + goto cbc_next(i); + } +__code cbc_decoderempty(INTERP i){ + MVMObject *decoder = GET_REG(i->cur_op, 2,i).o; + MVM_decoder_ensure_decoder(i->tc, decoder, "decoderempty"); + GET_REG(i->cur_op, 0,i).i64 = MVM_decoder_empty(i->tc, (MVMDecoder *)decoder); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_indexingoptimized(INTERP i){ + GET_REG(i->cur_op, 0,i).s = MVM_string_indexing_optimized(i->tc, GET_REG(i->cur_op, 2,i).s); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_captureinnerlex(INTERP i){ + MVM_frame_capture_inner(i->tc, GET_REG(i->cur_op, 0,i).o); + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_setdispatcherfor(INTERP i){ + MVMObject *disp_for = GET_REG(i->cur_op, 2,i).o; + i->tc->cur_dispatcher = GET_REG(i->cur_op, 0,i).o; + i->tc->cur_dispatcher_for = REPR(disp_for)->ID == MVM_REPR_ID_MVMCode ? disp_for - : MVM_frame_find_invokee(i.tc, disp_for, NULL); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_cpucores(INTER i){ - GET_REG(i.cur_op, 0,i).i32 = MVM_platform_cpu_count(); - i.cur_op += 2; - goto cbc_next(i); - } -__code cbc_decodertakecharseof(INTER i){ - MVMObject *decoder = GET_REG(i.cur_op, 2,i).o; - MVM_decoder_ensure_decoder(i.tc, decoder, "decodertakecharseof"); - GET_REG(i.cur_op, 0,i).s = MVM_decoder_take_chars(i.tc, (MVMDecoder *)decoder, - GET_REG(i.cur_op, 4,i).i64, 1); - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_cas_o(INTER i){ - MVMRegister *result = &GET_REG(i.cur_op, 0,i); - MVMObject *target = GET_REG(i.cur_op, 2,i).o; - MVMObject *expected = GET_REG(i.cur_op, 4,i).o; - MVMObject *value = GET_REG(i.cur_op, 6,i).o; - i.cur_op += 8; - MVM_6model_container_cas(i.tc, target, expected, value, result); - goto cbc_next(i); - } -__code cbc_cas_i(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_6model_container_cas_i(i.tc, - GET_REG(i.cur_op, 2,i).o, GET_REG(i.cur_op, 4,i).i64, - GET_REG(i.cur_op, 6,i).i64); - i.cur_op += 8; - goto cbc_next(i); -} -__code cbc_atomicinc_i(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_6model_container_atomic_inc(i.tc, - GET_REG(i.cur_op, 2,i).o); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_atomicdec_i(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_6model_container_atomic_dec(i.tc, - GET_REG(i.cur_op, 2,i).o); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_atomicadd_i(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_6model_container_atomic_add(i.tc, - GET_REG(i.cur_op, 2,i).o, GET_REG(i.cur_op, 4,i).i64); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_atomicload_o(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_6model_container_atomic_load(i.tc, - GET_REG(i.cur_op, 2,i).o); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_atomicload_i(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_6model_container_atomic_load_i(i.tc, - GET_REG(i.cur_op, 2,i).o); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_atomicstore_o(INTER i){ - MVMObject *target = GET_REG(i.cur_op, 0,i).o; - MVMObject *value = GET_REG(i.cur_op, 2,i).o; - i.cur_op += 4; - MVM_6model_container_atomic_store(i.tc, target, value); - goto cbc_next(i); - } -__code cbc_atomicstore_i(INTER i){ - MVM_6model_container_atomic_store_i(i.tc, GET_REG(i.cur_op, 0,i).o, - GET_REG(i.cur_op, 2,i).i64); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_barrierfull(INTER i){ + : MVM_frame_find_invokee(i->tc, disp_for, NULL); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_cpucores(INTERP i){ + GET_REG(i->cur_op, 0,i).i32 = MVM_platform_cpu_count(); + i->cur_op += 2; + goto cbc_next(i); + } +__code cbc_decodertakecharseof(INTERP i){ + MVMObject *decoder = GET_REG(i->cur_op, 2,i).o; + MVM_decoder_ensure_decoder(i->tc, decoder, "decodertakecharseof"); + GET_REG(i->cur_op, 0,i).s = MVM_decoder_take_chars(i->tc, (MVMDecoder *)decoder, + GET_REG(i->cur_op, 4,i).i64, 1); + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_cas_o(INTERP i){ + MVMRegister *result = &GET_REG(i->cur_op, 0,i); + MVMObject *target = GET_REG(i->cur_op, 2,i).o; + MVMObject *expected = GET_REG(i->cur_op, 4,i).o; + MVMObject *value = GET_REG(i->cur_op, 6,i).o; + i->cur_op += 8; + MVM_6model_container_cas(i->tc, target, expected, value, result); + goto cbc_next(i); + } +__code cbc_cas_i(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_6model_container_cas_i(i->tc, + GET_REG(i->cur_op, 2,i).o, GET_REG(i->cur_op, 4,i).i64, + GET_REG(i->cur_op, 6,i).i64); + i->cur_op += 8; + goto cbc_next(i); +} +__code cbc_atomicinc_i(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_6model_container_atomic_inc(i->tc, + GET_REG(i->cur_op, 2,i).o); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_atomicdec_i(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_6model_container_atomic_dec(i->tc, + GET_REG(i->cur_op, 2,i).o); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_atomicadd_i(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_6model_container_atomic_add(i->tc, + GET_REG(i->cur_op, 2,i).o, GET_REG(i->cur_op, 4,i).i64); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_atomicload_o(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_6model_container_atomic_load(i->tc, + GET_REG(i->cur_op, 2,i).o); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_atomicload_i(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_6model_container_atomic_load_i(i->tc, + GET_REG(i->cur_op, 2,i).o); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_atomicstore_o(INTERP i){ + MVMObject *target = GET_REG(i->cur_op, 0,i).o; + MVMObject *value = GET_REG(i->cur_op, 2,i).o; + i->cur_op += 4; + MVM_6model_container_atomic_store(i->tc, target, value); + goto cbc_next(i); + } +__code cbc_atomicstore_i(INTERP i){ + MVM_6model_container_atomic_store_i(i->tc, GET_REG(i->cur_op, 0,i).o, + GET_REG(i->cur_op, 2,i).i64); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_barrierfull(INTERP i){ MVM_barrier(); goto cbc_next(i); } -__code cbc_nativeinvoke_v(INTER i){ - i.tc->cur_frame->return_value = NULL; - i.tc->cur_frame->return_type = MVM_RETURN_VOID; - MVM_nativecall_invoke_jit(i.tc, GET_REG(i.cur_op, 2,i).o); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_nativeinvoke_i(INTER i){ - i.tc->cur_frame->return_value = &GET_REG(i.cur_op, 0,i); - i.tc->cur_frame->return_type = MVM_RETURN_INT; - MVM_nativecall_invoke_jit(i.tc, GET_REG(i.cur_op, 2,i).o); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_nativeinvoke_n(INTER i){ - i.tc->cur_frame->return_value = &GET_REG(i.cur_op, 0,i); - i.tc->cur_frame->return_type = MVM_RETURN_NUM; - MVM_nativecall_invoke_jit(i.tc, GET_REG(i.cur_op, 2,i).o); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_nativeinvoke_s(INTER i){ - i.tc->cur_frame->return_value = &GET_REG(i.cur_op, 0,i); - i.tc->cur_frame->return_type = MVM_RETURN_STR; - MVM_nativecall_invoke_jit(i.tc, GET_REG(i.cur_op, 2,i).o); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_nativeinvoke_o(INTER i){ - i.tc->cur_frame->return_value = &GET_REG(i.cur_op, 0,i); - i.tc->cur_frame->return_type = MVM_RETURN_OBJ; - MVM_nativecall_invoke_jit(i.tc, GET_REG(i.cur_op, 2,i).o); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_getarg_i(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = i.tc->cur_frame->args[GET_REG(i.cur_op, 2,i).u16].i64; - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_getarg_n(INTER i){ - GET_REG(i.cur_op, 0,i).n64 = i.tc->cur_frame->args[GET_REG(i.cur_op, 2,i).u16].n64; - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_getarg_s(INTER i){ - GET_REG(i.cur_op, 0,i).s = i.tc->cur_frame->args[GET_REG(i.cur_op, 2,i).u16].s; - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_getarg_o(INTER i){ - GET_REG(i.cur_op, 0,i).o = i.tc->cur_frame->args[GET_REG(i.cur_op, 2,i).u16].o; - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_coerce_II(INTER i){ - MVMObject * const type = GET_REG(i.cur_op, 4,i).o; - GET_REG(i.cur_op, 0,i).o = MVM_bigint_from_bigint(i.tc, type, GET_REG(i.cur_op, 2,i).o); - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_encoderepconf(INTER i){ - GET_REG(i.cur_op, 8,i).o = MVM_string_encode_to_buf_config(i.tc, GET_REG(i.cur_op, 2,i).s, - GET_REG(i.cur_op, 4,i).s, GET_REG(i.cur_op, 8,i).o, GET_REG(i.cur_op, 6,i).s, GET_REG(i.cur_op, 10,i).i64); - i.cur_op += 12; - goto cbc_next(i); -} -__code cbc_encodeconf(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_string_encode_to_buf_config(i.tc, GET_REG(i.cur_op, 2,i).s, - GET_REG(i.cur_op, 4,i).s, GET_REG(i.cur_op, 6,i).o, NULL, GET_REG(i.cur_op, 8,i).i64); - i.cur_op += 10; - goto cbc_next(i); -} -__code cbc_decodeconf(INTER i){ - GET_REG(i.cur_op, 0,i).s = MVM_string_decode_from_buf_config(i.tc, - GET_REG(i.cur_op, 2,i).o, GET_REG(i.cur_op, 4,i).s, NULL, GET_REG(i.cur_op, 6,i).i64); - i.cur_op += 8; - goto cbc_next(i); -} -__code cbc_decoderepconf(INTER i){ - GET_REG(i.cur_op, 0,i).s = MVM_string_decode_from_buf_config(i.tc, - GET_REG(i.cur_op, 2,i).o, GET_REG(i.cur_op, 4,i).s, GET_REG(i.cur_op, 6,i).s, GET_REG(i.cur_op, 8,i).i64); - i.cur_op += 10; - goto cbc_next(i); -} -__code cbc_getppid(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_proc_getppid(i.tc); - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_getsignals(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_io_get_signals(i.tc); - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_sp_guard(INTER i){ - MVMObject *check = GET_REG(i.cur_op, 0,i).o; - MVMSTable *want = (MVMSTable *)i.tc->cur_frame - ->effective_spesh_slots[GET_UI16(i.cur_op, 2)]; - i.cur_op += 8; +__code cbc_nativeinvoke_v(INTERP i){ + i->tc->cur_frame->return_value = NULL; + i->tc->cur_frame->return_type = MVM_RETURN_VOID; + MVM_nativecall_invoke_jit(i->tc, GET_REG(i->cur_op, 2,i).o); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_nativeinvoke_i(INTERP i){ + i->tc->cur_frame->return_value = &GET_REG(i->cur_op, 0,i); + i->tc->cur_frame->return_type = MVM_RETURN_INT; + MVM_nativecall_invoke_jit(i->tc, GET_REG(i->cur_op, 2,i).o); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_nativeinvoke_n(INTERP i){ + i->tc->cur_frame->return_value = &GET_REG(i->cur_op, 0,i); + i->tc->cur_frame->return_type = MVM_RETURN_NUM; + MVM_nativecall_invoke_jit(i->tc, GET_REG(i->cur_op, 2,i).o); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_nativeinvoke_s(INTERP i){ + i->tc->cur_frame->return_value = &GET_REG(i->cur_op, 0,i); + i->tc->cur_frame->return_type = MVM_RETURN_STR; + MVM_nativecall_invoke_jit(i->tc, GET_REG(i->cur_op, 2,i).o); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_nativeinvoke_o(INTERP i){ + i->tc->cur_frame->return_value = &GET_REG(i->cur_op, 0,i); + i->tc->cur_frame->return_type = MVM_RETURN_OBJ; + MVM_nativecall_invoke_jit(i->tc, GET_REG(i->cur_op, 2,i).o); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_getarg_i(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = i->tc->cur_frame->args[GET_REG(i->cur_op, 2,i).u16].i64; + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_getarg_n(INTERP i){ + GET_REG(i->cur_op, 0,i).n64 = i->tc->cur_frame->args[GET_REG(i->cur_op, 2,i).u16].n64; + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_getarg_s(INTERP i){ + GET_REG(i->cur_op, 0,i).s = i->tc->cur_frame->args[GET_REG(i->cur_op, 2,i).u16].s; + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_getarg_o(INTERP i){ + GET_REG(i->cur_op, 0,i).o = i->tc->cur_frame->args[GET_REG(i->cur_op, 2,i).u16].o; + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_coerce_II(INTERP i){ + MVMObject * const type = GET_REG(i->cur_op, 4,i).o; + GET_REG(i->cur_op, 0,i).o = MVM_bigint_from_bigint(i->tc, type, GET_REG(i->cur_op, 2,i).o); + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_encoderepconf(INTERP i){ + GET_REG(i->cur_op, 8,i).o = MVM_string_encode_to_buf_config(i->tc, GET_REG(i->cur_op, 2,i).s, + GET_REG(i->cur_op, 4,i).s, GET_REG(i->cur_op, 8,i).o, GET_REG(i->cur_op, 6,i).s, GET_REG(i->cur_op, 10,i).i64); + i->cur_op += 12; + goto cbc_next(i); +} +__code cbc_encodeconf(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_string_encode_to_buf_config(i->tc, GET_REG(i->cur_op, 2,i).s, + GET_REG(i->cur_op, 4,i).s, GET_REG(i->cur_op, 6,i).o, NULL, GET_REG(i->cur_op, 8,i).i64); + i->cur_op += 10; + goto cbc_next(i); +} +__code cbc_decodeconf(INTERP i){ + GET_REG(i->cur_op, 0,i).s = MVM_string_decode_from_buf_config(i->tc, + GET_REG(i->cur_op, 2,i).o, GET_REG(i->cur_op, 4,i).s, NULL, GET_REG(i->cur_op, 6,i).i64); + i->cur_op += 8; + goto cbc_next(i); +} +__code cbc_decoderepconf(INTERP i){ + GET_REG(i->cur_op, 0,i).s = MVM_string_decode_from_buf_config(i->tc, + GET_REG(i->cur_op, 2,i).o, GET_REG(i->cur_op, 4,i).s, GET_REG(i->cur_op, 6,i).s, GET_REG(i->cur_op, 8,i).i64); + i->cur_op += 10; + goto cbc_next(i); +} +__code cbc_getppid(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_proc_getppid(i->tc); + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_getsignals(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_io_get_signals(i->tc); + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_sp_guard(INTERP i){ + MVMObject *check = GET_REG(i->cur_op, 0,i).o; + MVMSTable *want = (MVMSTable *)i->tc->cur_frame + ->effective_spesh_slots[GET_UI16(i->cur_op, 2)]; + i->cur_op += 8; if (!check || STABLE(check) != want) - MVM_spesh_deopt_one(i.tc, GET_UI32(i.cur_op, -4)); - goto cbc_next(i); - } -__code cbc_sp_guardconc(INTER i){ - MVMObject *check = GET_REG(i.cur_op, 0,i).o; - MVMSTable *want = (MVMSTable *)i.tc->cur_frame - ->effective_spesh_slots[GET_UI16(i.cur_op, 2)]; - i.cur_op += 8; + MVM_spesh_deopt_one(i->tc, GET_UI32(i->cur_op, -4)); + goto cbc_next(i); + } +__code cbc_sp_guardconc(INTERP i){ + MVMObject *check = GET_REG(i->cur_op, 0,i).o; + MVMSTable *want = (MVMSTable *)i->tc->cur_frame + ->effective_spesh_slots[GET_UI16(i->cur_op, 2)]; + i->cur_op += 8; if (!check || !IS_CONCRETE(check) || STABLE(check) != want) - MVM_spesh_deopt_one(i.tc, GET_UI32(i.cur_op, -4)); - goto cbc_next(i); - } -__code cbc_sp_guardtype(INTER i){ - MVMObject *check = GET_REG(i.cur_op, 0,i).o; - MVMSTable *want = (MVMSTable *)i.tc->cur_frame - ->effective_spesh_slots[GET_UI16(i.cur_op, 2)]; - i.cur_op += 8; + MVM_spesh_deopt_one(i->tc, GET_UI32(i->cur_op, -4)); + goto cbc_next(i); + } +__code cbc_sp_guardtype(INTERP i){ + MVMObject *check = GET_REG(i->cur_op, 0,i).o; + MVMSTable *want = (MVMSTable *)i->tc->cur_frame + ->effective_spesh_slots[GET_UI16(i->cur_op, 2)]; + i->cur_op += 8; if (!check || IS_CONCRETE(check) || STABLE(check) != want) - MVM_spesh_deopt_one(i.tc, GET_UI32(i.cur_op, -4)); - goto cbc_next(i); - } -__code cbc_sp_guardsf(INTER i){ - MVMObject *check = GET_REG(i.cur_op, 0,i).o; - MVMStaticFrame *want = (MVMStaticFrame *)i.tc->cur_frame - ->effective_spesh_slots[GET_UI16(i.cur_op, 2)]; - i.cur_op += 8; + MVM_spesh_deopt_one(i->tc, GET_UI32(i->cur_op, -4)); + goto cbc_next(i); + } +__code cbc_sp_guardsf(INTERP i){ + MVMObject *check = GET_REG(i->cur_op, 0,i).o; + MVMStaticFrame *want = (MVMStaticFrame *)i->tc->cur_frame + ->effective_spesh_slots[GET_UI16(i->cur_op, 2)]; + i->cur_op += 8; if (REPR(check)->ID != MVM_REPR_ID_MVMCode || ((MVMCode *)check)->body.sf != want) - MVM_spesh_deopt_one(i.tc, GET_UI32(i.cur_op, -4)); - goto cbc_next(i); - } -__code cbc_sp_guardsfouter(INTER i){ - MVMObject *check = GET_REG(i.cur_op, 0,i).o; - MVMStaticFrame *want = (MVMStaticFrame *)i.tc->cur_frame - ->effective_spesh_slots[GET_UI16(i.cur_op, 2)]; - i.cur_op += 8; + MVM_spesh_deopt_one(i->tc, GET_UI32(i->cur_op, -4)); + goto cbc_next(i); + } +__code cbc_sp_guardsfouter(INTERP i){ + MVMObject *check = GET_REG(i->cur_op, 0,i).o; + MVMStaticFrame *want = (MVMStaticFrame *)i->tc->cur_frame + ->effective_spesh_slots[GET_UI16(i->cur_op, 2)]; + i->cur_op += 8; if (REPR(check)->ID != MVM_REPR_ID_MVMCode || ((MVMCode *)check)->body.sf != want || - ((MVMCode *)check)->body.outer != i.tc->cur_frame) - MVM_spesh_deopt_one(i.tc, GET_UI32(i.cur_op, -4)); - goto cbc_next(i); - } -__code cbc_sp_rebless(INTER i){ - if (!REPR(GET_REG(i.cur_op, 2,i).o)->change_type) { - MVM_exception_throw_adhoc(i.tc, "This REPR cannot change type"); + ((MVMCode *)check)->body.outer != i->tc->cur_frame) + MVM_spesh_deopt_one(i->tc, GET_UI32(i->cur_op, -4)); + goto cbc_next(i); + } +__code cbc_sp_rebless(INTERP i){ + if (!REPR(GET_REG(i->cur_op, 2,i).o)->change_type) { + MVM_exception_throw_adhoc(i->tc, "This REPR cannot change type"); } - REPR(GET_REG(i.cur_op, 2,i).o)->change_type(i.tc, GET_REG(i.cur_op, 2,i).o, GET_REG(i.cur_op, 4,i).o); - GET_REG(i.cur_op, 0,i).o = GET_REG(i.cur_op, 2,i).o; - MVM_SC_WB_OBJ(i.tc, GET_REG(i.cur_op, 0,i).o); - i.cur_op += 10; - MVM_spesh_deopt_all(i.tc); - MVM_spesh_deopt_one(i.tc, GET_UI32(i.cur_op, -4)); - goto cbc_next(i); -} -__code cbc_sp_resolvecode(INTER i){ - GET_REG(i.cur_op, 0,i).o = MVM_frame_resolve_invokee_spesh(i.tc, - GET_REG(i.cur_op, 2,i).o); - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_sp_decont(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; - MVMRegister *r = &GET_REG(i.cur_op, 0,i); - i.cur_op += 4; + REPR(GET_REG(i->cur_op, 2,i).o)->change_type(i->tc, GET_REG(i->cur_op, 2,i).o, GET_REG(i->cur_op, 4,i).o); + GET_REG(i->cur_op, 0,i).o = GET_REG(i->cur_op, 2,i).o; + MVM_SC_WB_OBJ(i->tc, GET_REG(i->cur_op, 0,i).o); + i->cur_op += 10; + MVM_spesh_deopt_all(i->tc); + MVM_spesh_deopt_one(i->tc, GET_UI32(i->cur_op, -4)); + goto cbc_next(i); +} +__code cbc_sp_resolvecode(INTERP i){ + GET_REG(i->cur_op, 0,i).o = MVM_frame_resolve_invokee_spesh(i->tc, + GET_REG(i->cur_op, 2,i).o); + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_sp_decont(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; + MVMRegister *r = &GET_REG(i->cur_op, 0,i); + i->cur_op += 4; if (obj && IS_CONCRETE(obj) && STABLE(obj)->container_spec) - STABLE(obj)->container_spec->fetch(i.tc, obj, r); + STABLE(obj)->container_spec->fetch(i->tc, obj, r); else r->o = obj; goto cbc_next(i); } -__code cbc_sp_getlex_o(INTER i){ - MVMFrame *f = i.tc->cur_frame; - MVMuint16 idx = GET_UI16(i.cur_op, 2); - MVMuint16 outers = GET_UI16(i.cur_op, 4); +__code cbc_sp_getlex_o(INTERP i){ + MVMFrame *f = i->tc->cur_frame; + MVMuint16 idx = GET_UI16(i->cur_op, 2); + MVMuint16 outers = GET_UI16(i->cur_op, 4); MVMRegister found; while (outers) { if (!f->outer) - MVM_exception_throw_adhoc(i.tc, "getlex: outer index out of range"); + MVM_exception_throw_adhoc(i->tc, "getlex: outer index out of range"); f = f->outer; outers--; } - found = GET_LEX(i.cur_op, 2, f,i); - GET_REG(i.cur_op, 0,i).o = found.o == NULL - ? MVM_frame_vivify_lexical(i.tc, f, idx) + found = GET_LEX(i->cur_op, 2, f,i); + GET_REG(i->cur_op, 0,i).o = found.o == NULL + ? MVM_frame_vivify_lexical(i->tc, f, idx) : found.o; - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_sp_getlex_ins(INTER i){ - MVMFrame *f = i.tc->cur_frame; - MVMuint16 idx = GET_UI16(i.cur_op, 2); - MVMuint16 outers = GET_UI16(i.cur_op, 4); + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_sp_getlex_ins(INTERP i){ + MVMFrame *f = i->tc->cur_frame; + MVMuint16 idx = GET_UI16(i->cur_op, 2); + MVMuint16 outers = GET_UI16(i->cur_op, 4); while (outers) { if (!f->outer) - MVM_exception_throw_adhoc(i.tc, "getlex: outer index out of range"); + MVM_exception_throw_adhoc(i->tc, "getlex: outer index out of range"); f = f->outer; outers--; } - GET_REG(i.cur_op, 0,i) = GET_LEX(i.cur_op, 2, f,i); - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_sp_getlex_no(INTER i){ - MVMRegister *found = MVM_frame_find_lexical_by_name(i.tc, - MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 2)), MVM_reg_obj); - GET_REG(i.cur_op, 0,i).o = found ? found->o : i.tc->instance->VMNull; - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_sp_getarg_o(INTER i){ - GET_REG(i.cur_op, 0,i).o = i.tc->cur_frame->params.args[GET_UI16(i.cur_op, 2)].o; - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_sp_getarg_i(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = i.tc->cur_frame->params.args[GET_UI16(i.cur_op, 2)].i64; - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_sp_getarg_n(INTER i){ - GET_REG(i.cur_op, 0,i).n64 = i.tc->cur_frame->params.args[GET_UI16(i.cur_op, 2)].n64; - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_sp_getarg_s(INTER i){ - GET_REG(i.cur_op, 0,i).s = i.tc->cur_frame->params.args[GET_UI16(i.cur_op, 2)].s; - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_sp_fastinvoke_v(INTER i){ - MVMCode *code = (MVMCode *)GET_REG(i.cur_op, 0,i).o; - MVMRegister *args = i.tc->cur_frame->args; - MVMint32 spesh_cand = GET_UI16(i.cur_op, 2); - i.tc->cur_frame->return_value = NULL; - i.tc->cur_frame->return_type = MVM_RETURN_VOID; - i.cur_op += 4; - i.tc->cur_frame->return_address = i.cur_op; - MVM_frame_invoke(i.tc, code->body.sf, i.cur_callsite, args, + GET_REG(i->cur_op, 0,i) = GET_LEX(i->cur_op, 2, f,i); + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_sp_getlex_no(INTERP i){ + MVMRegister *found = MVM_frame_find_lexical_by_name(i->tc, + MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 2)), MVM_reg_obj); + GET_REG(i->cur_op, 0,i).o = found ? found->o : i->tc->instance->VMNull; + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_sp_getarg_o(INTERP i){ + GET_REG(i->cur_op, 0,i).o = i->tc->cur_frame->params.args[GET_UI16(i->cur_op, 2)].o; + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_sp_getarg_i(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = i->tc->cur_frame->params.args[GET_UI16(i->cur_op, 2)].i64; + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_sp_getarg_n(INTERP i){ + GET_REG(i->cur_op, 0,i).n64 = i->tc->cur_frame->params.args[GET_UI16(i->cur_op, 2)].n64; + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_sp_getarg_s(INTERP i){ + GET_REG(i->cur_op, 0,i).s = i->tc->cur_frame->params.args[GET_UI16(i->cur_op, 2)].s; + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_sp_fastinvoke_v(INTERP i){ + MVMCode *code = (MVMCode *)GET_REG(i->cur_op, 0,i).o; + MVMRegister *args = i->tc->cur_frame->args; + MVMint32 spesh_cand = GET_UI16(i->cur_op, 2); + i->tc->cur_frame->return_value = NULL; + i->tc->cur_frame->return_type = MVM_RETURN_VOID; + i->cur_op += 4; + i->tc->cur_frame->return_address = i->cur_op; + MVM_frame_invoke(i->tc, code->body.sf, i->cur_callsite, args, code->body.outer, (MVMObject *)code, spesh_cand); goto cbc_next(i); } -__code cbc_sp_fastinvoke_i(INTER i){ - MVMCode *code = (MVMCode *)GET_REG(i.cur_op, 2,i).o; - MVMRegister *args = i.tc->cur_frame->args; - MVMint32 spesh_cand = GET_UI16(i.cur_op, 4); - i.tc->cur_frame->return_value = &GET_REG(i.cur_op, 0,i); - i.tc->cur_frame->return_type = MVM_RETURN_INT; - i.cur_op += 6; - i.tc->cur_frame->return_address = i.cur_op; - MVM_frame_invoke(i.tc, code->body.sf, i.cur_callsite, args, +__code cbc_sp_fastinvoke_i(INTERP i){ + MVMCode *code = (MVMCode *)GET_REG(i->cur_op, 2,i).o; + MVMRegister *args = i->tc->cur_frame->args; + MVMint32 spesh_cand = GET_UI16(i->cur_op, 4); + i->tc->cur_frame->return_value = &GET_REG(i->cur_op, 0,i); + i->tc->cur_frame->return_type = MVM_RETURN_INT; + i->cur_op += 6; + i->tc->cur_frame->return_address = i->cur_op; + MVM_frame_invoke(i->tc, code->body.sf, i->cur_callsite, args, code->body.outer, (MVMObject *)code, spesh_cand); goto cbc_next(i); } -__code cbc_sp_fastinvoke_n(INTER i){ - MVMCode *code = (MVMCode *)GET_REG(i.cur_op, 2,i).o; - MVMRegister *args = i.tc->cur_frame->args; - MVMint32 spesh_cand = GET_UI16(i.cur_op, 4); - i.tc->cur_frame->return_value = &GET_REG(i.cur_op, 0,i); - i.tc->cur_frame->return_type = MVM_RETURN_NUM; - i.cur_op += 6; - i.tc->cur_frame->return_address = i.cur_op; - MVM_frame_invoke(i.tc, code->body.sf, i.cur_callsite, args, +__code cbc_sp_fastinvoke_n(INTERP i){ + MVMCode *code = (MVMCode *)GET_REG(i->cur_op, 2,i).o; + MVMRegister *args = i->tc->cur_frame->args; + MVMint32 spesh_cand = GET_UI16(i->cur_op, 4); + i->tc->cur_frame->return_value = &GET_REG(i->cur_op, 0,i); + i->tc->cur_frame->return_type = MVM_RETURN_NUM; + i->cur_op += 6; + i->tc->cur_frame->return_address = i->cur_op; + MVM_frame_invoke(i->tc, code->body.sf, i->cur_callsite, args, code->body.outer, (MVMObject *)code, spesh_cand); goto cbc_next(i); } -__code cbc_sp_fastinvoke_s(INTER i){ - MVMCode *code = (MVMCode *)GET_REG(i.cur_op, 2,i).o; - MVMRegister *args = i.tc->cur_frame->args; - MVMint32 spesh_cand = GET_UI16(i.cur_op, 4); - i.tc->cur_frame->return_value = &GET_REG(i.cur_op, 0,i); - i.tc->cur_frame->return_type = MVM_RETURN_STR; - i.cur_op += 6; - i.tc->cur_frame->return_address = i.cur_op; - MVM_frame_invoke(i.tc, code->body.sf, i.cur_callsite, args, +__code cbc_sp_fastinvoke_s(INTERP i){ + MVMCode *code = (MVMCode *)GET_REG(i->cur_op, 2,i).o; + MVMRegister *args = i->tc->cur_frame->args; + MVMint32 spesh_cand = GET_UI16(i->cur_op, 4); + i->tc->cur_frame->return_value = &GET_REG(i->cur_op, 0,i); + i->tc->cur_frame->return_type = MVM_RETURN_STR; + i->cur_op += 6; + i->tc->cur_frame->return_address = i->cur_op; + MVM_frame_invoke(i->tc, code->body.sf, i->cur_callsite, args, code->body.outer, (MVMObject *)code, spesh_cand); goto cbc_next(i); } -__code cbc_sp_fastinvoke_o(INTER i){ - MVMCode *code = (MVMCode *)GET_REG(i.cur_op, 2,i).o; - MVMRegister *args = i.tc->cur_frame->args; - MVMint32 spesh_cand = GET_UI16(i.cur_op, 4); - i.tc->cur_frame->return_value = &GET_REG(i.cur_op, 0,i); - i.tc->cur_frame->return_type = MVM_RETURN_OBJ; - i.cur_op += 6; - i.tc->cur_frame->return_address = i.cur_op; - MVM_frame_invoke(i.tc, code->body.sf, i.cur_callsite, args, +__code cbc_sp_fastinvoke_o(INTERP i){ + MVMCode *code = (MVMCode *)GET_REG(i->cur_op, 2,i).o; + MVMRegister *args = i->tc->cur_frame->args; + MVMint32 spesh_cand = GET_UI16(i->cur_op, 4); + i->tc->cur_frame->return_value = &GET_REG(i->cur_op, 0,i); + i->tc->cur_frame->return_type = MVM_RETURN_OBJ; + i->cur_op += 6; + i->tc->cur_frame->return_address = i->cur_op; + MVM_frame_invoke(i->tc, code->body.sf, i->cur_callsite, args, code->body.outer, (MVMObject *)code, spesh_cand); goto cbc_next(i); } -__code cbc_sp_paramnamesused(INTER i){ - MVM_args_throw_named_unused_error(i.tc, (MVMString *)i.tc->cur_frame - ->effective_spesh_slots[GET_UI16(i.cur_op, 0)]); - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_sp_getspeshslot(INTER i){ - GET_REG(i.cur_op, 0,i).o = (MVMObject *)i.tc->cur_frame - ->effective_spesh_slots[GET_UI16(i.cur_op, 2)]; - i.cur_op += 4; - goto cbc_next(i); -} -__code cbc_sp_findmeth(INTER i){ +__code cbc_sp_paramnamesused(INTERP i){ + MVM_args_throw_named_unused_error(i->tc, (MVMString *)i->tc->cur_frame + ->effective_spesh_slots[GET_UI16(i->cur_op, 0)]); + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_sp_getspeshslot(INTERP i){ + GET_REG(i->cur_op, 0,i).o = (MVMObject *)i->tc->cur_frame + ->effective_spesh_slots[GET_UI16(i->cur_op, 2)]; + i->cur_op += 4; + goto cbc_next(i); +} +__code cbc_sp_findmeth(INTERP i){ /* Obtain object and cache index; see if we get a mai->tch. */ - MVMObject *obj = GET_REG(i.cur_op, 2,i).o; - MVMuint16 idx = GET_UI16(i.cur_op, 8); - if ((MVMSTable *)i.tc->cur_frame->effective_spesh_slots[idx] == STABLE(obj)) { - GET_REG(i.cur_op, 0,i).o = (MVMObject *)i.tc->cur_frame->effective_spesh_slots[idx + 1]; - i.cur_op += 10; + MVMObject *obj = GET_REG(i->cur_op, 2,i).o; + MVMuint16 idx = GET_UI16(i->cur_op, 8); + if ((MVMSTable *)i->tc->cur_frame->effective_spesh_slots[idx] == STABLE(obj)) { + GET_REG(i->cur_op, 0,i).o = (MVMObject *)i->tc->cur_frame->effective_spesh_slots[idx + 1]; + i->cur_op += 10; } else { /* May invoke, so pre-increment op counter */ - MVMString *name = MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 4)); - MVMRegister *res = &GET_REG(i.cur_op, 0,i); - i.cur_op += 10; - MVM_6model_find_method_spesh(i.tc, obj, name, idx, res); + MVMString *name = MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 4)); + MVMRegister *res = &GET_REG(i->cur_op, 0,i); + i->cur_op += 10; + MVM_6model_find_method_spesh(i->tc, obj, name, idx, res); } goto cbc_next(i); } -__code cbc_sp_fastcreate(INTER i){ +__code cbc_sp_fastcreate(INTERP i){ /* Assume we're in normal code, so doing a nursery allocation. * Also, that there is no initialize. */ - MVMuint16 size = GET_UI16(i.cur_op, 2); - MVMObject *obj = MVM_gc_allocate_zeroed(i.tc, size); - obj->st = (MVMSTable *)i.tc->cur_frame->effective_spesh_slots[GET_UI16(i.cur_op, 4)]; + MVMuint16 size = GET_UI16(i->cur_op, 2); + MVMObject *obj = MVM_gc_allocate_zeroed(i->tc, size); + obj->st = (MVMSTable *)i->tc->cur_frame->effective_spesh_slots[GET_UI16(i->cur_op, 4)]; obj->header.size = size; - obj->header.owner = i.tc->thread_id; - GET_REG(i.cur_op, 0,i).o = obj; - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_sp_get_o(INTER i){ - MVMObject *val = ((MVMObject *)((char *)GET_REG(i.cur_op, 2,i).o + GET_UI16(i.cur_op, 4))); - GET_REG(i.cur_op, 0,i).o = val ? val : i.tc->instance->VMNull; - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_sp_get_i64(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = *((MVMint64 *)((char *)GET_REG(i.cur_op, 2,i).o + GET_UI16(i.cur_op, 4))); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_sp_get_i32(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = *((MVMint32 *)((char *)GET_REG(i.cur_op, 2,i).o + GET_UI16(i.cur_op, 4))); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_sp_get_i16(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = *((MVMint16 *)((char *)GET_REG(i.cur_op, 2,i).o + GET_UI16(i.cur_op, 4))); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_sp_get_i8(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = *((MVMint8 *)((char *)GET_REG(i.cur_op, 2,i).o + GET_UI16(i.cur_op, 4))); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_sp_get_n(INTER i){ - GET_REG(i.cur_op, 0,i).n64 = *((MVMnum64 *)((char *)GET_REG(i.cur_op, 2,i).o + GET_UI16(i.cur_op, 4))); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_sp_get_s(INTER i){ - GET_REG(i.cur_op, 0,i).s = ((MVMString *)((char *)GET_REG(i.cur_op, 2,i).o + GET_UI16(i.cur_op, 4))); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_sp_bind_o(INTER i){ - MVMObject *o = GET_REG(i.cur_op, 0,i).o; - MVMObject *value = GET_REG(i.cur_op, 4,i).o; - MVM_ASSIGN_REF(i.tc, &(o->header), *((MVMObject **)((char *)o + GET_UI16(i.cur_op, 2))), value); - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_sp_bind_i64(INTER i){ - MVMObject *o = GET_REG(i.cur_op, 0,i).o; - *((MVMint64 *)((char *)o + GET_UI16(i.cur_op, 2))) = GET_REG(i.cur_op, 4,i).i64; - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_sp_bind_i32(INTER i){ - MVMObject *o = GET_REG(i.cur_op, 0,i).o; - *((MVMint32 *)((char *)o + GET_UI16(i.cur_op, 2))) = GET_REG(i.cur_op, 4,i).i64; - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_sp_bind_i16(INTER i){ - MVMObject *o = GET_REG(i.cur_op, 0,i).o; - *((MVMint16 *)((char *)o + GET_UI16(i.cur_op, 2))) = GET_REG(i.cur_op, 4,i).i64; - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_sp_bind_i8(INTER i){ - MVMObject *o = GET_REG(i.cur_op, 0,i).o; - *((MVMint8 *)((char *)o + GET_UI16(i.cur_op, 2))) = GET_REG(i.cur_op, 4,i).i64; - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_sp_bind_n(INTER i){ - MVMObject *o = GET_REG(i.cur_op, 0,i).o; - *((MVMnum64 *)((char *)o + GET_UI16(i.cur_op, 2))) = GET_REG(i.cur_op, 4,i).n64; - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_sp_bind_s(INTER i){ - MVMObject *o = GET_REG(i.cur_op, 0,i).o; - MVMString *value = GET_REG(i.cur_op, 4,i).s; - MVM_ASSIGN_REF(i.tc, &(o->header), *((MVMObject **)((char *)o + GET_UI16(i.cur_op, 2))), value); - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_sp_p6oget_o(INTER i){ - MVMObject *o = GET_REG(i.cur_op, 2,i).o; - MVMObject *val = MVM_p6opaque_read_object(i.tc, o, GET_UI16(i.cur_op, 4)); - GET_REG(i.cur_op, 0,i).o = val ? val : i.tc->instance->VMNull; - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_sp_p6ogetvt_o(INTER i){ - MVMObject *o = GET_REG(i.cur_op, 2,i).o; - char *data = MVM_p6opaque_real_data(i.tc, OBJECT_BODY(o)); - MVMObject *val = *((MVMObject **)(data + GET_UI16(i.cur_op, 4))); + obj->header.owner = i->tc->thread_id; + GET_REG(i->cur_op, 0,i).o = obj; + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_sp_get_o(INTERP i){ + MVMObject *val = ((MVMObject *)((char *)GET_REG(i->cur_op, 2,i).o + GET_UI16(i->cur_op, 4))); + GET_REG(i->cur_op, 0,i).o = val ? val : i->tc->instance->VMNull; + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_sp_get_i64(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = *((MVMint64 *)((char *)GET_REG(i->cur_op, 2,i).o + GET_UI16(i->cur_op, 4))); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_sp_get_i32(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = *((MVMint32 *)((char *)GET_REG(i->cur_op, 2,i).o + GET_UI16(i->cur_op, 4))); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_sp_get_i16(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = *((MVMint16 *)((char *)GET_REG(i->cur_op, 2,i).o + GET_UI16(i->cur_op, 4))); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_sp_get_i8(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = *((MVMint8 *)((char *)GET_REG(i->cur_op, 2,i).o + GET_UI16(i->cur_op, 4))); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_sp_get_n(INTERP i){ + GET_REG(i->cur_op, 0,i).n64 = *((MVMnum64 *)((char *)GET_REG(i->cur_op, 2,i).o + GET_UI16(i->cur_op, 4))); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_sp_get_s(INTERP i){ + GET_REG(i->cur_op, 0,i).s = ((MVMString *)((char *)GET_REG(i->cur_op, 2,i).o + GET_UI16(i->cur_op, 4))); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_sp_bind_o(INTERP i){ + MVMObject *o = GET_REG(i->cur_op, 0,i).o; + MVMObject *value = GET_REG(i->cur_op, 4,i).o; + MVM_ASSIGN_REF(i->tc, &(o->header), *((MVMObject **)((char *)o + GET_UI16(i->cur_op, 2))), value); + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_sp_bind_i64(INTERP i){ + MVMObject *o = GET_REG(i->cur_op, 0,i).o; + *((MVMint64 *)((char *)o + GET_UI16(i->cur_op, 2))) = GET_REG(i->cur_op, 4,i).i64; + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_sp_bind_i32(INTERP i){ + MVMObject *o = GET_REG(i->cur_op, 0,i).o; + *((MVMint32 *)((char *)o + GET_UI16(i->cur_op, 2))) = GET_REG(i->cur_op, 4,i).i64; + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_sp_bind_i16(INTERP i){ + MVMObject *o = GET_REG(i->cur_op, 0,i).o; + *((MVMint16 *)((char *)o + GET_UI16(i->cur_op, 2))) = GET_REG(i->cur_op, 4,i).i64; + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_sp_bind_i8(INTERP i){ + MVMObject *o = GET_REG(i->cur_op, 0,i).o; + *((MVMint8 *)((char *)o + GET_UI16(i->cur_op, 2))) = GET_REG(i->cur_op, 4,i).i64; + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_sp_bind_n(INTERP i){ + MVMObject *o = GET_REG(i->cur_op, 0,i).o; + *((MVMnum64 *)((char *)o + GET_UI16(i->cur_op, 2))) = GET_REG(i->cur_op, 4,i).n64; + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_sp_bind_s(INTERP i){ + MVMObject *o = GET_REG(i->cur_op, 0,i).o; + MVMString *value = GET_REG(i->cur_op, 4,i).s; + MVM_ASSIGN_REF(i->tc, &(o->header), *((MVMObject **)((char *)o + GET_UI16(i->cur_op, 2))), value); + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_sp_p6oget_o(INTERP i){ + MVMObject *o = GET_REG(i->cur_op, 2,i).o; + MVMObject *val = MVM_p6opaque_read_object(i->tc, o, GET_UI16(i->cur_op, 4)); + GET_REG(i->cur_op, 0,i).o = val ? val : i->tc->instance->VMNull; + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_sp_p6ogetvt_o(INTERP i){ + MVMObject *o = GET_REG(i->cur_op, 2,i).o; + char *data = MVM_p6opaque_real_data(i->tc, OBJECT_BODY(o)); + MVMObject *val = *((MVMObject **)(data + GET_UI16(i->cur_op, 4))); if (!val) { - val = (MVMObject *)i.tc->cur_frame->effective_spesh_slots[GET_UI16(i.cur_op, 6)]; - MVM_ASSIGN_REF(i.tc, &(o->header), *((MVMObject **)(data + GET_UI16(i.cur_op, 4))), val); + val = (MVMObject *)i->tc->cur_frame->effective_spesh_slots[GET_UI16(i->cur_op, 6)]; + MVM_ASSIGN_REF(i->tc, &(o->header), *((MVMObject **)(data + GET_UI16(i->cur_op, 4))), val); } - GET_REG(i.cur_op, 0,i).o = val; - i.cur_op += 8; - goto cbc_next(i); - } -__code cbc_sp_p6ogetvc_o(INTER i){ - MVMObject *o = GET_REG(i.cur_op, 2,i).o; - char *data = MVM_p6opaque_real_data(i.tc, OBJECT_BODY(o)); - MVMObject *val = *((MVMObject **)(data + GET_UI16(i.cur_op, 4))); + GET_REG(i->cur_op, 0,i).o = val; + i->cur_op += 8; + goto cbc_next(i); + } +__code cbc_sp_p6ogetvc_o(INTERP i){ + MVMObject *o = GET_REG(i->cur_op, 2,i).o; + char *data = MVM_p6opaque_real_data(i->tc, OBJECT_BODY(o)); + MVMObject *val = *((MVMObject **)(data + GET_UI16(i->cur_op, 4))); if (!val) { /* Clone might allocate, so re-fei->tch things after it. */ - val = MVM_repr_clone(i.tc, (MVMObject *)i.tc->cur_frame->effective_spesh_slots[GET_UI16(i.cur_op, 6)]); - o = GET_REG(i.cur_op, 2,i).o; - data = MVM_p6opaque_real_data(i.tc, OBJECT_BODY(o)); - MVM_ASSIGN_REF(i.tc, &(o->header), *((MVMObject **)(data + GET_UI16(i.cur_op, 4))), val); + val = MVM_repr_clone(i->tc, (MVMObject *)i->tc->cur_frame->effective_spesh_slots[GET_UI16(i->cur_op, 6)]); + o = GET_REG(i->cur_op, 2,i).o; + data = MVM_p6opaque_real_data(i->tc, OBJECT_BODY(o)); + MVM_ASSIGN_REF(i->tc, &(o->header), *((MVMObject **)(data + GET_UI16(i->cur_op, 4))), val); } - GET_REG(i.cur_op, 0,i).o = val; - i.cur_op += 8; - goto cbc_next(i); - } -__code cbc_sp_p6oget_i(INTER i){ - MVMObject *o = GET_REG(i.cur_op, 2,i).o; - char *data = MVM_p6opaque_real_data(i.tc, OBJECT_BODY(o)); - GET_REG(i.cur_op, 0,i).i64 = *((MVMint64 *)(data + GET_UI16(i.cur_op, 4))); - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_sp_p6oget_n(INTER i){ - MVMObject *o = GET_REG(i.cur_op, 2,i).o; - char *data = MVM_p6opaque_real_data(i.tc, OBJECT_BODY(o)); - GET_REG(i.cur_op, 0,i).n64 = *((MVMnum64 *)(data + GET_UI16(i.cur_op, 4))); - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_sp_p6oget_s(INTER i){ - MVMObject *o = GET_REG(i.cur_op, 2,i).o; - char *data = MVM_p6opaque_real_data(i.tc, OBJECT_BODY(o)); - GET_REG(i.cur_op, 0,i).s = *((MVMString **)(data + GET_UI16(i.cur_op, 4))); - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_sp_p6obind_o(INTER i){ - MVMObject *o = GET_REG(i.cur_op, 0,i).o; - MVMObject *value = GET_REG(i.cur_op, 4,i).o; - char *data = MVM_p6opaque_real_data(i.tc, OBJECT_BODY(o)); - MVM_ASSIGN_REF(i.tc, &(o->header), *((MVMObject **)(data + GET_UI16(i.cur_op, 2))), value); - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_sp_p6obind_i(INTER i){ - MVMObject *o = GET_REG(i.cur_op, 0,i).o; - char *data = MVM_p6opaque_real_data(i.tc, OBJECT_BODY(o)); - *((MVMint64 *)(data + GET_UI16(i.cur_op, 2))) = GET_REG(i.cur_op, 4,i).i64; - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_sp_p6obind_n(INTER i){ - MVMObject *o = GET_REG(i.cur_op, 0,i).o; - char *data = MVM_p6opaque_real_data(i.tc, OBJECT_BODY(o)); - *((MVMnum64 *)(data + GET_UI16(i.cur_op, 2))) = GET_REG(i.cur_op, 4,i).n64; - i.cur_op += 6; - goto cbc_next(i); - } -__code cbc_sp_p6obind_s(INTER i){ - MVMObject *o = GET_REG(i.cur_op, 0,i).o; - char *data = MVM_p6opaque_real_data(i.tc, OBJECT_BODY(o)); - MVM_ASSIGN_REF(i.tc, &(o->header), *((MVMString **)(data + GET_UI16(i.cur_op, 2))), - GET_REG(i.cur_op, 4,i).s); - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_sp_deref_get_i64(INTER i){ - MVMObject *o = GET_REG(i.cur_op, 2,i).o; - MVMint64 **target = ((MVMint64 **)((char *)o + GET_UI16(i.cur_op, 4))); - GET_REG(i.cur_op, 0,i).i64 = **target; - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_sp_deref_get_n(INTER i){ - MVMObject *o = GET_REG(i.cur_op, 2,i).o; - MVMnum64 **target = ((MVMnum64 **)((char *)o + GET_UI16(i.cur_op, 4))); - GET_REG(i.cur_op, 0,i).n64 = **target; - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_sp_deref_bind_i64(INTER i){ - MVMObject *o = GET_REG(i.cur_op, 0,i).o; - MVMint64 **target = ((MVMint64 **)((char *)o + GET_UI16(i.cur_op, 4))); - **target = GET_REG(i.cur_op, 2,i).i64; - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_sp_deref_bind_n(INTER i){ - MVMObject *o = GET_REG(i.cur_op, 0,i).o; - MVMnum64 **target = ((MVMnum64 **)((char *)o + GET_UI16(i.cur_op, 4))); - **target = GET_REG(i.cur_op, 2,i).n64; - i.cur_op += 6; - goto cbc_next(i); -} -__code cbc_sp_getlexvia_o(INTER i){ - MVMFrame *f = ((MVMCode *)GET_REG(i.cur_op, 6,i).o)->body.outer; - MVMuint16 idx = GET_UI16(i.cur_op, 2); - MVMuint16 outers = GET_UI16(i.cur_op, 4) - 1; /* - 1 as already in outer */ + GET_REG(i->cur_op, 0,i).o = val; + i->cur_op += 8; + goto cbc_next(i); + } +__code cbc_sp_p6oget_i(INTERP i){ + MVMObject *o = GET_REG(i->cur_op, 2,i).o; + char *data = MVM_p6opaque_real_data(i->tc, OBJECT_BODY(o)); + GET_REG(i->cur_op, 0,i).i64 = *((MVMint64 *)(data + GET_UI16(i->cur_op, 4))); + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_sp_p6oget_n(INTERP i){ + MVMObject *o = GET_REG(i->cur_op, 2,i).o; + char *data = MVM_p6opaque_real_data(i->tc, OBJECT_BODY(o)); + GET_REG(i->cur_op, 0,i).n64 = *((MVMnum64 *)(data + GET_UI16(i->cur_op, 4))); + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_sp_p6oget_s(INTERP i){ + MVMObject *o = GET_REG(i->cur_op, 2,i).o; + char *data = MVM_p6opaque_real_data(i->tc, OBJECT_BODY(o)); + GET_REG(i->cur_op, 0,i).s = *((MVMString **)(data + GET_UI16(i->cur_op, 4))); + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_sp_p6obind_o(INTERP i){ + MVMObject *o = GET_REG(i->cur_op, 0,i).o; + MVMObject *value = GET_REG(i->cur_op, 4,i).o; + char *data = MVM_p6opaque_real_data(i->tc, OBJECT_BODY(o)); + MVM_ASSIGN_REF(i->tc, &(o->header), *((MVMObject **)(data + GET_UI16(i->cur_op, 2))), value); + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_sp_p6obind_i(INTERP i){ + MVMObject *o = GET_REG(i->cur_op, 0,i).o; + char *data = MVM_p6opaque_real_data(i->tc, OBJECT_BODY(o)); + *((MVMint64 *)(data + GET_UI16(i->cur_op, 2))) = GET_REG(i->cur_op, 4,i).i64; + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_sp_p6obind_n(INTERP i){ + MVMObject *o = GET_REG(i->cur_op, 0,i).o; + char *data = MVM_p6opaque_real_data(i->tc, OBJECT_BODY(o)); + *((MVMnum64 *)(data + GET_UI16(i->cur_op, 2))) = GET_REG(i->cur_op, 4,i).n64; + i->cur_op += 6; + goto cbc_next(i); + } +__code cbc_sp_p6obind_s(INTERP i){ + MVMObject *o = GET_REG(i->cur_op, 0,i).o; + char *data = MVM_p6opaque_real_data(i->tc, OBJECT_BODY(o)); + MVM_ASSIGN_REF(i->tc, &(o->header), *((MVMString **)(data + GET_UI16(i->cur_op, 2))), + GET_REG(i->cur_op, 4,i).s); + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_sp_deref_get_i64(INTERP i){ + MVMObject *o = GET_REG(i->cur_op, 2,i).o; + MVMint64 **target = ((MVMint64 **)((char *)o + GET_UI16(i->cur_op, 4))); + GET_REG(i->cur_op, 0,i).i64 = **target; + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_sp_deref_get_n(INTERP i){ + MVMObject *o = GET_REG(i->cur_op, 2,i).o; + MVMnum64 **target = ((MVMnum64 **)((char *)o + GET_UI16(i->cur_op, 4))); + GET_REG(i->cur_op, 0,i).n64 = **target; + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_sp_deref_bind_i64(INTERP i){ + MVMObject *o = GET_REG(i->cur_op, 0,i).o; + MVMint64 **target = ((MVMint64 **)((char *)o + GET_UI16(i->cur_op, 4))); + **target = GET_REG(i->cur_op, 2,i).i64; + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_sp_deref_bind_n(INTERP i){ + MVMObject *o = GET_REG(i->cur_op, 0,i).o; + MVMnum64 **target = ((MVMnum64 **)((char *)o + GET_UI16(i->cur_op, 4))); + **target = GET_REG(i->cur_op, 2,i).n64; + i->cur_op += 6; + goto cbc_next(i); +} +__code cbc_sp_getlexvia_o(INTERP i){ + MVMFrame *f = ((MVMCode *)GET_REG(i->cur_op, 6,i).o)->body.outer; + MVMuint16 idx = GET_UI16(i->cur_op, 2); + MVMuint16 outers = GET_UI16(i->cur_op, 4) - 1; /* - 1 as already in outer */ MVMRegister found; while (outers) { if (!f->outer) - MVM_exception_throw_adhoc(i.tc, "getlex: outer index out of range"); + MVM_exception_throw_adhoc(i->tc, "getlex: outer index out of range"); f = f->outer; outers--; } - found = GET_LEX(i.cur_op, 2, f,i); - GET_REG(i.cur_op, 0,i).o = found.o == NULL - ? MVM_frame_vivify_lexical(i.tc, f, idx) + found = GET_LEX(i->cur_op, 2, f,i); + GET_REG(i->cur_op, 0,i).o = found.o == NULL + ? MVM_frame_vivify_lexical(i->tc, f, idx) : found.o; - i.cur_op += 8; - goto cbc_next(i); -} -__code cbc_sp_getlexvia_ins(INTER i){ - MVMFrame *f = ((MVMCode *)GET_REG(i.cur_op, 6,i).o)->body.outer; - MVMuint16 idx = GET_UI16(i.cur_op, 2); - MVMuint16 outers = GET_UI16(i.cur_op, 4) - 1; /* - 1 as already in outer */ + i->cur_op += 8; + goto cbc_next(i); +} +__code cbc_sp_getlexvia_ins(INTERP i){ + MVMFrame *f = ((MVMCode *)GET_REG(i->cur_op, 6,i).o)->body.outer; + MVMuint16 idx = GET_UI16(i->cur_op, 2); + MVMuint16 outers = GET_UI16(i->cur_op, 4) - 1; /* - 1 as already in outer */ while (outers) { if (!f->outer) - MVM_exception_throw_adhoc(i.tc, "getlex: outer index out of range"); + MVM_exception_throw_adhoc(i->tc, "getlex: outer index out of range"); f = f->outer; outers--; } - GET_REG(i.cur_op, 0,i) = GET_LEX(i.cur_op, 2, f,i); - i.cur_op += 8; - goto cbc_next(i); -} -__code cbc_sp_getstringfrom(INTER i){ - MVMCompUnit *dep = (MVMCompUnit *)i.tc->cur_frame->effective_spesh_slots[GET_UI16(i.cur_op, 2)]; - MVMuint32 idx = GET_UI32(i.cur_op, 4); - GET_REG(i.cur_op, 0,i).s = MVM_cu_string(i.tc, dep, idx); - i.cur_op += 8; - goto cbc_next(i); - } -__code cbc_sp_getwvalfrom(INTER i){ - MVMSerializationContext *dep = (MVMSerializationContext *)i.tc->cur_frame->effective_spesh_slots[GET_UI16(i.cur_op, 2)]; - MVMuint64 idx = MVM_BC_get_I64(i.cur_op, 4); - GET_REG(i.cur_op, 0,i).o = MVM_sc_get_object(i.tc, dep, idx); - i.cur_op += 12; - goto cbc_next(i); - } -__code cbc_sp_jit_enter(INTER i){ - if (i.tc->cur_frame->spesh_cand->jitcode == NULL) { - MVM_exception_throw_adhoc(i.tc, "Try to enter NULL jitcode"); + GET_REG(i->cur_op, 0,i) = GET_LEX(i->cur_op, 2, f,i); + i->cur_op += 8; + goto cbc_next(i); +} +__code cbc_sp_getstringfrom(INTERP i){ + MVMCompUnit *dep = (MVMCompUnit *)i->tc->cur_frame->effective_spesh_slots[GET_UI16(i->cur_op, 2)]; + MVMuint32 idx = GET_UI32(i->cur_op, 4); + GET_REG(i->cur_op, 0,i).s = MVM_cu_string(i->tc, dep, idx); + i->cur_op += 8; + goto cbc_next(i); + } +__code cbc_sp_getwvalfrom(INTERP i){ + MVMSerializationContext *dep = (MVMSerializationContext *)i->tc->cur_frame->effective_spesh_slots[GET_UI16(i->cur_op, 2)]; + MVMuint64 idx = MVM_BC_get_I64(i->cur_op, 4); + GET_REG(i->cur_op, 0,i).o = MVM_sc_get_object(i->tc, dep, idx); + i->cur_op += 12; + goto cbc_next(i); + } +__code cbc_sp_jit_enter(INTERP i){ + if (i->tc->cur_frame->spesh_cand->jitcode == NULL) { + MVM_exception_throw_adhoc(i->tc, "Try to enter NULL jitcode"); } /* trampoline back to this opcode */ - i.cur_op -= 2; - MVM_jit_enter_code(i.tc,i.cu, i.tc->cur_frame->spesh_cand->jitcode); - if (!i.tc->cur_frame) { + i->cur_op -= 2; + MVM_jit_enter_code(i->tc,i->cu, i->tc->cur_frame->spesh_cand->jitcode); + if (!i->tc->cur_frame) { /* somehow unwound our top frame */ goto cbc_return_label(i); } goto cbc_next(i); } -__code cbc_sp_boolify_iter(INTER i){ - GET_REG(i.cur_op, 0,i).i64 = MVM_iter_istrue(i.tc, (MVMIter*)GET_REG(i.cur_op, 2,i).o); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_sp_boolify_iter_arr(INTER i){ - MVMIter *iter = (MVMIter *)GET_REG(i.cur_op, 2,i).o; +__code cbc_sp_boolify_iter(INTERP i){ + GET_REG(i->cur_op, 0,i).i64 = MVM_iter_istrue(i->tc, (MVMIter*)GET_REG(i->cur_op, 2,i).o); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_sp_boolify_iter_arr(INTERP i){ + MVMIter *iter = (MVMIter *)GET_REG(i->cur_op, 2,i).o; - GET_REG(i.cur_op, 0,i).i64 = iter->body.array_state.index + 1 < iter->body.array_state.limit ? 1 : 0; + GET_REG(i->cur_op, 0,i).i64 = iter->body.array_state.index + 1 < iter->body.array_state.limit ? 1 : 0; - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_sp_boolify_iter_hash(INTER i){ - MVMIter *iter = (MVMIter *)GET_REG(i.cur_op, 2,i).o; + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_sp_boolify_iter_hash(INTERP i){ + MVMIter *iter = (MVMIter *)GET_REG(i->cur_op, 2,i).o; - GET_REG(i.cur_op, 0,i).i64 = iter->body.hash_state.next != NULL ? 1 : 0; + GET_REG(i->cur_op, 0,i).i64 = iter->body.hash_state.next != NULL ? 1 : 0; - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_sp_cas_o(INTER i){ - MVMRegister *result = &GET_REG(i.cur_op, 0,i); - MVMObject *target = GET_REG(i.cur_op, 2,i).o; - MVMObject *expected = GET_REG(i.cur_op, 4,i).o; - MVMObject *value = GET_REG(i.cur_op, 6,i).o; - i.cur_op += 8; - target->st->container_spec->cas(i.tc, target, expected, value, result); - goto cbc_next(i); - } -__code cbc_sp_atomicload_o(INTER i){ - MVMObject *target = GET_REG(i.cur_op, 2,i).o; - GET_REG(i.cur_op, 0,i).o = target->st->container_spec->atomic_load(i.tc, target); - i.cur_op += 4; - goto cbc_next(i); - } -__code cbc_sp_atomicstore_o(INTER i){ - MVMObject *target = GET_REG(i.cur_op, 0,i).o; - MVMObject *value = GET_REG(i.cur_op, 2,i).o; - i.cur_op += 4; - target->st->container_spec->atomic_store(i.tc, target, value); - goto cbc_next(i); - } -__code cbc_prof_enter(INTER i){ - MVM_profile_log_enter(i.tc, i.tc->cur_frame->static_info, + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_sp_cas_o(INTERP i){ + MVMRegister *result = &GET_REG(i->cur_op, 0,i); + MVMObject *target = GET_REG(i->cur_op, 2,i).o; + MVMObject *expected = GET_REG(i->cur_op, 4,i).o; + MVMObject *value = GET_REG(i->cur_op, 6,i).o; + i->cur_op += 8; + target->st->container_spec->cas(i->tc, target, expected, value, result); + goto cbc_next(i); + } +__code cbc_sp_atomicload_o(INTERP i){ + MVMObject *target = GET_REG(i->cur_op, 2,i).o; + GET_REG(i->cur_op, 0,i).o = target->st->container_spec->atomic_load(i->tc, target); + i->cur_op += 4; + goto cbc_next(i); + } +__code cbc_sp_atomicstore_o(INTERP i){ + MVMObject *target = GET_REG(i->cur_op, 0,i).o; + MVMObject *value = GET_REG(i->cur_op, 2,i).o; + i->cur_op += 4; + target->st->container_spec->atomic_store(i->tc, target, value); + goto cbc_next(i); + } +__code cbc_prof_enter(INTERP i){ + MVM_profile_log_enter(i->tc, i->tc->cur_frame->static_info, MVM_PROFILE_ENTER_NORMAL); goto cbc_next(i); } -__code cbc_prof_enterspesh(INTER i){ - MVM_profile_log_enter(i.tc, i.tc->cur_frame->static_info, +__code cbc_prof_enterspesh(INTERP i){ + MVM_profile_log_enter(i->tc, i->tc->cur_frame->static_info, MVM_PROFILE_ENTER_SPESH); goto cbc_next(i); } -__code cbc_prof_enterinline(INTER i){ - MVM_profile_log_enter(i.tc, - (MVMStaticFrame *)i.tc->cur_frame->effective_spesh_slots[GET_UI16(i.cur_op, 0)], +__code cbc_prof_enterinline(INTERP i){ + MVM_profile_log_enter(i->tc, + (MVMStaticFrame *)i->tc->cur_frame->effective_spesh_slots[GET_UI16(i->cur_op, 0)], MVM_PROFILE_ENTER_SPESH_INLINE); - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_prof_enternative(INTER i){ - MVM_profile_log_enter_native(i.tc, GET_REG(i.cur_op, 0,i).o); - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_prof_exit(INTER i){ - MVM_profile_log_exit(i.tc); - goto cbc_next(i); -} -__code cbc_prof_allocated(INTER i){ - MVM_profile_log_allocated(i.tc, GET_REG(i.cur_op, 0,i).o); - i.cur_op += 2; - goto cbc_next(i); -} -__code cbc_ctw_check(INTER i){ - MVMObject *obj = GET_REG(i.cur_op, 0,i).o; - MVMint16 blame = GET_I16(i.cur_op, 2); - i.cur_op += 4; - MVM_cross_thread_write_check(i.tc, obj, blame); - goto cbc_next(i); - } -__code cbc_DEPRECATED_4(INTER i){ + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_prof_enternative(INTERP i){ + MVM_profile_log_enter_native(i->tc, GET_REG(i->cur_op, 0,i).o); + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_prof_exit(INTERP i){ + MVM_profile_log_exit(i->tc); + goto cbc_next(i); +} +__code cbc_prof_allocated(INTERP i){ + MVM_profile_log_allocated(i->tc, GET_REG(i->cur_op, 0,i).o); + i->cur_op += 2; + goto cbc_next(i); +} +__code cbc_ctw_check(INTERP i){ + MVMObject *obj = GET_REG(i->cur_op, 0,i).o; + MVMint16 blame = GET_I16(i->cur_op, 2); + i->cur_op += 4; + MVM_cross_thread_write_check(i->tc, obj, blame); + goto cbc_next(i); + } +__code cbc_DEPRECATED_4(INTERP i){ goto cbc_DEPRECATED_5(i); } -__code cbc_DEPRECATED_5(INTER i){ +__code cbc_DEPRECATED_5(INTERP i){ goto cbc_DEPRECATED_6(i); } -__code cbc_DEPRECATED_6(INTER i){ +__code cbc_DEPRECATED_6(INTERP i){ goto cbc_DEPRECATED_7(i); } -__code cbc_DEPRECATED_7(INTER i){ +__code cbc_DEPRECATED_7(INTERP i){ goto cbc_DEPRECATED_8(i); } -__code cbc_DEPRECATED_8(INTER i){ +__code cbc_DEPRECATED_8(INTERP i){ goto cbc_DEPRECATED_9(i); } -__code cbc_DEPRECATED_9(INTER i){ +__code cbc_DEPRECATED_9(INTERP i){ goto cbc_DEPRECATED_10(i); } -__code cbc_DEPRECATED_10(INTER i){ +__code cbc_DEPRECATED_10(INTERP i){ goto cbc_DEPRECATED_11(i); } -__code cbc_DEPRECATED_11(INTER i){ +__code cbc_DEPRECATED_11(INTERP i){ goto cbc_DEPRECATED_12(i); } -__code cbc_DEPRECATED_12(INTER i){ - MVM_exception_throw_adhoc(i.tc, "The getregref_* ops were removed in MoarVM 2017.01."); - goto cbc_next(i); -} -__code cbc_DEPRECATED_13(INTER i){ - MVM_exception_throw_adhoc(i.tc, "The continuationclone op was removed in MoarVM 2017.01."); - goto cbc_next(i); -} -__code cbc_DEPRECATED_14(INTER i){ - MVM_exception_throw_adhoc(i.tc, "The asyncwritestr op was removed in MoarVM 2017.05."); - goto cbc_next(i); -} -__code cbc_DEPRECATED_15(INTER i){ - MVM_exception_throw_adhoc(i.tc, "The asyncwritestrto op was removed in MoarVM 2017.05."); - goto cbc_next(i); -} -__code cbc_DEPRECATED_16(INTER i){ - MVM_exception_throw_adhoc(i.tc, "The asyncreadchars op was removed in MoarVM 2017.05."); - goto cbc_next(i); -} -__code cbc_DEPRECATED_17(INTER i){ - MVM_exception_throw_adhoc(i.tc, "The setencoding op was removed in MoarVM 2017.06."); - goto cbc_next(i); -} -__code cbc_DEPRECATED_18(INTER i){ - MVM_exception_throw_adhoc(i.tc, "The write_fhs op was removed in MoarVM 2017.06."); - goto cbc_next(i); -} -__code cbc_DEPRECATED_19(INTER i){ - MVM_exception_throw_adhoc(i.tc, "The say_fhs op was removed in MoarVM 2017.06."); - goto cbc_next(i); -} -__code cbc_DEPRECATED_21(INTER i){ - MVM_exception_throw_adhoc(i.tc, "The readlinechomp_fh op was removed in MoarVM 2017.06."); - goto cbc_next(i); -} -__code cbc_DEPRECATED_22(INTER i){ - MVM_exception_throw_adhoc(i.tc, "The readall_fh op was removed in MoarVM 2017.06."); - goto cbc_next(i); -} -__code cbc_DEPRECATED_23(INTER i){ - MVM_exception_throw_adhoc(i.tc, "The read_fhs op was removed in MoarVM 2017.06."); - goto cbc_next(i); -} -__code cbc_DEPRECATED_24(INTER i){ - MVM_exception_throw_adhoc(i.tc, "The setinputlinesep op was removed in MoarVM 2017.06."); - goto cbc_next(i); -} -__code cbc_DEPRECATED_25(INTER i){ - MVM_exception_throw_adhoc(i.tc, "The setinputlineseps op was removed in MoarVM 2017.06."); - goto cbc_next(i); -} -__code cbc_DEPRECATED_27(INTER i){ - MVM_exception_throw_adhoc(i.tc, "The slurp op was removed in MoarVM 2017.06."); - goto cbc_next(i); -} -__code cbc_DEPRECATED_28(INTER i){ - MVM_exception_throw_adhoc(i.tc, "The spew op was removed in MoarVM 2017.06."); - goto cbc_next(i); -} -__code cbc_DEPRECATED_29(INTER i){ - MVM_exception_throw_adhoc(i.tc, "The spawn op was removed in MoarVM 2017.07."); - goto cbc_next(i); -} -__code cbc_DEPRECATED_30(INTER i){ - MVM_exception_throw_adhoc(i.tc, "The shell op was removed in MoarVM 2017.07."); - goto cbc_next(i); -} -__code cbc_DEPRECATED_31(INTER i){ - MVM_exception_throw_adhoc(i.tc, "The syncpipe op was removed in MoarVM 2017.07."); - goto cbc_next(i); -} -__code cbc_DEPRECATED_32(INTER i){ - MVM_exception_throw_adhoc(i.tc, "The close_fhi op was removed in MoarVM 2017.07."); - goto cbc_next(i); -} -__code cbc_DEPRECATED_33(INTER i){ - MVM_exception_throw_adhoc(i.tc, "The newlexotic op was removed in MoarVM 2017.08."); - goto cbc_next(i); -} -__code cbc_DEPRECATED_34(INTER i){ - MVM_exception_throw_adhoc(i.tc, "The lexoticresult op was removed in MoarVM 2017.08."); - goto cbc_next(i); -} -__code cbc_coverage_log(INTER i){ - MVMString *filename = MVM_cu_string(i.tc,i.cu, GET_UI32(i.cur_op, 0)); - MVMuint32 lineno = GET_UI32(i.cur_op, 4); - MVMuint32 cacheidx = GET_UI32(i.cur_op, 8); - char *cache = (char *)MVM_BC_get_I64(i.cur_op, 12); - MVM_line_coverage_report(i.tc, filename, lineno, cacheidx, cache); - i.cur_op += 20; - goto cbc_next(i); - } -__code cbc_breakpoint(INTER i){ - MVMuint32 file_idx = GET_UI32(i.cur_op, 0); - MVMuint32 line_no = GET_UI32(i.cur_op, 4); - MVM_debugserver_breakpoint_check(i.tc, file_idx, line_no); - i.cur_op += 8; - goto cbc_next(i); -} -__code cbc_coveragecontrol(INTER i){ - MVMuint32 cc = (MVMuint32)GET_REG(i.cur_op, 0,i).i64; - if (i.tc->instance->coverage_control && (cc == 0 || cc == 1)) - i.tc->instance->coverage_control = cc + 1; - i.cur_op += 2; +__code cbc_DEPRECATED_12(INTERP i){ + MVM_exception_throw_adhoc(i->tc, "The getregref_* ops were removed in MoarVM 2017.01."); + goto cbc_next(i); +} +__code cbc_DEPRECATED_13(INTERP i){ + MVM_exception_throw_adhoc(i->tc, "The continuationclone op was removed in MoarVM 2017.01."); + goto cbc_next(i); +} +__code cbc_DEPRECATED_14(INTERP i){ + MVM_exception_throw_adhoc(i->tc, "The asyncwritestr op was removed in MoarVM 2017.05."); + goto cbc_next(i); +} +__code cbc_DEPRECATED_15(INTERP i){ + MVM_exception_throw_adhoc(i->tc, "The asyncwritestrto op was removed in MoarVM 2017.05."); + goto cbc_next(i); +} +__code cbc_DEPRECATED_16(INTERP i){ + MVM_exception_throw_adhoc(i->tc, "The asyncreadchars op was removed in MoarVM 2017.05."); + goto cbc_next(i); +} +__code cbc_DEPRECATED_17(INTERP i){ + MVM_exception_throw_adhoc(i->tc, "The setencoding op was removed in MoarVM 2017.06."); + goto cbc_next(i); +} +__code cbc_DEPRECATED_18(INTERP i){ + MVM_exception_throw_adhoc(i->tc, "The write_fhs op was removed in MoarVM 2017.06."); + goto cbc_next(i); +} +__code cbc_DEPRECATED_19(INTERP i){ + MVM_exception_throw_adhoc(i->tc, "The say_fhs op was removed in MoarVM 2017.06."); + goto cbc_next(i); +} +__code cbc_DEPRECATED_21(INTERP i){ + MVM_exception_throw_adhoc(i->tc, "The readlinechomp_fh op was removed in MoarVM 2017.06."); + goto cbc_next(i); +} +__code cbc_DEPRECATED_22(INTERP i){ + MVM_exception_throw_adhoc(i->tc, "The readall_fh op was removed in MoarVM 2017.06."); + goto cbc_next(i); +} +__code cbc_DEPRECATED_23(INTERP i){ + MVM_exception_throw_adhoc(i->tc, "The read_fhs op was removed in MoarVM 2017.06."); + goto cbc_next(i); +} +__code cbc_DEPRECATED_24(INTERP i){ + MVM_exception_throw_adhoc(i->tc, "The setinputlinesep op was removed in MoarVM 2017.06."); + goto cbc_next(i); +} +__code cbc_DEPRECATED_25(INTERP i){ + MVM_exception_throw_adhoc(i->tc, "The setinputlineseps op was removed in MoarVM 2017.06."); + goto cbc_next(i); +} +__code cbc_DEPRECATED_27(INTERP i){ + MVM_exception_throw_adhoc(i->tc, "The slurp op was removed in MoarVM 2017.06."); + goto cbc_next(i); +} +__code cbc_DEPRECATED_28(INTERP i){ + MVM_exception_throw_adhoc(i->tc, "The spew op was removed in MoarVM 2017.06."); + goto cbc_next(i); +} +__code cbc_DEPRECATED_29(INTERP i){ + MVM_exception_throw_adhoc(i->tc, "The spawn op was removed in MoarVM 2017.07."); + goto cbc_next(i); +} +__code cbc_DEPRECATED_30(INTERP i){ + MVM_exception_throw_adhoc(i->tc, "The shell op was removed in MoarVM 2017.07."); + goto cbc_next(i); +} +__code cbc_DEPRECATED_31(INTERP i){ + MVM_exception_throw_adhoc(i->tc, "The syncpipe op was removed in MoarVM 2017.07."); + goto cbc_next(i); +} +__code cbc_DEPRECATED_32(INTERP i){ + MVM_exception_throw_adhoc(i->tc, "The close_fhi op was removed in MoarVM 2017.07."); + goto cbc_next(i); +} +__code cbc_DEPRECATED_33(INTERP i){ + MVM_exception_throw_adhoc(i->tc, "The newlexotic op was removed in MoarVM 2017.08."); + goto cbc_next(i); +} +__code cbc_DEPRECATED_34(INTERP i){ + MVM_exception_throw_adhoc(i->tc, "The lexoticresult op was removed in MoarVM 2017.08."); + goto cbc_next(i); +} +__code cbc_coverage_log(INTERP i){ + MVMString *filename = MVM_cu_string(i->tc,i->cu, GET_UI32(i->cur_op, 0)); + MVMuint32 lineno = GET_UI32(i->cur_op, 4); + MVMuint32 cacheidx = GET_UI32(i->cur_op, 8); + char *cache = (char *)MVM_BC_get_I64(i->cur_op, 12); + MVM_line_coverage_report(i->tc, filename, lineno, cacheidx, cache); + i->cur_op += 20; + goto cbc_next(i); + } +__code cbc_breakpoint(INTERP i){ + MVMuint32 file_idx = GET_UI32(i->cur_op, 0); + MVMuint32 line_no = GET_UI32(i->cur_op, 4); + MVM_debugserver_breakpoint_check(i->tc, file_idx, line_no); + i->cur_op += 8; + goto cbc_next(i); +} +__code cbc_coveragecontrol(INTERP i){ + MVMuint32 cc = (MVMuint32)GET_REG(i->cur_op, 0,i).i64; + if (i->tc->instance->coverage_control && (cc == 0 || cc == 1)) + i->tc->instance->coverage_control = cc + 1; + i->cur_op += 2; goto cbc_next(i); } -__code cbc_return_label (INTER i){ +__code cbc_return_label (INTERP i){ /* Need to clear these pointer pointers since they may be rooted * by some GC procedure. */ - i.tc->interp_cur_op = NULL; - i.tc->interp_bytecode_start = NULL; - i.tc->interp_reg_base = NULL; - i.tc->interp_cu = NULL; + i->tc->interp_cur_op = NULL; + i->tc->interp_bytecode_start = NULL; + i->tc->interp_reg_base = NULL; + i->tc->interp_cu = NULL; MVM_barrier(); } -__code cbc_op_call_extop (INTER i){ +__code cbc_op_call_extop (INTERP i) { /* Bounds checking? Never heard of that. */ - MVMuint8 *op_before = i.cur_op; - MVMExtOpRecord *record = &i.cu->body.extops[i.op - MVM_OP_EXT_BASE]; - record->func(i.tc, i.cur_op); - if (op_before == i.cur_op) - i.cur_op += record->operand_bytes; + MVMuint8 *op_before = i->cur_op; + MVMExtOpRecord *record = &i->cu->body.extops[i->op - MVM_OP_EXT_BASE]; + record->func(i->tc, i->cur_op); + if (op_before == i->cur_op) + i->cur_op += record->operand_bytes; goto cbc_next(i); } -void MVM_interp_run1(INTER i){ - goto (CODES[i.op])(i); +void MVM_interp_run1(INTERP i){ + goto (CODES[i->op])(i); } /* This is the interpreter run loop. We have one of these per thread. */ void MVM_interp_run_cbc(MVMThreadContext *tc) { - INTER i = {0,*tc->interp_cur_op,*tc->interp_bytecode_start,*tc->interp_reg_base,*tc->interp_cu,NULL,tc}; - tc->interp_cur_op = &i.cur_op; - tc->interp_bytecode_start = &i.bytecode_start; - tc->interp_reg_base = &i.reg_base; - tc->interp_cu = &i.cu; + INTER inter = {0,*tc->interp_cur_op,*tc->interp_bytecode_start,*tc->interp_reg_base,*tc->interp_cu,NULL,tc}; + INTERP i = &inter; + tc->interp_cur_op = &i->cur_op; + tc->interp_bytecode_start = &i->bytecode_start; + tc->interp_reg_base = &i->reg_base; + tc->interp_cu = &i->cu; /* Enter runloop. */ runloop: { diff -r 18916fa4f32c -r da6d6597bd69 src/core/oplables-cbc-codes.h --- a/src/core/oplables-cbc-codes.h Fri Feb 15 20:50:50 2019 +0900 +++ b/src/core/oplables-cbc-codes.h Fri Feb 15 20:51:54 2019 +0900 @@ -1,880 +1,880 @@ #include "interp_strunct.h" -__code cbc_no_op(INTER); -__code cbc_const_i8(INTER); -__code cbc_const_i16(INTER); -__code cbc_const_i32(INTER); -__code cbc_const_i64(INTER); -__code cbc_const_n32(INTER); -__code cbc_const_n64(INTER); -__code cbc_const_s(INTER); -__code cbc_set(INTER); -__code cbc_extend_u8(INTER); -__code cbc_extend_u16(INTER); -__code cbc_extend_u32(INTER); -__code cbc_extend_i8(INTER); -__code cbc_extend_i16(INTER); -__code cbc_extend_i32(INTER); -__code cbc_trunc_u8(INTER); -__code cbc_trunc_u16(INTER); -__code cbc_trunc_u32(INTER); -__code cbc_trunc_i8(INTER); -__code cbc_trunc_i16(INTER); -__code cbc_trunc_i32(INTER); -__code cbc_extend_n32(INTER); -__code cbc_trunc_n32(INTER); -__code cbc_goto(INTER); -__code cbc_if_i(INTER); -__code cbc_unless_i(INTER); -__code cbc_if_n(INTER); -__code cbc_unless_n(INTER); -__code cbc_if_s(INTER); -__code cbc_unless_s(INTER); -__code cbc_if_s0(INTER); -__code cbc_unless_s0(INTER); -__code cbc_if_o(INTER); -__code cbc_unless_o(INTER); -__code cbc_jumplist(INTER); -__code cbc_getlex(INTER); -__code cbc_bindlex(INTER); -__code cbc_getlex_ni(INTER); -__code cbc_getlex_nn(INTER); -__code cbc_getlex_ns(INTER); -__code cbc_getlex_no(INTER); -__code cbc_bindlex_ni(INTER); -__code cbc_bindlex_nn(INTER); -__code cbc_bindlex_ns(INTER); -__code cbc_bindlex_no(INTER); -__code cbc_getlex_ng(INTER); -__code cbc_bindlex_ng(INTER); -__code cbc_getdynlex(INTER); -__code cbc_binddynlex(INTER); -__code cbc_setlexvalue(INTER); -__code cbc_lexprimspec(INTER); -__code cbc_return_i(INTER); -__code cbc_return_n(INTER); -__code cbc_return_s(INTER); -__code cbc_return_o(INTER); -__code cbc_return(INTER); -__code cbc_eq_i(INTER); -__code cbc_ne_i(INTER); -__code cbc_lt_i(INTER); -__code cbc_le_i(INTER); -__code cbc_gt_i(INTER); -__code cbc_ge_i(INTER); -__code cbc_cmp_i(INTER); -__code cbc_add_i(INTER); -__code cbc_sub_i(INTER); -__code cbc_mul_i(INTER); -__code cbc_div_i(INTER); -__code cbc_div_u(INTER); -__code cbc_mod_i(INTER); -__code cbc_mod_u(INTER); -__code cbc_neg_i(INTER); -__code cbc_abs_i(INTER); -__code cbc_inc_i(INTER); -__code cbc_inc_u(INTER); -__code cbc_dec_i(INTER); -__code cbc_dec_u(INTER); -__code cbc_band_i(INTER); -__code cbc_bor_i(INTER); -__code cbc_bxor_i(INTER); -__code cbc_bnot_i(INTER); -__code cbc_blshift_i(INTER); -__code cbc_brshift_i(INTER); -__code cbc_pow_i(INTER); -__code cbc_not_i(INTER); -__code cbc_gcd_i(INTER); -__code cbc_lcm_i(INTER); -__code cbc_eq_n(INTER); -__code cbc_ne_n(INTER); -__code cbc_lt_n(INTER); -__code cbc_le_n(INTER); -__code cbc_gt_n(INTER); -__code cbc_ge_n(INTER); -__code cbc_cmp_n(INTER); -__code cbc_add_n(INTER); -__code cbc_sub_n(INTER); -__code cbc_mul_n(INTER); -__code cbc_div_n(INTER); -__code cbc_mod_n(INTER); -__code cbc_neg_n(INTER); -__code cbc_abs_n(INTER); -__code cbc_pow_n(INTER); -__code cbc_ceil_n(INTER); -__code cbc_floor_n(INTER); -__code cbc_sin_n(INTER); -__code cbc_asin_n(INTER); -__code cbc_cos_n(INTER); -__code cbc_acos_n(INTER); -__code cbc_tan_n(INTER); -__code cbc_atan_n(INTER); -__code cbc_atan2_n(INTER); -__code cbc_sec_n(INTER); -__code cbc_asec_n(INTER); -__code cbc_sinh_n(INTER); -__code cbc_cosh_n(INTER); -__code cbc_tanh_n(INTER); -__code cbc_sech_n(INTER); -__code cbc_sqrt_n(INTER); -__code cbc_log_n(INTER); -__code cbc_exp_n(INTER); -__code cbc_coerce_in(INTER); -__code cbc_coerce_ni(INTER); -__code cbc_coerce_is(INTER); -__code cbc_coerce_ns(INTER); -__code cbc_coerce_si(INTER); -__code cbc_coerce_sn(INTER); -__code cbc_smrt_numify(INTER); -__code cbc_smrt_strify(INTER); -__code cbc_prepargs(INTER); -__code cbc_arg_i(INTER); -__code cbc_arg_n(INTER); -__code cbc_arg_s(INTER); -__code cbc_arg_o(INTER); -__code cbc_argconst_i(INTER); -__code cbc_argconst_n(INTER); -__code cbc_argconst_s(INTER); -__code cbc_invoke_v(INTER); -__code cbc_invoke_i(INTER); -__code cbc_invoke_n(INTER); -__code cbc_invoke_s(INTER); -__code cbc_invoke_o(INTER); -__code cbc_checkarity(INTER); -__code cbc_param_rp_i(INTER); -__code cbc_param_rp_n(INTER); -__code cbc_param_rp_s(INTER); -__code cbc_param_rp_o(INTER); -__code cbc_param_op_i(INTER); -__code cbc_param_op_n(INTER); -__code cbc_param_op_s(INTER); -__code cbc_param_op_o(INTER); -__code cbc_param_rn_i(INTER); -__code cbc_param_rn_n(INTER); -__code cbc_param_rn_s(INTER); -__code cbc_param_rn_o(INTER); -__code cbc_param_on_i(INTER); -__code cbc_param_on_n(INTER); -__code cbc_param_on_s(INTER); -__code cbc_param_on_o(INTER); -__code cbc_param_sp(INTER); -__code cbc_param_sn(INTER); -__code cbc_getcode(INTER); -__code cbc_caller(INTER); -__code cbc_capturelex(INTER); -__code cbc_takeclosure(INTER); -__code cbc_exception(INTER); -__code cbc_bindexmessage(INTER); -__code cbc_bindexpayload(INTER); -__code cbc_bindexcategory(INTER); -__code cbc_getexmessage(INTER); -__code cbc_getexpayload(INTER); -__code cbc_getexcategory(INTER); -__code cbc_throwdyn(INTER); -__code cbc_throwlex(INTER); -__code cbc_throwlexotic(INTER); -__code cbc_throwcatdyn(INTER); -__code cbc_throwcatlex(INTER); -__code cbc_throwcatlexotic(INTER); -__code cbc_die(INTER); -__code cbc_rethrow(INTER); -__code cbc_resume(INTER); -__code cbc_takehandlerresult(INTER); -__code cbc_DEPRECATED_33(INTER); -__code cbc_DEPRECATED_34(INTER); -__code cbc_backtracestrings(INTER); -__code cbc_usecapture(INTER); -__code cbc_savecapture(INTER); -__code cbc_captureposelems(INTER); -__code cbc_captureposarg(INTER); -__code cbc_captureposarg_i(INTER); -__code cbc_captureposarg_n(INTER); -__code cbc_captureposarg_s(INTER); -__code cbc_captureposprimspec(INTER); -__code cbc_captureexistsnamed(INTER); -__code cbc_capturehasnameds(INTER); -__code cbc_invokewithcapture(INTER); -__code cbc_multicacheadd(INTER); -__code cbc_multicachefind(INTER); -__code cbc_null_s(INTER); -__code cbc_isnull_s(INTER); -__code cbc_eq_s(INTER); -__code cbc_ne_s(INTER); -__code cbc_gt_s(INTER); -__code cbc_ge_s(INTER); -__code cbc_lt_s(INTER); -__code cbc_le_s(INTER); -__code cbc_cmp_s(INTER); -__code cbc_eqat_s(INTER); -__code cbc_eqatic_s(INTER); -__code cbc_haveat_s(INTER); -__code cbc_concat_s(INTER); -__code cbc_repeat_s(INTER); -__code cbc_substr_s(INTER); -__code cbc_index_s(INTER); -__code cbc_graphs_s(INTER); -__code cbc_codes_s(INTER); -__code cbc_getcp_s(INTER); -__code cbc_indexcp_s(INTER); -__code cbc_uc(INTER); -__code cbc_lc(INTER); -__code cbc_tc(INTER); -__code cbc_split(INTER); -__code cbc_join(INTER); -__code cbc_getcpbyname(INTER); -__code cbc_indexat(INTER); -__code cbc_indexnat(INTER); -__code cbc_unipropcode(INTER); -__code cbc_unipvalcode(INTER); -__code cbc_hasuniprop(INTER); -__code cbc_hasunipropc(INTER); -__code cbc_chars(INTER); -__code cbc_chr(INTER); -__code cbc_ordfirst(INTER); -__code cbc_ordat(INTER); -__code cbc_rindexfrom(INTER); -__code cbc_escape(INTER); -__code cbc_flip(INTER); -__code cbc_setbuffersize_fh(INTER); -__code cbc_iscclass(INTER); -__code cbc_findcclass(INTER); -__code cbc_findnotcclass(INTER); -__code cbc_nfafromstatelist(INTER); -__code cbc_nfarunproto(INTER); -__code cbc_nfarunalt(INTER); -__code cbc_radix(INTER); -__code cbc_encode(INTER); -__code cbc_decode(INTER); -__code cbc_istrue_s(INTER); -__code cbc_isfalse_s(INTER); -__code cbc_null(INTER); -__code cbc_isnull(INTER); -__code cbc_ifnonnull(INTER); -__code cbc_findmeth(INTER); -__code cbc_findmeth_s(INTER); -__code cbc_can(INTER); -__code cbc_can_s(INTER); -__code cbc_create(INTER); -__code cbc_clone(INTER); -__code cbc_isconcrete(INTER); -__code cbc_rebless(INTER); -__code cbc_istype(INTER); -__code cbc_objprimspec(INTER); -__code cbc_gethow(INTER); -__code cbc_getwhat(INTER); -__code cbc_getwho(INTER); -__code cbc_setwho(INTER); -__code cbc_reprname(INTER); -__code cbc_getwhere(INTER); -__code cbc_eqaddr(INTER); -__code cbc_bindattr_i(INTER); -__code cbc_bindattr_n(INTER); -__code cbc_bindattr_s(INTER); -__code cbc_bindattr_o(INTER); -__code cbc_bindattrs_i(INTER); -__code cbc_bindattrs_n(INTER); -__code cbc_bindattrs_s(INTER); -__code cbc_bindattrs_o(INTER); -__code cbc_getattr_i(INTER); -__code cbc_getattr_n(INTER); -__code cbc_getattr_s(INTER); -__code cbc_getattr_o(INTER); -__code cbc_getattrs_i(INTER); -__code cbc_getattrs_n(INTER); -__code cbc_getattrs_s(INTER); -__code cbc_getattrs_o(INTER); -__code cbc_attrinited(INTER); -__code cbc_box_i(INTER); -__code cbc_box_n(INTER); -__code cbc_box_s(INTER); -__code cbc_unbox_i(INTER); -__code cbc_unbox_n(INTER); -__code cbc_unbox_s(INTER); -__code cbc_atpos_i(INTER); -__code cbc_atpos_n(INTER); -__code cbc_atpos_s(INTER); -__code cbc_atpos_o(INTER); -__code cbc_bindpos_i(INTER); -__code cbc_bindpos_n(INTER); -__code cbc_bindpos_s(INTER); -__code cbc_bindpos_o(INTER); -__code cbc_push_i(INTER); -__code cbc_push_n(INTER); -__code cbc_push_s(INTER); -__code cbc_push_o(INTER); -__code cbc_pop_i(INTER); -__code cbc_pop_n(INTER); -__code cbc_pop_s(INTER); -__code cbc_pop_o(INTER); -__code cbc_shift_i(INTER); -__code cbc_shift_n(INTER); -__code cbc_shift_s(INTER); -__code cbc_shift_o(INTER); -__code cbc_unshift_i(INTER); -__code cbc_unshift_n(INTER); -__code cbc_unshift_s(INTER); -__code cbc_unshift_o(INTER); -__code cbc_splice(INTER); -__code cbc_setelemspos(INTER); -__code cbc_existspos(INTER); -__code cbc_atkey_i(INTER); -__code cbc_atkey_n(INTER); -__code cbc_atkey_s(INTER); -__code cbc_atkey_o(INTER); -__code cbc_bindkey_i(INTER); -__code cbc_bindkey_n(INTER); -__code cbc_bindkey_s(INTER); -__code cbc_bindkey_o(INTER); -__code cbc_existskey(INTER); -__code cbc_deletekey(INTER); -__code cbc_elems(INTER); -__code cbc_knowhow(INTER); -__code cbc_knowhowattr(INTER); -__code cbc_newtype(INTER); -__code cbc_composetype(INTER); -__code cbc_setmethcache(INTER); -__code cbc_setmethcacheauth(INTER); -__code cbc_settypecache(INTER); -__code cbc_settypecheckmode(INTER); -__code cbc_setboolspec(INTER); -__code cbc_istrue(INTER); -__code cbc_isfalse(INTER); -__code cbc_bootint(INTER); -__code cbc_bootnum(INTER); -__code cbc_bootstr(INTER); -__code cbc_bootarray(INTER); -__code cbc_bootintarray(INTER); -__code cbc_bootnumarray(INTER); -__code cbc_bootstrarray(INTER); -__code cbc_boothash(INTER); -__code cbc_isint(INTER); -__code cbc_isnum(INTER); -__code cbc_isstr(INTER); -__code cbc_islist(INTER); -__code cbc_ishash(INTER); -__code cbc_sethllconfig(INTER); -__code cbc_hllboxtype_i(INTER); -__code cbc_hllboxtype_n(INTER); -__code cbc_hllboxtype_s(INTER); -__code cbc_hlllist(INTER); -__code cbc_hllhash(INTER); -__code cbc_getcomp(INTER); -__code cbc_bindcomp(INTER); -__code cbc_getcurhllsym(INTER); -__code cbc_bindcurhllsym(INTER); -__code cbc_gethllsym(INTER); -__code cbc_bindhllsym(INTER); -__code cbc_settypehll(INTER); -__code cbc_settypehllrole(INTER); -__code cbc_hllize(INTER); -__code cbc_hllizefor(INTER); -__code cbc_usecompileehllconfig(INTER); -__code cbc_usecompilerhllconfig(INTER); -__code cbc_iter(INTER); -__code cbc_iterkey_s(INTER); -__code cbc_iterval(INTER); -__code cbc_getcodename(INTER); -__code cbc_iscoderef(INTER); -__code cbc_getcodeobj(INTER); -__code cbc_setcodeobj(INTER); -__code cbc_setcodename(INTER); -__code cbc_forceouterctx(INTER); -__code cbc_setinvokespec(INTER); -__code cbc_isinvokable(INTER); -__code cbc_freshcoderef(INTER); -__code cbc_markcodestatic(INTER); -__code cbc_markcodestub(INTER); -__code cbc_getstaticcode(INTER); -__code cbc_getcodecuid(INTER); -__code cbc_setdispatcher(INTER); -__code cbc_takedispatcher(INTER); -__code cbc_assign(INTER); -__code cbc_assignunchecked(INTER); -__code cbc_iscont(INTER); -__code cbc_decont(INTER); -__code cbc_setcontspec(INTER); -__code cbc_sha1(INTER); -__code cbc_createsc(INTER); -__code cbc_scsetobj(INTER); -__code cbc_scsetcode(INTER); -__code cbc_scgetobj(INTER); -__code cbc_scgethandle(INTER); -__code cbc_scgetobjidx(INTER); -__code cbc_scsetdesc(INTER); -__code cbc_scobjcount(INTER); -__code cbc_setobjsc(INTER); -__code cbc_getobjsc(INTER); -__code cbc_serialize(INTER); -__code cbc_deserialize(INTER); -__code cbc_wval(INTER); -__code cbc_wval_wide(INTER); -__code cbc_scwbdisable(INTER); -__code cbc_scwbenable(INTER); -__code cbc_pushcompsc(INTER); -__code cbc_popcompsc(INTER); -__code cbc_scgetdesc(INTER); -__code cbc_loadbytecode(INTER); -__code cbc_masttofile(INTER); -__code cbc_masttocu(INTER); -__code cbc_iscompunit(INTER); -__code cbc_compunitmainline(INTER); -__code cbc_compunitcodes(INTER); -__code cbc_ctx(INTER); -__code cbc_ctxouter(INTER); -__code cbc_ctxcaller(INTER); -__code cbc_ctxlexpad(INTER); -__code cbc_curcode(INTER); -__code cbc_callercode(INTER); -__code cbc_add_I(INTER); -__code cbc_sub_I(INTER); -__code cbc_mul_I(INTER); -__code cbc_div_I(INTER); -__code cbc_mod_I(INTER); -__code cbc_neg_I(INTER); -__code cbc_abs_I(INTER); -__code cbc_cmp_I(INTER); -__code cbc_eq_I(INTER); -__code cbc_ne_I(INTER); -__code cbc_lt_I(INTER); -__code cbc_le_I(INTER); -__code cbc_gt_I(INTER); -__code cbc_ge_I(INTER); -__code cbc_bor_I(INTER); -__code cbc_bxor_I(INTER); -__code cbc_band_I(INTER); -__code cbc_bnot_I(INTER); -__code cbc_blshift_I(INTER); -__code cbc_brshift_I(INTER); -__code cbc_pow_I(INTER); -__code cbc_gcd_I(INTER); -__code cbc_lcm_I(INTER); -__code cbc_expmod_I(INTER); -__code cbc_isprime_I(INTER); -__code cbc_rand_I(INTER); -__code cbc_coerce_In(INTER); -__code cbc_coerce_Is(INTER); -__code cbc_coerce_nI(INTER); -__code cbc_coerce_sI(INTER); -__code cbc_isbig_I(INTER); -__code cbc_bool_I(INTER); -__code cbc_base_I(INTER); -__code cbc_radix_I(INTER); -__code cbc_div_In(INTER); -__code cbc_copy_f(INTER); -__code cbc_append_f(INTER); -__code cbc_rename_f(INTER); -__code cbc_delete_f(INTER); -__code cbc_chmod_f(INTER); -__code cbc_exists_f(INTER); -__code cbc_mkdir(INTER); -__code cbc_rmdir(INTER); -__code cbc_open_dir(INTER); -__code cbc_read_dir(INTER); -__code cbc_close_dir(INTER); -__code cbc_open_fh(INTER); -__code cbc_close_fh(INTER); -__code cbc_DEPRECATED_23(INTER); -__code cbc_DEPRECATED_27(INTER); -__code cbc_DEPRECATED_28(INTER); -__code cbc_DEPRECATED_18(INTER); -__code cbc_seek_fh(INTER); -__code cbc_lock_fh(INTER); -__code cbc_unlock_fh(INTER); -__code cbc_sync_fh(INTER); -__code cbc_trunc_fh(INTER); -__code cbc_eof_fh(INTER); -__code cbc_getstdin(INTER); -__code cbc_getstdout(INTER); -__code cbc_getstderr(INTER); -__code cbc_connect_sk(INTER); -__code cbc_socket(INTER); -__code cbc_bind_sk(INTER); -__code cbc_DEPRECATED_24(INTER); -__code cbc_accept_sk(INTER); -__code cbc_decodetocodes(INTER); -__code cbc_encodefromcodes(INTER); -__code cbc_DEPRECATED_17(INTER); -__code cbc_print(INTER); -__code cbc_say(INTER); -__code cbc_DEPRECATED_22(INTER); -__code cbc_tell_fh(INTER); -__code cbc_stat(INTER); -__code cbc_tryfindmeth(INTER); -__code cbc_tryfindmeth_s(INTER); -__code cbc_chdir(INTER); -__code cbc_srand(INTER); -__code cbc_rand_i(INTER); -__code cbc_rand_n(INTER); -__code cbc_time_i(INTER); -__code cbc_sleep(INTER); -__code cbc_newthread(INTER); -__code cbc_threadjoin(INTER); -__code cbc_time_n(INTER); -__code cbc_exit(INTER); -__code cbc_DEPRECATED_30(INTER); -__code cbc_cwd(INTER); -__code cbc_clargs(INTER); -__code cbc_getenvhash(INTER); -__code cbc_loadlib(INTER); -__code cbc_freelib(INTER); -__code cbc_findsym(INTER); -__code cbc_dropsym(INTER); -__code cbc_loadext(INTER); -__code cbc_backendconfig(INTER); -__code cbc_getlexouter(INTER); -__code cbc_getlexrel(INTER); -__code cbc_getlexreldyn(INTER); -__code cbc_getlexrelcaller(INTER); -__code cbc_getlexcaller(INTER); -__code cbc_bitand_s(INTER); -__code cbc_bitor_s(INTER); -__code cbc_bitxor_s(INTER); -__code cbc_isnanorinf(INTER); -__code cbc_inf(INTER); -__code cbc_neginf(INTER); -__code cbc_nan(INTER); -__code cbc_getpid(INTER); -__code cbc_DEPRECATED_29(INTER); -__code cbc_filereadable(INTER); -__code cbc_filewritable(INTER); -__code cbc_fileexecutable(INTER); -__code cbc_DEPRECATED_19(INTER); -__code cbc_capturenamedshash(INTER); -__code cbc_read_fhb(INTER); -__code cbc_write_fhb(INTER); -__code cbc_replace(INTER); -__code cbc_newexception(INTER); -__code cbc_permit(INTER); -__code cbc_backtrace(INTER); -__code cbc_symlink(INTER); -__code cbc_link(INTER); -__code cbc_gethostname(INTER); -__code cbc_exreturnafterunwind(INTER); -__code cbc_DEPRECATED_13(INTER); -__code cbc_continuationreset(INTER); -__code cbc_continuationcontrol(INTER); -__code cbc_continuationinvoke(INTER); -__code cbc_randscale_n(INTER); -__code cbc_uniisblock(INTER); -__code cbc_assertparamcheck(INTER); -__code cbc_hintfor(INTER); -__code cbc_paramnamesused(INTER); -__code cbc_getuniname(INTER); -__code cbc_getuniprop_int(INTER); -__code cbc_getuniprop_bool(INTER); -__code cbc_getuniprop_str(INTER); -__code cbc_matchuniprop(INTER); -__code cbc_nativecallbuild(INTER); -__code cbc_nativecallinvoke(INTER); -__code cbc_nativecallrefresh(INTER); -__code cbc_threadrun(INTER); -__code cbc_threadid(INTER); -__code cbc_threadyield(INTER); -__code cbc_currentthread(INTER); -__code cbc_lock(INTER); -__code cbc_unlock(INTER); -__code cbc_semacquire(INTER); -__code cbc_semtryacquire(INTER); -__code cbc_semrelease(INTER); -__code cbc_getlockcondvar(INTER); -__code cbc_condwait(INTER); -__code cbc_condsignalone(INTER); -__code cbc_condsignalall(INTER); -__code cbc_queuepoll(INTER); -__code cbc_setmultispec(INTER); -__code cbc_ctxouterskipthunks(INTER); -__code cbc_ctxcallerskipthunks(INTER); -__code cbc_timer(INTER); -__code cbc_cancel(INTER); -__code cbc_signal(INTER); -__code cbc_watchfile(INTER); -__code cbc_asyncconnect(INTER); -__code cbc_asynclisten(INTER); -__code cbc_DEPRECATED_14(INTER); -__code cbc_asyncwritebytes(INTER); -__code cbc_DEPRECATED_16(INTER); -__code cbc_asyncreadbytes(INTER); -__code cbc_getlexstatic_o(INTER); -__code cbc_getlexperinvtype_o(INTER); -__code cbc_execname(INTER); -__code cbc_const_i64_16(INTER); -__code cbc_const_i64_32(INTER); -__code cbc_isnonnull(INTER); -__code cbc_param_rn2_i(INTER); -__code cbc_param_rn2_n(INTER); -__code cbc_param_rn2_s(INTER); -__code cbc_param_rn2_o(INTER); -__code cbc_param_on2_i(INTER); -__code cbc_param_on2_n(INTER); -__code cbc_param_on2_s(INTER); -__code cbc_param_on2_o(INTER); -__code cbc_osrpoint(INTER); -__code cbc_nativecallcast(INTER); -__code cbc_spawnprocasync(INTER); -__code cbc_killprocasync(INTER); -__code cbc_startprofile(INTER); -__code cbc_endprofile(INTER); -__code cbc_objectid(INTER); -__code cbc_settypefinalize(INTER); -__code cbc_force_gc(INTER); -__code cbc_nativecallglobal(INTER); -__code cbc_DEPRECATED_32(INTER); -__code cbc_setparameterizer(INTER); -__code cbc_parameterizetype(INTER); -__code cbc_typeparameterized(INTER); -__code cbc_typeparameters(INTER); -__code cbc_typeparameterat(INTER); -__code cbc_readlink(INTER); -__code cbc_lstat(INTER); -__code cbc_iscont_i(INTER); -__code cbc_iscont_n(INTER); -__code cbc_iscont_s(INTER); -__code cbc_assign_i(INTER); -__code cbc_assign_n(INTER); -__code cbc_assign_s(INTER); -__code cbc_decont_i(INTER); -__code cbc_decont_n(INTER); -__code cbc_decont_s(INTER); -__code cbc_getrusage(INTER); -__code cbc_threadlockcount(INTER); -__code cbc_DEPRECATED_4(INTER); -__code cbc_getlexref_i(INTER); -__code cbc_getlexref_n(INTER); -__code cbc_getlexref_s(INTER); -__code cbc_getlexref_ni(INTER); -__code cbc_getlexref_nn(INTER); -__code cbc_getlexref_ns(INTER); -__code cbc_atposref_i(INTER); -__code cbc_atposref_n(INTER); -__code cbc_atposref_s(INTER); -__code cbc_getattrref_i(INTER); -__code cbc_getattrref_n(INTER); -__code cbc_getattrref_s(INTER); -__code cbc_getattrsref_i(INTER); -__code cbc_getattrsref_n(INTER); -__code cbc_getattrsref_s(INTER); -__code cbc_nativecallsizeof(INTER); -__code cbc_encodenorm(INTER); -__code cbc_normalizecodes(INTER); -__code cbc_strfromcodes(INTER); -__code cbc_strtocodes(INTER); -__code cbc_getcodelocation(INTER); -__code cbc_eqatim_s(INTER); -__code cbc_ordbaseat(INTER); -__code cbc_neverrepossess(INTER); -__code cbc_scdisclaim(INTER); -__code cbc_DEPRECATED_31(INTER); -__code cbc_atpos2d_i(INTER); -__code cbc_atpos2d_n(INTER); -__code cbc_atpos2d_s(INTER); -__code cbc_atpos2d_o(INTER); -__code cbc_atpos3d_i(INTER); -__code cbc_atpos3d_n(INTER); -__code cbc_atpos3d_s(INTER); -__code cbc_atpos3d_o(INTER); -__code cbc_atposnd_i(INTER); -__code cbc_atposnd_n(INTER); -__code cbc_atposnd_s(INTER); -__code cbc_atposnd_o(INTER); -__code cbc_bindpos2d_i(INTER); -__code cbc_bindpos2d_n(INTER); -__code cbc_bindpos2d_s(INTER); -__code cbc_bindpos2d_o(INTER); -__code cbc_bindpos3d_i(INTER); -__code cbc_bindpos3d_n(INTER); -__code cbc_bindpos3d_s(INTER); -__code cbc_bindpos3d_o(INTER); -__code cbc_bindposnd_i(INTER); -__code cbc_bindposnd_n(INTER); -__code cbc_bindposnd_s(INTER); -__code cbc_bindposnd_o(INTER); -__code cbc_dimensions(INTER); -__code cbc_setdimensions(INTER); -__code cbc_numdimensions(INTER); -__code cbc_ctxcode(INTER); -__code cbc_isrwcont(INTER); -__code cbc_fc(INTER); -__code cbc_DEPRECATED_25(INTER); -__code cbc_DEPRECATED_21(INTER); -__code cbc_encoderep(INTER); -__code cbc_istty_fh(INTER); -__code cbc_multidimref_i(INTER); -__code cbc_multidimref_n(INTER); -__code cbc_multidimref_s(INTER); -__code cbc_fileno_fh(INTER); -__code cbc_asyncudp(INTER); -__code cbc_DEPRECATED_15(INTER); -__code cbc_asyncwritebytesto(INTER); -__code cbc_objprimbits(INTER); -__code cbc_objprimunsigned(INTER); -__code cbc_DEPRECATED_5(INTER); -__code cbc_DEPRECATED_6(INTER); -__code cbc_DEPRECATED_7(INTER); -__code cbc_DEPRECATED_8(INTER); -__code cbc_getlexref_i32(INTER); -__code cbc_getlexref_i16(INTER); -__code cbc_getlexref_i8(INTER); -__code cbc_getlexref_n32(INTER); -__code cbc_box_u(INTER); -__code cbc_unbox_u(INTER); -__code cbc_coerce_iu(INTER); -__code cbc_coerce_ui(INTER); -__code cbc_coerce_nu(INTER); -__code cbc_coerce_un(INTER); -__code cbc_decont_u(INTER); -__code cbc_DEPRECATED_9(INTER); -__code cbc_DEPRECATED_10(INTER); -__code cbc_DEPRECATED_11(INTER); -__code cbc_DEPRECATED_12(INTER); -__code cbc_getlexref_u(INTER); -__code cbc_getlexref_u32(INTER); -__code cbc_getlexref_u16(INTER); -__code cbc_getlexref_u8(INTER); -__code cbc_param_rp_u(INTER); -__code cbc_param_op_u(INTER); -__code cbc_param_rn_u(INTER); -__code cbc_param_on_u(INTER); -__code cbc_param_rn2_u(INTER); -__code cbc_param_on2_u(INTER); -__code cbc_stat_time(INTER); -__code cbc_lstat_time(INTER); -__code cbc_setdebugtypename(INTER); -__code cbc_loadbytecodebuffer(INTER); -__code cbc_loadbytecodefh(INTER); -__code cbc_throwpayloadlex(INTER); -__code cbc_throwpayloadlexcaller(INTER); -__code cbc_lastexpayload(INTER); -__code cbc_cancelnotify(INTER); -__code cbc_decoderconfigure(INTER); -__code cbc_decodersetlineseps(INTER); -__code cbc_decoderaddbytes(INTER); -__code cbc_decodertakechars(INTER); -__code cbc_decodertakeallchars(INTER); -__code cbc_decodertakeavailablechars(INTER); -__code cbc_decodertakeline(INTER); -__code cbc_decoderbytesavailable(INTER); -__code cbc_decodertakebytes(INTER); -__code cbc_decoderempty(INTER); -__code cbc_indexingoptimized(INTER); -__code cbc_captureinnerlex(INTER); -__code cbc_unicmp_s(INTER); -__code cbc_setdispatcherfor(INTER); -__code cbc_getstrfromname(INTER); -__code cbc_indexic_s(INTER); -__code cbc_getport_sk(INTER); -__code cbc_cpucores(INTER); -__code cbc_eqaticim_s(INTER); -__code cbc_indexicim_s(INTER); -__code cbc_decodertakecharseof(INTER); -__code cbc_indexim_s(INTER); -__code cbc_cas_o(INTER); -__code cbc_cas_i(INTER); -__code cbc_atomicinc_i(INTER); -__code cbc_atomicdec_i(INTER); -__code cbc_atomicadd_i(INTER); -__code cbc_atomicload_o(INTER); -__code cbc_atomicload_i(INTER); -__code cbc_atomicstore_o(INTER); -__code cbc_atomicstore_i(INTER); -__code cbc_barrierfull(INTER); -__code cbc_coveragecontrol(INTER); -__code cbc_nativeinvoke_v(INTER); -__code cbc_nativeinvoke_i(INTER); -__code cbc_nativeinvoke_n(INTER); -__code cbc_nativeinvoke_s(INTER); -__code cbc_nativeinvoke_o(INTER); -__code cbc_getarg_i(INTER); -__code cbc_getarg_n(INTER); -__code cbc_getarg_s(INTER); -__code cbc_getarg_o(INTER); -__code cbc_coerce_II(INTER); -__code cbc_encoderepconf(INTER); -__code cbc_encodeconf(INTER); -__code cbc_decodeconf(INTER); -__code cbc_decoderepconf(INTER); -__code cbc_getppid(INTER); -__code cbc_getsignals(INTER); -__code cbc_sp_guard(INTER); -__code cbc_sp_guardconc(INTER); -__code cbc_sp_guardtype(INTER); -__code cbc_sp_guardsf(INTER); -__code cbc_sp_guardsfouter(INTER); -__code cbc_sp_rebless(INTER); -__code cbc_sp_resolvecode(INTER); -__code cbc_sp_decont(INTER); -__code cbc_sp_getlex_o(INTER); -__code cbc_sp_getlex_ins(INTER); -__code cbc_sp_getlex_no(INTER); -__code cbc_sp_getarg_o(INTER); -__code cbc_sp_getarg_i(INTER); -__code cbc_sp_getarg_n(INTER); -__code cbc_sp_getarg_s(INTER); -__code cbc_sp_fastinvoke_v(INTER); -__code cbc_sp_fastinvoke_i(INTER); -__code cbc_sp_fastinvoke_n(INTER); -__code cbc_sp_fastinvoke_s(INTER); -__code cbc_sp_fastinvoke_o(INTER); -__code cbc_sp_paramnamesused(INTER); -__code cbc_sp_getspeshslot(INTER); -__code cbc_sp_findmeth(INTER); -__code cbc_sp_fastcreate(INTER); -__code cbc_sp_get_o(INTER); -__code cbc_sp_get_i64(INTER); -__code cbc_sp_get_i32(INTER); -__code cbc_sp_get_i16(INTER); -__code cbc_sp_get_i8(INTER); -__code cbc_sp_get_n(INTER); -__code cbc_sp_get_s(INTER); -__code cbc_sp_bind_o(INTER); -__code cbc_sp_bind_i64(INTER); -__code cbc_sp_bind_i32(INTER); -__code cbc_sp_bind_i16(INTER); -__code cbc_sp_bind_i8(INTER); -__code cbc_sp_bind_n(INTER); -__code cbc_sp_bind_s(INTER); -__code cbc_sp_p6oget_o(INTER); -__code cbc_sp_p6ogetvt_o(INTER); -__code cbc_sp_p6ogetvc_o(INTER); -__code cbc_sp_p6oget_i(INTER); -__code cbc_sp_p6oget_n(INTER); -__code cbc_sp_p6oget_s(INTER); -__code cbc_sp_p6obind_o(INTER); -__code cbc_sp_p6obind_i(INTER); -__code cbc_sp_p6obind_n(INTER); -__code cbc_sp_p6obind_s(INTER); -__code cbc_sp_deref_get_i64(INTER); -__code cbc_sp_deref_get_n(INTER); -__code cbc_sp_deref_bind_i64(INTER); -__code cbc_sp_deref_bind_n(INTER); -__code cbc_sp_getlexvia_o(INTER); -__code cbc_sp_getlexvia_ins(INTER); -__code cbc_sp_getstringfrom(INTER); -__code cbc_sp_getwvalfrom(INTER); -__code cbc_sp_jit_enter(INTER); -__code cbc_sp_boolify_iter(INTER); -__code cbc_sp_boolify_iter_arr(INTER); -__code cbc_sp_boolify_iter_hash(INTER); -__code cbc_sp_cas_o(INTER); -__code cbc_sp_atomicload_o(INTER); -__code cbc_sp_atomicstore_o(INTER); -__code cbc_prof_enter(INTER); -__code cbc_prof_enterspesh(INTER); -__code cbc_prof_enterinline(INTER); -__code cbc_prof_enternative(INTER); -__code cbc_prof_exit(INTER); -__code cbc_prof_allocated(INTER); -__code cbc_ctw_check(INTER); -__code cbc_coverage_log(INTER); -__code cbc_breakpoint(INTER); -__code cbc_op_call_extop(INTER); +__code cbc_no_op(INTERP); +__code cbc_const_i8(INTERP); +__code cbc_const_i16(INTERP); +__code cbc_const_i32(INTERP); +__code cbc_const_i64(INTERP); +__code cbc_const_n32(INTERP); +__code cbc_const_n64(INTERP); +__code cbc_const_s(INTERP); +__code cbc_set(INTERP); +__code cbc_extend_u8(INTERP); +__code cbc_extend_u16(INTERP); +__code cbc_extend_u32(INTERP); +__code cbc_extend_i8(INTERP); +__code cbc_extend_i16(INTERP); +__code cbc_extend_i32(INTERP); +__code cbc_trunc_u8(INTERP); +__code cbc_trunc_u16(INTERP); +__code cbc_trunc_u32(INTERP); +__code cbc_trunc_i8(INTERP); +__code cbc_trunc_i16(INTERP); +__code cbc_trunc_i32(INTERP); +__code cbc_extend_n32(INTERP); +__code cbc_trunc_n32(INTERP); +__code cbc_goto(INTERP); +__code cbc_if_i(INTERP); +__code cbc_unless_i(INTERP); +__code cbc_if_n(INTERP); +__code cbc_unless_n(INTERP); +__code cbc_if_s(INTERP); +__code cbc_unless_s(INTERP); +__code cbc_if_s0(INTERP); +__code cbc_unless_s0(INTERP); +__code cbc_if_o(INTERP); +__code cbc_unless_o(INTERP); +__code cbc_jumplist(INTERP); +__code cbc_getlex(INTERP); +__code cbc_bindlex(INTERP); +__code cbc_getlex_ni(INTERP); +__code cbc_getlex_nn(INTERP); +__code cbc_getlex_ns(INTERP); +__code cbc_getlex_no(INTERP); +__code cbc_bindlex_ni(INTERP); +__code cbc_bindlex_nn(INTERP); +__code cbc_bindlex_ns(INTERP); +__code cbc_bindlex_no(INTERP); +__code cbc_getlex_ng(INTERP); +__code cbc_bindlex_ng(INTERP); +__code cbc_getdynlex(INTERP); +__code cbc_binddynlex(INTERP); +__code cbc_setlexvalue(INTERP); +__code cbc_lexprimspec(INTERP); +__code cbc_return_i(INTERP); +__code cbc_return_n(INTERP); +__code cbc_return_s(INTERP); +__code cbc_return_o(INTERP); +__code cbc_return(INTERP); +__code cbc_eq_i(INTERP); +__code cbc_ne_i(INTERP); +__code cbc_lt_i(INTERP); +__code cbc_le_i(INTERP); +__code cbc_gt_i(INTERP); +__code cbc_ge_i(INTERP); +__code cbc_cmp_i(INTERP); +__code cbc_add_i(INTERP); +__code cbc_sub_i(INTERP); +__code cbc_mul_i(INTERP); +__code cbc_div_i(INTERP); +__code cbc_div_u(INTERP); +__code cbc_mod_i(INTERP); +__code cbc_mod_u(INTERP); +__code cbc_neg_i(INTERP); +__code cbc_abs_i(INTERP); +__code cbc_inc_i(INTERP); +__code cbc_inc_u(INTERP); +__code cbc_dec_i(INTERP); +__code cbc_dec_u(INTERP); +__code cbc_band_i(INTERP); +__code cbc_bor_i(INTERP); +__code cbc_bxor_i(INTERP); +__code cbc_bnot_i(INTERP); +__code cbc_blshift_i(INTERP); +__code cbc_brshift_i(INTERP); +__code cbc_pow_i(INTERP); +__code cbc_not_i(INTERP); +__code cbc_gcd_i(INTERP); +__code cbc_lcm_i(INTERP); +__code cbc_eq_n(INTERP); +__code cbc_ne_n(INTERP); +__code cbc_lt_n(INTERP); +__code cbc_le_n(INTERP); +__code cbc_gt_n(INTERP); +__code cbc_ge_n(INTERP); +__code cbc_cmp_n(INTERP); +__code cbc_add_n(INTERP); +__code cbc_sub_n(INTERP); +__code cbc_mul_n(INTERP); +__code cbc_div_n(INTERP); +__code cbc_mod_n(INTERP); +__code cbc_neg_n(INTERP); +__code cbc_abs_n(INTERP); +__code cbc_pow_n(INTERP); +__code cbc_ceil_n(INTERP); +__code cbc_floor_n(INTERP); +__code cbc_sin_n(INTERP); +__code cbc_asin_n(INTERP); +__code cbc_cos_n(INTERP); +__code cbc_acos_n(INTERP); +__code cbc_tan_n(INTERP); +__code cbc_atan_n(INTERP); +__code cbc_atan2_n(INTERP); +__code cbc_sec_n(INTERP); +__code cbc_asec_n(INTERP); +__code cbc_sinh_n(INTERP); +__code cbc_cosh_n(INTERP); +__code cbc_tanh_n(INTERP); +__code cbc_sech_n(INTERP); +__code cbc_sqrt_n(INTERP); +__code cbc_log_n(INTERP); +__code cbc_exp_n(INTERP); +__code cbc_coerce_in(INTERP); +__code cbc_coerce_ni(INTERP); +__code cbc_coerce_is(INTERP); +__code cbc_coerce_ns(INTERP); +__code cbc_coerce_si(INTERP); +__code cbc_coerce_sn(INTERP); +__code cbc_smrt_numify(INTERP); +__code cbc_smrt_strify(INTERP); +__code cbc_prepargs(INTERP); +__code cbc_arg_i(INTERP); +__code cbc_arg_n(INTERP); +__code cbc_arg_s(INTERP); +__code cbc_arg_o(INTERP); +__code cbc_argconst_i(INTERP); +__code cbc_argconst_n(INTERP); +__code cbc_argconst_s(INTERP); +__code cbc_invoke_v(INTERP); +__code cbc_invoke_i(INTERP); +__code cbc_invoke_n(INTERP); +__code cbc_invoke_s(INTERP); +__code cbc_invoke_o(INTERP); +__code cbc_checkarity(INTERP); +__code cbc_param_rp_i(INTERP); +__code cbc_param_rp_n(INTERP); +__code cbc_param_rp_s(INTERP); +__code cbc_param_rp_o(INTERP); +__code cbc_param_op_i(INTERP); +__code cbc_param_op_n(INTERP); +__code cbc_param_op_s(INTERP); +__code cbc_param_op_o(INTERP); +__code cbc_param_rn_i(INTERP); +__code cbc_param_rn_n(INTERP); +__code cbc_param_rn_s(INTERP); +__code cbc_param_rn_o(INTERP); +__code cbc_param_on_i(INTERP); +__code cbc_param_on_n(INTERP); +__code cbc_param_on_s(INTERP); +__code cbc_param_on_o(INTERP); +__code cbc_param_sp(INTERP); +__code cbc_param_sn(INTERP); +__code cbc_getcode(INTERP); +__code cbc_caller(INTERP); +__code cbc_capturelex(INTERP); +__code cbc_takeclosure(INTERP); +__code cbc_exception(INTERP); +__code cbc_bindexmessage(INTERP); +__code cbc_bindexpayload(INTERP); +__code cbc_bindexcategory(INTERP); +__code cbc_getexmessage(INTERP); +__code cbc_getexpayload(INTERP); +__code cbc_getexcategory(INTERP); +__code cbc_throwdyn(INTERP); +__code cbc_throwlex(INTERP); +__code cbc_throwlexotic(INTERP); +__code cbc_throwcatdyn(INTERP); +__code cbc_throwcatlex(INTERP); +__code cbc_throwcatlexotic(INTERP); +__code cbc_die(INTERP); +__code cbc_rethrow(INTERP); +__code cbc_resume(INTERP); +__code cbc_takehandlerresult(INTERP); +__code cbc_DEPRECATED_33(INTERP); +__code cbc_DEPRECATED_34(INTERP); +__code cbc_backtracestrings(INTERP); +__code cbc_usecapture(INTERP); +__code cbc_savecapture(INTERP); +__code cbc_captureposelems(INTERP); +__code cbc_captureposarg(INTERP); +__code cbc_captureposarg_i(INTERP); +__code cbc_captureposarg_n(INTERP); +__code cbc_captureposarg_s(INTERP); +__code cbc_captureposprimspec(INTERP); +__code cbc_captureexistsnamed(INTERP); +__code cbc_capturehasnameds(INTERP); +__code cbc_invokewithcapture(INTERP); +__code cbc_multicacheadd(INTERP); +__code cbc_multicachefind(INTERP); +__code cbc_null_s(INTERP); +__code cbc_isnull_s(INTERP); +__code cbc_eq_s(INTERP); +__code cbc_ne_s(INTERP); +__code cbc_gt_s(INTERP); +__code cbc_ge_s(INTERP); +__code cbc_lt_s(INTERP); +__code cbc_le_s(INTERP); +__code cbc_cmp_s(INTERP); +__code cbc_eqat_s(INTERP); +__code cbc_eqatic_s(INTERP); +__code cbc_haveat_s(INTERP); +__code cbc_concat_s(INTERP); +__code cbc_repeat_s(INTERP); +__code cbc_substr_s(INTERP); +__code cbc_index_s(INTERP); +__code cbc_graphs_s(INTERP); +__code cbc_codes_s(INTERP); +__code cbc_getcp_s(INTERP); +__code cbc_indexcp_s(INTERP); +__code cbc_uc(INTERP); +__code cbc_lc(INTERP); +__code cbc_tc(INTERP); +__code cbc_split(INTERP); +__code cbc_join(INTERP); +__code cbc_getcpbyname(INTERP); +__code cbc_indexat(INTERP); +__code cbc_indexnat(INTERP); +__code cbc_unipropcode(INTERP); +__code cbc_unipvalcode(INTERP); +__code cbc_hasuniprop(INTERP); +__code cbc_hasunipropc(INTERP); +__code cbc_chars(INTERP); +__code cbc_chr(INTERP); +__code cbc_ordfirst(INTERP); +__code cbc_ordat(INTERP); +__code cbc_rindexfrom(INTERP); +__code cbc_escape(INTERP); +__code cbc_flip(INTERP); +__code cbc_setbuffersize_fh(INTERP); +__code cbc_iscclass(INTERP); +__code cbc_findcclass(INTERP); +__code cbc_findnotcclass(INTERP); +__code cbc_nfafromstatelist(INTERP); +__code cbc_nfarunproto(INTERP); +__code cbc_nfarunalt(INTERP); +__code cbc_radix(INTERP); +__code cbc_encode(INTERP); +__code cbc_decode(INTERP); +__code cbc_istrue_s(INTERP); +__code cbc_isfalse_s(INTERP); +__code cbc_null(INTERP); +__code cbc_isnull(INTERP); +__code cbc_ifnonnull(INTERP); +__code cbc_findmeth(INTERP); +__code cbc_findmeth_s(INTERP); +__code cbc_can(INTERP); +__code cbc_can_s(INTERP); +__code cbc_create(INTERP); +__code cbc_clone(INTERP); +__code cbc_isconcrete(INTERP); +__code cbc_rebless(INTERP); +__code cbc_istype(INTERP); +__code cbc_objprimspec(INTERP); +__code cbc_gethow(INTERP); +__code cbc_getwhat(INTERP); +__code cbc_getwho(INTERP); +__code cbc_setwho(INTERP); +__code cbc_reprname(INTERP); +__code cbc_getwhere(INTERP); +__code cbc_eqaddr(INTERP); +__code cbc_bindattr_i(INTERP); +__code cbc_bindattr_n(INTERP); +__code cbc_bindattr_s(INTERP); +__code cbc_bindattr_o(INTERP); +__code cbc_bindattrs_i(INTERP); +__code cbc_bindattrs_n(INTERP); +__code cbc_bindattrs_s(INTERP); +__code cbc_bindattrs_o(INTERP); +__code cbc_getattr_i(INTERP); +__code cbc_getattr_n(INTERP); +__code cbc_getattr_s(INTERP); +__code cbc_getattr_o(INTERP); +__code cbc_getattrs_i(INTERP); +__code cbc_getattrs_n(INTERP); +__code cbc_getattrs_s(INTERP); +__code cbc_getattrs_o(INTERP); +__code cbc_attrinited(INTERP); +__code cbc_box_i(INTERP); +__code cbc_box_n(INTERP); +__code cbc_box_s(INTERP); +__code cbc_unbox_i(INTERP); +__code cbc_unbox_n(INTERP); +__code cbc_unbox_s(INTERP); +__code cbc_atpos_i(INTERP); +__code cbc_atpos_n(INTERP); +__code cbc_atpos_s(INTERP); +__code cbc_atpos_o(INTERP); +__code cbc_bindpos_i(INTERP); +__code cbc_bindpos_n(INTERP); +__code cbc_bindpos_s(INTERP); +__code cbc_bindpos_o(INTERP); +__code cbc_push_i(INTERP); +__code cbc_push_n(INTERP); +__code cbc_push_s(INTERP); +__code cbc_push_o(INTERP); +__code cbc_pop_i(INTERP); +__code cbc_pop_n(INTERP); +__code cbc_pop_s(INTERP); +__code cbc_pop_o(INTERP); +__code cbc_shift_i(INTERP); +__code cbc_shift_n(INTERP); +__code cbc_shift_s(INTERP); +__code cbc_shift_o(INTERP); +__code cbc_unshift_i(INTERP); +__code cbc_unshift_n(INTERP); +__code cbc_unshift_s(INTERP); +__code cbc_unshift_o(INTERP); +__code cbc_splice(INTERP); +__code cbc_setelemspos(INTERP); +__code cbc_existspos(INTERP); +__code cbc_atkey_i(INTERP); +__code cbc_atkey_n(INTERP); +__code cbc_atkey_s(INTERP); +__code cbc_atkey_o(INTERP); +__code cbc_bindkey_i(INTERP); +__code cbc_bindkey_n(INTERP); +__code cbc_bindkey_s(INTERP); +__code cbc_bindkey_o(INTERP); +__code cbc_existskey(INTERP); +__code cbc_deletekey(INTERP); +__code cbc_elems(INTERP); +__code cbc_knowhow(INTERP); +__code cbc_knowhowattr(INTERP); +__code cbc_newtype(INTERP); +__code cbc_composetype(INTERP); +__code cbc_setmethcache(INTERP); +__code cbc_setmethcacheauth(INTERP); +__code cbc_settypecache(INTERP); +__code cbc_settypecheckmode(INTERP); +__code cbc_setboolspec(INTERP); +__code cbc_istrue(INTERP); +__code cbc_isfalse(INTERP); +__code cbc_bootint(INTERP); +__code cbc_bootnum(INTERP); +__code cbc_bootstr(INTERP); +__code cbc_bootarray(INTERP); +__code cbc_bootintarray(INTERP); +__code cbc_bootnumarray(INTERP); +__code cbc_bootstrarray(INTERP); +__code cbc_boothash(INTERP); +__code cbc_isint(INTERP); +__code cbc_isnum(INTERP); +__code cbc_isstr(INTERP); +__code cbc_islist(INTERP); +__code cbc_ishash(INTERP); +__code cbc_sethllconfig(INTERP); +__code cbc_hllboxtype_i(INTERP); +__code cbc_hllboxtype_n(INTERP); +__code cbc_hllboxtype_s(INTERP); +__code cbc_hlllist(INTERP); +__code cbc_hllhash(INTERP); +__code cbc_getcomp(INTERP); +__code cbc_bindcomp(INTERP); +__code cbc_getcurhllsym(INTERP); +__code cbc_bindcurhllsym(INTERP); +__code cbc_gethllsym(INTERP); +__code cbc_bindhllsym(INTERP); +__code cbc_settypehll(INTERP); +__code cbc_settypehllrole(INTERP); +__code cbc_hllize(INTERP); +__code cbc_hllizefor(INTERP); +__code cbc_usecompileehllconfig(INTERP); +__code cbc_usecompilerhllconfig(INTERP); +__code cbc_iter(INTERP); +__code cbc_iterkey_s(INTERP); +__code cbc_iterval(INTERP); +__code cbc_getcodename(INTERP); +__code cbc_iscoderef(INTERP); +__code cbc_getcodeobj(INTERP); +__code cbc_setcodeobj(INTERP); +__code cbc_setcodename(INTERP); +__code cbc_forceouterctx(INTERP); +__code cbc_setinvokespec(INTERP); +__code cbc_isinvokable(INTERP); +__code cbc_freshcoderef(INTERP); +__code cbc_markcodestatic(INTERP); +__code cbc_markcodestub(INTERP); +__code cbc_getstaticcode(INTERP); +__code cbc_getcodecuid(INTERP); +__code cbc_setdispatcher(INTERP); +__code cbc_takedispatcher(INTERP); +__code cbc_assign(INTERP); +__code cbc_assignunchecked(INTERP); +__code cbc_iscont(INTERP); +__code cbc_decont(INTERP); +__code cbc_setcontspec(INTERP); +__code cbc_sha1(INTERP); +__code cbc_createsc(INTERP); +__code cbc_scsetobj(INTERP); +__code cbc_scsetcode(INTERP); +__code cbc_scgetobj(INTERP); +__code cbc_scgethandle(INTERP); +__code cbc_scgetobjidx(INTERP); +__code cbc_scsetdesc(INTERP); +__code cbc_scobjcount(INTERP); +__code cbc_setobjsc(INTERP); +__code cbc_getobjsc(INTERP); +__code cbc_serialize(INTERP); +__code cbc_deserialize(INTERP); +__code cbc_wval(INTERP); +__code cbc_wval_wide(INTERP); +__code cbc_scwbdisable(INTERP); +__code cbc_scwbenable(INTERP); +__code cbc_pushcompsc(INTERP); +__code cbc_popcompsc(INTERP); +__code cbc_scgetdesc(INTERP); +__code cbc_loadbytecode(INTERP); +__code cbc_masttofile(INTERP); +__code cbc_masttocu(INTERP); +__code cbc_iscompunit(INTERP); +__code cbc_compunitmainline(INTERP); +__code cbc_compunitcodes(INTERP); +__code cbc_ctx(INTERP); +__code cbc_ctxouter(INTERP); +__code cbc_ctxcaller(INTERP); +__code cbc_ctxlexpad(INTERP); +__code cbc_curcode(INTERP); +__code cbc_callercode(INTERP); +__code cbc_add_I(INTERP); +__code cbc_sub_I(INTERP); +__code cbc_mul_I(INTERP); +__code cbc_div_I(INTERP); +__code cbc_mod_I(INTERP); +__code cbc_neg_I(INTERP); +__code cbc_abs_I(INTERP); +__code cbc_cmp_I(INTERP); +__code cbc_eq_I(INTERP); +__code cbc_ne_I(INTERP); +__code cbc_lt_I(INTERP); +__code cbc_le_I(INTERP); +__code cbc_gt_I(INTERP); +__code cbc_ge_I(INTERP); +__code cbc_bor_I(INTERP); +__code cbc_bxor_I(INTERP); +__code cbc_band_I(INTERP); +__code cbc_bnot_I(INTERP); +__code cbc_blshift_I(INTERP); +__code cbc_brshift_I(INTERP); +__code cbc_pow_I(INTERP); +__code cbc_gcd_I(INTERP); +__code cbc_lcm_I(INTERP); +__code cbc_expmod_I(INTERP); +__code cbc_isprime_I(INTERP); +__code cbc_rand_I(INTERP); +__code cbc_coerce_In(INTERP); +__code cbc_coerce_Is(INTERP); +__code cbc_coerce_nI(INTERP); +__code cbc_coerce_sI(INTERP); +__code cbc_isbig_I(INTERP); +__code cbc_bool_I(INTERP); +__code cbc_base_I(INTERP); +__code cbc_radix_I(INTERP); +__code cbc_div_In(INTERP); +__code cbc_copy_f(INTERP); +__code cbc_append_f(INTERP); +__code cbc_rename_f(INTERP); +__code cbc_delete_f(INTERP); +__code cbc_chmod_f(INTERP); +__code cbc_exists_f(INTERP); +__code cbc_mkdir(INTERP); +__code cbc_rmdir(INTERP); +__code cbc_open_dir(INTERP); +__code cbc_read_dir(INTERP); +__code cbc_close_dir(INTERP); +__code cbc_open_fh(INTERP); +__code cbc_close_fh(INTERP); +__code cbc_DEPRECATED_23(INTERP); +__code cbc_DEPRECATED_27(INTERP); +__code cbc_DEPRECATED_28(INTERP); +__code cbc_DEPRECATED_18(INTERP); +__code cbc_seek_fh(INTERP); +__code cbc_lock_fh(INTERP); +__code cbc_unlock_fh(INTERP); +__code cbc_sync_fh(INTERP); +__code cbc_trunc_fh(INTERP); +__code cbc_eof_fh(INTERP); +__code cbc_getstdin(INTERP); +__code cbc_getstdout(INTERP); +__code cbc_getstderr(INTERP); +__code cbc_connect_sk(INTERP); +__code cbc_socket(INTERP); +__code cbc_bind_sk(INTERP); +__code cbc_DEPRECATED_24(INTERP); +__code cbc_accept_sk(INTERP); +__code cbc_decodetocodes(INTERP); +__code cbc_encodefromcodes(INTERP); +__code cbc_DEPRECATED_17(INTERP); +__code cbc_print(INTERP); +__code cbc_say(INTERP); +__code cbc_DEPRECATED_22(INTERP); +__code cbc_tell_fh(INTERP); +__code cbc_stat(INTERP); +__code cbc_tryfindmeth(INTERP); +__code cbc_tryfindmeth_s(INTERP); +__code cbc_chdir(INTERP); +__code cbc_srand(INTERP); +__code cbc_rand_i(INTERP); +__code cbc_rand_n(INTERP); +__code cbc_time_i(INTERP); +__code cbc_sleep(INTERP); +__code cbc_newthread(INTERP); +__code cbc_threadjoin(INTERP); +__code cbc_time_n(INTERP); +__code cbc_exit(INTERP); +__code cbc_DEPRECATED_30(INTERP); +__code cbc_cwd(INTERP); +__code cbc_clargs(INTERP); +__code cbc_getenvhash(INTERP); +__code cbc_loadlib(INTERP); +__code cbc_freelib(INTERP); +__code cbc_findsym(INTERP); +__code cbc_dropsym(INTERP); +__code cbc_loadext(INTERP); +__code cbc_backendconfig(INTERP); +__code cbc_getlexouter(INTERP); +__code cbc_getlexrel(INTERP); +__code cbc_getlexreldyn(INTERP); +__code cbc_getlexrelcaller(INTERP); +__code cbc_getlexcaller(INTERP); +__code cbc_bitand_s(INTERP); +__code cbc_bitor_s(INTERP); +__code cbc_bitxor_s(INTERP); +__code cbc_isnanorinf(INTERP); +__code cbc_inf(INTERP); +__code cbc_neginf(INTERP); +__code cbc_nan(INTERP); +__code cbc_getpid(INTERP); +__code cbc_DEPRECATED_29(INTERP); +__code cbc_filereadable(INTERP); +__code cbc_filewritable(INTERP); +__code cbc_fileexecutable(INTERP); +__code cbc_DEPRECATED_19(INTERP); +__code cbc_capturenamedshash(INTERP); +__code cbc_read_fhb(INTERP); +__code cbc_write_fhb(INTERP); +__code cbc_replace(INTERP); +__code cbc_newexception(INTERP); +__code cbc_permit(INTERP); +__code cbc_backtrace(INTERP); +__code cbc_symlink(INTERP); +__code cbc_link(INTERP); +__code cbc_gethostname(INTERP); +__code cbc_exreturnafterunwind(INTERP); +__code cbc_DEPRECATED_13(INTERP); +__code cbc_continuationreset(INTERP); +__code cbc_continuationcontrol(INTERP); +__code cbc_continuationinvoke(INTERP); +__code cbc_randscale_n(INTERP); +__code cbc_uniisblock(INTERP); +__code cbc_assertparamcheck(INTERP); +__code cbc_hintfor(INTERP); +__code cbc_paramnamesused(INTERP); +__code cbc_getuniname(INTERP); +__code cbc_getuniprop_int(INTERP); +__code cbc_getuniprop_bool(INTERP); +__code cbc_getuniprop_str(INTERP); +__code cbc_matchuniprop(INTERP); +__code cbc_nativecallbuild(INTERP); +__code cbc_nativecallinvoke(INTERP); +__code cbc_nativecallrefresh(INTERP); +__code cbc_threadrun(INTERP); +__code cbc_threadid(INTERP); +__code cbc_threadyield(INTERP); +__code cbc_currentthread(INTERP); +__code cbc_lock(INTERP); +__code cbc_unlock(INTERP); +__code cbc_semacquire(INTERP); +__code cbc_semtryacquire(INTERP); +__code cbc_semrelease(INTERP); +__code cbc_getlockcondvar(INTERP); +__code cbc_condwait(INTERP); +__code cbc_condsignalone(INTERP); +__code cbc_condsignalall(INTERP); +__code cbc_queuepoll(INTERP); +__code cbc_setmultispec(INTERP); +__code cbc_ctxouterskipthunks(INTERP); +__code cbc_ctxcallerskipthunks(INTERP); +__code cbc_timer(INTERP); +__code cbc_cancel(INTERP); +__code cbc_signal(INTERP); +__code cbc_watchfile(INTERP); +__code cbc_asyncconnect(INTERP); +__code cbc_asynclisten(INTERP); +__code cbc_DEPRECATED_14(INTERP); +__code cbc_asyncwritebytes(INTERP); +__code cbc_DEPRECATED_16(INTERP); +__code cbc_asyncreadbytes(INTERP); +__code cbc_getlexstatic_o(INTERP); +__code cbc_getlexperinvtype_o(INTERP); +__code cbc_execname(INTERP); +__code cbc_const_i64_16(INTERP); +__code cbc_const_i64_32(INTERP); +__code cbc_isnonnull(INTERP); +__code cbc_param_rn2_i(INTERP); +__code cbc_param_rn2_n(INTERP); +__code cbc_param_rn2_s(INTERP); +__code cbc_param_rn2_o(INTERP); +__code cbc_param_on2_i(INTERP); +__code cbc_param_on2_n(INTERP); +__code cbc_param_on2_s(INTERP); +__code cbc_param_on2_o(INTERP); +__code cbc_osrpoint(INTERP); +__code cbc_nativecallcast(INTERP); +__code cbc_spawnprocasync(INTERP); +__code cbc_killprocasync(INTERP); +__code cbc_startprofile(INTERP); +__code cbc_endprofile(INTERP); +__code cbc_objectid(INTERP); +__code cbc_settypefinalize(INTERP); +__code cbc_force_gc(INTERP); +__code cbc_nativecallglobal(INTERP); +__code cbc_DEPRECATED_32(INTERP); +__code cbc_setparameterizer(INTERP); +__code cbc_parameterizetype(INTERP); +__code cbc_typeparameterized(INTERP); +__code cbc_typeparameters(INTERP); +__code cbc_typeparameterat(INTERP); +__code cbc_readlink(INTERP); +__code cbc_lstat(INTERP); +__code cbc_iscont_i(INTERP); +__code cbc_iscont_n(INTERP); +__code cbc_iscont_s(INTERP); +__code cbc_assign_i(INTERP); +__code cbc_assign_n(INTERP); +__code cbc_assign_s(INTERP); +__code cbc_decont_i(INTERP); +__code cbc_decont_n(INTERP); +__code cbc_decont_s(INTERP); +__code cbc_getrusage(INTERP); +__code cbc_threadlockcount(INTERP); +__code cbc_DEPRECATED_4(INTERP); +__code cbc_getlexref_i(INTERP); +__code cbc_getlexref_n(INTERP); +__code cbc_getlexref_s(INTERP); +__code cbc_getlexref_ni(INTERP); +__code cbc_getlexref_nn(INTERP); +__code cbc_getlexref_ns(INTERP); +__code cbc_atposref_i(INTERP); +__code cbc_atposref_n(INTERP); +__code cbc_atposref_s(INTERP); +__code cbc_getattrref_i(INTERP); +__code cbc_getattrref_n(INTERP); +__code cbc_getattrref_s(INTERP); +__code cbc_getattrsref_i(INTERP); +__code cbc_getattrsref_n(INTERP); +__code cbc_getattrsref_s(INTERP); +__code cbc_nativecallsizeof(INTERP); +__code cbc_encodenorm(INTERP); +__code cbc_normalizecodes(INTERP); +__code cbc_strfromcodes(INTERP); +__code cbc_strtocodes(INTERP); +__code cbc_getcodelocation(INTERP); +__code cbc_eqatim_s(INTERP); +__code cbc_ordbaseat(INTERP); +__code cbc_neverrepossess(INTERP); +__code cbc_scdisclaim(INTERP); +__code cbc_DEPRECATED_31(INTERP); +__code cbc_atpos2d_i(INTERP); +__code cbc_atpos2d_n(INTERP); +__code cbc_atpos2d_s(INTERP); +__code cbc_atpos2d_o(INTERP); +__code cbc_atpos3d_i(INTERP); +__code cbc_atpos3d_n(INTERP); +__code cbc_atpos3d_s(INTERP); +__code cbc_atpos3d_o(INTERP); +__code cbc_atposnd_i(INTERP); +__code cbc_atposnd_n(INTERP); +__code cbc_atposnd_s(INTERP); +__code cbc_atposnd_o(INTERP); +__code cbc_bindpos2d_i(INTERP); +__code cbc_bindpos2d_n(INTERP); +__code cbc_bindpos2d_s(INTERP); +__code cbc_bindpos2d_o(INTERP); +__code cbc_bindpos3d_i(INTERP); +__code cbc_bindpos3d_n(INTERP); +__code cbc_bindpos3d_s(INTERP); +__code cbc_bindpos3d_o(INTERP); +__code cbc_bindposnd_i(INTERP); +__code cbc_bindposnd_n(INTERP); +__code cbc_bindposnd_s(INTERP); +__code cbc_bindposnd_o(INTERP); +__code cbc_dimensions(INTERP); +__code cbc_setdimensions(INTERP); +__code cbc_numdimensions(INTERP); +__code cbc_ctxcode(INTERP); +__code cbc_isrwcont(INTERP); +__code cbc_fc(INTERP); +__code cbc_DEPRECATED_25(INTERP); +__code cbc_DEPRECATED_21(INTERP); +__code cbc_encoderep(INTERP); +__code cbc_istty_fh(INTERP); +__code cbc_multidimref_i(INTERP); +__code cbc_multidimref_n(INTERP); +__code cbc_multidimref_s(INTERP); +__code cbc_fileno_fh(INTERP); +__code cbc_asyncudp(INTERP); +__code cbc_DEPRECATED_15(INTERP); +__code cbc_asyncwritebytesto(INTERP); +__code cbc_objprimbits(INTERP); +__code cbc_objprimunsigned(INTERP); +__code cbc_DEPRECATED_5(INTERP); +__code cbc_DEPRECATED_6(INTERP); +__code cbc_DEPRECATED_7(INTERP); +__code cbc_DEPRECATED_8(INTERP); +__code cbc_getlexref_i32(INTERP); +__code cbc_getlexref_i16(INTERP); +__code cbc_getlexref_i8(INTERP); +__code cbc_getlexref_n32(INTERP); +__code cbc_box_u(INTERP); +__code cbc_unbox_u(INTERP); +__code cbc_coerce_iu(INTERP); +__code cbc_coerce_ui(INTERP); +__code cbc_coerce_nu(INTERP); +__code cbc_coerce_un(INTERP); +__code cbc_decont_u(INTERP); +__code cbc_DEPRECATED_9(INTERP); +__code cbc_DEPRECATED_10(INTERP); +__code cbc_DEPRECATED_11(INTERP); +__code cbc_DEPRECATED_12(INTERP); +__code cbc_getlexref_u(INTERP); +__code cbc_getlexref_u32(INTERP); +__code cbc_getlexref_u16(INTERP); +__code cbc_getlexref_u8(INTERP); +__code cbc_param_rp_u(INTERP); +__code cbc_param_op_u(INTERP); +__code cbc_param_rn_u(INTERP); +__code cbc_param_on_u(INTERP); +__code cbc_param_rn2_u(INTERP); +__code cbc_param_on2_u(INTERP); +__code cbc_stat_time(INTERP); +__code cbc_lstat_time(INTERP); +__code cbc_setdebugtypename(INTERP); +__code cbc_loadbytecodebuffer(INTERP); +__code cbc_loadbytecodefh(INTERP); +__code cbc_throwpayloadlex(INTERP); +__code cbc_throwpayloadlexcaller(INTERP); +__code cbc_lastexpayload(INTERP); +__code cbc_cancelnotify(INTERP); +__code cbc_decoderconfigure(INTERP); +__code cbc_decodersetlineseps(INTERP); +__code cbc_decoderaddbytes(INTERP); +__code cbc_decodertakechars(INTERP); +__code cbc_decodertakeallchars(INTERP); +__code cbc_decodertakeavailablechars(INTERP); +__code cbc_decodertakeline(INTERP); +__code cbc_decoderbytesavailable(INTERP); +__code cbc_decodertakebytes(INTERP); +__code cbc_decoderempty(INTERP); +__code cbc_indexingoptimized(INTERP); +__code cbc_captureinnerlex(INTERP); +__code cbc_unicmp_s(INTERP); +__code cbc_setdispatcherfor(INTERP); +__code cbc_getstrfromname(INTERP); +__code cbc_indexic_s(INTERP); +__code cbc_getport_sk(INTERP); +__code cbc_cpucores(INTERP); +__code cbc_eqaticim_s(INTERP); +__code cbc_indexicim_s(INTERP); +__code cbc_decodertakecharseof(INTERP); +__code cbc_indexim_s(INTERP); +__code cbc_cas_o(INTERP); +__code cbc_cas_i(INTERP); +__code cbc_atomicinc_i(INTERP); +__code cbc_atomicdec_i(INTERP); +__code cbc_atomicadd_i(INTERP); +__code cbc_atomicload_o(INTERP); +__code cbc_atomicload_i(INTERP); +__code cbc_atomicstore_o(INTERP); +__code cbc_atomicstore_i(INTERP); +__code cbc_barrierfull(INTERP); +__code cbc_coveragecontrol(INTERP); +__code cbc_nativeinvoke_v(INTERP); +__code cbc_nativeinvoke_i(INTERP); +__code cbc_nativeinvoke_n(INTERP); +__code cbc_nativeinvoke_s(INTERP); +__code cbc_nativeinvoke_o(INTERP); +__code cbc_getarg_i(INTERP); +__code cbc_getarg_n(INTERP); +__code cbc_getarg_s(INTERP); +__code cbc_getarg_o(INTERP); +__code cbc_coerce_II(INTERP); +__code cbc_encoderepconf(INTERP); +__code cbc_encodeconf(INTERP); +__code cbc_decodeconf(INTERP); +__code cbc_decoderepconf(INTERP); +__code cbc_getppid(INTERP); +__code cbc_getsignals(INTERP); +__code cbc_sp_guard(INTERP); +__code cbc_sp_guardconc(INTERP); +__code cbc_sp_guardtype(INTERP); +__code cbc_sp_guardsf(INTERP); +__code cbc_sp_guardsfouter(INTERP); +__code cbc_sp_rebless(INTERP); +__code cbc_sp_resolvecode(INTERP); +__code cbc_sp_decont(INTERP); +__code cbc_sp_getlex_o(INTERP); +__code cbc_sp_getlex_ins(INTERP); +__code cbc_sp_getlex_no(INTERP); +__code cbc_sp_getarg_o(INTERP); +__code cbc_sp_getarg_i(INTERP); +__code cbc_sp_getarg_n(INTERP); +__code cbc_sp_getarg_s(INTERP); +__code cbc_sp_fastinvoke_v(INTERP); +__code cbc_sp_fastinvoke_i(INTERP); +__code cbc_sp_fastinvoke_n(INTERP); +__code cbc_sp_fastinvoke_s(INTERP); +__code cbc_sp_fastinvoke_o(INTERP); +__code cbc_sp_paramnamesused(INTERP); +__code cbc_sp_getspeshslot(INTERP); +__code cbc_sp_findmeth(INTERP); +__code cbc_sp_fastcreate(INTERP); +__code cbc_sp_get_o(INTERP); +__code cbc_sp_get_i64(INTERP); +__code cbc_sp_get_i32(INTERP); +__code cbc_sp_get_i16(INTERP); +__code cbc_sp_get_i8(INTERP); +__code cbc_sp_get_n(INTERP); +__code cbc_sp_get_s(INTERP); +__code cbc_sp_bind_o(INTERP); +__code cbc_sp_bind_i64(INTERP); +__code cbc_sp_bind_i32(INTERP); +__code cbc_sp_bind_i16(INTERP); +__code cbc_sp_bind_i8(INTERP); +__code cbc_sp_bind_n(INTERP); +__code cbc_sp_bind_s(INTERP); +__code cbc_sp_p6oget_o(INTERP); +__code cbc_sp_p6ogetvt_o(INTERP); +__code cbc_sp_p6ogetvc_o(INTERP); +__code cbc_sp_p6oget_i(INTERP); +__code cbc_sp_p6oget_n(INTERP); +__code cbc_sp_p6oget_s(INTERP); +__code cbc_sp_p6obind_o(INTERP); +__code cbc_sp_p6obind_i(INTERP); +__code cbc_sp_p6obind_n(INTERP); +__code cbc_sp_p6obind_s(INTERP); +__code cbc_sp_deref_get_i64(INTERP); +__code cbc_sp_deref_get_n(INTERP); +__code cbc_sp_deref_bind_i64(INTERP); +__code cbc_sp_deref_bind_n(INTERP); +__code cbc_sp_getlexvia_o(INTERP); +__code cbc_sp_getlexvia_ins(INTERP); +__code cbc_sp_getstringfrom(INTERP); +__code cbc_sp_getwvalfrom(INTERP); +__code cbc_sp_jit_enter(INTERP); +__code cbc_sp_boolify_iter(INTERP); +__code cbc_sp_boolify_iter_arr(INTERP); +__code cbc_sp_boolify_iter_hash(INTERP); +__code cbc_sp_cas_o(INTERP); +__code cbc_sp_atomicload_o(INTERP); +__code cbc_sp_atomicstore_o(INTERP); +__code cbc_prof_enter(INTERP); +__code cbc_prof_enterspesh(INTERP); +__code cbc_prof_enterinline(INTERP); +__code cbc_prof_enternative(INTERP); +__code cbc_prof_exit(INTERP); +__code cbc_prof_allocated(INTERP); +__code cbc_ctw_check(INTERP); +__code cbc_coverage_log(INTERP); +__code cbc_breakpoint(INTERP); +__code cbc_op_call_extop(INTERP); -__code cbc_return_label(INTER); +__code cbc_return_label(INTERP); - __code (* CODES[])(INTER) = { + __code (* CODES[])(INTERP) = { cbc_no_op, cbc_const_i8, cbc_const_i16,