Commit Graph

31 Commits

Author SHA1 Message Date
Fergus Henderson
0e1e0b0b91 Implement recursive' and non_recursive' pragma c_code declarations.
Estimated hours taken: 4

Implement `recursive' and `non_recursive' pragma c_code declarations.
This allows the compiler to optimize cases when the C code
is known to not call Mercury code.  It's also necessary
to allow C code which modifies the hp register to work
(such code must be declared `non_recursive', otherwise
the registers will be saved and restored over it).
To make things bootstrap OK, the old pragma c_code declarations
default to `non_recursive'.

prog_data.m, hlds_goal.m:
	Add new field c_is_recursive to pragma c_code goals.

prog_io.m:
	Parse the new `recursive' and `non_recursive' pragma c_code
	declarations.

make_hlds.m:
	Pass the c_is_recursive field from the parse tree to the HLDS.

live_vars.m:
	For non-recursive C code, don't save variables on the stack.

code_gen.pp:
	For non-recursive C code, don't save variables on the stack,
	don't mark the succip as needing to be saved, and don't
	call save_registers() and restore_registers().

*.m:
	Change c_code/5 to c_code/6.
1996-06-10 17:18:50 +00:00
Zoltan Somogyi
89644bebb2 Fixed a bug that caused restores of succip to be put in the wrong
Estimated hours taken: 5

peephole:
	Fixed a bug that caused restores of succip to be put in the wrong
	place, but only after predicate-wide value numbering.

opt_debug:
	Added a couple of debugging predicates used in tracking down this bug.

value_number:
	Fix a bug that left a livevals pseudo-op in the wrong place if a
	single instruction sequence contained more than one such pseudo-op.

options:
	Add --debug-opt. Rename --vndebug to --debug-vn.
	Add --generate-bytecode.

optimize, vn_debug:
	Use the new routines in opt_debug, and use the new/renamed options.

store_alloc:
	Don't thread follow_vars through the module, since the follow_vars
	information is not attached directly to branched structures. We
	now also use the same slot to hold the store map computed by this
	pass; this should allow the later deletion of the store map slot
	from goal_infos.

follow_code:
	Removed dead predicate.

livemap:
	Added a comment.
1996-05-12 04:51:14 +00:00
Zoltan Somogyi
99e729814f Make sure we don't change the goal being analyzed except possibly
Estimated hours taken: 20

det_analysis:
	Make sure we don't change the goal being analyzed except possibly
	for the introduction of `some's (which should not hurt anything).

	Make sure we don't print any error messages except in the final
	iteration, when all the inputs to the inference are stable.

	If the --debug-detism options is set, print messages about the
	progress of inference and checking.

	Also moved some code around.

det_report:
	Distinguish the handling of warning messages and error messages.

simplify:
	Use the new ability of det_report to separate warnings and errors.

passes_aux:
	Add a new generic pass form, for use by simplify.

option:
	Add --debug-detism (as above), --aditi, which at the moment
	only enables the disjunctive normal form transformation, and
	--inlining/--no-inlining, which set the other three flags
	involved in inlining depending on whether you want standard
	inlining or none at all.

	Follow_code used to be set twice and follow_vars not at all;
	I fixed this.

	Reenabled optimize_higher_order at -O3.

	Moved value numbering to -O4 and pred_value_number to -O5.
	This makes it easier to separate value numbering from the
	other optimizations (which are likely to be more effective).

	Divided options_help into sections to avoid excessive
	compilation times.

store_alloc:
	Base the store map on the follow_vars info attached to the
	branched structure which I added recently, and not on the
	follow_vars map being passed around, since it will be more accurate.

hlds_out:
	Print information about follow_vars and store_maps when -D is given.

follow_code:
	Undo an old hack that change to follow_vars has made counterproductive.

middle_rec:
	Fix a bug uncovered by the change to follow_code. When looking for a
	register to hold the counter, it is not enough to avoid picking a
	register that appears in the recursive case; we must also avoid
	registers that occur only in the base case.

livemap:
	Mentioning the code address succip now causes the succip to be
	considered live. This may or may not fix the bug with pred_value_number
	miscompiling unused_args.m; the other changes have caused the input
	to value numbering to change, and they no longer trigger the problem.
	(Will try to test this later.)

mercury_compile:
	Try to make sure that we print statistics only after passes that
	were actually executed. Also, reduce the number of lookups of the
	verbose option. Move some predicates so that the order of their
	appearance matches the current order of invocation.

vn_table:
	Loosen a sanity check to let xnuc2 pass through it.

code_exprn, switch_detection:
	Minor changes.
1996-05-10 09:49:17 +00:00
Fergus Henderson
9a7da88ce0 Treat higher-order predicate calls as a new sort of goal,
Estimated hours taken: 24

Treat higher-order predicate calls as a new sort of goal,
rather than as calls to the special predicate call/N, in order to
remove the fixed limit on the number of arguments and on the modes
for call/N.

Also, remove the restriction on output arguments preceding input arguments
in lambda expressions.

hlds_goal.m:
	Add new functor higher_order_call/6 to the hlds__goal type.

*.m:
	Handle new functor higher_order_call/6.

arg_info.m:
	Abstract things a bit more: the argument passing convention
	for a procedure may be affected by that procedure's types,
	modes, and code_model, as well as the arg_method.

follow_vars.m:
	Pass down the args_method, since it is now needed for figuring
	out the arg_info for unifications and higher-order calls.

follow_code.m:
	Treat complicated unifications in the same way as calls.

lambda.m:
	When creating lambda predicates, permute the arguments so
	that all input arguments come before all output arguments.

call_gen.m:
	When generating higher-order predicate calls, don't abort
	if outputs precede inputs; instead, generate code assuming
	that the called predicate's args have been permuted so that
	the inputs to come before all the outputs.
1996-05-02 22:44:50 +00:00
Zoltan Somogyi
d344165793 Add a new option, --branch-delay-slot, intended for use by mc on
Estimated hours taken: 3

options:
	Add a new option, --branch-delay-slot, intended for use by mc on
	the basis of the configuattion script. It says whether the machine
	architecture has delays slots on branches.

	The setting of option should affect whether we set
	--optimize-delay-slots at -O2, but this doesn't work yet.

hlds_goal:
	Add an extra field to hold follow_vars infromation to disjunctions,
	switches and if-then-elses. I intend to use this information to
	generate better code.

*.m:
	Changes to accommodate the extra field.
1996-04-20 08:37:36 +00:00
Zoltan Somogyi
2833bfffb7 Divided the old hlds.m into four files:
Estimated hours taken: 10

hlds, hlds_module, hlds_pred, hlds_goal, hlds_data:
	Divided the old hlds.m into four files:

	hlds_module.m defines the data structures that deal with issues
	that are wider than a single predicate. These data structures are
	the module_info structure, dependency_info, the predicate table
	and the shape table.

	hlds_pred.m defined pred_info and proc_info, pred_id and proc_id.

	hlds_goal.m defines hlds__goal, hlds__goal_{expr,info}, and the
	other parts of goal structures.

	hlsd_data.m defines the HLDS types that deal with issues related
	to data and its representation: function symbols, types, insts, modes.
	It also defines the types related to determinism.

	hlds.m is now an empty module. I have not removed it from CVS
	because we may need the name hlds.m again, and CVS does not like
	the reuse of a name once removed.

other modules:
	Import the necessary part of hlds.

det_analysis:
	Define a type that was up to now improperly defined in hlds.m.

prog_io:
	Move the definition of type determinism to hlds_data. This decision
	may need to be revisited when prog_io is broken up.

dnf, lambda:
	Simplify the task of defining predicates.

llds:
	Fix some comments.

mercury_compile:
	If the option -d all is given, dump all HLDS stages.

shape, unused_args:
	Fix formatting.
1996-04-02 12:12:24 +00:00
Fergus Henderson
6d7f4b9b30 Undo dylan's changes in the names of some library entities,
Estimated hours taken: 1.5

Undo dylan's changes in the names of some library entities,
by applying the following sed script

	s/term_atom/term__atom/g
	s/term_string/term__string/g
	s/term_integer/term__integer/g
	s/term_float/term__float/g
	s/term_context/term__context/g
	s/term_functor/term__functor/g
	s/term_variable/term__variable/g
	s/_term__/_term_/g
	s/std_util__bool_/bool__/g

to all the `.m' and `.pp' files in the compiler and library directories.
The reason for undoing these changes was to minimize incompatibilities
with 0.4 (and besides, the changes were not a really good idea in the first
place).

I also moved `bool' to a separate module.
The main reason for that change is to ensure that the `__' prefix is
only used when it genuinely represents a module qualifier.
(That's what dylan's changes were trying to acheive, but `term__'
does genuinely represent a module qualifier.)

compiler/*.m:
	Apply sed script above;
	where appropriate, add `bool' to the list of imported modules.
1996-02-03 17:30:14 +00:00
Dylan Shuttleworth
3ab8d92226 Change names with badly placed double underscores (ie where the part of
Estimated hours taken: _2___

Change names with badly placed double underscores (ie where the part of
a name before a double underscore is not the same as the module name.)

Reflect changes in the library interface.

compiler/*:
	Use the newer, more correct form of the term and bool names.
	Predicates "bool__" are now "std_util__bool" and labels of
	the term ADT are now "term_" instead of "term__".

compiler/vn*.m:
	change all names "vn__*" to a correct module prefix.  All the
	names remain qualified.

compiler/hlds.m:
	s/\<is_builtin__/hlds__is_builtin_/g
	s/\<dependency_info__/hlds__dependency_info_/g

compiler/unify_proc.m:
	s/\<unify_proc_info__/unify_proc__info_/g

compiler/transform.m:
	s/\<reschedule__conj/transform__reschedule_conj/g
1995-12-29 03:45:20 +00:00
Fergus Henderson
97946d39be This commit included two groups of changes:
1. A bug fix and a new warning for quantification

	quantification.m:
		Fix bug in renaming apart of lambda goals: it used to
		sort the lambda variables.  Improve efficiency slightly.
		Add some comments for quantification__rename_apart.
		Use more informative variable names in a couple of places.

	quantification.m, make_hlds.m, mercury_to_mercury.pp, options.m:
		Add code to quantification.m to detect variables with
		overlapping scopes, and pass back a list of warnings.
		Add code to make_hlds.m to print out the warnings, if
		the new option warn_overlapping_scopes was enabled (as
		it is by default).  Add code to options.m and
		mercury_to_mercury.pp to handle the new warning
		option.

	common.m, cse_detection.m, follow_code.m, unify_proc.m,
		Add an extra argument `_Warnings' to calls to
		`implicitly_quantify_clause_body', as required by the
		above change.

	goal_util.m:
		Export the predicate goal_util__rename_var_list for use by
		quantification.m.

2. A (very incomplete) start to a new backend which will generate
high-level, debuggable C code.

	options.m:
		Add new option --high-level-C.

	mercury_to_mercury.pp:
		Handle new option.

	mercury_to_c.m:
		New file.

	llds.m, hlds_out.m:
		Export predicates for use by mercury_to_c.m.
1995-10-26 13:06:45 +00:00
David Jeffery
f75693e80a The C interface.
The changes made allow declarations of the form:

:- pragma(c_code, predname(Varname1::mode1, Varname2::mode2, ...),
	"Some C code to execute instead of a mercury clause;").

There are still a couple of minor problems to be fixed in the near future:
If there is a regular clause given as well as a pragma(c_code, ...) dec, it
is not handled well, and variables names '_' are not handled well.

prog_io.m:
	parse the pragma(c_code, ...) dec.
hlds.m:
	define a new hlds__goal_expr 'pragma_c_code'.
make_hlds.m:
	insert the pragma(c_code, ...) dec. as a pragma_c_code into the hlds.
det_analysis.m:
	infer that pragma_c_code goals are det.
modes.m:
	convince the mode checker that the correct pragma variables are bound
	etc.
quantification.m:
	quantify the variables in the pragma(c_code, ...) dec.
code_gen.pp:
	convert pragma_c_code into pragma_c (in the llds).
llds.m:
	define a new instr, pragma_c. Output the pragma_c
hlds_out.m:
mercury_to_mercury.m:
mercury_to_goedel.m:
	spit out pragma(c_code, ...) decs properly

*.m: 	handle the new pragma_c_code in the hlds or the new pragma_c in the llds
1995-10-17 11:13:13 +00:00
Thomas Conway
6248b4b93b Make implicit quantification rename apart vars that
quantification.m:
	Make implicit quantification rename apart vars that
	are local to distinct scopes. This will help in the
	singleton variable warning pass once the latter has
	been changed to work on the HLDS.

	These changes also allow goals of the form:
		.... X ....,
		some [X] Goal
	which were previously not allowed.

cse_detection.m:
	A 1 line bugfix from Zoltan.

det_analysis.m:
	Rather than redoing quantification, construct
	a correct goal_info directly in det__disj_to_ite/3.

optimize.pp:
	Fix a singleton variable. Zoltan, there is an
	XXX for you to read and remove if the fix is
	correct.

common.m, cse_detection.m, det_analysis.m,
follow_code.m, make_hlds.m, polymorphism.m,
unify_proc.m:
	Fix the calls to implicitly_quantify_clause_body and
	implicity_quantify_goal.

TODO:
	Update a couple of things.

parser.m:
	Add a map(string, var) to the state so that varset
	can be simplified.

varset.m:
	Simplfy the varset structure so that the binding
	of names to variables is cheaper.
1995-09-01 07:56:00 +00:00
Zoltan Somogyi
bebe96be34 Look inside blocks introduced by value numbering when looking
frameopt:
	Look inside blocks introduced by value numbering when looking
	restorations of succip.

value_number, opt_util:
	If we are using conservative garbage collection, disable value
	numbering for blocks that allocate more than one cell on the heap.
	This allows value numbering of most blocks to work in the absence
	of -DALL_INTERIOR_POINTERS.

all other source files:
	Clean up "blank" lines that nevertheless contain space or tab
	characters.
1995-08-27 11:10:20 +00:00
Fergus Henderson
b87de68334 Implement unique modes. We do not handle local aliasing yet, so this
-------------------------------------------------------

Implement unique modes.  We do not handle local aliasing yet, so this
is still not very useful, except for io__state.  Destructive update is
not yet implemented.  Also note that this really only implements
"mostly unique" variables that may be non-unique on backtracking - we
don't check that you don't backtrack over I/O, for example.

prog_io.m, mode_util.m, modes.m, inst_match.m:
	Major changes to Handle unique modes.

mercury_to_mercury.m, polymorphism.m, prog_out.m, undef_modes.m:
	Use `ground(Uniqueness)' rather than just `ground'.

compiler/*.m:
	Fix compile errors now that unique modes are enforced: add a
	few calls to copy/2, and comment out lots of unique mode
	declarations that caused problems.

typecheck.m, mode_info.m:
	Hack around the use of unique modes, which doesn't work
	because we don't allow local aliasing yet: make the insts
	`uniq_type_info' and `uniq_mode_info' not unique at all,
	and add a call to copy/2 when extracting the io_state from
	type_info or mode_info.

-------------------------------------------------------

Plus a couple of unrelated changes:

hlds.m:
	Change the modes for the special predicates from `ground -> ground'
	to `in', so that any error messages that show those modes
	come out looking nicer.

	Add a new shared_inst_table for shared versions of user-defined
	insts.

mercury_to_goedel.m:
	Use string__is_alnum_or_underscore.
1995-08-02 07:53:53 +00:00
Zoltan Somogyi
b905b2f4d8 Added an extra argument to call, which contains a maybe of the unification
context of the unification from which call was made. We we use this to generate
significantly better error messages. (There should be no more messages of the
form "call to __Unify__(blah blah blah) can fail".) Most of the files are
changed just to reflect this.

An unrelated change in det_analysis is that we now ensure the absence of
cycles by modifying the new inferred determinism in the light of the old
one, ensuring that any changes are monotonic.

In hlds_out, inhibit the printing of pseudo-imported predicates (unifications)
since nobody cares about them except sometimes Fergus.
1995-07-31 08:35:41 +00:00
Zoltan Somogyi
109d17e10b Removed the notion of "internal determinism"; commits are now indicated
hlds:
	Removed the notion of "internal determinism"; commits are now indicated
	through "some" goals. Renamed the predicate module_info_shapes to
	module_info_get_shapes. Will later change other predicates also to
	get consistent naming.

hlds_out:
	Removed printing of internal determinisms.

det_analysis:
	Changes to accommodate the new way of signalling commits. The comments
	on optimizations have been modified to reflect the need for information
	about whether goals can raise exceptions. Exported two predicates for
	use by follow_code.

live_vars:
	Changes to accommodate the new way of signalling commits.

code_gen:
	Shift the handling of commits to "some" goals. Some predicates
	had three versions, one for each code model; these have been
	simplified significantly. The sequence of predicates has also
	been rationalised a bit. There is still room for improvement
	on both fronts.

disj_gen, ite_gen, middle_rec:
	Changed calls to modified predicates in code_gen.

common:
	When this pass changes A == f(B, C), D := f(B, C) into A == f(B, C),
	D := A, it can change the scopes of A, B and C. The pass did not
	take this into account; now it does. The pass is still disabled
	until it has been more adequately tested.

mercury_compile:
	Moved followcode into the back end. We now thread ModuleInfo through
	the backend instead of Shapes, since follow_code modifies other parts
	of ModuleInfo as well. Rationalised the stage numbers, WHICH MEANS
	-d NUMBERS HAVE CHANGED.

follow_code:
	Follow_code is now after determinism analysis, so that we can check
	that it does not change the determinism of the branched structure
	we are pushing code into. We now push not just builtins but also the
	first call after the branched structure into the branched structure,
	since this will reduce register shuffling. Made a start on pushing code
	into the fronts of branched structures, when some code before the branch
	point is useful only in one branch.

options:
	Added an option prev_code for the (incomplete) functionality in
	follow_code.

vn_flush:
	Moved a comment about future functionality to where it now belongs.

cse_detection:
	Removed obsolete debugging predicate.
1995-07-27 02:00:19 +00:00
Thomas Conway
4bba071fe5 fix a bug in an earlier change.
code_info.m:
	fix a bug in an earlier change.

follow_code.m:
	uncomment a small piece of code that the above fix now causes
	to behave correctly.
1995-07-24 21:12:49 +00:00
Zoltan Somogyi
2946fb475b Improved the format of the message about calls with wrong arity.
typecheck:
	Improved the format of the message about calls with wrong arity.

jumpopt, optimize:
	A goto whose target is the predicate entry label is replaced by
	the pointed-to code only if a flag is set; optimize sets the flag
	only after value numbering and frameopt. This means the pointed-to
	code is in better shape when it is "inlined".

peephole, opt_util:
	When optimizing incr_sp/decr_sp pairs, allow a restoration of succip
	between them to be optimized away. This works because the only way
	this can happen is if the store of succip in its slot was promoted
	before the incr_sp, and no calls may have been in the meantime,
	so the original copy is still in succip.

frameopt, optimize:
	Postponed the check for whether succip is ever restored, since
	peephole may affect the decision.

follow_code:
	We now push code from the outside context into this context before
	pushing code from this context into nested contexts, since this may
	give us more code to push. I also removed redundant references to
	ModuleInfo.

prog_io:
	Small formatting change.
1995-07-21 09:40:48 +00:00
Fergus Henderson
36878440a1 This batch of changes implements complicated modes of complicated
unifications.  See the comments at the top of unify_proc.m for
details of how it's done.

hlds.m:
	Add new export statuses `pseudo_imported' and `pseudo_exported'
	to handle unification predicates, which can now have complicated
	modes.

code_gen.pp, code_info.m, common.m, constraint.m, cse_detection.m,
follow_code.m, follow_vars.m, hlds_out.m, inlining.m, live_vars,
make_hlds.m, mercury_compile.pp, modes.m, store_alloc.m,
switch_detection.m:
	Handle pseudo_imported predicates.

modes.m, constraint.m:
	Change modecheck to return an updated module_info, since
	modechecking may insert new entries into the unify_requests
	queue in the module_info.  Make sure that modechecking
	never inserts requests into the unify_requests queue
	for code that has mode errors (or needs rescheduling).

call_gen.m, polymorphism.m:
	Move duplicated code into unify_proc.m.

clause_to_proc.m:
	Add new predicate clauses_to_proc for use by unify_proc.m.

unify_proc.m:
	Implement complicated unifications with complicated modes.
1995-07-20 13:32:36 +00:00
Fergus Henderson
ac4f8ba0fb Add copyright messages.
compiler/*:
	Add copyright messages.
	Change all occurences of *.nl in comments to *.m.

compiler/mercury_compile.pp:
	Change the output to the .dep files to use *.m rather than *.nl.
	(NOTE: this means that `mmake' will not work any more if you
	call your files *.nl!!!)
1995-03-30 21:03:41 +00:00
Fergus Henderson
efa7a8b0bd Implement merge_instmap_delta properly, to fix a bug in
mode_util.nl, modes.nl, follow_code.nl:
	Implement merge_instmap_delta properly, to fix a bug in
	determinism analysis.  This required threading the module_info
	through various predicates.
1995-02-18 04:23:38 +00:00
Thomas Conway
b759b4436a change occurences of is_builtin and not_builtin to abstract
various:
	change occurences of is_builtin and not_builtin to abstract
	calls.

code_info.nl:
	perform transitive checking for variable dependencies.
1995-02-07 07:39:13 +00:00
Fergus Henderson
1a977ea19a Replace all occurrences of `not(Vars, Goal)' with just
*.nl:
	Replace all occurrences of `not(Vars, Goal)' with just
	plain `not(Goal)'.

type_util.nl, switch_gen.nl:
	Higher-order pred types are not user-defined types.
	Add a `predtype' type category for them.

call_gen.nl:
	Change call_closure/2 to call_closure/3 (with liveinfo).
	Plus a little bit of random hacking.
1995-01-10 18:35:59 +00:00
Thomas Conway
6081299928 Fixed follow code so that it:
follow_code.nl:
	Fixed follow code so that it:
		1) reclaims heap by failure where possible
		2) doesn't requantify goals it doesn't need to.
	qsort now compiles.
1995-01-10 03:10:27 +00:00
Fergus Henderson
e3725ca5ff Improve an error message.
code_info.nl:
	Improve an error message.

followcode.nl:
	Add a comment.

hlds_out.nl:
	Output ":=", "==", or "=" for the different types of unifications.
======> READ THIS: <======
	(Known bug: the order of the operands for ":=" is wrong.)

make_hlds.nl, unify_proc.nl:
	Make complicated unifications work!
1994-12-14 12:02:10 +00:00
Fergus Henderson
1e8a2b9f06 Improve efficiency a little.
follow_code.nl:
	Improve efficiency a little.
1994-10-03 07:21:10 +00:00
Fergus Henderson
98b7357f35 Add a reminder about fixing the permissions
Makefile.common:
	Add a reminder about fixing the permissions

code_info.nl:
	Fix some determinism errors introduced by adding new
	llds instruction types.

det_analysis.nl:
	Count the number of determinism errors in the code
	and pass this back to the top-level, so that we
	don't attempt to compile code which contains determinism errors.

	For if-then-elses with a deterministic condition,
	optimize the else part away.  This prevents the code
	generator from getting confused when the else part is semidet
	but the if-then-else as a whole is det.

hlds.nl, make_hlds.nl:
	Change the predicate_table so that it allows more than
	one predicate with the same module, name, and arity.
	Move the checking for duplicate preds from hlds.nl to make_hlds.nl.
	This is so we can insert automatically generated unification
	predicates, which must be overloaded, into the predicate_table.

hlds.nl:
	Add a few comments.

mercury_compile.nl:
	Split mercury_compile/7, which was becoming huge, into
	about a dozen smaller predicates.
	Ensure that we report the memory/time usage statistics
	after every pass.

mercury_to_mercury.nl, modes.nl, typecheck.nl, prog_io.nl:
	Fix some determinism errors.
	(There are still 6 determinism errors that remain, 5 in
	mercury_compile and 1 in prog_io.  These are caused
	by calls to io__gc_call, because we haven't yet implemented
	mode analysis for higher-order preds.)
1994-09-05 17:07:43 +00:00
Fergus Henderson
a407841788 Only save and restore the heap pointer if the goal being
backtracked over contains a construction unification or a
non-builtin call.  Add code to save/restore the heap pointer
in one or two places where this was missing, e.g. semidet disjunctions.

Change switch/2 into switch/3 so that we can store the `local
determinism' of the switch there, rather than in the goal_info.

Fix code generation for semidet/nondet switches, so that
we omit the test for the last case if the switch is locally
det.
1994-08-27 08:29:26 +00:00
Fergus Henderson
8a173aeb5e Fixed bug where follow_code was stuffing up the instmap_delta in the
goal_info, by adding a new predicate `recompute_instmap_delta' in
mode_util.nl to recompute this info.  A couple of minor fixes to
code_gen.nl.  Renamed `detect_liveness_is_atomic' as `goal_is_atomic'
and moved it to hlds.nl.
1994-08-12 13:49:07 +00:00
Thomas Conway
7c5705431f changed call/5 to call/6 -- added followvars to the call structure.
[lots].nl
	changed call/5 to call/6 -- added followvars to the call structure.
	Not used yet.
1994-07-01 07:31:24 +00:00
Thomas Conway
8231e3f82b The pass for migrating builtins into branched structures
follow_code.nl:
	The pass for migrating builtins into branched structures
1994-07-01 05:58:28 +00:00
Thomas Conway
8b2c509027 Fix big in generated code: don't overwrite registers that
call_gen.nl code_info.nl:
	Fix big in generated code: don't overwrite registers that
		contain arguments that have yet to be "setup".

mercury_compile.nl:
	Reorder some of the passes: recognise builtins sooner; same
	with switch detection. Add follow_code computation.

modes.nl:
	Fix so that the compiler generates correct code, at the cost
	of spurious warings.

quantification.nl:
	Fix a _real_ determinism bug: there was no code for quantifying
	switches. Has been added.

follow_code.nl:
	Migrate builtins into the ends of branched structures. Not really
	robust yet, but doesn't fall over on itself, and some other
	parts of the compiler, and several test cases.
1994-06-30 15:13:16 +00:00