Merge ssh://ssh.dcc.fc.up.pt:31064/home/vsc/yap
This commit is contained in:
commit
c840e9cabb
@ -787,6 +787,10 @@ static void kill_children(LogUpdIndex *c, PredEntry *ap) {
|
|||||||
ncl = c->ChildIndex;
|
ncl = c->ChildIndex;
|
||||||
/* kill children */
|
/* kill children */
|
||||||
while (ncl) {
|
while (ncl) {
|
||||||
|
if (ncl->ClRefCount>0) {
|
||||||
|
c->ClRefCount--;
|
||||||
|
return;
|
||||||
|
}
|
||||||
kill_first_log_iblock(ncl, c, ap);
|
kill_first_log_iblock(ncl, c, ap);
|
||||||
ncl = c->ChildIndex;
|
ncl = c->ChildIndex;
|
||||||
}
|
}
|
||||||
@ -862,7 +866,7 @@ static void kill_first_log_iblock(LogUpdIndex *c, LogUpdIndex *parent,
|
|||||||
if (DBErasedIList)
|
if (DBErasedIList)
|
||||||
DBErasedIList->PrevSiblingIndex = c;
|
DBErasedIList->PrevSiblingIndex = c;
|
||||||
DBErasedIList = c;
|
DBErasedIList = c;
|
||||||
if (!((c->ClFlags & InUseMask) || c->ClRefCount)) {
|
if (!(c->ClFlags & InUseMask || c->ClRefCount)) {
|
||||||
kill_off_lu_block(c, parent, ap);
|
kill_off_lu_block(c, parent, ap);
|
||||||
} else {
|
} else {
|
||||||
if (c->ClFlags & ErasedMask)
|
if (c->ClFlags & ErasedMask)
|
||||||
|
@ -337,7 +337,7 @@ bool Yap_PrintWarning(Term twarning) {
|
|||||||
FunctorPrintMessage, PROLOG_MODULE)); // PROCEDURE_print_message2;
|
FunctorPrintMessage, PROLOG_MODULE)); // PROCEDURE_print_message2;
|
||||||
if (twarning)
|
if (twarning)
|
||||||
__android_log_print(ANDROID_LOG_INFO, "YAPDroid ", " warning(%s)",
|
__android_log_print(ANDROID_LOG_INFO, "YAPDroid ", " warning(%s)",
|
||||||
Yap_TermToBuffer(twarning, Quote_illegal_f | Ignore_ops_f | Ignore_cyclics_f));
|
Yap_TermToBuffer(twarning, Quote_illegal_f | Ignore_ops_f | Handle_cyclics_f));
|
||||||
Term cmod = (CurrentModule == PROLOG_MODULE ? TermProlog : CurrentModule);
|
Term cmod = (CurrentModule == PROLOG_MODULE ? TermProlog : CurrentModule);
|
||||||
bool rc;
|
bool rc;
|
||||||
Term ts[2], err;
|
Term ts[2], err;
|
||||||
|
@ -616,7 +616,6 @@ add_subDIRECTORY(utf8proc )
|
|||||||
set(CXX_SWIG_OUTDIR ${CMAKE_BINARY_DIR}/packages/swig/android)
|
set(CXX_SWIG_OUTDIR ${CMAKE_BINARY_DIR}/packages/swig/android)
|
||||||
add_subdirectory(packages/swig/android)
|
add_subdirectory(packages/swig/android)
|
||||||
add_definitions(-DMYDDAS=1 -DEMBEDDED_MYDDAS=1 -DMYDDAS_SQLITE3=1 -DEMBEDDED_SQLITE3=1)
|
add_definitions(-DMYDDAS=1 -DEMBEDDED_MYDDAS=1 -DMYDDAS_SQLITE3=1 -DEMBEDDED_SQLITE3=1)
|
||||||
link_directories(${CMAKE_SOURCE_DIR}/../sqlite-android/jni/${CMAKE_ANDROID_ARCH_ABI})
|
|
||||||
|
|
||||||
else()
|
else()
|
||||||
add_definitions(-DMYDDAS=1 -DEMBEDDED_MYDDAS=1 -DMYDDAS_SQLITE3=1 )
|
add_definitions(-DMYDDAS=1 -DEMBEDDED_MYDDAS=1 -DMYDDAS_SQLITE3=1 )
|
||||||
@ -656,7 +655,8 @@ if (WIN32 OR ANDROID)
|
|||||||
if (ANDROID)
|
if (ANDROID)
|
||||||
List(APPEND YLIBS $<TARGET_OBJECTS:YAPsqlite3>)
|
List(APPEND YLIBS $<TARGET_OBJECTS:YAPsqlite3>)
|
||||||
List(APPEND YLIBS $<TARGET_OBJECTS:DROID>)
|
List(APPEND YLIBS $<TARGET_OBJECTS:DROID>)
|
||||||
set(ANDROID_LIBRARIES sqliteX android log)
|
set(ANDROID_LIBRARIES ${CMAKE_SOURCE_DIR}/../sqlite-android/jni/${ANDROID_ABI}/libsqliteX.so android log)
|
||||||
|
link_directories(${CMAKE_SOURCE_DIR}/../sqlite-android/jni/${ANDROID_ABI})
|
||||||
|
|
||||||
endif ()
|
endif ()
|
||||||
endif ()
|
endif ()
|
||||||
@ -967,6 +967,7 @@ if (WIN32)
|
|||||||
|
|
||||||
endif (WIN32)
|
endif (WIN32)
|
||||||
|
|
||||||
|
if (NOT ANDROID)
|
||||||
add_executable(yap-bin ${CONSOLE_SOURCES})
|
add_executable(yap-bin ${CONSOLE_SOURCES})
|
||||||
|
|
||||||
set_target_properties(yap-bin PROPERTIES OUTPUT_NAME yap)
|
set_target_properties(yap-bin PROPERTIES OUTPUT_NAME yap)
|
||||||
@ -980,6 +981,7 @@ install(TARGETS libYap yap-bin
|
|||||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
endif()
|
||||||
|
|
||||||
if (WITH_MPI)
|
if (WITH_MPI)
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ public:
|
|||||||
/// should be a callable
|
/// should be a callable
|
||||||
/// goal.
|
/// goal.
|
||||||
inline YAPQuery(const char *s) : YAPPredicate(s, goal, names, (nts = &ARG1)) {
|
inline YAPQuery(const char *s) : YAPPredicate(s, goal, names, (nts = &ARG1)) {
|
||||||
__android_log_print(ANDROID_LOG_INFO, "YAPDroid", "got game %d",
|
__android_log_print(ANDROID_LOG_INFO, "YAPDroid", "got game %ld",
|
||||||
LOCAL_CurSlot);
|
LOCAL_CurSlot);
|
||||||
|
|
||||||
openQuery();
|
openQuery();
|
||||||
|
@ -147,7 +147,7 @@ int main(int argc, char **argv)
|
|||||||
YAP_Reset(YAP_FULL_RESET, false);
|
YAP_Reset(YAP_FULL_RESET, false);
|
||||||
/* End preprocessor code */
|
/* End preprocessor code */
|
||||||
|
|
||||||
mtrace();
|
//mtrace();
|
||||||
bool rc = exec_top_level(BootMode, &init_args);
|
bool rc = exec_top_level(BootMode, &init_args);
|
||||||
if (!rc)
|
if (!rc)
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -131,7 +131,6 @@ FILE *Yap_GetOutputStream(Term t, const char *msg) {
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
cmax =7;
|
|
||||||
int GetFreeStreamD(void) {
|
int GetFreeStreamD(void) {
|
||||||
CACHE_REGS
|
CACHE_REGS
|
||||||
LOCK(GLOBAL_StreamDescLock);
|
LOCK(GLOBAL_StreamDescLock);
|
||||||
|
Reference in New Issue
Block a user