Commit Graph

1690 Commits

Author SHA1 Message Date
Andrew Bromage
fda56846cb With any luck, this should be the call_graph branch successfully
merged.  Do not use --constraint-propagation, because it doesn't
schedule conjunctions properly yet.
1995-07-04 03:15:30 +00:00
Andrew Bromage
a26cb0ee21 Transform module. 1995-07-04 01:32:25 +00:00
Andrew Bromage
7b615f8c02 Constaint propagation. WARNING: Does not work yet. 1995-07-04 01:31:14 +00:00
Tyson Dowd
39d10b85bb Changes output format so NU-Prologs builtin parser doesn't
garbage_out.m, shapes.m:
	Changes output format so NU-Prologs builtin parser doesn't
	barf at it. (Mercury's parser is much better ;-)
1995-07-03 08:17:52 +00:00
Thomas Conway
a7b72b2b67 Change some comments in the generated code slightly.
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).
1995-07-03 08:06:53 +00:00
Peter Ross
ea690f0afe Added the predicates list__perm (permuations of list) and list__insert
list.m:
	Added the predicates list__perm (permuations of list) and list__insert
	(multidet insert into a list).
1995-07-03 07:53:28 +00:00
Fergus Henderson
f6bc691646 Add an Mmake file for the profiler.
prof/Mmake:
	Add an Mmake file for the profiler.
1995-07-03 05:07:21 +00:00
Fergus Henderson
c9f8b324d0 Mangle quoted Mercury predicate names properly,
llds.m:
	Mangle quoted Mercury predicate names properly,
	so that we don't get syntax errors from the C compiler.
1995-07-02 09:42:55 +00:00
Peter Ross
3079c0871f Changed the io__read_word, now ignores all initial whitespace and then
io.m:
	Changed the io__read_word, now ignores all initial whitespace and then
	builds the word.
1995-06-30 11:56:59 +00:00
Peter Ross
b36eaf006d The profiler. (At the moment just processes the addrdecl file)
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.
1995-06-30 11:32:24 +00:00
Tyson Dowd
86ffff6687 Output exports in the .garb files.
garbage_out.m:
	Output exports in the .garb files.
