Merge branch 'master' of git.dcc.fc.up.pt:yap-6.3
This commit is contained in:
commit
8c6aa05b17
@ -3302,48 +3302,55 @@ YAP_Init(YAP_init_args *yap_init)
|
||||
return YAP_BOOT_FROM_PROLOG;
|
||||
}
|
||||
|
||||
Int Yap_InitDefaults( YAP_init_args *init_args, char saved_state[] )
|
||||
{
|
||||
init_args->SavedState = saved_state;
|
||||
init_args->AttsSize = 0;
|
||||
init_args->HeapSize = 0;
|
||||
init_args->StackSize = 0;
|
||||
init_args->TrailSize = 0;
|
||||
init_args->MaxAttsSize = 0;
|
||||
init_args->MaxHeapSize = 0;
|
||||
init_args->MaxStackSize = 0;
|
||||
init_args->MaxGlobalSize = 0;
|
||||
init_args->MaxTrailSize = 0;
|
||||
init_args->YapLibDir = NULL;
|
||||
init_args->YapPrologBootFile = NULL;
|
||||
init_args->YapPrologInitFile = NULL;
|
||||
init_args->YapPrologRCFile = NULL;
|
||||
init_args->YapPrologGoal = NULL;
|
||||
init_args->YapPrologTopLevelGoal = NULL;
|
||||
init_args->YapPrologAddPath = NULL;
|
||||
init_args->HaltAfterConsult = FALSE;
|
||||
init_args->FastBoot = FALSE;
|
||||
init_args->NumberWorkers = 1;
|
||||
init_args->SchedulerLoop = 10;
|
||||
init_args->DelayedReleaseLoad = 3;
|
||||
init_args->PrologShouldHandleInterrupts = FALSE;
|
||||
init_args->ExecutionMode = INTERPRETED;
|
||||
init_args->Argc = 1;
|
||||
{
|
||||
size_t l1 = 2*sizeof(char *);
|
||||
if (!(init_args->Argv = (char **)malloc(l1)))
|
||||
return YAP_BOOT_ERROR;
|
||||
init_args->Argv[0] = Yap_FindExecutable ();
|
||||
init_args->Argv[1] = NULL;
|
||||
}
|
||||
init_args->ErrorNo = 0;
|
||||
init_args->ErrorCause = NULL;
|
||||
init_args->QuietMode = FALSE;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
X_API Int
|
||||
YAP_FastInit(char saved_state[])
|
||||
{
|
||||
YAP_init_args init_args;
|
||||
Int out;
|
||||
|
||||
init_args.SavedState = saved_state;
|
||||
init_args.AttsSize = 0;
|
||||
init_args.HeapSize = 0;
|
||||
init_args.StackSize = 0;
|
||||
init_args.TrailSize = 0;
|
||||
init_args.MaxAttsSize = 0;
|
||||
init_args.MaxHeapSize = 0;
|
||||
init_args.MaxStackSize = 0;
|
||||
init_args.MaxGlobalSize = 0;
|
||||
init_args.MaxTrailSize = 0;
|
||||
init_args.YapLibDir = NULL;
|
||||
init_args.YapPrologBootFile = NULL;
|
||||
init_args.YapPrologInitFile = NULL;
|
||||
init_args.YapPrologRCFile = NULL;
|
||||
init_args.YapPrologGoal = NULL;
|
||||
init_args.YapPrologTopLevelGoal = NULL;
|
||||
init_args.YapPrologAddPath = NULL;
|
||||
init_args.HaltAfterConsult = FALSE;
|
||||
init_args.FastBoot = FALSE;
|
||||
init_args.NumberWorkers = 1;
|
||||
init_args.SchedulerLoop = 10;
|
||||
init_args.DelayedReleaseLoad = 3;
|
||||
init_args.PrologShouldHandleInterrupts = FALSE;
|
||||
init_args.ExecutionMode = INTERPRETED;
|
||||
init_args.Argc = 1;
|
||||
{
|
||||
size_t l1 = 2*sizeof(char *);
|
||||
if (!(init_args.Argv = (char **)malloc(l1)))
|
||||
return YAP_BOOT_ERROR;
|
||||
init_args.Argv[0] = Yap_FindExecutable ();
|
||||
init_args.Argv[1] = NULL;
|
||||
}
|
||||
init_args.ErrorNo = 0;
|
||||
init_args.ErrorCause = NULL;
|
||||
init_args.QuietMode = FALSE;
|
||||
out = YAP_Init(&init_args);
|
||||
if (( out = Yap_InitDefaults( &init_args, saved_state ) ) != YAP_BOOT_ERROR)
|
||||
out = YAP_Init(&init_args);
|
||||
if (out == YAP_BOOT_ERROR) {
|
||||
Yap_Error(init_args.ErrorNo,TermNil,init_args.ErrorCause);
|
||||
}
|
||||
|
@ -579,7 +579,7 @@ void Yap_udi_Interval_init(void) {
|
||||
memset((void *) cb,0, sizeof(*cb));
|
||||
|
||||
/*TODO: ask vitor why this gives a warning*/
|
||||
cb->decl= name;
|
||||
cb->decl= (YAP_Atom)name;
|
||||
Yap_MkEmptyWakeUp(name);
|
||||
cb->init= IntervalUdiInit;
|
||||
cb->insert=IntervalUdiInsert;
|
||||
|
10
Makefile.in
10
Makefile.in
@ -64,7 +64,7 @@ MPI_CC=@MPI_CC@
|
||||
CPPFLAGS=@CPPFLAGS@ -I. -I$(srcdir)/H -I$(srcdir)/include -I$(srcdir)/os -I$(srcdir)/OPTYap -I$(srcdir)/BEAM -I$(srcdir)/CXX
|
||||
EXECUTABLE_CFLAGS= @CFLAGS@ $(YAP_EXTRAS) $(DEFS) $(CPPFLAGS)
|
||||
CFLAGS= @YAPLIB_CFLAGS@ $(YAP_EXTRAS) $(DEFS) $(CPPFLAGS)
|
||||
CXXFLAGS= @CXXFLAGS@ $(YAP_EXTRAS) $(DEFS) $(CPPFLAGS)
|
||||
CXXFLAGS= @SHLIB_CXXFLAGS@ $(YAP_EXTRAS) $(DEFS) $(CPPFLAGS)
|
||||
C_INTERF_FLAGS= @YAPLIB_CFLAGS@ $(YAP_EXTRAS) $(DEFS) $(CPPFLAGS) -Iinclude
|
||||
C_PARSER_FLAGS= @YAPLIB_CFLAGS@ $(YAP_EXTRAS) $(DEFS) $(CPPFLAGS)
|
||||
#
|
||||
@ -400,7 +400,7 @@ LIBTAI_OBJECTS = \
|
||||
C_INTERFACE_OBJECTS = \
|
||||
load_foreign.o load_dl.o load_dld.o load_dyld.o \
|
||||
load_none.o load_aout.o load_aix.o load_dll.o load_shl.o \
|
||||
c_interface.o clause_list.o yapi.o
|
||||
c_interface.o clause_list.o
|
||||
|
||||
OR_OBJECTS = \
|
||||
or.memory.o opt.init.o opt.preds.o \
|
||||
@ -416,7 +416,7 @@ STATIC_OBJECTS = \
|
||||
|
||||
LIB_OBJECTS = $(ENGINE_OBJECTS) $(C_INTERFACE_OBJECTS) $(OR_OBJECTS) $(BEAM_OBJECTS) $(STATIC_OBJECTS) $(LIBTAI_OBJECTS)
|
||||
|
||||
OBJECTS = yap.o $(LIB_OBJECTS)
|
||||
OBJECTS = yap.o yapi.o $(LIB_OBJECTS)
|
||||
|
||||
PLCONS_OBJECTS = \
|
||||
pl-ntcon.o \
|
||||
@ -460,7 +460,7 @@ udi.o: C/udi.c config.h
|
||||
%.o: BEAM/%.c config.h
|
||||
$(CC) -c $(CFLAGS) $< -o $@
|
||||
|
||||
yapi.o: CXX/yapi.cpp config.h
|
||||
yapi.o: CXX/yapi.cpp CXX/yapi.hh config.h
|
||||
$(CXX) -c $(CXXFLAGS) $< -o $@
|
||||
|
||||
sys.o: library/system/sys.c config.h
|
||||
@ -584,7 +584,7 @@ libYap.a: $(LIB_OBJECTS)
|
||||
$(AR) rc libYap.a $(LIB_OBJECTS)
|
||||
$(RANLIB) libYap.a
|
||||
|
||||
@DYNYAPLIB@: $(LIB_OBJECTS)
|
||||
@DYNYAPLIB@: $(LIB_OBJECTS) yapi.o
|
||||
@YAPLIB_LD@ -o @YAPLIB@ $(LIB_OBJECTS) $(LIBS) $(LDFLAGS) $(SONAMEFLAG)
|
||||
for p in $(EXTRAYAPLIBS); do \
|
||||
$(LN_S) -f @DYNYAPLIB@ $$p; \
|
||||
|
@ -134,7 +134,7 @@ typedef enum {
|
||||
#define YAP_CONSULT_MODE 0
|
||||
#define YAP_RECONSULT_MODE 1
|
||||
|
||||
typedef struct {
|
||||
typedef struct yap_boot_params {
|
||||
/* if NON-NULL, path where we can find the saved state */
|
||||
char *SavedState;
|
||||
/* if NON-0, minimal size for Heap or Code Area */
|
||||
@ -217,6 +217,7 @@ typedef struct {
|
||||
char *ErrorCause;
|
||||
} YAP_init_args;
|
||||
|
||||
Int Yap_InitDefaults( YAP_init_args *init_args, char saved_state[] );
|
||||
|
||||
/* from thread.h */
|
||||
typedef struct {
|
||||
|
@ -47,6 +47,7 @@ PROGRAMS= \
|
||||
$(srcdir)/heaps.yap \
|
||||
$(srcdir)/lambda.pl \
|
||||
$(srcdir)/lineutils.yap \
|
||||
$(srcdir)/listing.yap \
|
||||
$(srcdir)/lists.yap \
|
||||
$(srcdir)/nb.yap \
|
||||
$(srcdir)/ordsets.yap \
|
||||
|
Reference in New Issue
Block a user