first cut at Anderson's JIT code.

This commit is contained in:
Vitor Santos Costa
2009-04-07 23:55:16 +01:00
parent f97bc596b9
commit b2ad3bd000
9 changed files with 73 additions and 1 deletions

View File

@@ -1606,6 +1606,21 @@ a_empty_call(clause_info *clinfo, yamop *code_p, int pass_no, struct intermedia
return code_p;
}
static yamop *
a_cnp(op_numbers opcode, yamop *code_p, int pass_no, struct intermediates *cip)
{
if (pass_no) {
code_p->opc = emit_op(opcode);
code_p->u.aFlp.n = 0;
code_p->u.aFlp.native = NULL;
code_p->u.aFlp.native_next = 0;
code_p->u.aFlp.p = cip->CurrentPred;
}
GONEXT(aFlp);
return code_p;
}
static yamop *
a_pl(op_numbers opcode, PredEntry *pred, yamop *code_p, int pass_no)
{
@@ -3376,6 +3391,9 @@ do_pass(int pass_no, yamop **entry_codep, int assembling, int *clause_has_blobsp
case cut_op:
code_p = a_cut(&clinfo, code_p, pass_no, cip);
break;
case native_op:
code_p = a_cnp(_native_me, code_p, pass_no, cip);
break;
case cutexit_op:
code_p = a_cut(&clinfo, code_p, pass_no, cip);
if (cip->CurrentPred->PredFlags & LogUpdatePredFlag &&