1995-06-30 07:32:43 +00:00
Peter Ross
51610e8cc4 Added PROFFLAGS 1995-06-30 06:36:23 +00:00
Fergus Henderson
006451ead1 Add a file documenting the limitations of the current Mercury system. 1995-06-30 04:45:52 +00:00
Fergus Henderson
4e394a836c Fix a few errors (now that main/2 is required to be det/multidet)
tests/general/*.m:
	Fix a few errors (now that main/2 is required to be det/multidet)
	and warnings in the test cases.
1995-06-29 07:10:49 +00:00
Fergus Henderson
e7dcee316a Add a note about using `--verbose-errors' to the FAQs section.
doc/user_guide.texi:
	Add a note about using `--verbose-errors' to the FAQs section.
1995-06-29 07:05:20 +00:00
Fergus Henderson
e0bf164c42 Fix a few typos and spelling errors.
doc/reference_manual.texi:
	Fix a few typos and spelling errors.
	(I ran it through ispell.)
1995-06-29 06:54:05 +00:00
Tyson Dowd
6335eb6a78 Output .garb files (with --gc accurate). This option overrides
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.
1995-06-29 05:31:15 +00:00
Fergus Henderson
bbe3a27429 Don't include DEFAULT_GRADE in LIBGRADES.
configure.in:
	Don't include DEFAULT_GRADE in LIBGRADES.
1995-06-28 01:28:52 +00:00
Fergus Henderson
e8a39797b6 Modify the nondet/semidet benchmarks so that `main' is either
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.
1995-06-27 14:26:17 +00:00
Fergus Henderson
e71fd08cd4 Check for both <ucontext.h> and <sys/ucontext.h> (in that order),
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.
1995-06-27 13:54:16 +00:00
Fergus Henderson
634a81cffd Use <sys/ucontext.h> rather than <ucontext.h> if configure
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.)
1995-06-27 13:51:47 +00:00
Peter Ross
6cc1f3e0b0 Changed the way the extra field in the label type is defined.
*.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.
1995-06-27 09:48:20 +00:00
Fergus Henderson
588825014c Fix bug reported by Philip Dart: term_io__write_term should
term_io.m:
	Fix bug reported by Philip Dart: term_io__write_term should
	write an empty list as just "[]" not as "'[]'".
1995-06-27 09:26:21 +00:00
Zoltan Somogyi
0e01b308a3 minor change.
HISTORY:
	minor change.
1995-06-27 02:43:45 +00:00
Fergus Henderson
566616df4a Fix bug introduced in my recent change: use `GOTO_LABEL' macro
wrapper.mod:
	Fix bug introduced in my recent change: use `GOTO_LABEL' macro
	rather than ordinary `goto', so that it works with GRADE=debug.
1995-06-26 08:39:19 +00:00
Steven Siew
f5aa3c8281 Add new files which implement the debugger.
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).
1995-06-26 07:50:02 +00:00
Peter Ross
2b53578efc Added red-black tree's to the library.
rbtree.m:
	Added red-black tree's to the library.
1995-06-26 07:08:53 +00:00
Peter Ross
d4dfcab0f9 Propogate PROFFLAGS through out the compiler.
Mmake:
	Propogate PROFFLAGS through out the compiler.
1995-06-26 05:57:18 +00:00
Peter Ross
a417e25d49 Added a new flag called PROFFLAGS. If you want to turn profiling on
Mmake:
	Added a new flag called PROFFLAGS.  If you want to turn profiling on
	add a PROFFLAGS line to MMake.params
1995-06-26 05:51:05 +00:00
Peter Ross
3400a8d3c2 Reorginised the profiling header file so that it conforms to the 244
prof.*:
	Reorginised the profiling header file so that it conforms to the 244
	definition of the way to do it.  ;-)
1995-06-26 05:48:21 +00:00
Peter Ross
6b3ac2f7cb Call do_init_modules if any of the profiling flags on.
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.
1995-06-26 05:44:39 +00:00
Peter Ross
1e12222ccd Fixed minor bug in call's used for profiling.
call.mod:
	Fixed minor bug in call's used for profiling.
1995-06-26 05:37:15 +00:00
Fergus Henderson
0713ab1575 Change the type of the first two arguments of unify/5 in
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.
1995-06-25 13:47:14 +00:00
Fergus Henderson
c8ae15ffd8 Commit a work-around for a code generation bug -
det_analysis.m:
	Commit a work-around for a code generation bug -
	the compiler generated incorrect code for my change
	to det_analysis.m.
1995-06-25 08:13:12 +00:00
Fergus Henderson
ec5a0ae4af Fix an error in the documentation - the descriptions for
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'.)
1995-06-25 04:32:16 +00:00
Zoltan Somogyi
159e986015 Add a new option, --optimize-fulljumps, which defaults on.
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.
1995-06-24 15:53:28 +00:00
Fergus Henderson
f0d77e44ba Don't report a compile error if there is a higher-order pred
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.)
1995-06-24 14:12:44 +00:00
Fergus Henderson
36820eda8d Report an error if main/2 can fail.
det_analysis.m:
	Report an error if main/2 can fail.
1995-06-24 14:09:02 +00:00
Fergus Henderson
0a82600fac 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.
1995-06-24 13:24:30 +00:00
Fergus Henderson
4e187e1dd8 Redo bromage's change to add `relation.m' to the library,
library.m:
	Redo bromage's change to add `relation.m' to the library,
	since conway accidentally deleted bromage's change.
1995-06-24 13:06:21 +00:00
Zoltan Somogyi
ca82e7dd11 Check for loops in sequences of jumps to jumps.
jumpopt:
	Check for loops in sequences of jumps to jumps. Don't loop forever
	at compile time; instead, emit code that loops forever.
1995-06-24 06:26:50 +00:00
Fergus Henderson
398b1aa4b0 Link the .nl files into the stage 2 library directory, so that
bootcheck:
	Link the .nl files into the stage 2 library directory, so that
	`mmake install' will work from there.
1995-06-24 01:16:25 +00:00
Fergus Henderson
6fe319bbc7 Fix bug in string_to_float.
string.nu.nl:
	Fix bug in string_to_float.
1995-06-23 15:37:14 +00:00
Fergus Henderson
888208937f Fix bug in code generation for nondet if-then-else with nondet
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.
1995-06-23 11:06:20 +00:00
Fergus Henderson
26f56c6789 Add a couple of new test cases.
tests/general:
	Add a couple of new test cases.
	Remove `Entry' and `NP_Entry', since they aren't needed now that
	I've removed the crud from ../Mmake.
1995-06-23 10:49:14 +00:00
Fergus Henderson
fcedd5b5f2 Remove a lot of crud about alternative entry points
tests/Mmake:
	Remove a lot of crud about alternative entry points
	from the Mmake file.
1995-06-23 10:46:00 +00:00
Fergus Henderson
06a9689403 Add a comment to the Mmake file.
tests/benchmarks/Mmake:
	Add a comment to the Mmake file.
1995-06-23 10:45:16 +00:00
Fergus Henderson
63fa268e28 Call make_entry() macro rather than calling insert_entry()
runtime/engine.mod:
	Call make_entry() macro rather than calling insert_entry()
	directly, so that insert_entry() is not called by default.
1995-06-23 09:26:42 +00:00
Fergus Henderson
4fc11e9119 Remove the -V2.6.3 for kryten.
scripts/mgnuc.in:
	Remove the -V2.6.3 for kryten.
1995-06-23 07:06:00 +00:00
Thomas Conway
d4e18f531d Add an assertion in the table lookup.
table.c:
	Add an assertion in the table lookup.
1995-06-22 23:57:55 +00:00