more small fixes
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1431 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
c1e67345cf
commit
b8d0396939
@ -242,13 +242,13 @@ Yap_ReInitConstExps(void)
|
|||||||
AtomEntry *ae = RepAtom(Yap_FullLookupAtom(InitConstTab[i].OpName));
|
AtomEntry *ae = RepAtom(Yap_FullLookupAtom(InitConstTab[i].OpName));
|
||||||
|
|
||||||
WRITE_LOCK(ae->ARWLock);
|
WRITE_LOCK(ae->ARWLock);
|
||||||
if ((p = Yap_GetExpPropHavingLock(ae, 0)) == NULL) {
|
if (!(p = Yap_GetExpPropHavingLock(ae, 0))) {
|
||||||
WRITE_UNLOCK(ae->ARWLock);
|
WRITE_UNLOCK(ae->ARWLock);
|
||||||
return(FALSE);
|
return FALSE;
|
||||||
}
|
}
|
||||||
RepExpProp(p)->FOfEE.constant = InitConstTab[i].f;
|
RepExpProp(p)->FOfEE.constant = InitConstTab[i].f;
|
||||||
WRITE_UNLOCK(ae->ARWLock);
|
WRITE_UNLOCK(ae->ARWLock);
|
||||||
}
|
}
|
||||||
return(TRUE);
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2110,7 +2110,7 @@ Yap_ReInitUnaryExps(void)
|
|||||||
WRITE_LOCK(ae->ARWLock);
|
WRITE_LOCK(ae->ARWLock);
|
||||||
if ((p = Yap_GetExpPropHavingLock(ae, 1)) == NULL) {
|
if ((p = Yap_GetExpPropHavingLock(ae, 1)) == NULL) {
|
||||||
WRITE_UNLOCK(ae->ARWLock);
|
WRITE_UNLOCK(ae->ARWLock);
|
||||||
return(FALSE);
|
return FALSE;
|
||||||
}
|
}
|
||||||
RepExpProp(p)->FOfEE.unary = InitUnTab[i].f;
|
RepExpProp(p)->FOfEE.unary = InitUnTab[i].f;
|
||||||
WRITE_UNLOCK(ae->ARWLock);
|
WRITE_UNLOCK(ae->ARWLock);
|
||||||
|
20
C/save.c
20
C/save.c
@ -408,6 +408,11 @@ save_regs(int mode)
|
|||||||
#ifdef COROUTINING
|
#ifdef COROUTINING
|
||||||
putout(DelayedVars);
|
putout(DelayedVars);
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(SBA) || defined(TABLING)
|
||||||
|
putcellptr(H_FZ);
|
||||||
|
putcellptr((CELL *)B_FZ);
|
||||||
|
putcellptr((CELL *)TR_FZ);
|
||||||
|
#endif /* SBA || TABLING */
|
||||||
}
|
}
|
||||||
putout(CurrentModule);
|
putout(CurrentModule);
|
||||||
if (mode == DO_EVERYTHING) {
|
if (mode == DO_EVERYTHING) {
|
||||||
@ -464,7 +469,7 @@ save_heap(void)
|
|||||||
{
|
{
|
||||||
int j;
|
int j;
|
||||||
/* Then save the whole heap */
|
/* Then save the whole heap */
|
||||||
#if defined(YAPOR) || defined(TABLING)
|
#if defined(YAPOR) || defined(TABLING) && !defined(YAP_MEMORY_ALLOC_SCHEME)
|
||||||
/* skip the local and global data structures */
|
/* skip the local and global data structures */
|
||||||
j = Unsigned(&GLOBAL) - Unsigned(Yap_HeapBase);
|
j = Unsigned(&GLOBAL) - Unsigned(Yap_HeapBase);
|
||||||
putout(j);
|
putout(j);
|
||||||
@ -798,6 +803,17 @@ get_regs(int flag)
|
|||||||
if (Yap_ErrorMessage)
|
if (Yap_ErrorMessage)
|
||||||
return -1;
|
return -1;
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(SBA) || defined(TABLING)
|
||||||
|
H_FZ = get_cellptr();
|
||||||
|
if (Yap_ErrorMessage)
|
||||||
|
return -1;
|
||||||
|
B_FZ = (choiceptr)get_cellptr();
|
||||||
|
if (Yap_ErrorMessage)
|
||||||
|
return -1;
|
||||||
|
TR_FZ = (tr_fr_ptr)get_cellptr();
|
||||||
|
if (Yap_ErrorMessage)
|
||||||
|
return -1;
|
||||||
|
#endif /* SBA || TABLING */
|
||||||
}
|
}
|
||||||
CurrentModule = get_cell();
|
CurrentModule = get_cell();
|
||||||
if (Yap_ErrorMessage)
|
if (Yap_ErrorMessage)
|
||||||
@ -875,7 +891,7 @@ get_hash(void)
|
|||||||
static int
|
static int
|
||||||
CopyCode(void)
|
CopyCode(void)
|
||||||
{
|
{
|
||||||
#if defined(YAPOR) || defined(TABLING)
|
#if (defined(YAPOR) || defined(TABLING)) && !defined(YAP_MEMORY_ALLOC_SCHEME)
|
||||||
/* skip the local and global data structures */
|
/* skip the local and global data structures */
|
||||||
CELL j = get_cell();
|
CELL j = get_cell();
|
||||||
if (Yap_ErrorMessage)
|
if (Yap_ErrorMessage)
|
||||||
|
@ -181,7 +181,6 @@ low_level_trace(yap_low_level_port port, PredEntry *pred, CELL *args)
|
|||||||
#if defined(THREADS) || defined(YAPOR)
|
#if defined(THREADS) || defined(YAPOR)
|
||||||
fprintf(Yap_stderr,"(%d)", worker_id);
|
fprintf(Yap_stderr,"(%d)", worker_id);
|
||||||
#endif
|
#endif
|
||||||
fprintf(Yap_stderr," %x ", Yap_ReadTimedVar(WokenGoals));
|
|
||||||
/* check_trail_consistency(); */
|
/* check_trail_consistency(); */
|
||||||
if (pred == NULL)
|
if (pred == NULL)
|
||||||
return;
|
return;
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
Copyright: R. Rocha and NCC - University of Porto, Portugal
|
Copyright: R. Rocha and NCC - University of Porto, Portugal
|
||||||
File: opt.config.h
|
File: opt.config.h
|
||||||
version: $Id: opt.config.h,v 1.9 2005-08-04 15:45:54 ricroc Exp $
|
version: $Id: opt.config.h,v 1.10 2005-10-31 12:27:54 vsc Exp $
|
||||||
|
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
|
|
||||||
@ -26,8 +26,8 @@
|
|||||||
/* ----------------------------------------- **
|
/* ----------------------------------------- **
|
||||||
** memory alloc scheme (define one) **
|
** memory alloc scheme (define one) **
|
||||||
** ----------------------------------------- */
|
** ----------------------------------------- */
|
||||||
#define SHM_MEMORY_ALLOC_SCHEME 1
|
/* #define SHM_MEMORY_ALLOC_SCHEME 1 */
|
||||||
/* #define YAP_MEMORY_ALLOC_SCHEME 1 */
|
#define YAP_MEMORY_ALLOC_SCHEME 1
|
||||||
/* #define MALLOC_MEMORY_ALLOC_SCHEME 1 */
|
/* #define MALLOC_MEMORY_ALLOC_SCHEME 1 */
|
||||||
|
|
||||||
/* ------------------------------------------- **
|
/* ------------------------------------------- **
|
||||||
|
@ -16,6 +16,11 @@
|
|||||||
|
|
||||||
<h2>Yap-5.1.0:</h2>
|
<h2>Yap-5.1.0:</h2>
|
||||||
<ul>
|
<ul>
|
||||||
|
<li> FIXED: syntax error in ypp.yap (obs Paulo Moura). </li>
|
||||||
|
<li> FIXED: save/restore should be as usual if using YAP allocation. </li>
|
||||||
|
<li> FIXED: save/restore FZ regs. </li>
|
||||||
|
<li> FIXED: $loop_stream could be defined early in boot process. </li>
|
||||||
|
<li> NEW: make rational trees default. </li>
|
||||||
<li> NEW: make enable-max-memory default. </li>
|
<li> NEW: make enable-max-memory default. </li>
|
||||||
<li> FIXED: allow people to disable indexing (obs Ricardo Lopes). </li>
|
<li> FIXED: allow people to disable indexing (obs Ricardo Lopes). </li>
|
||||||
<li> FIXED: make undefined exception more ISO like (obs Paulo Moura). </li>
|
<li> FIXED: make undefined exception more ISO like (obs Paulo Moura). </li>
|
||||||
|
@ -1040,11 +1040,7 @@ fi
|
|||||||
|
|
||||||
if test "$use_malloc" = "yes" -a "$maxmemory" = "yes"
|
if test "$use_malloc" = "yes" -a "$maxmemory" = "yes"
|
||||||
then
|
then
|
||||||
echo ****************************************
|
maxmemory="no"
|
||||||
echo Malloc and Max Memory are not compatible
|
|
||||||
echo Please use different options
|
|
||||||
echo ****************************************
|
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl On some systems doing a fflush(NULL) to flush all output streams
|
dnl On some systems doing a fflush(NULL) to flush all output streams
|
||||||
@ -1111,7 +1107,7 @@ AC_DEFINE(GC_NO_TAGS,1)
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
dnl large memory configuration, don't trust Yap allocation routines
|
dnl large memory configuration, don't trust Yap allocation routines
|
||||||
if test "$maxmemory" = yes
|
if test "$maxmemory" = yes
|
||||||
then
|
then
|
||||||
AC_DEFINE(GC_NO_TAGS,1)
|
AC_DEFINE(GC_NO_TAGS,1)
|
||||||
AC_DEFINE(USE_DL_MALLOC,1)
|
AC_DEFINE(USE_DL_MALLOC,1)
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
%
|
%
|
||||||
% Author: Nuno Fonseca (nunofonseca@acm.org)
|
% Author: Nuno Fonseca (nunofonseca@acm.org)
|
||||||
% Date: 2005-05-14
|
% Date: 2005-05-14
|
||||||
% $Id: ypp.yap,v 1.2 2005-10-28 17:38:50 vsc Exp $
|
% $Id: ypp.yap,v 1.3 2005-10-31 12:27:54 vsc Exp $
|
||||||
%
|
%
|
||||||
%====================================================================================
|
%====================================================================================
|
||||||
|
|
||||||
@ -55,7 +55,7 @@ ypp_consult(File):-
|
|||||||
|
|
||||||
ypp_reconsult(File):-
|
ypp_reconsult(File):-
|
||||||
(get_state(on)->ypp_file(File,NFile);NFile=File),
|
(get_state(on)->ypp_file(File,NFile);NFile=File),
|
||||||
reconsult(NFile),
|
reconsult(NFile).
|
||||||
%====================================================================================
|
%====================================================================================
|
||||||
% Private Predicates
|
% Private Predicates
|
||||||
%====================================================================================
|
%====================================================================================
|
||||||
|
Reference in New Issue
Block a user