for review: ite_gen.m bug fix
Fergus Henderson
fjh at cs.mu.OZ.AU
Thu Jul 23 02:30:45 AEST 1998
Zoltan, can you please review this one?
--------------------
Fix a bug introduced in zs's recent changes that broke
extras/trailed_update/tests/func_trail_test.m.
compiler/ite_gen.m:
When generating code for a negation, the condition
should always be generated as a model_semi goal,
even if the negation as a whole is model_det.
Index: ite_gen.m
===================================================================
RCS file: /home/staff/zs/imp/mercury/compiler/ite_gen.m,v
retrieving revision 1.56
diff -u -r1.56 ite_gen.m
--- ite_gen.m 1998/07/20 10:00:52 1.56
+++ ite_gen.m 1998/07/22 16:26:44
@@ -289,8 +289,10 @@
code_info__maybe_push_temp_frame(CodeModel, MayHijack,
HijackInfo, CurFrameLval, TempFrameCode),
- % Generate the negated goal.
- code_gen__generate_goal(CodeModel, Goal, GoalCode),
+ % Generate the negated goal as a semi-deterministic goal;
+ % it cannot be nondet, since mode correctness requires it
+ % to have no output vars.
+ code_gen__generate_goal(model_semi, Goal, GoalCode),
code_info__ite_enter_then(HijackInfo, CurFrameLval,
ThenNeckCode, ElseNeckCode),
--
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