Commit Graph

155 Commits

Author SHA1 Message Date
Zoltan Somogyi
0f957ba302 Note that this file has been almost completely implemented
Estimated hours taken: 0.01

allocation.html:
	Note that this file has been almost completely implemented
	(almost a year ago).
1997-10-30 08:33:01 +00:00
Zoltan Somogyi
7757e68c16 Fix a couple of grammar errors.
Estimated hours taken: 0.02

allocation.html:
	Fix a couple of grammar errors.
1997-09-29 06:10:54 +00:00
Fergus Henderson
e4b4e886bb Trivial layout change.
Estimated hours taken: 0.1

compiler/notes/compiler_design.html:
	Trivial layout change.
1997-09-23 16:48:43 +00:00
Thomas Conway
3641af5272 Add constant propagation within modules. This occurs during simplification
Estimated hours taken: 10


Add constant propagation within modules. This occurs during simplification
and simply attempts to evaluate "known" calls that have all their inputs
bound to constants and replaces the call with constructions of the outputs.
Currently the "known" calls are (most) of the arithmetic predicates, and
the comparison of ints and floats.

compiler/instmap.m:
	add merge_instmap_deltas which merges a list of intmap deltas
	rather than just two of them.

compiler/mercury_compile.m:
compiler/options.m:
	add (and use) the option --optimize-constant-propagation

compiler/simplify.m:
	add a bool to the simplify struct to turn on/off constant
	propagation.
	in the simplification of calls, check to see if all the inputs
	are bound to constants. If we know how to evaluate this call
	at compile time, then do so. This may change the instmap delta.
	For branched goals, we merge the instmap deltas to recompute the
	instmap delta for the goal as a whole so that we know when every
	branch binds a variable to the same constant.

compiler/notes/compiler_design.html:
	mention constant propagation.

doc/user_guide.texi:
	mention constant propagation.

compiler/const_prop.m:
	code that attempts to evaluate calls at compile time.
	It contains tables of calls that we know how to evaluate.
1997-08-25 02:25:09 +00:00
Tyson Dowd
f007c77b1f Add update of configure.in to check for new features.
Estimated hours taken: 0.01

compiler/notes/release_checklist.html:
	Add update of configure.in to check for new features.
1997-08-01 05:26:09 +00:00
Fergus Henderson
64a1c52666 Localize the definition of the version number into a single file.
Automate the building of releases, including daily "rotd"
(release-of-the-day) releases.

VERSION:
	New file, defines the version number.
	Also document the general scheme for assigning version numbers.

Mmake.common.in:
	Add `include VERSION'.

Mmakefile:
bindist/Mmakefile:
configure.in:
	Use the version number in VERSION rather than hard-coding it
	in multiple places.

Mmakefile:
README:
.README.in:
INSTALL:
.INSTALL.in:
	Change things so that README and INSTALL are automatically
	generated from .README.in and .INSTALL.in respectively, using
	the version number defined in VERSION.

BUGS:
	Remove an unnecessary reference to the version number.

RELEASE_NOTES:
	Change this file so that the version number is only mentioned
	in one place.  Bump the version number here to 0.7 in preparation
	for the next release.

library/Mmakefile:
library/library.m:
library/library.m.in:
	Change things so that library.m is automatically generated from
	library.m.in using the version number in VERSION.
	Also change it so that library__version says which architecture
	it was configured for.

tools/test_mercury:
	Override the version specified in the VERSION file in the CVS
	repository with either `rotd-YYYY-MM-DD' or (when making a release)
	with a specified $RELEASE_VERSION.
	When running on murliboobo, if the version built passes all its
	tests, copy it to the /pub/mercury/beta-releases directory on
	ftp://turiel.cs.mu.oz.au.

