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:
vsc 2005-10-31 12:27:54 +00:00
parent c1e67345cf
commit b8d0396939
8 changed files with 34 additions and 18 deletions

View File

@ -242,13 +242,13 @@ Yap_ReInitConstExps(void)
AtomEntry *ae = RepAtom(Yap_FullLookupAtom(InitConstTab[i].OpName));
WRITE_LOCK(ae->ARWLock);
if ((p = Yap_GetExpPropHavingLock(ae, 0)) == NULL) {
if (!(p = Yap_GetExpPropHavingLock(ae, 0))) {
WRITE_UNLOCK(ae->ARWLock);
return(FALSE);
return FALSE;
}
RepExpProp(p)->FOfEE.constant = InitConstTab[i].f;
WRITE_UNLOCK(ae->ARWLock);
}
return(TRUE);
return TRUE;
}

View File

@ -2110,7 +2110,7 @@ Yap_ReInitUnaryExps(void)
WRITE_LOCK(ae->ARWLock);
if ((p = Yap_GetExpPropHavingLock(ae, 1)) == NULL) {
WRITE_UNLOCK(ae->ARWLock);
return(FALSE);
return FALSE;
}
RepExpProp(p)->FOfEE.unary = InitUnTab[i].f;
WRITE_UNLOCK(ae->ARWLock);

View File

@ -408,6 +408,11 @@ save_regs(int mode)
#ifdef COROUTINING
putout(DelayedVars);
#endif
#if defined(SBA) || defined(TABLING)
putcellptr(H_FZ);
putcellptr((CELL *)B_FZ);
putcellptr((CELL *)TR_FZ);
#endif /* SBA || TABLING */
}
putout(CurrentModule);
if (mode == DO_EVERYTHING) {
@ -464,7 +469,7 @@ save_heap(void)
{
int j;
/* 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 */
j = Unsigned(&GLOBAL) - Unsigned(Yap_HeapBase);
putout(j);
@ -798,6 +803,17 @@ get_regs(int flag)
if (Yap_ErrorMessage)
return -1;
#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();
if (Yap_ErrorMessage)
@ -875,7 +891,7 @@ get_hash(void)
static int
CopyCode(void)
{
#if defined(YAPOR) || defined(TABLING)
#if (defined(YAPOR) || defined(TABLING)) && !defined(YAP_MEMORY_ALLOC_SCHEME)
/* skip the local and global data structures */
CELL j = get_cell();
if (Yap_ErrorMessage)

View File

@ -181,7 +181,6 @@ low_level_trace(yap_low_level_port port, PredEntry *pred, CELL *args)
#if defined(THREADS) || defined(YAPOR)
fprintf(Yap_stderr,"(%d)", worker_id);
#endif
fprintf(Yap_stderr," %x ", Yap_ReadTimedVar(WokenGoals));
/* check_trail_consistency(); */
if (pred == NULL)
return;

View File

@ -5,7 +5,7 @@
Copyright: R. Rocha and NCC - University of Porto, Portugal
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) **
** ----------------------------------------- */
#define SHM_MEMORY_ALLOC_SCHEME 1
/* #define YAP_MEMORY_ALLOC_SCHEME 1 */
/* #define SHM_MEMORY_ALLOC_SCHEME 1 */
#define YAP_MEMORY_ALLOC_SCHEME 1
/* #define MALLOC_MEMORY_ALLOC_SCHEME 1 */
/* ------------------------------------------- **

View File

@ -16,6 +16,11 @@
<h2>Yap-5.1.0:</h2>
<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> FIXED: allow people to disable indexing (obs Ricardo Lopes). </li>
<li> FIXED: make undefined exception more ISO like (obs Paulo Moura). </li>

View File

@ -1040,11 +1040,7 @@ fi
if test "$use_malloc" = "yes" -a "$maxmemory" = "yes"
then
echo ****************************************
echo Malloc and Max Memory are not compatible
echo Please use different options
echo ****************************************
exit 1
maxmemory="no"
fi
dnl On some systems doing a fflush(NULL) to flush all output streams
@ -1111,7 +1107,7 @@ AC_DEFINE(GC_NO_TAGS,1)
fi
dnl large memory configuration, don't trust Yap allocation routines
if test "$maxmemory" = yes
if test "$maxmemory" = yes
then
AC_DEFINE(GC_NO_TAGS,1)
AC_DEFINE(USE_DL_MALLOC,1)

View File

@ -4,7 +4,7 @@
%
% Author: Nuno Fonseca (nunofonseca@acm.org)
% 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):-
(get_state(on)->ypp_file(File,NFile);NFile=File),
reconsult(NFile),
reconsult(NFile).
%====================================================================================
% Private Predicates
%====================================================================================