-
-
Save bdw/8ed7638d265ff77d716e to your computer and use it in GitHub Desktop.
example of conversion
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case MVM_OP_unshift_i: return &MVM_repr_unshift_i; | |
case MVM_OP_unshift_n: return &MVM_repr_unshift_n; | |
case MVM_OP_unshift_n: | |
case MVM_OP_push_n: { | |
MVMint32 invocant = ins->operands[0].reg.orig; | |
MVMint32 value = ins->operands[1].reg.orig; | |
MVMJitCallArg args[] = { { MVM_JIT_INTERP_VAR, MVM_JIT_INTERP_TC }, | |
{ MVM_JIT_REG_VAL, invocant }, | |
{ MVM_JIT_REG_VAL_F, value } }; | |
jg_append_call_c(tc, jgb->graph, op_to_func(tc, op), 3, args, MVM_JIT_RV_VOID, -1); | |
break; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(template: unshift_n | |
(call (^func &MVM_repr_unshift_n) | |
(arglist 3 | |
(carg (tc) ptr) | |
(carg $0 ptr) | |
(carg $1 num)) | |
void)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment