[m-rev.] diff: implement casts between value types in IL backend.

Tyson Dowd trd at miscrit.be
Thu Aug 9 00:16:55 AEST 2001


Hi,

It turns out you need to implement this to build the library with
intermodule optimization turned off, as it tries to convert characters
to integers.

===================================================================


Estimated hours taken: 1
Branches: main

compiler/mlds_to_il.m:
	Implement casts between value types -- we use the IL "conv"
	instruction to do data conversions.



Index: compiler/mlds_to_il.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/mlds_to_il.m,v
retrieving revision 1.61
diff -u -r1.61 mlds_to_il.m
--- compiler/mlds_to_il.m	2001/08/05 06:25:30	1.61
+++ compiler/mlds_to_il.m	2001/08/08 14:08:18
@@ -2111,7 +2111,11 @@
 				])
 			)
 		;
-			sorry(this_file, "cast operations between value types")
+			DestILType = ilds__type(_, DestSimpleType),
+			Instrs = tree__list([
+				comment_node("cast between value types"),
+				instr_node(conv(DestSimpleType))
+			])
 		)
 	}.
 

--------------------------------------------------------------------------
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