indenting cganges

This commit is contained in:
Vitor Santos Costa 2010-08-17 13:02:28 +01:00
parent 431482ac40
commit 3e6ce40eb1

View File

@ -2457,71 +2457,71 @@ YAP_Init(YAP_init_args *yap_init)
yap_flags[QUIET_MODE_FLAG] = TRUE; yap_flags[QUIET_MODE_FLAG] = TRUE;
} }
{ BACKUP_MACHINE_REGS(); { BACKUP_MACHINE_REGS();
Yap_InitYaamRegs(); Yap_InitYaamRegs();
#if HAVE_MPI #if HAVE_MPI
Yap_InitMPI (); Yap_InitMPI ();
#endif #endif
#if HAVE_MPE #if HAVE_MPE
Yap_InitMPE (); Yap_InitMPE ();
#endif #endif
if (yap_init->YapPrologRCFile != NULL) { if (yap_init->YapPrologRCFile != NULL) {
/* /*
This must be done before restore, otherwise This must be done before restore, otherwise
restore will print out messages .... restore will print out messages ....
*/ */
yap_flags[HALT_AFTER_CONSULT_FLAG] = yap_init->HaltAfterConsult; yap_flags[HALT_AFTER_CONSULT_FLAG] = yap_init->HaltAfterConsult;
}
/* tell the system who should cope with interruptions */
Yap_ExecutionMode = yap_init->ExecutionMode;
if (do_bootstrap) {
restore_result = YAP_BOOT_FROM_PROLOG;
} else if (BOOT_FROM_SAVED_STATE) {
restore_result = Yap_Restore(yap_init->SavedState, yap_init->YapLibDir);
if (restore_result == FAIL_RESTORE) {
yap_init->ErrorNo = Yap_Error_TYPE;
yap_init->ErrorCause = Yap_ErrorMessage;
/* shouldn't RECOVER_MACHINE_REGS(); be here ??? */
return YAP_BOOT_ERROR;
} }
} else { /* tell the system who should cope with interruptions */
restore_result = YAP_BOOT_FROM_PROLOG; Yap_ExecutionMode = yap_init->ExecutionMode;
} if (do_bootstrap) {
yap_flags[FAST_BOOT_FLAG] = yap_init->FastBoot; restore_result = YAP_BOOT_FROM_PROLOG;
} else if (BOOT_FROM_SAVED_STATE) {
restore_result = Yap_Restore(yap_init->SavedState, yap_init->YapLibDir);
if (restore_result == FAIL_RESTORE) {
yap_init->ErrorNo = Yap_Error_TYPE;
yap_init->ErrorCause = Yap_ErrorMessage;
/* shouldn't RECOVER_MACHINE_REGS(); be here ??? */
return YAP_BOOT_ERROR;
}
} else {
restore_result = YAP_BOOT_FROM_PROLOG;
}
yap_flags[FAST_BOOT_FLAG] = yap_init->FastBoot;
#if defined(YAPOR) || defined(TABLING) #if defined(YAPOR) || defined(TABLING)
#ifdef TABLING #ifdef TABLING
/* make sure we initialise this field */ /* make sure we initialise this field */
GLOBAL_root_dep_fr = NULL; GLOBAL_root_dep_fr = NULL;
#endif #endif
make_root_frames(); make_root_frames();
#ifdef YAPOR #ifdef YAPOR
init_workers(); init_workers();
#endif /* YAPOR */ #endif /* YAPOR */
Yap_init_local(); Yap_init_local();
#ifdef YAPOR #ifdef YAPOR
if (worker_id != 0) { if (worker_id != 0) {
#if SBA #if SBA
/* /*
In the SBA we cannot just happily inherit registers In the SBA we cannot just happily inherit registers
from the other workers from the other workers
*/ */
Yap_InitYaamRegs(); Yap_InitYaamRegs();
#endif /* SBA */ #endif /* SBA */
#ifndef THREADS #ifndef THREADS
Yap_InitPreAllocCodeSpace(); Yap_InitPreAllocCodeSpace();
#endif #endif
/* slaves, waiting for work */ /* slaves, waiting for work */
CurrentModule = USER_MODULE; CurrentModule = USER_MODULE;
P = GETWORK_FIRST_TIME; P = GETWORK_FIRST_TIME;
Yap_exec_absmi(FALSE); Yap_exec_absmi(FALSE);
Yap_Error(INTERNAL_ERROR, TermNil, "abstract machine unexpected exit (YAP_Init)"); Yap_Error(INTERNAL_ERROR, TermNil, "abstract machine unexpected exit (YAP_Init)");
} }
#endif /* YAPOR */ #endif /* YAPOR */
#endif /* YAPOR || TABLING */ #endif /* YAPOR || TABLING */
RECOVER_MACHINE_REGS(); RECOVER_MACHINE_REGS();
} }
/* make sure we do this after restore */ /* make sure we do this after restore */
if (yap_init->MaxStackSize) { if (yap_init->MaxStackSize) {
Yap_AllowLocalExpansion = FALSE; Yap_AllowLocalExpansion = FALSE;