don't trust Error_TYPE unless ErrorMessage is set
fix ^cstats fix git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@401 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
7c6b48a20d
commit
8b97aac875
@ -866,7 +866,8 @@ addclause(Term t, CODEADDR cp, int mode, int mod)
|
|||||||
spy_flag = TRUE;
|
spy_flag = TRUE;
|
||||||
if (mode == consult)
|
if (mode == consult)
|
||||||
not_was_reconsulted(p, t, TRUE);
|
not_was_reconsulted(p, t, TRUE);
|
||||||
if (Error_TYPE == PERMISSION_ERROR_MODIFY_STATIC_PROCEDURE)
|
/* always check if we have a valid error first */
|
||||||
|
if (ErrorMessage && Error_TYPE == PERMISSION_ERROR_MODIFY_STATIC_PROCEDURE)
|
||||||
return;
|
return;
|
||||||
if (!is_dynamic(p)) {
|
if (!is_dynamic(p)) {
|
||||||
Clause *clp = ClauseCodeToClause(cp);
|
Clause *clp = ClauseCodeToClause(cp);
|
||||||
|
@ -2718,7 +2718,7 @@ cclause(Term inp_clause, int NOfArgs, int mod)
|
|||||||
/* may botch while doing a different module */
|
/* may botch while doing a different module */
|
||||||
|
|
||||||
/* first, initialise CompilerBotch to handle all cases of interruptions */
|
/* first, initialise CompilerBotch to handle all cases of interruptions */
|
||||||
ErrorMessage = NIL;
|
ErrorMessage = NULL;
|
||||||
if ((botch_why = setjmp(CompilerBotch)) == 3) {
|
if ((botch_why = setjmp(CompilerBotch)) == 3) {
|
||||||
/* out of local stack, just duplicate the stack */
|
/* out of local stack, just duplicate the stack */
|
||||||
restore_machine_regs();
|
restore_machine_regs();
|
||||||
@ -2759,7 +2759,7 @@ cclause(Term inp_clause, int NOfArgs, int mod)
|
|||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
restart_compilation:
|
restart_compilation:
|
||||||
if (ErrorMessage != NIL) {
|
if (ErrorMessage != NULL) {
|
||||||
reset_vars();
|
reset_vars();
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
@ -1111,9 +1111,10 @@ InteractSIGINT(int ch) {
|
|||||||
unsigned long int heap_space_taken =
|
unsigned long int heap_space_taken =
|
||||||
(unsigned long int)(Unsigned(HeapTop)-Unsigned(HeapBase));
|
(unsigned long int)(Unsigned(HeapTop)-Unsigned(HeapBase));
|
||||||
double frag = (100.0*(heap_space_taken-HeapUsed))/heap_space_taken;
|
double frag = (100.0*(heap_space_taken-HeapUsed))/heap_space_taken;
|
||||||
YP_fprintf(YP_stderr, "Code Space: %ld (%ld bytes used, fragmentation %.3f%%).\n",
|
YP_fprintf(YP_stderr, "Code Space: %ld (%ld bytes needed, %ld bytes used, fragmentation %.3f%%).\n",
|
||||||
(unsigned long int)(Unsigned (AuxTop) - Unsigned (HeapBase)),
|
(unsigned long int)(Unsigned (H0) - Unsigned (HeapBase)),
|
||||||
(unsigned long int)(Unsigned(HeapTop)-Unsigned(HeapBase)),
|
(unsigned long int)(Unsigned(HeapTop)-Unsigned(HeapBase)),
|
||||||
|
(unsigned long int)(HeapUsed),
|
||||||
frag);
|
frag);
|
||||||
YP_fprintf(YP_stderr, "Stack Space: %ld (%ld for Global, %ld for local).\n",
|
YP_fprintf(YP_stderr, "Stack Space: %ld (%ld for Global, %ld for local).\n",
|
||||||
(unsigned long int)(sizeof(CELL)*(LCL0-H0)),
|
(unsigned long int)(sizeof(CELL)*(LCL0-H0)),
|
||||||
|
Reference in New Issue
Block a user