[m-rev.] trivial diff: fix source file map bug

Simon Taylor stayl at cs.mu.OZ.AU
Sat Jun 8 23:52:09 AEST 2002


Estimated hours taken: 0.25
Branches: main

compiler/source_file_map.m:
	Fix a bug which caused the Mercury.modules file to be
	re-read on each lookup of a source file name.

Index: source_file_map.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/source_file_map.m,v
retrieving revision 1.1
diff -u -u -r1.1 source_file_map.m
--- source_file_map.m	15 Apr 2002 05:04:15 -0000	1.1
+++ source_file_map.m	8 Jun 2002 12:46:55 -0000
@@ -56,8 +56,8 @@
 
 get_source_file_map(SourceFileMap) -->
 	globals__io_get_globals(Globals0),
-	{ globals__get_source_file_map(Globals0, MaybeSourceFileMap) },
-	( { MaybeSourceFileMap = yes(SourceFileMap0) } ->
+	{ globals__get_source_file_map(Globals0, MaybeSourceFileMap0) },
+	( { MaybeSourceFileMap0 = yes(SourceFileMap0) } ->
 		{ SourceFileMap = SourceFileMap0 }
 	;
 		globals__io_lookup_bool_option(use_subdirs, UseSubdirs),
@@ -75,7 +75,7 @@
 		),
 		globals__io_get_globals(Globals1),
 		{ globals__set_source_file_map(Globals1,
-			MaybeSourceFileMap, Globals2) },
+			yes(SourceFileMap), Globals2) },
 		{ unsafe_promise_unique(Globals2, Globals) },
 		globals__io_set_globals(Globals)
 	).
--------------------------------------------------------------------------
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