compiler/notes/release_checklist.m:
	Change the release checklist to say that you only need to
	update the version number in VERSION rather than in 6 different
	places.  Also change the procedure for building the final
	tar file to reflect the above changes to the `test_mercury' script.
1997-07-28 08:52:15 +00:00
Fergus Henderson
04b720630b Update the copyright messages so that (a) they contain the correct years
and (b) they say "Copyright (C) ... _The_ University of Melbourne".
1997-07-27 15:09:59 +00:00
Tyson Dowd
78e344c0df Update compiler design notes.
Estimated hours taken: 0.05

Update compiler design notes.

compiler/notes/compiler_design.html:
	Update design notes with regard to continutation_info.m, and
	remove mention of garbage_out.m and shapes.m.
1997-07-24 03:41:14 +00:00
Andrew Bromage
1414a710ab Reorganisation of modules to do with the inst data type.
Estimated hours taken: 20

Reorganisation of modules to do with the inst data type.

This is actually the first installment of the alias tracking mode
checker in disguise.  A very good disguise.  The rationale for
this reorganisation is to reduce coupling in the part of the mode
checker which is _not_ in this change (ie most of it).

Alias tracking requires a new kind of inst, alias(inst_key), where
an inst_key is a handle on some other sub-inst.  With it goes a
data structure in which to store dereferenced insts and all the
operations which go with it.  This code will go in the new module
inst.m so that it doesn't have to go in prog_data.m.  (I briefly
considered putting it in instmap.m however this introduces some
bad coupling since instmap.m imports hlds_module.m.  Putting it
in prog_data.m would cause hlds_*.m to depend on prog_data.m,
but we have designed things so that the dependencies go in the
other direction.)

The remainder of the reorganisation is a general cleanup: the
inst testing predicates (inst_is_*) have been moved out of
mode_util because they are not actually operations on modes at
all, and have been moved into inst_match.  inst_match has then
been split because otherwise it would be 2000 lines long and
will get significantly bigger when aliasing is added.  Roughly
speaking, any operations which create new insts from old ones
have been moved into a new module, inst_util while any operations
which test the values of insts remain in inst_match.

Also included are the removal of some NU-Prologisms since the
NU-Prolog version of the compiler is no longer supported.  Two
changes here:

	- Removal of some when declarations.
	- A gross hack in inst_is_*_2, where two copies of
	  the same inst were passed into the predicate so that
	  one could be switched on.  Thank NU-Prolog's lack of
	  common subexpression elimination.

compiler/inst.m:
	New module which contains the data types inst, uniqueness,
	pred_inst_info, bound_inst.

compiler/inst_util.m:
	New module which contains predicates which perform mode
	checking-like operations on insts.

	Moved in:
		abstractly_unify_inst, abstractly_unify_inst_functor,
		inst_merge, make_mostly_uniq_inst (from inst_match.m)

compiler/inst_match.m:
	Moved out:
		inst_merge, make_mostly_uniq_inst,
		abstractly_unify_inst, abstractly_unify_inst_functor
			(to inst_util.m)

	Moved in:
		inst_is_*, inst_list_is_*, bound_inst_list_is_*
			(from mode_util.m)

	Now exported:
		unique_matches_initial/2, unique_matches_final/2
		inst_contains_instname/3, pred_inst_matches/3
		(They are required by inst_util.m, and they are
		useful in their own right.)

compiler/instmap.m:
	instmap_delta_lookup_var/3 reincarnated as
	instmap_delta_search_var/3.  The reason for this change is
	that previously, instmap_delta_lookup_var simply returned
	`free' if the searched-for var did not occur in the
	instmap_delta.  This is somewhat non-obvious behaviour.
	instmap_delta_search_var/3 fails in such a situation.

compiler/mode_util.m:
	Moved out:
		inst_is_*, inst_list_is_*, bound_inst_list_is_*
			(to inst_match.m)
		(These are not really operations on modes.)

compiler/modecheck_call.m:
	Moved in modecheck_higher_order_func_call/5, from modecheck_unify.m

compiler/modecheck_unify.m:
	Moved out modecheck_higher_order_func_call/5, to modecheck_call.m
	where it should have been all along.

compiler/prog_data.m:
	Moved out the types inst, uniqueness, pred_inst_info,
	bound_inst (to inst.m).

compiler/common.m:
compiler/cse_detection.m:
compiler/fact_table.m:
compiler/higher_order.m:
compiler/hlds_data.m:
compiler/hlds_goal.m:
compiler/hlds_out.m:
compiler/intermod.m:
compiler/liveness.m:
compiler/llds.m:
compiler/make_hlds.m:
compiler/mercury_to_mercury.m:
compiler/mode_debug.m:
compiler/mode_errors.m:
compiler/mode_info.m:
compiler/modes.m:
compiler/module_qual.m:
compiler/polymorphism.m:
compiler/prog_io.m:
compiler/prog_io_util.m:
compiler/prog_util.m:
compiler/simplify.m:
compiler/switch_detection.m:
compiler/unify_proc.m:
compiler/unique_modes.m:
	Miscellaneous minor changes to cope with the above changes.

