mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-15 01:13:30 +00:00
Only return the first solution to main/2, rather than all solutions.
wrapper.mod: Only return the first solution to main/2, rather than all solutions. table.c: Remove unnecessary assert(), since it caused a warning, and since the condition it checks for is already checked for in newmem(). CFLAGSFILE, PORTABILITY: Minor changes.
This commit is contained in:
@@ -29,3 +29,11 @@
|
||||
|
||||
# Use this option if you want to include time profiling information.
|
||||
# -DPROFILE_TIME
|
||||
|
||||
# Use this option with -DSPEED if you want minimal (relatively efficient)
|
||||
# debugging
|
||||
# -DDEBUG_GOTOS
|
||||
|
||||
# Use this option with -DSPEED if don't want debugging, but you do want
|
||||
# to support the `-w' (entry point) command
|
||||
# -DDEBUG_LABELS
|
||||
|
||||
@@ -8,7 +8,7 @@ bits by casting pointers to integers and back again.
|
||||
|
||||
Various parts of the code are conditionalized to take advantage of
|
||||
GNU C's special features if they are available, and to use specific
|
||||
global registers variables on certain machines.
|
||||
registers for global register variables on certain machines.
|
||||
|
||||
Otherwise this should be portable ANSI C :-)
|
||||
It isn't portable to older non-ansi C compilers, but if you don't
|
||||
|
||||
@@ -31,9 +31,6 @@ void tab_init_table(Table *table)
|
||||
|
||||
table->ta_store = make_many(List *, table->ta_size);
|
||||
|
||||
/* make sure that the make_many worked! */
|
||||
assert(((table->ta_size != 0) ? table->ta_store : 1));
|
||||
|
||||
for (i = 0; i < table->ta_size; i++)
|
||||
table->ta_store[i] = NULL;
|
||||
}
|
||||
|
||||
@@ -491,7 +491,7 @@ global_success:
|
||||
}
|
||||
#endif
|
||||
|
||||
redo();
|
||||
goto all_done;
|
||||
|
||||
global_fail:
|
||||
#ifndef SPEED
|
||||
@@ -502,25 +502,21 @@ global_fail:
|
||||
|
||||
if (detaildebug)
|
||||
dumpnondstack();
|
||||
|
||||
maxfr = (Word *) pop();
|
||||
succip = (Code *) pop();
|
||||
hp = (Word *) pop();
|
||||
|
||||
if (detaildebug)
|
||||
{
|
||||
save_transient_registers();
|
||||
printregs("after popping...");
|
||||
}
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
maxfr = (Word *) pop();
|
||||
succip = (Code *) pop();
|
||||
hp = (Word *) pop();
|
||||
}
|
||||
|
||||
all_done:
|
||||
maxfr = (Word *) pop();
|
||||
succip = (Code *) pop();
|
||||
hp = (Word *) pop();
|
||||
|
||||
#ifndef SPEED
|
||||
if (finaldebug && detaildebug)
|
||||
{
|
||||
save_transient_registers();
|
||||
printregs("after popping...");
|
||||
}
|
||||
#endif
|
||||
proceed();
|
||||
#ifndef USE_GCC_NONLOCAL_GOTOS
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user