diff: higher_order.m bug fix

Fergus Henderson fjh at cs.mu.OZ.AU
Mon Feb 2 17:34:24 AEDT 1998


Estimated hours taken: 0.5

compiler/higher_order.m:
	A bug fix for the previous bug fix: when examining the insts during
	higher-order specialization, make sure we call inst_expand/3 to
	expand user- or compiler-defined insts.  Without this change,
	the test case tests/hard_coded/ho_func_reg.m fails.

cvs diff  compiler/higher_order.m
Index: compiler/higher_order.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/higher_order.m,v
retrieving revision 1.39
diff -u -r1.39 higher_order.m
--- higher_order.m	1998/01/29 13:28:23	1.39
+++ higher_order.m	1998/02/02 06:24:18
@@ -33,7 +33,7 @@
 :- import_module hlds_pred, hlds_goal, hlds_data, instmap, (inst).
 :- import_module code_util, globals, make_hlds, mode_util, goal_util.
 :- import_module type_util, options, prog_data, quantification, (lambda).
-:- import_module mercury_to_mercury.
+:- import_module mercury_to_mercury, inst_match.
 
 :- import_module assoc_list, bool, char, int, list, map, require, set.
 :- import_module std_util, string, varset, term.
@@ -1107,7 +1107,9 @@
 		%
 		( 
 			mode_get_insts(ModuleInfo, LVarMode,
-				LVarInitialInst, _LVarFinalInst),
+				LVarInitialInst0, _LVarFinalInst),
+			inst_expand(ModuleInfo, LVarInitialInst0,
+				LVarInitialInst),
 			LVarInitialInst = ground(_, yes(LVarPredInstInfo))
 		->
 			LVarPredInstInfo = pred_inst_info(_, LVarArgModes0, _),

-- 
Fergus Henderson <fjh at cs.mu.oz.au>   |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>   |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3         |     -- the last words of T. S. Garp.



More information about the developers mailing list