[m-rev.] For review: Generate IL modules for standard library sub-modules
Jonathan Morgan
jonmmorgan at gmail.com
Sat Jun 16 23:16:05 AEST 2007
Estimated hours taken: 1
Branches: main
Altered the IL backend so that it generates modules rather than assemblies
for all standard library modules, including sub-modules.
compiler/mlds_to_il.m:
Made the above alteration.
Index: compiler/mlds_to_il.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/mlds_to_il.m,v
retrieving revision 1.182
diff -u -r1.182 mlds_to_il.m
--- compiler/mlds_to_il.m 12 Jun 2007 03:29:59 -0000 1.182
+++ compiler/mlds_to_il.m 16 Jun 2007 13:06:21 -0000
@@ -320,7 +320,7 @@
% during the build (using AL.EXE).
PackageName = mlds_module_name_to_package_name(ModuleName),
(
- PackageName = qualified(unqualified("mercury"), _)
+ sym_name_prefix(PackageName) = "mercury"
->
ThisAssembly = [],
AssemblerRefs = Imports
@@ -3620,6 +3620,10 @@
sym_name_to_class_name_2(qualified(ModuleSpec, Name), [Name | Modules]) :-
sym_name_to_class_name_2(ModuleSpec, Modules).
sym_name_to_class_name_2(unqualified(Name), [Name]).
+
+:- func sym_name_prefix(sym_name) = string.
+sym_name_prefix(qualified(ModuleSpec, _)) = sym_name_prefix(ModuleSpec).
+sym_name_prefix(unqualified(Name)) = Name.
%-----------------------------------------------------------------------------%
%
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to: mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions: mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------
More information about the reviews
mailing list