[m-rev.] diff: bug fix for sub-modules with foreign procs

Peter Ross peter.ross at miscrit.be
Mon Aug 13 03:02:34 AEST 2001


Hi,


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


Estimated hours taken: 3
Branches: main

compiler/mlds_to_il.m:
    Fix a bug where the incorrect assembly reference was being generated
    for foreign procedures implemented in sub modules.


Index: compiler/mlds_to_il.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/mlds_to_il.m,v
retrieving revision 1.64
diff -u -r1.64 mlds_to_il.m
--- compiler/mlds_to_il.m	12 Aug 2001 13:29:11 -0000	1.64
+++ compiler/mlds_to_il.m	12 Aug 2001 17:02:05 -0000
@@ -3004,6 +3004,16 @@
 	->
 		AssemblyName = assembly("mercury")
 	;
+			% Foreign code currently resides in it's own
+			% assembly even if it is in a sub-module.
+		PackageSymName = qualified(_, Name),
+		( string__remove_suffix(Name, "__csharp_code", _)
+		; string__remove_suffix(Name, "__cpp_code", _)
+		)
+	->
+		mlds_to_il__sym_name_to_string(PackageSymName, PackageString),
+		AssemblyName = assembly(PackageString)
+	;
 		mlds_to_il__sym_name_to_string(PackageSymName, PackageString),
 		( PackageSymName = unqualified(_),
 			AssemblyName = assembly(PackageString)

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