[m-rev.] diff: fix external predicates bug on the IL backend.

Peter Ross pro at missioncriticalit.com
Wed Nov 6 08:23:39 AEDT 2002


Hi,


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


Estimated hours taken: 0.5
Branches: main

Ensure that an assembly reference to the <module>__cpp_code assembly
is generated for external predicates.

compiler/mlds_to_il.m:
	Add managed_cplusplus to the file_foreign_langs field for each
	external predicate.

Index: compiler/mlds_to_il.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/mlds_to_il.m,v
retrieving revision 1.121
diff -u -r1.121 mlds_to_il.m
--- compiler/mlds_to_il.m	23 Oct 2002 16:32:02 -0000	1.121
+++ compiler/mlds_to_il.m	5 Nov 2002 17:21:26 -0000
@@ -1021,6 +1021,12 @@
 	; 
 		{ MaybeStatement = external },
 
+		% XXX The external reference must currently reside in 
+		% MC++ file associated with this file.  This is very hackish.
+		ForeignLangs =^ file_foreign_langs,
+		^ file_foreign_langs := 
+			set__insert(ForeignLangs, managed_cplusplus),
+
 		{ mangle_dataname_module(no, ModuleName, NewModuleName) },
 		{ ClassName = mlds_module_name_to_class_name(NewModuleName) },
--------------------------------------------------------------------------
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