Merge branch 'master' of ssh://git.code.sf.net/p/yap/yap-6.3
This commit is contained in:
commit
993a9272d1
72
C/absmi.c
72
C/absmi.c
@ -593,7 +593,7 @@ static int
|
|||||||
check_alarm_fail_int(int CONT USES_REGS)
|
check_alarm_fail_int(int CONT USES_REGS)
|
||||||
{
|
{
|
||||||
#if defined(_MSC_VER) || defined(__MINGW32__)
|
#if defined(_MSC_VER) || defined(__MINGW32__)
|
||||||
/* I need this for Windows and other systems where SIGINT
|
/* I need this for Windows and any system where SIGINT
|
||||||
is not proceesed by same thread as absmi */
|
is not proceesed by same thread as absmi */
|
||||||
LOCK(LOCAL_SignalLock);
|
LOCK(LOCAL_SignalLock);
|
||||||
if (LOCAL_PrologMode & (AbortMode|InterruptMode))
|
if (LOCAL_PrologMode & (AbortMode|InterruptMode))
|
||||||
@ -605,15 +605,19 @@ check_alarm_fail_int(int CONT USES_REGS)
|
|||||||
UNLOCK(LOCAL_SignalLock);
|
UNLOCK(LOCAL_SignalLock);
|
||||||
#endif
|
#endif
|
||||||
if (LOCAL_ActiveSignals & (YAP_FAIL_SIGNAL|YAP_INT_SIGNAL)) {
|
if (LOCAL_ActiveSignals & (YAP_FAIL_SIGNAL|YAP_INT_SIGNAL)) {
|
||||||
|
/* these should fail, INT should go up to top-level */
|
||||||
if (LOCAL_ActiveSignals & YAP_INT_SIGNAL) {
|
if (LOCAL_ActiveSignals & YAP_INT_SIGNAL) {
|
||||||
Yap_Error(PURE_ABORT, TermNil, "abort from console");
|
Yap_Error(PURE_ABORT, TermNil, "abort from console");
|
||||||
}
|
}
|
||||||
LOCAL_ActiveSignals &= ~(YAP_FAIL_SIGNAL|YAP_INT_SIGNAL);
|
LOCAL_ActiveSignals &= ~(YAP_FAIL_SIGNAL|YAP_INT_SIGNAL);
|
||||||
if (!LOCAL_ActiveSignals)
|
if (!LOCAL_ActiveSignals) {
|
||||||
|
/* no need to look into GC */
|
||||||
CalculateStackGap( PASS_REGS1 );
|
CalculateStackGap( PASS_REGS1 );
|
||||||
|
}
|
||||||
|
// fail even if there are more signals, they will have to be dealt later.
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
return TRUE;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@ -621,6 +625,7 @@ stack_overflow( CELL *env, yamop *cp USES_REGS )
|
|||||||
{
|
{
|
||||||
if ((Int)(Unsigned(YREG) - Unsigned(H)) < StackGap( PASS_REGS1 ) ||
|
if ((Int)(Unsigned(YREG) - Unsigned(H)) < StackGap( PASS_REGS1 ) ||
|
||||||
LOCAL_ActiveSignals & YAP_STOVF_SIGNAL) {
|
LOCAL_ActiveSignals & YAP_STOVF_SIGNAL) {
|
||||||
|
LOCAL_ActiveSignals &= ~YAP_STOVF_SIGNAL;
|
||||||
if (!Yap_gc(((PredEntry *)(S))->ArityOfPE, env, cp)) {
|
if (!Yap_gc(((PredEntry *)(S))->ArityOfPE, env, cp)) {
|
||||||
Yap_NilError(OUT_OF_STACK_ERROR,LOCAL_ErrorMessage);
|
Yap_NilError(OUT_OF_STACK_ERROR,LOCAL_ErrorMessage);
|
||||||
return 0;
|
return 0;
|
||||||
@ -654,12 +659,9 @@ code_overflow( CELL *yenv USES_REGS )
|
|||||||
static int
|
static int
|
||||||
interrupt_handler( USES_REGS1 )
|
interrupt_handler( USES_REGS1 )
|
||||||
{
|
{
|
||||||
int v;
|
|
||||||
PredEntry *pe = (PredEntry *)S;
|
PredEntry *pe = (PredEntry *)S;
|
||||||
|
|
||||||
// printf("D %lx %p\n", LOCAL_ActiveSignals, P);
|
// printf("D %lx %p\n", LOCAL_ActiveSignals, P);
|
||||||
if ((v = check_alarm_fail_int( FALSE PASS_REGS )) != 1)
|
|
||||||
return v;
|
|
||||||
/* tell whether we can creep or not, this is hard because we will
|
/* tell whether we can creep or not, this is hard because we will
|
||||||
lose the info RSN
|
lose the info RSN
|
||||||
*/
|
*/
|
||||||
@ -832,7 +834,8 @@ interrupt_execute( USES_REGS1 )
|
|||||||
if (trace_interrupts) fprintf(stderr,"[%d] %s:%d: INTERRUPT %lx (YENV=%p ENV=%p ASP=%p)\n", (int)pthread_self(), \
|
if (trace_interrupts) fprintf(stderr,"[%d] %s:%d: INTERRUPT %lx (YENV=%p ENV=%p ASP=%p)\n", (int)pthread_self(), \
|
||||||
__FUNCTION__, __LINE__,LOCAL_ActiveSignals,YENV,ENV,ASP);
|
__FUNCTION__, __LINE__,LOCAL_ActiveSignals,YENV,ENV,ASP);
|
||||||
#endif
|
#endif
|
||||||
check_alarm_fail_int( TRUE PASS_REGS );
|
if ((v = check_alarm_fail_int( TRUE PASS_REGS )) >= 0)
|
||||||
|
return v;
|
||||||
PP = P->u.pp.p0;
|
PP = P->u.pp.p0;
|
||||||
if ((PP->ExtraPredFlags & NoDebugPredFlag) && (LOCAL_ActiveSignals == YAP_CREEP_SIGNAL))
|
if ((PP->ExtraPredFlags & NoDebugPredFlag) && (LOCAL_ActiveSignals == YAP_CREEP_SIGNAL))
|
||||||
return 2;
|
return 2;
|
||||||
@ -852,7 +855,8 @@ interrupt_call( USES_REGS1 )
|
|||||||
if (trace_interrupts) fprintf(stderr,"[%d] %s:%d: INTERRUPT %lx (YENV=%p ENV=%p ASP=%p)\n", (int)pthread_self(), \
|
if (trace_interrupts) fprintf(stderr,"[%d] %s:%d: INTERRUPT %lx (YENV=%p ENV=%p ASP=%p)\n", (int)pthread_self(), \
|
||||||
__FUNCTION__, __LINE__,LOCAL_ActiveSignals,YENV,ENV,ASP);
|
__FUNCTION__, __LINE__,LOCAL_ActiveSignals,YENV,ENV,ASP);
|
||||||
#endif
|
#endif
|
||||||
check_alarm_fail_int( TRUE PASS_REGS );
|
if ((v = check_alarm_fail_int( TRUE PASS_REGS )) >= 0)
|
||||||
|
return v;
|
||||||
// printf("%lx %p %p %lx\n", LOCAL_ActiveSignals, P->u.Osbpp.p, P->u.Osbpp.p0, P->u.Osbpp.p0->ExtraPredFlags);
|
// printf("%lx %p %p %lx\n", LOCAL_ActiveSignals, P->u.Osbpp.p, P->u.Osbpp.p0, P->u.Osbpp.p0->ExtraPredFlags);
|
||||||
PP = P->u.Osbpp.p0;
|
PP = P->u.Osbpp.p0;
|
||||||
if ((PP->ExtraPredFlags & NoDebugPredFlag) && (LOCAL_ActiveSignals == YAP_CREEP_SIGNAL))
|
if ((PP->ExtraPredFlags & NoDebugPredFlag) && (LOCAL_ActiveSignals == YAP_CREEP_SIGNAL))
|
||||||
@ -873,7 +877,8 @@ interrupt_pexecute( PredEntry *pen USES_REGS )
|
|||||||
if (trace_interrupts) fprintf(stderr,"[%d] %s:%d: INTERRUPT %lx (YENV=%p ENV=%p ASP=%p)\n", (int)pthread_self(), \
|
if (trace_interrupts) fprintf(stderr,"[%d] %s:%d: INTERRUPT %lx (YENV=%p ENV=%p ASP=%p)\n", (int)pthread_self(), \
|
||||||
__FUNCTION__, __LINE__,LOCAL_ActiveSignals,YENV,ENV,ASP);
|
__FUNCTION__, __LINE__,LOCAL_ActiveSignals,YENV,ENV,ASP);
|
||||||
#endif
|
#endif
|
||||||
check_alarm_fail_int( 2 PASS_REGS );
|
if ((v = check_alarm_fail_int( 2 PASS_REGS )) >= 0)
|
||||||
|
return v;
|
||||||
PP = NULL;
|
PP = NULL;
|
||||||
if (LOCAL_ActiveSignals == YAP_CREEP_SIGNAL)
|
if (LOCAL_ActiveSignals == YAP_CREEP_SIGNAL)
|
||||||
return 2; /* keep on creeping */
|
return 2; /* keep on creeping */
|
||||||
@ -902,7 +907,8 @@ interrupt_deallocate( USES_REGS1 )
|
|||||||
if (trace_interrupts) fprintf(stderr,"[%d] %s:%d: INTERRUPT %lx (YENV=%p ENV=%p ASP=%p)\n", (int)pthread_self(), \
|
if (trace_interrupts) fprintf(stderr,"[%d] %s:%d: INTERRUPT %lx (YENV=%p ENV=%p ASP=%p)\n", (int)pthread_self(), \
|
||||||
__FUNCTION__, __LINE__,LOCAL_ActiveSignals,YENV,ENV,ASP);
|
__FUNCTION__, __LINE__,LOCAL_ActiveSignals,YENV,ENV,ASP);
|
||||||
#endif
|
#endif
|
||||||
check_alarm_fail_int( TRUE PASS_REGS );
|
if ((v = check_alarm_fail_int( TRUE PASS_REGS )) >= 0)
|
||||||
|
return v;
|
||||||
/*
|
/*
|
||||||
don't do a creep here; also, if our instruction is followed by
|
don't do a creep here; also, if our instruction is followed by
|
||||||
a execute_c, just wait a bit more */
|
a execute_c, just wait a bit more */
|
||||||
@ -945,11 +951,13 @@ interrupt_deallocate( USES_REGS1 )
|
|||||||
static int
|
static int
|
||||||
interrupt_cut( USES_REGS1 )
|
interrupt_cut( USES_REGS1 )
|
||||||
{
|
{
|
||||||
|
int v;
|
||||||
#ifdef DEBUG_INTERRUPTS
|
#ifdef DEBUG_INTERRUPTS
|
||||||
if (trace_interrupts) fprintf(stderr,"[%d] %s:%d: INTERRUPT %lx (YENV=%p ENV=%p ASP=%p)\n", (int)pthread_self(), \
|
if (trace_interrupts) fprintf(stderr,"[%d] %s:%d: INTERRUPT %lx (YENV=%p ENV=%p ASP=%p)\n", (int)pthread_self(), \
|
||||||
__FUNCTION__, __LINE__,LOCAL_ActiveSignals,YENV,ENV,ASP);
|
__FUNCTION__, __LINE__,LOCAL_ActiveSignals,YENV,ENV,ASP);
|
||||||
#endif
|
#endif
|
||||||
check_alarm_fail_int( 2 PASS_REGS );
|
if ((v = check_alarm_fail_int( 2 PASS_REGS )) >= 0)
|
||||||
|
return v;
|
||||||
if (!LOCAL_ActiveSignals || (LOCAL_ActiveSignals & (YAP_CDOVF_SIGNAL|YAP_CREEP_SIGNAL)) == LOCAL_ActiveSignals) {
|
if (!LOCAL_ActiveSignals || (LOCAL_ActiveSignals & (YAP_CDOVF_SIGNAL|YAP_CREEP_SIGNAL)) == LOCAL_ActiveSignals) {
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
@ -963,11 +971,13 @@ interrupt_cut( USES_REGS1 )
|
|||||||
static int
|
static int
|
||||||
interrupt_cut_t( USES_REGS1 )
|
interrupt_cut_t( USES_REGS1 )
|
||||||
{
|
{
|
||||||
|
int v;
|
||||||
#ifdef DEBUG_INTERRUPTS
|
#ifdef DEBUG_INTERRUPTS
|
||||||
if (trace_interrupts) fprintf(stderr,"[%d] %s:%d: INTERRUPT %lx (YENV=%p ENV=%p ASP=%p)\n", (int)pthread_self(), \
|
if (trace_interrupts) fprintf(stderr,"[%d] %s:%d: INTERRUPT %lx (YENV=%p ENV=%p ASP=%p)\n", (int)pthread_self(), \
|
||||||
__FUNCTION__, __LINE__,LOCAL_ActiveSignals,YENV,ENV,ASP);
|
__FUNCTION__, __LINE__,LOCAL_ActiveSignals,YENV,ENV,ASP);
|
||||||
#endif
|
#endif
|
||||||
check_alarm_fail_int( 2 PASS_REGS );
|
if ((v = check_alarm_fail_int( 2 PASS_REGS )) >= 0)
|
||||||
|
return v;
|
||||||
if (!LOCAL_ActiveSignals || (LOCAL_ActiveSignals & (YAP_CDOVF_SIGNAL|YAP_CREEP_SIGNAL)) == LOCAL_ActiveSignals) {
|
if (!LOCAL_ActiveSignals || (LOCAL_ActiveSignals & (YAP_CDOVF_SIGNAL|YAP_CREEP_SIGNAL)) == LOCAL_ActiveSignals) {
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
@ -981,13 +991,13 @@ interrupt_cut_t( USES_REGS1 )
|
|||||||
static int
|
static int
|
||||||
interrupt_commit_y( USES_REGS1 )
|
interrupt_commit_y( USES_REGS1 )
|
||||||
{
|
{
|
||||||
|
int v;
|
||||||
#ifdef DEBUG_INTERRUPTS
|
#ifdef DEBUG_INTERRUPTS
|
||||||
if (trace_interrupts) fprintf(stderr,"[%d] %s:%d: INTERRUPT %lx (YENV=%p ENV=%p ASP=%p)\n", (int)pthread_self(), \
|
if (trace_interrupts) fprintf(stderr,"[%d] %s:%d: INTERRUPT %lx (YENV=%p ENV=%p ASP=%p)\n", (int)pthread_self(), \
|
||||||
__FUNCTION__, __LINE__,LOCAL_ActiveSignals,YENV,ENV,ASP);
|
__FUNCTION__, __LINE__,LOCAL_ActiveSignals,YENV,ENV,ASP);
|
||||||
#endif
|
#endif
|
||||||
if (!LOCAL_ActiveSignals || (LOCAL_ActiveSignals & (YAP_CDOVF_SIGNAL|YAP_CREEP_SIGNAL)) == LOCAL_ActiveSignals) {
|
if ((v = check_alarm_fail_int( 2 PASS_REGS )) >= 0)
|
||||||
return 2;
|
return v;
|
||||||
}
|
|
||||||
/* find something to fool S */
|
/* find something to fool S */
|
||||||
S = (CELL *)PredRestoreRegs;
|
S = (CELL *)PredRestoreRegs;
|
||||||
XREGS[0] = YENV[P->u.yps.y];
|
XREGS[0] = YENV[P->u.yps.y];
|
||||||
@ -998,11 +1008,13 @@ interrupt_commit_y( USES_REGS1 )
|
|||||||
static int
|
static int
|
||||||
interrupt_commit_x( USES_REGS1 )
|
interrupt_commit_x( USES_REGS1 )
|
||||||
{
|
{
|
||||||
|
int v;
|
||||||
#ifdef DEBUG_INTERRUPTS
|
#ifdef DEBUG_INTERRUPTS
|
||||||
if (trace_interrupts) fprintf(stderr,"[%d] %s:%d: INTERRUPT %lx (YENV=%p ENV=%p ASP=%p)\n", (int)pthread_self(), \
|
if (trace_interrupts) fprintf(stderr,"[%d] %s:%d: INTERRUPT %lx (YENV=%p ENV=%p ASP=%p)\n", (int)pthread_self(), \
|
||||||
__FUNCTION__, __LINE__,LOCAL_ActiveSignals,YENV,ENV,ASP);
|
__FUNCTION__, __LINE__,LOCAL_ActiveSignals,YENV,ENV,ASP);
|
||||||
#endif
|
#endif
|
||||||
check_alarm_fail_int( 2 PASS_REGS );
|
if ((v = check_alarm_fail_int( 2 PASS_REGS )) >= 0)
|
||||||
|
return v;
|
||||||
if (!LOCAL_ActiveSignals || (LOCAL_ActiveSignals & (YAP_CDOVF_SIGNAL|YAP_CREEP_SIGNAL)) == LOCAL_ActiveSignals) {
|
if (!LOCAL_ActiveSignals || (LOCAL_ActiveSignals & (YAP_CDOVF_SIGNAL|YAP_CREEP_SIGNAL)) == LOCAL_ActiveSignals) {
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
@ -1033,7 +1045,8 @@ interrupt_either( USES_REGS1 )
|
|||||||
if (trace_interrupts) fprintf(stderr,"[%d] %s:%d: INTERRUPT %lx (YENV=%p ENV=%p ASP=%p)\n", (int)pthread_self(), \
|
if (trace_interrupts) fprintf(stderr,"[%d] %s:%d: INTERRUPT %lx (YENV=%p ENV=%p ASP=%p)\n", (int)pthread_self(), \
|
||||||
__FUNCTION__, __LINE__,LOCAL_ActiveSignals,YENV,ENV,ASP);
|
__FUNCTION__, __LINE__,LOCAL_ActiveSignals,YENV,ENV,ASP);
|
||||||
#endif
|
#endif
|
||||||
check_alarm_fail_int( 2 PASS_REGS );
|
if ((v = check_alarm_fail_int( 2 PASS_REGS )) >= 0)
|
||||||
|
return v;
|
||||||
if (LOCAL_ActiveSignals == YAP_CREEP_SIGNAL)
|
if (LOCAL_ActiveSignals == YAP_CREEP_SIGNAL)
|
||||||
return 2;
|
return 2;
|
||||||
PP = P->u.Osblp.p0;
|
PP = P->u.Osblp.p0;
|
||||||
@ -1056,7 +1069,6 @@ interrupt_dexecute( USES_REGS1 )
|
|||||||
if (trace_interrupts) fprintf(stderr,"[%d] %s:%d: INTERRUPT %lx (YENV=%p ENV=%p ASP=%p)\n", (int)pthread_self(), \
|
if (trace_interrupts) fprintf(stderr,"[%d] %s:%d: INTERRUPT %lx (YENV=%p ENV=%p ASP=%p)\n", (int)pthread_self(), \
|
||||||
__FUNCTION__, __LINE__,LOCAL_ActiveSignals,YENV,ENV,ASP);
|
__FUNCTION__, __LINE__,LOCAL_ActiveSignals,YENV,ENV,ASP);
|
||||||
#endif
|
#endif
|
||||||
check_alarm_fail_int( 2 PASS_REGS );
|
|
||||||
PP = P->u.pp.p0;
|
PP = P->u.pp.p0;
|
||||||
if (LOCAL_ActiveSignals & YAP_CREEP_SIGNAL &&
|
if (LOCAL_ActiveSignals & YAP_CREEP_SIGNAL &&
|
||||||
PP->ExtraPredFlags & NoDebugPredFlag) {
|
PP->ExtraPredFlags & NoDebugPredFlag) {
|
||||||
@ -3084,11 +3096,9 @@ Yap_absmi(int inp)
|
|||||||
/* cut */
|
/* cut */
|
||||||
Op(cut, s);
|
Op(cut, s);
|
||||||
#ifdef COROUTINING
|
#ifdef COROUTINING
|
||||||
if (FALSE) {
|
CACHE_Y_AS_ENV(YREG);
|
||||||
CACHE_Y_AS_ENV(YREG);
|
check_stack(NoStackCut, H);
|
||||||
check_stack(NoStackCut, H);
|
ENDCACHE_Y_AS_ENV();
|
||||||
ENDCACHE_Y_AS_ENV();
|
|
||||||
}
|
|
||||||
do_cut:
|
do_cut:
|
||||||
#endif
|
#endif
|
||||||
SET_ASP(YREG, PREG->u.s.s);
|
SET_ASP(YREG, PREG->u.s.s);
|
||||||
@ -3110,11 +3120,9 @@ Yap_absmi(int inp)
|
|||||||
/* cut_t does the same as cut */
|
/* cut_t does the same as cut */
|
||||||
Op(cut_t, s);
|
Op(cut_t, s);
|
||||||
#ifdef COROUTINING
|
#ifdef COROUTINING
|
||||||
if (FALSE) {
|
CACHE_Y_AS_ENV(YREG);
|
||||||
CACHE_Y_AS_ENV(YREG);
|
check_stack(NoStackCutT, H);
|
||||||
check_stack(NoStackCutT, H);
|
ENDCACHE_Y_AS_ENV();
|
||||||
ENDCACHE_Y_AS_ENV();
|
|
||||||
}
|
|
||||||
do_cut_t:
|
do_cut_t:
|
||||||
#endif
|
#endif
|
||||||
SET_ASP(YREG, PREG->u.s.s);
|
SET_ASP(YREG, PREG->u.s.s);
|
||||||
@ -3135,11 +3143,9 @@ Yap_absmi(int inp)
|
|||||||
/* cut_e */
|
/* cut_e */
|
||||||
Op(cut_e, s);
|
Op(cut_e, s);
|
||||||
#ifdef COROUTINING
|
#ifdef COROUTINING
|
||||||
if (FALSE) {
|
CACHE_Y_AS_ENV(YREG);
|
||||||
CACHE_Y_AS_ENV(YREG);
|
check_stack(NoStackCutE, H);
|
||||||
check_stack(NoStackCutE, H);
|
ENDCACHE_Y_AS_ENV();
|
||||||
ENDCACHE_Y_AS_ENV();
|
|
||||||
}
|
|
||||||
do_cut_e:
|
do_cut_e:
|
||||||
#endif
|
#endif
|
||||||
SET_ASP(YREG, PREG->u.s.s);
|
SET_ASP(YREG, PREG->u.s.s);
|
||||||
|
3
C/exec.c
3
C/exec.c
@ -1815,6 +1815,9 @@ Yap_InitYaamRegs( int myworker_id )
|
|||||||
DepFr_cons_cp(REMOTE_top_dep_fr(myworker_id)) = NORM_CP(B);
|
DepFr_cons_cp(REMOTE_top_dep_fr(myworker_id)) = NORM_CP(B);
|
||||||
#endif
|
#endif
|
||||||
UNLOCK(REMOTE_SignalLock(myworker_id));
|
UNLOCK(REMOTE_SignalLock(myworker_id));
|
||||||
|
// make sure we have slots in case we don go through the top-level */
|
||||||
|
Yap_StartSlots( PASS_REGS1 );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static Int
|
static Int
|
||||||
|
4
C/text.c
4
C/text.c
@ -450,6 +450,7 @@ read_Text( void *buf, seq_tv_t *inp, encoding_t *enc, int *minimal, size_t *leng
|
|||||||
*lengp = strlen(s);
|
*lengp = strlen(s);
|
||||||
*enc = YAP_CHAR;
|
*enc = YAP_CHAR;
|
||||||
return s;
|
return s;
|
||||||
|
#if USE_GMP
|
||||||
case YAP_STRING_BIG:
|
case YAP_STRING_BIG:
|
||||||
if (buf) s = buf;
|
if (buf) s = buf;
|
||||||
else s = Yap_PreAllocCodeSpace();
|
else s = Yap_PreAllocCodeSpace();
|
||||||
@ -459,6 +460,7 @@ read_Text( void *buf, seq_tv_t *inp, encoding_t *enc, int *minimal, size_t *leng
|
|||||||
*enc = YAP_CHAR;
|
*enc = YAP_CHAR;
|
||||||
*lengp = strlen(s);
|
*lengp = strlen(s);
|
||||||
return s;
|
return s;
|
||||||
|
#endif
|
||||||
case YAP_STRING_CHARS:
|
case YAP_STRING_CHARS:
|
||||||
*enc = YAP_CHAR;
|
*enc = YAP_CHAR;
|
||||||
if (inp->sz)
|
if (inp->sz)
|
||||||
@ -551,6 +553,7 @@ read_Text( void *buf, seq_tv_t *inp, encoding_t *enc, int *minimal, size_t *leng
|
|||||||
LOCAL_Error_TYPE = gen_type_error( inp->type );
|
LOCAL_Error_TYPE = gen_type_error( inp->type );
|
||||||
LOCAL_Error_Term = t;
|
LOCAL_Error_Term = t;
|
||||||
}
|
}
|
||||||
|
#if USE_GMP
|
||||||
} else if (IsBigIntTerm(t)) {
|
} else if (IsBigIntTerm(t)) {
|
||||||
if (inp->type & (YAP_STRING_BIG)) {
|
if (inp->type & (YAP_STRING_BIG)) {
|
||||||
inp->type &= (YAP_STRING_BIG);
|
inp->type &= (YAP_STRING_BIG);
|
||||||
@ -560,6 +563,7 @@ read_Text( void *buf, seq_tv_t *inp, encoding_t *enc, int *minimal, size_t *leng
|
|||||||
LOCAL_Error_TYPE = gen_type_error( inp->type );
|
LOCAL_Error_TYPE = gen_type_error( inp->type );
|
||||||
LOCAL_Error_Term = t;
|
LOCAL_Error_Term = t;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
} else {
|
} else {
|
||||||
if (!Yap_IsGroundTerm(t)) {
|
if (!Yap_IsGroundTerm(t)) {
|
||||||
LOCAL_Error_TYPE = INSTANTIATION_ERROR;
|
LOCAL_Error_TYPE = INSTANTIATION_ERROR;
|
||||||
|
@ -417,7 +417,7 @@ extern int Yap_page_size;
|
|||||||
}
|
}
|
||||||
#endif /***********************************************************************************/
|
#endif /***********************************************************************************/
|
||||||
|
|
||||||
#ifdef THREADS
|
#if defined(THREADS) && defined(TABLING)
|
||||||
#define ALLOC_STRUCT(STR, STR_TYPE, _PG_ENT) \
|
#define ALLOC_STRUCT(STR, STR_TYPE, _PG_ENT) \
|
||||||
GET_FREE_STRUCT(STR, STR_TYPE, LOCAL##_PG_ENT, GLOBAL##_PG_ENT)
|
GET_FREE_STRUCT(STR, STR_TYPE, LOCAL##_PG_ENT, GLOBAL##_PG_ENT)
|
||||||
#define FREE_STRUCT(STR, STR_TYPE, _PG_ENT) \
|
#define FREE_STRUCT(STR, STR_TYPE, _PG_ENT) \
|
||||||
|
@ -159,7 +159,7 @@ struct page_statistics {
|
|||||||
#endif /* USE_PAGES_MALLOC */
|
#endif /* USE_PAGES_MALLOC */
|
||||||
|
|
||||||
|
|
||||||
#ifdef THREADS
|
#if defined(THREADS) && defined(TABLING)
|
||||||
#define GET_ALL_PAGE_STATS(STATS, STR_TYPE, _PAGES) \
|
#define GET_ALL_PAGE_STATS(STATS, STR_TYPE, _PAGES) \
|
||||||
LOCK(GLOBAL_ThreadHandlesLock); \
|
LOCK(GLOBAL_ThreadHandlesLock); \
|
||||||
CHECK_PAGE_FREE_STRUCTS(STR_TYPE, GLOBAL##_PAGES); \
|
CHECK_PAGE_FREE_STRUCTS(STR_TYPE, GLOBAL##_PAGES); \
|
||||||
|
@ -199,4 +199,5 @@ read_sig.
|
|||||||
:- '$set_no_trace'(true, prolog).
|
:- '$set_no_trace'(true, prolog).
|
||||||
:- '$set_no_trace'('$call'(_,_,_,_), prolog).
|
:- '$set_no_trace'('$call'(_,_,_,_), prolog).
|
||||||
:- '$set_no_trace'('$execute_nonstop'(_,_), prolog).
|
:- '$set_no_trace'('$execute_nonstop'(_,_), prolog).
|
||||||
|
:- '$set_no_trace'('$restore_regs'(_,_), prolog).
|
||||||
|
|
||||||
|
@ -130,6 +130,9 @@ table(Pred) :-
|
|||||||
'$set_table'(Mod,PredFunctor,PredModeList) :-
|
'$set_table'(Mod,PredFunctor,PredModeList) :-
|
||||||
'$undefined'(PredFunctor,Mod), !,
|
'$undefined'(PredFunctor,Mod), !,
|
||||||
'$c_table'(Mod,PredFunctor,PredModeList).
|
'$c_table'(Mod,PredFunctor,PredModeList).
|
||||||
|
'$set_table'(Mod,PredFunctor,PredModeList) :-
|
||||||
|
'$flags'(PredFunctor,Mod,Flags,Flags),
|
||||||
|
Flags /\ 0x00000040 =:= 0x00000040, !.
|
||||||
'$set_table'(Mod,PredFunctor,PredModeList) :-
|
'$set_table'(Mod,PredFunctor,PredModeList) :-
|
||||||
'$flags'(PredFunctor,Mod,Flags,Flags),
|
'$flags'(PredFunctor,Mod,Flags,Flags),
|
||||||
Flags /\ 0x1991F8C0 =:= 0,
|
Flags /\ 0x1991F8C0 =:= 0,
|
||||||
|
Reference in New Issue
Block a user