more patches to support Anderson's JIT.
This commit is contained in:
@@ -1969,7 +1969,6 @@ YAP_Init(YAP_init_args *yap_init)
|
||||
} else {
|
||||
Heap = yap_init->HeapSize;
|
||||
}
|
||||
/* tell the system who should cope with interruptions */
|
||||
Yap_PrologShouldHandleInterrupts = yap_init->PrologShouldHandleInterrupts;
|
||||
Yap_InitWorkspace(Heap, Stack, Trail, Atts,
|
||||
yap_init->MaxTableSpaceSize,
|
||||
@@ -2010,6 +2009,8 @@ YAP_Init(YAP_init_args *yap_init)
|
||||
*/
|
||||
yap_flags[HALT_AFTER_CONSULT_FLAG] = yap_init->HaltAfterConsult;
|
||||
}
|
||||
/* tell the system who should cope with interruptions */
|
||||
Yap_ExecutionMode = yap_init->ExecutionMode;
|
||||
if (yap_init->SavedState != NULL ||
|
||||
yap_init->YapPrologBootFile == NULL) {
|
||||
#if SUPPORT_CONDOR || SUPPORT_THREADS
|
||||
@@ -2131,6 +2132,7 @@ YAP_FastInit(char saved_state[])
|
||||
init_args.SchedulerLoop = 10;
|
||||
init_args.DelayedReleaseLoad = 3;
|
||||
init_args.PrologShouldHandleInterrupts = FALSE;
|
||||
init_args.ExecutionMode = INTERPRETED;
|
||||
init_args.Argc = 0;
|
||||
init_args.Argv = NULL;
|
||||
init_args.ErrorNo = 0;
|
||||
|
@@ -2098,6 +2098,8 @@ c_head(Term t, compiler_struct *cglobs)
|
||||
Yap_emit(run_op,Zero,(unsigned long) cglobs->cint.CurrentPred,&cglobs->cint);
|
||||
}
|
||||
#endif
|
||||
if (Yap_ExecutionMode == MIXED_MODE_USER)
|
||||
Yap_emit(native_op, 0, 0, &cglobs->cint);
|
||||
c_args(t, 0, cglobs);
|
||||
}
|
||||
|
||||
|
@@ -995,6 +995,13 @@ has_cut(yamop *pc)
|
||||
break;
|
||||
case _execute:
|
||||
case _dexecute:
|
||||
case _p_execute_cpred:
|
||||
pc = NEXTOP(pc,pp);
|
||||
break;
|
||||
case _native_me:
|
||||
pc = NEXTOP(pc,aFlp);
|
||||
break;
|
||||
case _dexecute:
|
||||
case _p_execute_cpred:
|
||||
pc = NEXTOP(pc,pp);
|
||||
break;
|
||||
@@ -1539,6 +1546,8 @@ move_next(ClauseDef *clause, UInt regno)
|
||||
op_numbers op = Yap_op_from_opcode(cl->opc);
|
||||
|
||||
switch (op) {
|
||||
case _native_me:
|
||||
return;
|
||||
case _p_db_ref_x:
|
||||
case _p_float_x:
|
||||
if (wreg == cl->u.xl.x) {
|
||||
|
Reference in New Issue
Block a user