[m-dev.] diff: fix contexts of procedure bodies
Fergus Henderson
fjh at cs.mu.OZ.AU
Fri Nov 19 05:18:28 AEDT 1999
The patch below fixes some problems with contexts that show
up now that the debugger prints source line numbers.
Note that this fix is only a partial solution to the problem;
it doesn't resolve things for the case of zero-arity predicates.
The solution to that case is not so easy, because for a clause
such as
foo :-
bar(...).
we currently keep only one context, but really two are required,
one for the whole procedure body, and one for the call to bar.
----------
Estimated hours taken: 0.5
compiler/make_hlds.m:
Ensure that we set the correct context for conjunctions
which include argument unifications.
Workspace: /d-drive/home/hg/fjh/mercury
Index: compiler/make_hlds.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/make_hlds.m,v
retrieving revision 1.316
diff -u -d -r1.316 make_hlds.m
--- compiler/make_hlds.m 1999/11/15 07:24:27 1.316
+++ compiler/make_hlds.m 1999/11/18 18:09:19
@@ -5236,11 +5236,12 @@
{ VarSet = VarSet0 },
{ Info = Info0 }
;
- { Goal0 = _ - GoalInfo },
+ { Goal0 = _ - GoalInfo0 },
{ goal_to_conj_list(Goal0, List0) },
insert_arg_unifications_2(HeadVars, Args, Context, ArgContext,
ForPragmaC, 0, List0, VarSet0, List, VarSet,
Info0, Info),
+ { goal_info_set_context(GoalInfo0, Context, GoalInfo) },
{ conj_list_to_goal(List, GoalInfo, Goal) }
).
--
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.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list