[m-rev.] trivial diff: remove duplicate code in modes.m

David Overton dmo at cs.mu.OZ.AU
Mon Jun 2 16:56:37 AEST 2003


Estimated hours taken: 0.2
Branches: main

compiler/modes.m:
	Remove some duplicate code in `modecheck_set_var_inst'.

Index: compiler/modes.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/modes.m,v
retrieving revision 1.269
diff -u -r1.269 modes.m
--- compiler/modes.m	2 Jun 2003 04:56:29 -0000	1.269
+++ compiler/modes.m	2 Jun 2003 06:53:23 -0000
@@ -2017,17 +2017,8 @@
 			% lost some uniqueness, or bound part of the var.
 			% The call to inst_matches_binding will succeed
 			% only if we haven't bound any part of the var.
-			inst_matches_binding(Inst, Inst0, Type, ModuleInfo)
-		->
-			% We've just added some information
-			% or lost some uniqueness.
-			instmap__set(InstMap0, Var0, Inst, InstMap),
-			mode_info_set_instmap(InstMap, ModeInfo1, ModeInfo2),
-			mode_info_get_delay_info(ModeInfo2, DelayInfo0),
-			delay_info__bind_var(DelayInfo0, Var0, DelayInfo),
-			mode_info_set_delay_info(DelayInfo,
-				ModeInfo2, ModeInfo3)
-		;
+			\+ inst_matches_binding(Inst, Inst0, Type, ModuleInfo),
+
 			% We've bound part of the var.  If the var was locked,
 			% then we need to report an error...
 			mode_info_var_is_locked(ModeInfo1, Var0, Reason0),

-- 
David Overton                  Uni of Melbourne     +61 3 8344 1354
dmo at cs.mu.oz.au                Monash Uni (Clayton) +61 3 9905 5779
http://www.cs.mu.oz.au/~dmo    Mobile Phone         +61 4 0337 4393
--------------------------------------------------------------------------
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