jpl
This commit is contained in:
parent
a01ba3383b
commit
990a86512d
16
C/cdmgr.c
16
C/cdmgr.c
@ -1652,7 +1652,7 @@ Atom Yap_source_file_name(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief we cannot add clauses to the proceduree
|
* @brief we cannot add clauses to the procedure
|
||||||
*
|
*
|
||||||
* @param p predicate
|
* @param p predicate
|
||||||
*
|
*
|
||||||
@ -3091,6 +3091,8 @@ static Int p_clean_up_dead_clauses(USES_REGS1) {
|
|||||||
|
|
||||||
void Yap_HidePred(PredEntry *pe) {
|
void Yap_HidePred(PredEntry *pe) {
|
||||||
|
|
||||||
|
if (pe->PredFlags & HiddenPredFlag)
|
||||||
|
return;
|
||||||
pe->PredFlags |= (HiddenPredFlag | NoSpyPredFlag | NoTracePredFlag);
|
pe->PredFlags |= (HiddenPredFlag | NoSpyPredFlag | NoTracePredFlag);
|
||||||
if (pe->NextOfPE) {
|
if (pe->NextOfPE) {
|
||||||
UInt hash = PRED_HASH(pe->FunctorOfPred, CurrentModule, PredHashTableSize);
|
UInt hash = PRED_HASH(pe->FunctorOfPred, CurrentModule, PredHashTableSize);
|
||||||
@ -3106,6 +3108,7 @@ void Yap_HidePred(PredEntry *pe) {
|
|||||||
op = &p->NextPredOfHash;
|
op = &p->NextPredOfHash;
|
||||||
p = p->NextPredOfHash;
|
p = p->NextPredOfHash;
|
||||||
}
|
}
|
||||||
|
pe->NextPredOfHash = NULL;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
Prop *op, p;
|
Prop *op, p;
|
||||||
@ -3124,6 +3127,8 @@ void Yap_HidePred(PredEntry *pe) {
|
|||||||
op = &p->NextOfPE;
|
op = &p->NextOfPE;
|
||||||
p = p->NextOfPE;
|
p = p->NextOfPE;
|
||||||
}
|
}
|
||||||
|
pe->NextOfPE = RepAtom(AtomFoundVar)->PropsOfAE;
|
||||||
|
RepAtom(AtomFoundVar)->PropsOfAE = AbsPredProp(pe);
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -3139,7 +3144,7 @@ void Yap_HidePred(PredEntry *pe) {
|
|||||||
op = &p->NextPredOfModule;
|
op = &p->NextPredOfModule;
|
||||||
p = p->NextPredOfModule;
|
p = p->NextPredOfModule;
|
||||||
}
|
}
|
||||||
|
pe->NextPredOfModule = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3160,6 +3165,13 @@ stash_predicate(USES_REGS1) {
|
|||||||
Yap_get_pred(Deref(ARG1), Deref(ARG2), "while checking for a procedure");
|
Yap_get_pred(Deref(ARG1), Deref(ARG2), "while checking for a procedure");
|
||||||
if (pe) {
|
if (pe) {
|
||||||
pe->PredFlags |= (HiddenPredFlag | NoSpyPredFlag | NoTracePredFlag);
|
pe->PredFlags |= (HiddenPredFlag | NoSpyPredFlag | NoTracePredFlag);
|
||||||
|
/*
|
||||||
|
char ns[1024];
|
||||||
|
const char *s = (pe->ModuleOfPred == PROLOG_MODULE ?
|
||||||
|
"__prolog__stash__" :
|
||||||
|
snprintf(sn,1023,"__%s__".RepAtom(AtomOfTerm( pe->ModuleOfPred ))));
|
||||||
|
pe->ModuleOfPred = MkAtomTerm(Yap_LookupAtom(s));
|
||||||
|
*/
|
||||||
return true;
|
return true;
|
||||||
} else
|
} else
|
||||||
return false;
|
return false;
|
||||||
|
@ -1,20 +1,20 @@
|
|||||||
# set(CMAKE_MACOSX_RPATH 1)
|
# set(CMAKE_MACOSX_RPATH 1)
|
||||||
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
|
||||||
|
|
||||||
add_lib(jplYap jpl.h jpl.c hacks.h)
|
add_lib(jplYap jpl.h jpl.c hacks.h)
|
||||||
|
|
||||||
include_directories (${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2} ${JAVA_AWT_PATH} )
|
include_directories (${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2} ${JAVA_AWT_PATH} )
|
||||||
|
|
||||||
if (MAC)
|
if (APPLE)
|
||||||
target_link_libraries(jplYap libYap /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
|
get_filename_component ( JAVA_AWT_DIR ${JAVA_AWT_LIBRARY} DIRECTORY)
|
||||||
/System/Library/PrivateFrameworks/JavaLaunching.framework/Versions/A/JavaLaunching)
|
find_library (JLI jli ${JAVA_AWT_DIR}/jli)
|
||||||
else()
|
|
||||||
target_link_libraries(jplYap libYap ${JAVA_JVM_LIBRARY} ${JAVA_AWT_LIBRARY})
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
target_link_libraries(jplYap libYap ${JLI} ${JNI_LIBRARIES})
|
||||||
|
|
||||||
set_target_properties(jplYap PROPERTIES
|
set_target_properties(jplYap PROPERTIES
|
||||||
OUTPUT_NAME jpl
|
OUTPUT_NAME jpl
|
||||||
INSTALL_RPATH_USE_LINK_PATH TRUE )
|
INSTALL_RPATH_USE_LINK_PATH TRUE
|
||||||
|
)
|
||||||
|
|
||||||
# set(YAP_SYSTEM_OPTIONS "jpl " ${YAP_SYSTEM_OPTIONS} PARENT_SCOPE)
|
# set(YAP_SYSTEM_OPTIONS "jpl " ${YAP_SYSTEM_OPTIONS} PARENT_SCOPE)
|
||||||
install(TARGETS jplYap
|
install(TARGETS jplYap
|
||||||
|
Reference in New Issue
Block a user