Skip to content

Commit

Permalink
JIT strfromname in the legacy JIT
Browse files Browse the repository at this point in the history
  • Loading branch information
MasterDuke17 committed Aug 6, 2018
1 parent 9d4681a commit 9b44d48
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/jit/graph.c
Expand Up @@ -365,6 +365,7 @@ static void * op_to_func(MVMThreadContext *tc, MVMint16 opcode) {
case MVM_OP_breakpoint: return MVM_debugserver_breakpoint_check;
case MVM_OP_sp_getstringfrom: return MVM_cu_string;
case MVM_OP_encoderepconf: return MVM_string_encode_to_buf_config;
case MVM_OP_strfromname: return MVM_unicode_string_from_name;
default:
MVM_oops(tc, "JIT: No function for op %d in op_to_func (%s)", opcode, MVM_op_get_op(opcode)->name);
}
Expand Down Expand Up @@ -3325,6 +3326,13 @@ static MVMint32 consume_ins(MVMThreadContext *tc, MVMJitGraph *jg,
jg_append_call_c(tc, jg, op_to_func(tc, op), 3, args, MVM_JIT_RV_VOID, -1);
break;
}
case MVM_OP_strfromname: {
MVMint16 name = ins->operands[0].reg.orig;
MVMJitCallArg args[] = { { MVM_JIT_INTERP_VAR, { MVM_JIT_INTERP_TC } },
{ MVM_JIT_REG_VAL, { name } } };
jg_append_call_c(tc, jg, op_to_func(tc, op), 2, args, MVM_JIT_RV_PTR, -1);
break;
}
default: {
/* Check if it's an extop. */
MVMint32 emitted_extop = 0;
Expand Down

0 comments on commit 9b44d48

Please sign in to comment.