call cleanup
This commit is contained in:
parent
af29600f09
commit
e3ab36f091
@ -9,8 +9,7 @@
|
|||||||
/* trust_fail */
|
/* trust_fail */
|
||||||
BOp(trust_fail, e);
|
BOp(trust_fail, e);
|
||||||
{
|
{
|
||||||
while (POP_CHOICE_POINT(B->cp_b))
|
while (POP_CHOICE_POINT(B->cp_b)) {
|
||||||
{
|
|
||||||
POP_EXECUTE();
|
POP_EXECUTE();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -37,8 +36,7 @@ shared_fail:
|
|||||||
/* fail */
|
/* fail */
|
||||||
PBOp(op_fail, e);
|
PBOp(op_fail, e);
|
||||||
|
|
||||||
if (PP)
|
if (PP) {
|
||||||
{
|
|
||||||
UNLOCK(PP->PELock);
|
UNLOCK(PP->PELock);
|
||||||
PP = NULL;
|
PP = NULL;
|
||||||
}
|
}
|
||||||
@ -48,12 +46,10 @@ shared_fail:
|
|||||||
ENDCACHE_Y_AS_ENV();
|
ENDCACHE_Y_AS_ENV();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
fail:
|
fail : {
|
||||||
{
|
|
||||||
register tr_fr_ptr pt0 = TR;
|
register tr_fr_ptr pt0 = TR;
|
||||||
#if defined(YAPOR) || defined(THREADS)
|
#if defined(YAPOR) || defined(THREADS)
|
||||||
if (PP)
|
if (PP) {
|
||||||
{
|
|
||||||
UNLOCK(PP->PELock);
|
UNLOCK(PP->PELock);
|
||||||
PP = NULL;
|
PP = NULL;
|
||||||
}
|
}
|
||||||
@ -63,22 +59,18 @@ fail:
|
|||||||
CACHE_TR(B->cp_tr);
|
CACHE_TR(B->cp_tr);
|
||||||
PREFETCH_OP(PREG);
|
PREFETCH_OP(PREG);
|
||||||
failloop:
|
failloop:
|
||||||
if (pt0 == S_TR)
|
if (pt0 == S_TR) {
|
||||||
{
|
|
||||||
SP = SP0;
|
SP = SP0;
|
||||||
#ifdef LOW_LEVEL_TRACER
|
#ifdef LOW_LEVEL_TRACER
|
||||||
if (Yap_do_low_level_trace)
|
if (Yap_do_low_level_trace) {
|
||||||
{
|
|
||||||
int go_on = true;
|
int go_on = true;
|
||||||
yamop *ipc = PREG;
|
yamop *ipc = PREG;
|
||||||
|
|
||||||
while (go_on)
|
while (go_on) {
|
||||||
{
|
|
||||||
op_numbers opnum = Yap_op_from_opcode(ipc->opc);
|
op_numbers opnum = Yap_op_from_opcode(ipc->opc);
|
||||||
|
|
||||||
go_on = false;
|
go_on = false;
|
||||||
switch (opnum)
|
switch (opnum) {
|
||||||
{
|
|
||||||
#ifdef TABLING
|
#ifdef TABLING
|
||||||
case _table_load_answer:
|
case _table_load_answer:
|
||||||
low_level_trace(retry_table_loader, LOAD_CP(B)->cp_pred_entry, NULL);
|
low_level_trace(retry_table_loader, LOAD_CP(B)->cp_pred_entry, NULL);
|
||||||
@ -94,13 +86,16 @@ failloop:
|
|||||||
#endif /* THREADS_CONSUMER_SHARING */
|
#endif /* THREADS_CONSUMER_SHARING */
|
||||||
#ifdef DETERMINISTIC_TABLING
|
#ifdef DETERMINISTIC_TABLING
|
||||||
if (IS_DET_GEN_CP(B))
|
if (IS_DET_GEN_CP(B))
|
||||||
low_level_trace(retry_table_generator, DET_GEN_CP(B)->cp_pred_entry, NULL);
|
low_level_trace(retry_table_generator, DET_GEN_CP(B)->cp_pred_entry,
|
||||||
|
NULL);
|
||||||
else
|
else
|
||||||
#endif /* DETERMINISTIC_TABLING */
|
#endif /* DETERMINISTIC_TABLING */
|
||||||
low_level_trace(retry_table_generator, GEN_CP(B)->cp_pred_entry, (CELL *)(GEN_CP(B) + 1));
|
low_level_trace(retry_table_generator, GEN_CP(B)->cp_pred_entry,
|
||||||
|
(CELL *)(GEN_CP(B) + 1));
|
||||||
break;
|
break;
|
||||||
case _table_answer_resolution:
|
case _table_answer_resolution:
|
||||||
low_level_trace(retry_table_consumer, CONS_CP(B)->cp_pred_entry, NULL);
|
low_level_trace(retry_table_consumer, CONS_CP(B)->cp_pred_entry,
|
||||||
|
NULL);
|
||||||
break;
|
break;
|
||||||
case _trie_trust_var:
|
case _trie_trust_var:
|
||||||
case _trie_retry_var:
|
case _trie_retry_var:
|
||||||
@ -198,8 +193,7 @@ failloop:
|
|||||||
{
|
{
|
||||||
TR = TR_FZ;
|
TR = TR_FZ;
|
||||||
TRAIL_LINK(pt0);
|
TRAIL_LINK(pt0);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
#endif /* FROZEN_STACKS */
|
#endif /* FROZEN_STACKS */
|
||||||
RESTORE_TR();
|
RESTORE_TR();
|
||||||
GONext();
|
GONext();
|
||||||
@ -207,16 +201,13 @@ failloop:
|
|||||||
BEGD(d1);
|
BEGD(d1);
|
||||||
d1 = TrailTerm(pt0 - 1);
|
d1 = TrailTerm(pt0 - 1);
|
||||||
pt0--;
|
pt0--;
|
||||||
if (IsVarTerm(d1))
|
if (IsVarTerm(d1)) {
|
||||||
{
|
|
||||||
#if defined(YAPOR_SBA) && defined(YAPOR)
|
#if defined(YAPOR_SBA) && defined(YAPOR)
|
||||||
/* clean up the trail when we backtrack */
|
/* clean up the trail when we backtrack */
|
||||||
if (Unsigned((Int)(d1) - (Int)(H_FZ)) >
|
if (Unsigned((Int)(d1) - (Int)(H_FZ)) >
|
||||||
Unsigned((Int)(B_FZ) - (Int)(H_FZ)))
|
Unsigned((Int)(B_FZ) - (Int)(H_FZ))) {
|
||||||
{
|
|
||||||
RESET_VARIABLE(STACK_TO_SBA(d1));
|
RESET_VARIABLE(STACK_TO_SBA(d1));
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
#endif
|
#endif
|
||||||
/* normal variable */
|
/* normal variable */
|
||||||
RESET_VARIABLE(d1);
|
RESET_VARIABLE(d1);
|
||||||
@ -224,18 +215,19 @@ failloop:
|
|||||||
}
|
}
|
||||||
/* pointer to code space */
|
/* pointer to code space */
|
||||||
/* or updatable variable */
|
/* or updatable variable */
|
||||||
#if defined(TERM_EXTENSIONS) || defined(FROZEN_STACKS) || defined(MULTI_ASSIGNMENT_VARIABLES)
|
#if defined(TERM_EXTENSIONS) || defined(FROZEN_STACKS) || \
|
||||||
|
defined(MULTI_ASSIGNMENT_VARIABLES)
|
||||||
if (IsPairTerm(d1))
|
if (IsPairTerm(d1))
|
||||||
#endif /* TERM_EXTENSIONS || FROZEN_STACKS || MULTI_ASSIGNMENT_VARIABLES */
|
#endif /* TERM_EXTENSIONS || FROZEN_STACKS || MULTI_ASSIGNMENT_VARIABLES */
|
||||||
{
|
{
|
||||||
register CELL flags;
|
register CELL flags;
|
||||||
CELL *pt1 = RepPair(d1);
|
CELL *pt1 = RepPair(d1);
|
||||||
#ifdef LIMIT_TABLING
|
#ifdef LIMIT_TABLING
|
||||||
if ((ADDR)pt1 == LOCAL_TrailBase)
|
if ((ADDR)pt1 == LOCAL_TrailBase) {
|
||||||
{
|
|
||||||
sg_fr_ptr sg_fr = (sg_fr_ptr)TrailVal(pt0);
|
sg_fr_ptr sg_fr = (sg_fr_ptr)TrailVal(pt0);
|
||||||
TrailTerm(pt0) = AbsPair((CELL *)(pt0 - 1));
|
TrailTerm(pt0) = AbsPair((CELL *)(pt0 - 1));
|
||||||
SgFr_state(sg_fr)--; /* complete_in_use --> complete : compiled_in_use --> compiled */
|
SgFr_state(sg_fr)--; /* complete_in_use --> complete : compiled_in_use -->
|
||||||
|
compiled */
|
||||||
insert_into_global_sg_fr_list(sg_fr);
|
insert_into_global_sg_fr_list(sg_fr);
|
||||||
goto failloop;
|
goto failloop;
|
||||||
}
|
}
|
||||||
@ -248,24 +240,19 @@ failloop:
|
|||||||
#else
|
#else
|
||||||
IN_BETWEEN(LOCAL_TrailBase, pt1, (ADDR)CurrentTrailTop + MinTrailGap)
|
IN_BETWEEN(LOCAL_TrailBase, pt1, (ADDR)CurrentTrailTop + MinTrailGap)
|
||||||
#endif /* YAPOR_SBA */
|
#endif /* YAPOR_SBA */
|
||||||
)
|
) {
|
||||||
{
|
|
||||||
pt0 = (tr_fr_ptr)pt1;
|
pt0 = (tr_fr_ptr)pt1;
|
||||||
goto failloop;
|
goto failloop;
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
#endif /* FROZEN_STACKS */
|
#endif /* FROZEN_STACKS */
|
||||||
if (IN_BETWEEN(H0, pt1, HR))
|
if (IN_BETWEEN(H0, pt1, HR)) {
|
||||||
{
|
if (IsAttVar(pt1)) {
|
||||||
if (IsAttVar(pt1))
|
|
||||||
{
|
|
||||||
goto failloop;
|
goto failloop;
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
TR = pt0;
|
TR = pt0;
|
||||||
Yap_CleanOpaqueVariable(d1);
|
Yap_CleanOpaqueVariable(d1);
|
||||||
goto fail;
|
|
||||||
|
goto failloop;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef FROZEN_STACKS /* TRAIL */
|
#ifdef FROZEN_STACKS /* TRAIL */
|
||||||
@ -275,8 +262,7 @@ failloop:
|
|||||||
#endif
|
#endif
|
||||||
flags = *pt1;
|
flags = *pt1;
|
||||||
#if MULTIPLE_STACKS
|
#if MULTIPLE_STACKS
|
||||||
if (FlagOn(DBClMask, flags))
|
if (FlagOn(DBClMask, flags)) {
|
||||||
{
|
|
||||||
DBRef dbr = DBStructFlagsToDBStruct(pt1);
|
DBRef dbr = DBStructFlagsToDBStruct(pt1);
|
||||||
int erase;
|
int erase;
|
||||||
|
|
||||||
@ -284,19 +270,14 @@ failloop:
|
|||||||
DEC_DBREF_COUNT(dbr);
|
DEC_DBREF_COUNT(dbr);
|
||||||
erase = (dbr->Flags & ErasedMask) && (dbr->ref_count == 0);
|
erase = (dbr->Flags & ErasedMask) && (dbr->ref_count == 0);
|
||||||
UNLOCK(dbr->lock);
|
UNLOCK(dbr->lock);
|
||||||
if (erase)
|
if (erase) {
|
||||||
{
|
|
||||||
saveregs();
|
saveregs();
|
||||||
Yap_ErDBE(dbr);
|
Yap_ErDBE(dbr);
|
||||||
setregs();
|
setregs();
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else
|
if (flags & LogUpdMask) {
|
||||||
{
|
if (flags & IndexMask) {
|
||||||
if (flags & LogUpdMask)
|
|
||||||
{
|
|
||||||
if (flags & IndexMask)
|
|
||||||
{
|
|
||||||
LogUpdIndex *cl = ClauseFlagsToLogUpdIndex(pt1);
|
LogUpdIndex *cl = ClauseFlagsToLogUpdIndex(pt1);
|
||||||
int erase;
|
int erase;
|
||||||
#if PARALLEL_YAP
|
#if PARALLEL_YAP
|
||||||
@ -306,55 +287,46 @@ failloop:
|
|||||||
PELOCK(8, ap);
|
PELOCK(8, ap);
|
||||||
DEC_CLREF_COUNT(cl);
|
DEC_CLREF_COUNT(cl);
|
||||||
erase = (cl->ClFlags & ErasedMask) && !(cl->ClRefCount);
|
erase = (cl->ClFlags & ErasedMask) && !(cl->ClRefCount);
|
||||||
if (erase)
|
if (erase) {
|
||||||
{
|
|
||||||
saveregs();
|
saveregs();
|
||||||
/* at this point,
|
/* at this point,
|
||||||
we are the only ones accessing the clause,
|
we are the only ones accessing the clause,
|
||||||
hence we don't need to have a lock it */
|
hence we don't need to have a lock it */
|
||||||
Yap_ErLogUpdIndex(cl);
|
Yap_ErLogUpdIndex(cl);
|
||||||
setregs();
|
setregs();
|
||||||
}
|
} else if (cl->ClFlags & DirtyMask) {
|
||||||
else if (cl->ClFlags & DirtyMask)
|
|
||||||
{
|
|
||||||
saveregs();
|
saveregs();
|
||||||
/* at this point,
|
/* at this point,
|
||||||
we are the only ones accessing the clause,
|
we are the only ones accessing the clause,
|
||||||
hence we don't need to have a lock it */
|
hence we don't need to have a lock it */
|
||||||
Yap_CleanUpIndex(cl);
|
Yap_CleanUpIndex(cl);
|
||||||
setregs();
|
setregs();
|
||||||
}
|
}
|
||||||
UNLOCK(ap->PELock);
|
UNLOCK(ap->PELock);
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
LogUpdClause *cl = ClauseFlagsToLogUpdClause(pt1);
|
LogUpdClause *cl = ClauseFlagsToLogUpdClause(pt1);
|
||||||
int erase;
|
int erase;
|
||||||
#if PARALLEL_YAP
|
#if PARALLEL_YAP
|
||||||
PredEntry *ap = cl->ClPred;
|
PredEntry *ap = cl->ClPred;
|
||||||
#endif
|
#endif
|
||||||
/* BB support */
|
/* BB support */
|
||||||
if (ap)
|
if (ap) {
|
||||||
{
|
|
||||||
|
|
||||||
PELOCK(9, ap);
|
PELOCK(9, ap);
|
||||||
DEC_CLREF_COUNT(cl);
|
DEC_CLREF_COUNT(cl);
|
||||||
erase = (cl->ClFlags & ErasedMask) && !(cl->ClRefCount);
|
erase = (cl->ClFlags & ErasedMask) && !(cl->ClRefCount);
|
||||||
if (erase)
|
if (erase) {
|
||||||
{
|
|
||||||
saveregs();
|
saveregs();
|
||||||
/* at this point,
|
/* at this point,
|
||||||
we are the only ones accessing the clause,
|
we are the only ones accessing the clause,
|
||||||
hence we don't need to have a lock it */
|
hence we don't need to have a lock it */
|
||||||
Yap_ErLogUpdCl(cl);
|
Yap_ErLogUpdCl(cl);
|
||||||
setregs();
|
setregs();
|
||||||
}
|
}
|
||||||
UNLOCK(ap->PELock);
|
UNLOCK(ap->PELock);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
DynamicClause *cl = ClauseFlagsToDynamicClause(pt1);
|
DynamicClause *cl = ClauseFlagsToDynamicClause(pt1);
|
||||||
int erase;
|
int erase;
|
||||||
|
|
||||||
@ -362,12 +334,11 @@ failloop:
|
|||||||
DEC_CLREF_COUNT(cl);
|
DEC_CLREF_COUNT(cl);
|
||||||
erase = (cl->ClFlags & ErasedMask) && !(cl->ClRefCount);
|
erase = (cl->ClFlags & ErasedMask) && !(cl->ClRefCount);
|
||||||
UNLOCK(cl->ClLock);
|
UNLOCK(cl->ClLock);
|
||||||
if (erase)
|
if (erase) {
|
||||||
{
|
|
||||||
saveregs();
|
saveregs();
|
||||||
/* at this point,
|
/* at this point,
|
||||||
we are the only ones accessing the clause,
|
we are the only ones accessing the clause,
|
||||||
hence we don't need to have a lock it */
|
hence we don't need to have a lock it */
|
||||||
Yap_ErCl(cl);
|
Yap_ErCl(cl);
|
||||||
setregs();
|
setregs();
|
||||||
}
|
}
|
||||||
@ -376,37 +347,24 @@ failloop:
|
|||||||
#else
|
#else
|
||||||
ResetFlag(InUseMask, flags);
|
ResetFlag(InUseMask, flags);
|
||||||
*pt1 = flags;
|
*pt1 = flags;
|
||||||
if (FlagOn((ErasedMask | DirtyMask), flags))
|
if (FlagOn((ErasedMask | DirtyMask), flags)) {
|
||||||
{
|
if (FlagOn(DBClMask, flags)) {
|
||||||
if (FlagOn(DBClMask, flags))
|
|
||||||
{
|
|
||||||
saveregs();
|
saveregs();
|
||||||
Yap_ErDBE(DBStructFlagsToDBStruct(pt1));
|
Yap_ErDBE(DBStructFlagsToDBStruct(pt1));
|
||||||
setregs();
|
setregs();
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
saveregs();
|
saveregs();
|
||||||
if (flags & LogUpdMask)
|
if (flags & LogUpdMask) {
|
||||||
{
|
if (flags & IndexMask) {
|
||||||
if (flags & IndexMask)
|
if (FlagOn(ErasedMask, flags)) {
|
||||||
{
|
|
||||||
if (FlagOn(ErasedMask, flags))
|
|
||||||
{
|
|
||||||
Yap_ErLogUpdIndex(ClauseFlagsToLogUpdIndex(pt1));
|
Yap_ErLogUpdIndex(ClauseFlagsToLogUpdIndex(pt1));
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
Yap_CleanUpIndex(ClauseFlagsToLogUpdIndex(pt1));
|
Yap_CleanUpIndex(ClauseFlagsToLogUpdIndex(pt1));
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
Yap_ErLogUpdCl(ClauseFlagsToLogUpdClause(pt1));
|
Yap_ErLogUpdCl(ClauseFlagsToLogUpdClause(pt1));
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
Yap_ErCl(ClauseFlagsToDynamicClause(pt1));
|
Yap_ErCl(ClauseFlagsToDynamicClause(pt1));
|
||||||
}
|
}
|
||||||
setregs();
|
setregs();
|
||||||
|
2
C/text.c
2
C/text.c
@ -537,7 +537,7 @@ static Term write_strings(unsigned char *s0, seq_tv_t *out,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
char *s = (char *)s0, *lim = s + max;
|
char *s = (char *)s0;
|
||||||
Term t = init_tstring(PASS_REGS1);
|
Term t = init_tstring(PASS_REGS1);
|
||||||
LOCAL_TERM_ERROR(t, 2 * max);
|
LOCAL_TERM_ERROR(t, 2 * max);
|
||||||
unsigned char *buf = buf_from_tstring(HR);
|
unsigned char *buf = buf_from_tstring(HR);
|
||||||
|
@ -354,7 +354,7 @@ bool low_level_trace__(yap_low_level_port port, PredEntry *pred, CELL *args) {
|
|||||||
printf("\n");
|
printf("\n");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
b += snprintf(b, top - b, Int_FORMAT " "UInt_FORMAT " ", vsc_count, LCL0 - (CELL *)B);
|
b += snprintf(b, top - b, "%llud "UInt_FORMAT " ", vsc_count, LCL0 - (CELL *)B);
|
||||||
b += snprintf(b, top - b, Int_FORMAT " ", LCL0 - (CELL *)Yap_REGS.CUT_C_TOP);
|
b += snprintf(b, top - b, Int_FORMAT " ", LCL0 - (CELL *)Yap_REGS.CUT_C_TOP);
|
||||||
#if defined(THREADS) || defined(YAPOR)
|
#if defined(THREADS) || defined(YAPOR)
|
||||||
b += snprintf(b, top - b, "(%d)", worker_id);
|
b += snprintf(b, top - b, "(%d)", worker_id);
|
||||||
@ -482,7 +482,7 @@ static Int reset_total_choicepoints(USES_REGS1) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static Int show_low_level_trace(USES_REGS1) {
|
static Int show_low_level_trace(USES_REGS1) {
|
||||||
fprintf(stderr, "Call counter=" Int_FORMAT "\n", vsc_count);
|
fprintf(stderr, "Call counter=%lld\n", vsc_count);
|
||||||
return (TRUE);
|
return (TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -610,7 +610,7 @@ static void putAtom(Atom atom, int Quote_illegal, struct write_globs *wglb) {
|
|||||||
while (*s) {
|
while (*s) {
|
||||||
int32_t ch;
|
int32_t ch;
|
||||||
s += get_utf8(s, 1, &ch);
|
s += get_utf8(s, 1, &ch);
|
||||||
write_quoted(ch, '\'', stream);
|
write_quoted( ch, '\'', stream);
|
||||||
}
|
}
|
||||||
wrputc('\'', stream);
|
wrputc('\'', stream);
|
||||||
} else {
|
} else {
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
#ifdef FROZEN_STACKS
|
#ifdef FROZEN_STACKS
|
||||||
{
|
{
|
||||||
tr_fr_ptr pt0, pt1, pbase;
|
tr_fr_ptr pt0, pt1, pbase, ptop;
|
||||||
restart:
|
pbase = B->cp_tr, ptop = TR;
|
||||||
pbase = B->cp_tr;
|
|
||||||
pt0 = pt1 = TR - 1;
|
pt0 = pt1 = TR - 1;
|
||||||
while (pt1 >= pbase) {
|
while (pt1 >= pbase) {
|
||||||
BEGD(d1);
|
BEGD(d1);
|
||||||
@ -33,10 +32,7 @@
|
|||||||
Functor f = FunctorOfTerm(t);
|
Functor f = FunctorOfTerm(t);
|
||||||
if (f == FunctorBigInt) {
|
if (f == FunctorBigInt) {
|
||||||
Int tag = Yap_blob_tag(t) - USER_BLOB_START;
|
Int tag = Yap_blob_tag(t) - USER_BLOB_START;
|
||||||
RESET_VARIABLE(&TrailTerm(pt1));
|
|
||||||
RESET_VARIABLE(&TrailVal(pt1));
|
|
||||||
GLOBAL_OpaqueHandlers[tag].cut_handler(d1);
|
GLOBAL_OpaqueHandlers[tag].cut_handler(d1);
|
||||||
goto restart;
|
|
||||||
} else {
|
} else {
|
||||||
pt0--;
|
pt0--;
|
||||||
}
|
}
|
||||||
@ -91,8 +87,12 @@
|
|||||||
if (pt0 != pt1) {
|
if (pt0 != pt1) {
|
||||||
int size;
|
int size;
|
||||||
pt0++;
|
pt0++;
|
||||||
size = TR - pt0;
|
size = ptop - pt0;
|
||||||
memmove(pbase, pt0, size * sizeof(struct trail_frame));
|
memmove(pbase, pt0, size * sizeof(struct trail_frame));
|
||||||
|
if (ptop != TR) {
|
||||||
|
memmove(pbase + size, ptop, (TR - ptop) * sizeof(struct trail_frame));
|
||||||
|
size += (TR - ptop);
|
||||||
|
}
|
||||||
TR = pbase + size;
|
TR = pbase + size;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -113,7 +113,7 @@ extern VFS_t *GLOBAL_VFS;
|
|||||||
|
|
||||||
extern void init_android_stream(void);
|
extern void init_android_stream(void);
|
||||||
|
|
||||||
extern void Yap_InitStdStream(int sno, SMALLUNSGN flags, FILE *file, VFS_t *vfsp);
|
extern void Yap_InitStdStream(int sno, unsigned int flags, FILE *file, VFS_t *vfsp);
|
||||||
|
|
||||||
static inline VFS_t *vfs_owner(const char *fname) {
|
static inline VFS_t *vfs_owner(const char *fname) {
|
||||||
VFS_t *me = GLOBAL_VFS;
|
VFS_t *me = GLOBAL_VFS;
|
||||||
|
@ -79,7 +79,6 @@ __BEGIN_DECLS
|
|||||||
|
|
||||||
#include "YapFormat.h"
|
#include "YapFormat.h"
|
||||||
|
|
||||||
|
|
||||||
/* Primitive Functions */
|
/* Primitive Functions */
|
||||||
|
|
||||||
#define YAP_Deref(t) (t)
|
#define YAP_Deref(t) (t)
|
||||||
|
Reference in New Issue
Block a user