-
-
Save FROGGS/3a0eb94ad0145840886b to your computer and use it in GitHub Desktop.
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
diff --git a/src/jit/graph.c b/src/jit/graph.c | |
index 6b7fef4..f5545a7 100644 | |
--- a/src/jit/graph.c | |
+++ b/src/jit/graph.c | |
@@ -705,12 +705,6 @@ static MVMint32 jgb_consume_reprop(MVMThreadContext *tc, JitGraphBuilder *jgb, | |
MVMSpeshFacts *type_facts = 0; | |
MVMint32 alternative = 0; | |
- /* XXX There is a very strange bug with push and unshift where the flag for | |
- * num64 registers doesn't properly get passed to the function, resulting | |
- * in a "push: expected num register" error. */ | |
- if (op == MVM_OP_push_n || op == MVM_OP_unshift_n) | |
- goto skipdevirt; | |
- | |
switch (op) { | |
case MVM_OP_unshift_i: | |
case MVM_OP_unshift_n: | |
@@ -859,8 +853,7 @@ static MVMint32 jgb_consume_reprop(MVMThreadContext *tc, JitGraphBuilder *jgb, | |
{ MVM_JIT_REG_VAL, invocant }, | |
{ MVM_JIT_REG_OBJBODY, invocant }, | |
{ MVM_JIT_REG_VAL, key }, | |
- { op == MVM_OP_bindpos_n || op == MVM_OP_bindkey_n ? MVM_JIT_REG_VAL_F : MVM_JIT_REG_VAL , | |
- value }, | |
+ { MVM_JIT_REG_VAL, value }, | |
{ MVM_JIT_LITERAL, | |
op == MVM_OP_bindpos_i || op == MVM_OP_bindkey_i ? MVM_reg_int64 : | |
op == MVM_OP_bindpos_n || op == MVM_OP_bindkey_n ? MVM_reg_num64 : | |
@@ -980,8 +973,7 @@ static MVMint32 jgb_consume_reprop(MVMThreadContext *tc, JitGraphBuilder *jgb, | |
{ is_name_direct ? MVM_JIT_STR_IDX : MVM_JIT_REG_VAL, | |
attrname }, | |
{ MVM_JIT_LITERAL, attrhint }, | |
- { op == MVM_OP_bindattr_n || op == MVM_OP_bindattrs_n ? MVM_JIT_REG_VAL_F : MVM_JIT_REG_VAL , | |
- value }, | |
+ { MVM_JIT_REG_VAL, value }, | |
{ MVM_JIT_LITERAL, | |
op == MVM_OP_bindattr_i || op == MVM_OP_bindattrs_i ? MVM_reg_int64 : | |
op == MVM_OP_bindattr_n || op == MVM_OP_bindattrs_n ? MVM_reg_num64 : | |
@@ -1016,8 +1008,7 @@ static MVMint32 jgb_consume_reprop(MVMThreadContext *tc, JitGraphBuilder *jgb, | |
{ MVM_JIT_REG_STABLE, invocant }, | |
{ MVM_JIT_REG_VAL, invocant }, | |
{ MVM_JIT_REG_OBJBODY, invocant }, | |
- { op == MVM_OP_push_n || op == MVM_OP_unshift_n ? MVM_JIT_REG_VAL_F : MVM_JIT_REG_VAL , | |
- value }, | |
+ { MVM_JIT_REG_VAL, value }, | |
{ MVM_JIT_LITERAL, | |
op == MVM_OP_push_i || op == MVM_OP_unshift_i ? MVM_reg_int64 : | |
op == MVM_OP_push_n || op == MVM_OP_unshift_n ? MVM_reg_num64 : | |
@@ -1235,7 +1226,7 @@ skipdevirt: | |
MVMJitCallArg args[] = { { MVM_JIT_INTERP_VAR, MVM_JIT_INTERP_TC }, | |
{ MVM_JIT_REG_VAL, invocant }, | |
{ MVM_JIT_REG_VAL, key_pos }, | |
- { op == MVM_OP_bindpos_n || op == MVM_OP_bindkey_n ? MVM_JIT_REG_VAL_F : MVM_JIT_REG_VAL, value } }; | |
+ { MVM_JIT_REG_VAL, value } }; | |
jgb_append_call_c(tc, jgb, op_to_func(tc, op), 4, args, MVM_JIT_RV_VOID, -1); | |
break; | |
} | |
@@ -1299,7 +1290,7 @@ skipdevirt: | |
{ MVM_JIT_REG_VAL, typ }, | |
{ MVM_JIT_STR_IDX, str_idx }, | |
{ MVM_JIT_LITERAL, hint }, | |
- { op == MVM_OP_bindattr_n ? MVM_JIT_REG_VAL_F : MVM_JIT_REG_VAL, val }, | |
+ { MVM_JIT_REG_VAL, val }, | |
{ MVM_JIT_LITERAL, kind } }; | |
jgb_append_call_c(tc, jgb, op_to_func(tc, op), 7, args, MVM_JIT_RV_VOID, -1); | |
break; | |
@@ -1322,7 +1313,7 @@ skipdevirt: | |
{ MVM_JIT_REG_VAL, typ }, | |
{ MVM_JIT_REG_VAL, str }, | |
{ MVM_JIT_LITERAL, hint }, | |
- { op == MVM_OP_bindattrs_n ? MVM_JIT_REG_VAL_F : MVM_JIT_REG_VAL, val }, | |
+ { MVM_JIT_REG_VAL, val }, | |
{ MVM_JIT_LITERAL, kind } }; | |
jgb_append_call_c(tc, jgb, op_to_func(tc, op), 7, args, MVM_JIT_RV_VOID, -1); | |
break; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment