[m-rev.] diff: fixes for `il' grade

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Nov 20 08:23:11 AEDT 2001


compiler/mlds_to_il.m:
	- Fix a bug: it was using `univ', but it should
	  have been using `std_util:univ'.
	- Fix a problem which prevented linking files compiled
	  in grade `il' against the `ilc' library:
	  always treat the reference to `univ' in the exception-handling
	  code that gets automatically linked into main/2
	  as if univ was defined with --low-level-data.
	  This is hack, but it is currently needed to be able to run
	  any programs in grade `il'.

cvs server: Diffing .
Index: mlds_to_il.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/mlds_to_il.m,v
retrieving revision 1.91
diff -u -d -r1.91 mlds_to_il.m
--- mlds_to_il.m	2001/11/08 11:48:01	1.91
+++ mlds_to_il.m	2001/11/19 19:33:51
@@ -1019,11 +1019,22 @@
 			)
 		)},
 
-		{ UnivMercuryType = term__functor(term__atom("univ"), [], 
-			context("", 0)) },
+		{ construct_qualified_term(
+			qualified(unqualified("std_util"), "univ"),
+			[], UnivMercuryType) },	
 		{ UnivMLDSType = mercury_type(UnivMercuryType,
 				user_type, non_foreign_type(UnivMercuryType)) },
-		{ UnivType = mlds_type_to_ilds_type(DataRep, UnivMLDSType) },
+		%
+		% XXX Nasty hack alert!
+		%
+		% Currently the library doesn't build with --high-level-data.
+		% So here we explicitly set --high-level-data to `no'
+		% to reflect the fact that we're linking against the
+		% version of the library compiled with --low-level-data.
+		%
+		{ XXX_LibraryDataRep = DataRep ^ highlevel_data := no },
+		{ UnivType = mlds_type_to_ilds_type(XXX_LibraryDataRep,
+			UnivMLDSType) },
 
 		{ RenameNode = (func(N) = list__map(RenameRets, N)) },
 

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list