Merge ssh://ssh.dcc.fc.up.pt:31064/home/vsc/yap

This commit is contained in:
Vitor Santos Costa 2019-04-04 13:27:47 +01:00
commit c840e9cabb
6 changed files with 12 additions and 7 deletions

View File

@ -787,6 +787,10 @@ static void kill_children(LogUpdIndex *c, PredEntry *ap) {
ncl = c->ChildIndex;
/* kill children */
while (ncl) {
if (ncl->ClRefCount>0) {
c->ClRefCount--;
return;
}
kill_first_log_iblock(ncl, c, ap);
ncl = c->ChildIndex;
}
@ -862,7 +866,7 @@ static void kill_first_log_iblock(LogUpdIndex *c, LogUpdIndex *parent,
if (DBErasedIList)
DBErasedIList->PrevSiblingIndex = c;
DBErasedIList = c;
if (!((c->ClFlags & InUseMask) || c->ClRefCount)) {
if (!(c->ClFlags & InUseMask || c->ClRefCount)) {
kill_off_lu_block(c, parent, ap);
} else {
if (c->ClFlags & ErasedMask)

View File

@ -337,7 +337,7 @@ bool Yap_PrintWarning(Term twarning) {
FunctorPrintMessage, PROLOG_MODULE)); // PROCEDURE_print_message2;
if (twarning)
__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);
bool rc;
Term ts[2], err;

View File

@ -616,7 +616,6 @@ add_subDIRECTORY(utf8proc )
set(CXX_SWIG_OUTDIR ${CMAKE_BINARY_DIR}/packages/swig/android)
add_subdirectory(packages/swig/android)
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()
add_definitions(-DMYDDAS=1 -DEMBEDDED_MYDDAS=1 -DMYDDAS_SQLITE3=1 )
@ -656,7 +655,8 @@ if (WIN32 OR ANDROID)
if (ANDROID)
List(APPEND YLIBS $<TARGET_OBJECTS:YAPsqlite3>)
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 ()
@ -967,6 +967,7 @@ if (WIN32)
endif (WIN32)
if (NOT ANDROID)
add_executable(yap-bin ${CONSOLE_SOURCES})
set_target_properties(yap-bin PROPERTIES OUTPUT_NAME yap)
@ -980,6 +981,7 @@ install(TARGETS libYap yap-bin
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
endif()
if (WITH_MPI)

View File

@ -98,7 +98,7 @@ public:
/// should be a callable
/// goal.
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);
openQuery();

View File

@ -147,7 +147,7 @@ int main(int argc, char **argv)
YAP_Reset(YAP_FULL_RESET, false);
/* End preprocessor code */
mtrace();
//mtrace();
bool rc = exec_top_level(BootMode, &init_args);
if (!rc)
return 1;

View File

@ -131,7 +131,6 @@ FILE *Yap_GetOutputStream(Term t, const char *msg) {
return rc;
}
cmax =7;
int GetFreeStreamD(void) {
CACHE_REGS
LOCK(GLOBAL_StreamDescLock);