compiler/notes/compiler_design.html:
	Document the new modules.
1997-07-24 01:33:04 +00:00
Zoltan Somogyi
39871ffd62 Removed "being done by jammb", since he isn't working on Mercury
Estimated hours taken: 0.2

todo.html:
	Removed "being done by jammb", since he isn't working on Mercury
	anymore. Added a note that petdr is supposed to be working on
	data type specialization. Clarified a point about attribute grammars.
1997-07-10 06:44:42 +00:00
Simon Taylor
e7ebb733be Document `:- use_module'.
Estimated hours taken: 14

compiler/notes/todo.html
	Document `:- use_module'.
1997-06-29 23:17:47 +00:00
Fergus Henderson
7628f7dabc Mention that common.m also does elimination of duplicate procedure
Estimated hours taken: 0.25

compiler/notes/compiler_design.html:
	Mention that common.m also does elimination of duplicate procedure
	calls, not just of common structs.
1997-06-25 05:23:57 +00:00
Zoltan Somogyi
8e0a049f42 Removed an item saying only "implement".
Estimated hours taken: 0.1

Removed an item saying only "implement".
1997-05-07 05:24:11 +00:00
Fergus Henderson
5da7e91c83 Update the todo list to reflect things that have been done.
Estimated hours taken: 1

compiler/notes/todo.html:
	Update the todo list to reflect things that have been done.
	Move some items from the TODO section to the WISHLIST section.
	Change the indentation slightly to make it easier to read
	the ASCII source.
1997-04-29 15:01:06 +00:00
Bert Thompson
9c8bf02b3a Added some more documentation on module qualification.
Estimated hours taken: 0.1

[This was stayl's change to COMPILER_DESIGN that somehow didn't get
incorporated when COMPILER_DESIGN became compiler_desing.html.]

compiler/notes/compiler_design.html:
	Added some more documentation on module qualification.
1997-04-28 07:27:31 +00:00
Bert Thompson
d8a4974865 Change the filenames of the .html files to lowercase.
Estimated hours taken: 0.1

Change the filenames of the .html files to lowercase.
This is essentially a gratuitous aesthetic change. 8^)

compiler/notes/Mmakefile
1997-04-08 14:49:05 +00:00
Bert Thompson
5a651645c4 Added target for creating plain text equivalents of the HTML documents.
Estimated hours taken: 0.2

Added target for creating plain text equivalents of the HTML documents.
We use the file extension .text for the plain text documents.

All these docs are installed on the web pages.

Also added a target to clean away the generated plain text files.

mercury/compiler/notes/Mmakefile:
1997-04-03 06:29:52 +00:00
Bert Thompson
4446553166 Removed the original plain text documents in this directory since they've
Estimated hours taken: 0.1

Removed the original plain text documents in this directory since they've
now been translated into HTML. In order to produce plain text from
the HTML docs, we can use the facilities of the text browser Lynx:

	lynx -dump file.html > file.text

compiler/notes/
	ALLOCATION
	AUTHORS
	CODING_STANDARDS
	COMPILER_DESIGN
	GC_AND_C_CODE
	GLOSSARY
	MODULE_SYSTEM
	RELEASE_CHECKLIST
	REVIEWS
	TODO
1997-04-03 05:22:20 +00:00
Bert Thompson
dea497b338 Translated plain text docs to HTML. This obviously creates
Estimated hours taken: 4

Translated plain text docs to HTML. This obviously creates
a dual update problem. We should solve this by putting
the plain text docs in the attic and retaining the HTML.

Also added the HTML files to the Mmakefile so they are installed
on the web pages.

The other documents in compiler/notes will be HTMLized soon.

compiler/notes/
	Mmakefiles
	ALLOCATION.html
	AUTHORS.html
	CODING_STANDARDS.html
	COMPILER_DESIGN.html
	GC_AND_C_CODE.html
	GLOSSARY.html
	MODULE_SYSTEM.html
	RELEASE_CHECKLIST.html
	REVIEWS.html
	TODO.html
1997-04-03 05:17:54 +00:00
Bert Thompson
270b7a1a52 Cut-n-paste error.
Estimated hours taken: 0.1

Cut-n-paste error.

mercury/compiler/notes/Mmakefile:
	I copied another Mmakefile and accidentally left some rubbish in it.
	Why did I not test the Mmakefile before checkeding it in?
	It is not possible to test changes to this Mmakefile without
	first checking in, since the install_webpage script checks
	out the latest version of the Mmakefile when installing the
	web pages. This problem should be fixed.
