diff: compiler/notes/compiler_design.html & simplify

Fergus Henderson fjh at cs.mu.oz.au
Sat Jan 10 20:14:20 AEDT 1998


compiler/notes/compiler_design.html:
	Document why the first `simplify' pass is considered part of the
	semantic analysis phase, not the high-level transformation phase
	(the answer is because it can report warnings).

cvs diff: Diffing .
Index: compiler_design.html
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/notes/compiler_design.html,v
retrieving revision 1.16
diff -u -u -r1.16 compiler_design.html
--- compiler_design.html	1998/01/09 11:53:06	1.16
+++ compiler_design.html	1998/01/10 09:09:15
@@ -191,6 +191,13 @@
 
 <p>
 
+Any pass which can report errors or warnings must be part of this stage,
+so that the compiler does the right thing for options such as
+`--halt-at-warn' (which turns warnings into errors) and
+`--error-check-only' (which makes the compiler only compile up to this stage).
+
+<p>
+
 <dl>
 
 <dt> implicit quantification
@@ -331,7 +338,8 @@
 	massage the code into a form the code generator will accept.
 	It also warns the programmer about any constructs that are so simple
 	that they should not have been included in the program in the first
-	place.
+	place.  (That's why this pass needs to be part of semantic analysis:
+	because it can report warnings.)
 	simplify.m calls common.m which looks for (a) construction unifications
 	that construct a term that is the same as one that already exists,
 	or (b) repeated calls to a predicate with the same inputs, and replaces

-- 
Fergus Henderson <fjh at cs.mu.oz.au>   |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>   |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3         |     -- the last words of T. S. Garp.



More information about the developers mailing list