Skip to content

Commit

Permalink
Fix jump condition in JIT compiled getcodename
Browse files Browse the repository at this point in the history
We check the code object's MVM_CF_TYPE_OBJECT flag. If the flag is 0 (the
object is concrete), the test assembly instruction will set the zero flag to 1.
So we need to jump over the throw_adhoc if the zero flag is set, not when it's
0.

Fixes GH #1027
  • Loading branch information
niner committed Dec 22, 2018
1 parent 07fe8e4 commit caf7e4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/jit/x64/emit.dasc
Expand Up @@ -2160,7 +2160,7 @@ void MVM_jit_emit_primitive(MVMThreadContext *tc, MVMJitCompiler *compiler, MVMJ
| cmp_repr_id TMP1, TMP2, MVM_REPR_ID_MVMCode;
| je >1;
| test_type_object TMP1;
| jnz >1;
| jz >1;
| throw_adhoc "getcodename requires a concrete object";
|1:
| mov TMP2, CODE:TMP1->body.name;
Expand Down

0 comments on commit caf7e4f

Please sign in to comment.