1997-04-02 09:07:12 +00:00
Bert Thompson
c65cd4d890 Added Mmakefile for installing web docs.
Estimated hours taken: 0.3

Added Mmakefile for installing web docs.

mercury/compiler/notes/Mmakefile:
	We need an Mmakefile to install these developer documents
	into the webpages in the `developer' directory.
1997-04-02 08:54:47 +00:00
Simon Taylor
a2f49b9ae7 Added some more documentation on module qualification.
Estimated hours taken: 0.1

compiler/notes/COMPILER_DESIGN
	Added some more documentation on module qualification.
1997-03-25 06:55:11 +00:00
Tyson Dowd
57f3d8506a Add two new items to the TODO list.
Estimated hours taken: 0.05

Add two new items to the TODO list.

compiler/notes/TODO:
	- Add extended DCGs to wish list, and removing limitation on
	  monomorphic higher order terms to TODO list.
1997-02-27 02:28:28 +00:00
Tyson Dowd
ed4e5ec684 - Add more information about what base_type_layout does.
Estimated hours taken: 0.1

compiler/notes/COMPILER_DESIGN:
	- Add more information about what base_type_layout does.
	- Fix a typo	s/tatic/static
1997-02-26 00:52:14 +00:00
Andrew Bromage
8450ad51cc Document modules mode_debug, modecheck_call and modecheck_unify.
Estimated hours taken: 0.2

COMPILER_DESIGN:
        Document modules mode_debug, modecheck_call and modecheck_unify.
        Changed references to *.pp files since we don't use them any more.
1997-02-24 05:35:48 +00:00
Zoltan Somogyi
867d3ac0fa Document several modules that were not documented before.
Estimated hours taken: 0.3

COMPILER_DESIGN:
	Document several modules that were not documented before.
1997-02-24 04:57:18 +00:00
Thomas Conway
a8eca1cb5a add a couple of wish list items about determinism and if-then-elses.
Estimated hours taken: epsilon

compiler/notes/TODO:
	add a couple of wish list items about determinism and if-then-elses.
1997-02-21 01:26:14 +00:00
Tyson Dowd
2b13f14f00 Rewrite and clarify review policy.
Estimated hours taken: 2.5

Rewrite and clarify review policy.

compiler/notes/CODING_STANDARDS:
	Remove most of the text on reviews, move it into REVIEWS.
	Put in a reference to REVIEWS.

compiler/notes/REVIEWS:
	New document, describes review procedures and policies.
1997-02-19 04:02:20 +00:00
Tyson Dowd
26635bf223 Update TODO file with new research ideas, remove some things
Estimated hours taken: 0.5

compiler/notes/TODO:
	Update TODO file with new research ideas, remove some things
	that have been implemented.
1997-02-13 23:51:13 +00:00
Simon Taylor
656c0e7dd3 Updated now that common.m and excess.m are no longer separate passes.
Estimated hours taken: 0.25

compiler/notes/COMPILER_DESIGN
	Updated now that common.m and excess.m are no longer separate passes.

compiler/notes/TODO
	Remove duplicate call warning.
1997-01-20 03:29:59 +00:00
Zoltan Somogyi
3b1a10427a Document pragma_c_gen and saved_vars.
Estimated hours taken: 0.1

COMPILER_DESIGN:
	Document pragma_c_gen and saved_vars.
1997-01-08 01:54:34 +00:00
Zoltan Somogyi
71c1873ad3 Document llds_common, base_type_info and base_layout_info.
Estimated hours taken: 0.5

Document llds_common, base_type_info and base_layout_info.
1996-12-23 06:07:23 +00:00
Fergus Henderson
c687ac77c9 Update this file... it had suffered some software rot.
Estimated hours taken: 0.25

notes/RELEASE_CHECKLIST:
	Update this file... it had suffered some software rot.
1996-12-20 09:23:30 +00:00
Zoltan Somogyi
cedf391fad Update the document in light of experience of implementing much of it.
Estimated hours taken: 0.2

ALLOCATION:
	Update the document in light of experience of implementing much of it.
1996-12-18 08:56:51 +00:00
Fergus Henderson
67f0cb89b6 Mention that people should review their changes themselves
Estimated hours taken: 0.25

compiler/notes/CODING_STANDARDS:
	Mention that people should review their changes themselves
	before sending them to someone else to review.
1996-12-12 11:52:54 +00:00
Fergus Henderson
98c853468d Mention how disjunctions should be formatted.
Estimated hours taken: 0.1

compiler/notes/CODING_STANDARDS:
	Mention how disjunctions should be formatted.
1996-12-09 08:21:01 +00:00
Zoltan Somogyi
3c1a1f5236 Revise the method of handling non-forward-live variables that are
Estimated hours taken: 2

ALLOCATION:
	Revise the method of handling non-forward-live variables that are
	needed at resumption points. Clarify what an "occurrence" means.
1996-12-05 02:06:45 +00:00
Zoltan Somogyi
de6b360b7a Rename the cont_lives field in the new design to resume_point.
Estimated hours taken: 0.1

ALLOCATION:
	Rename the cont_lives field in the new design to resume_point.
	Since this field now gives not just the set of vars that must be
	saved, but also determines how many (and which) labels the resumption
	point will have, the new name is more descriptive. It also avoids
	conflict with the name of the existing cont_lives field.
1996-11-25 00:29:47 +00:00
Zoltan Somogyi
6688910594 A total rewrite of this document. It now describes the approach
Estimated hours taken: 10

ALLOCATION:
	A total rewrite of this document. It now describes the approach
	we will take in rewriting some parts of the code generator.
1996-11-20 09:16:06 +00:00
Andrew Bromage
030345930b Added reference to instmap.m
Estimated hours taken: 0.1

compiler/notes/COMPILER_DESIGN:
	Added reference to instmap.m
1996-11-19 01:19:57 +00:00
Fergus Henderson
ef552f2fc4 Add a note to remember to update the version number
Estimated hours taken: 0.1

compiler/notes/RELEASE_CHECKLIST:
	Add a note to remember to update the version number
	in bindist/bindist.configure.in.
1996-10-23 14:05:37 +00:00
Simon Taylor
63a9d5cbab Documented intermod.m
Estimated hours taken: 0.1

compiler/notes/COMPILER_DESIGN
	Documented intermod.m

compiler/notes/AUTHORS
        Updated student email addresses.
1996-09-11 08:57:24 +00:00
Zoltan Somogyi
d6f8026667 Add Simon, and update mail addresses.
Estimated hours taken: 0.5

AUTHORS:
	Add Simon, and update mail addresses.

COMPILER_DESIGN, TODO:
	General updates.
1996-07-23 09:33:35 +00:00
Fergus Henderson
5589708c77 Update to reflect the fact that expansion of equivalence types
Estimated hours taken: 0.75

notes/COMPILER_DESIGN:
	Update to reflect the fact that expansion of equivalence types
	is now in its own module, equiv_type.m.
1996-07-03 15:47:45 +00:00
Simon Taylor
1a9b5b43e6 Documented module_qual.m
Estimated hours taken: 0.1

compiler/notes/COMPILER_DESIGN
Documented module_qual.m
Cleaned out some old junk.
1996-06-11 06:30:47 +00:00
Fergus Henderson
e5a3ff0bc1 Add more detailed guidelines on layout of comments,
Estimated hours taken: 0.5

notes/CODING_STANDARDS:
	Add more detailed guidelines on layout of comments,
	if-then-elses and type definitions.  Mention that
	language features such as functions shouldn't be used yet.
1996-05-30 09:15:41 +00:00
Fergus Henderson
876663ce77 Add a definition of "liveness".
Estimated hours taken: 0.25

compiler/notes/GLOSSARY:
	Add a definition of "liveness".
1996-05-26 17:06:06 +00:00
Fergus Henderson
a04b84c764 Update now that we've done a few things (type inference,
Estimated hours taken: 0.25

compiler/notes/TODO:
	Update now that we've done a few things (type inference,
	.mod files implemented using C interface, predicate overloading,
	lookup-switches, warnings about unused arguments).
1996-05-14 12:44:27 +00:00
Zoltan Somogyi
bc997e073a Remove an item already done and add a comment.
Estimated hours taken: 0.1

TODO:
	Remove an item already done and add a comment.
1996-05-10 09:50:26 +00:00
Fergus Henderson
22cdd3f2c5 Update the specification for the all-singing, all-dancing
Estimated hours taken: 0.5

compiler/notes/MODULE_SYSTEM
	Update the specification for the all-singing, all-dancing
	module system to include a new `module_ops' symbol specifier,
	after discussions with Peter Schachte.
1996-05-02 21:38:01 +00:00