compilation fixes

This commit is contained in:
Vitor Santos Costa 2019-04-25 19:02:01 +01:00
parent 5f819fd7b4
commit dc5b90a643
2 changed files with 19 additions and 17 deletions

View File

@ -2090,12 +2090,12 @@ mark_choicepoints(register choiceptr gc_B, tr_fr_ptr saved_TR, bool very_verbose
restart_cp:
switch (opnum) {
case _Nstop:
if (gc_B->cp_b != NULL) {
nargs = 0;
break;
} else {
/* this is the last choice point, the work is done ;-) */
return;
if (gc_B->cp_env == LCL0) {
return;
} else {
// This must be a border choicepoint, just move up
gc_B = (choiceptr)(gc_B->cp_env[E_B]);
continue;
}
case _retry_c:
case _retry_userc:
@ -3025,11 +3025,14 @@ sweep_choicepoints(choiceptr gc_B USES_REGS)
sweep_environments(gc_B->cp_env,
EnvSizeInCells,
NULL PASS_REGS);
if (gc_B->cp_b != NULL) {
break;
} else
return;
case _trust_fail:
if (gc_B->cp_env == LCL0) {
return;
} else {
// This must be a border choicepoint, just move up
gc_B = (choiceptr)(gc_B->cp_env[E_B]);
continue;
}
case _trust_fail:
break;
case _or_else:
case _or_last:

View File

@ -52,14 +52,13 @@ typedef struct non_single_struct_t {
}
#define def_aux_overflow() \
aux_overflow:{ \
while (to_visit_max-to_visit0 < 32) { \
size_t d1 = to_visit-to_visit0; \
size_t d2 = to_visit_max-to_visit0; \
to_visit0 = Realloc(to_visit0,(d2+128)*sizeof(struct non_single_struct_t)); \
size_t d2 = to_visit_max-to_visit0; \
size_t d3 = Yap_Min(d2+1024, d2 *2); \
to_visit0 = Realloc(to_visit0,d3*sizeof(struct non_single_struct_t)); \
to_visit = to_visit0+d1; \
to_visit_max = to_visit0+(d2+128); \
pt0--; \
goto restart; \
to_visit_max = to_visit0+(d3); \
}
#define def_global_overflow() \