code_info.m:
Change some comments in the generated code slightly.
ite_gen.m:
grab the instmap before generating the condition not
after in all three kinds of ite.
unify_gen.m:
grab and slap the code_info structure across the call
to generate_failure. This pair of calls should probably
be migrated into generate_failure. I'll check this out
soon (tomorrow).
mercury_profile.m:
The profiler. (At the moment just processes the addrdecl file)
*.m:
Command line parsing stolen from compiler. (Not linked into entirely
into mercury_profile, as causes a compiler bug)
rbtree.m:
Removed as not needed anymore, as part of the library.
call_gen.m code_gen.pp code_info.m garbage_out.m hlds.m llds.m
mercury_compile.pp shapes.m:
Output .garb files (with --gc accurate). This option overrides
information gleaned from the grades about GC.
Remove some of the magic numbers that were being used for
shape numbers.
tests/benchmarks:
Modify the nondet/semidet benchmarks so that `main' is either
det or multidet.
Remove files `Entry' and `NP_Entry' since they are no longer
needed.
configure.in:
Check for both <ucontext.h> and <sys/ucontext.h> (in that order),
since Tyson reports that his version of Linux has the latter but
not the former.
runtime/memory.c:
Use <sys/ucontext.h> rather than <ucontext.h> if configure
determines that the system has <sys/ucontext.h> but not
<ucontext.h>. (Tyson reports that his version of Linux
is like that.)
*.m:
Changed the way the extra field in the label type is defined. Now
all labels are initially assumed to be 'unknown' and a seperate
profiling pass (to be implemented) will determine whether the label can
be accessed externally.
debug_util.m, debugger.m:
Add new files which implement the debugger.
everything else:
Merge in changes between when the `debugger' branch was created
and now (Mon Jun 26 07:44:55 GMT 1995).
wrapper.mod:
Call do_init_modules if any of the profiling flags on. Need label info
for all types of profiling.
Executes code to begin time profiling if flag defined.
hlds.m and lots of other files:
Change the type of the first two arguments of unify/5 in
hlds__goal_expr from `term, term' to `var, unify_rhs'
where unify_rhs is given by
:- type unify_rhs
---> var(var)
; functor(const, list(var))
; lambda_goal(list(var), hlds__goal).
This change was for two reasons: firstly, it simplifies the
code in a lot of places, and secondly, it is a step towards
implementing lambda closures and higher-order predicates
properly.
set.m:
Fix an error in the documentation - the descriptions for
`set__delete' and `set__remove' where the wrong way around.
(Ditto `set__delete_list' and `set__remove_list'.)
options, optimize:
Add a new option, --optimize-fulljumps, which defaults on.
jumpopt, opt_util:
If --optimize-fulljumps is set, replace unconditional gotos with
the instruction sequence they point to. This not only avoids a jump
at runtime, but also increases basic block length and makes value
numbering more effective.
peephole:
Fulljump optimization can replace a recursive tailcall with the
initial part of the code of the procedure. Therefore peephole now
looks for a decr_sp followed by an incr_sp, and removes such pairs
from the instruction sequence.
frameopt:
Do not consider a decr_sp followed by an incr_sp to be a fatal error
(just in case peephole is switched off).
vn_block:
Fix a big tickled by fulljump optimization: maxfr, curfr and succip
were not required to be made up to date before an if_val exited
the extended basic block.
vn_util:
Simplify some more patterns of vnrvals. The extra patterns are
involved in testing conditions that are known to be true or false.
These patterns can arise when fulljump optimization replaces a
recursive tailcall.
modes.m, typecheck.m, code_util.m:
Don't report a compile error if there is a higher-order pred
unification in a compiler-generated predicate. (Instead, delay
the error until run-time so that it only occurs if the higher-order
pred unification in question actually gets executed.)
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.
ite_gen.m:
Fix bug in code generation for nondet if-then-else with nondet
condition - the save of the hijack frame maxfr was occurring
before the hijack frame was created.