[m-dev.] for review: add prog_context to class method bodies
David Glen JEFFERY
dgj at cs.mu.OZ.AU
Wed Nov 10 15:43:22 AEDT 1999
This one's for Zoltan.
Estimated hours taken: 0.2
compiler/polymorphism.m:
When creating a class method body, give the goal the same context
as the pred as a whole (seeing that the body is completely introduced).
This means that the debugger should be able to print out a sensible
context when tracing a class method call.
Index: polymorphism.m
===================================================================
RCS file: /home/staff/zs/imp/mercury/compiler/polymorphism.m,v
retrieving revision 1.176
diff -u -t -r1.176 polymorphism.m
--- polymorphism.m 1999/10/26 01:01:06 1.176
+++ polymorphism.m 1999/11/10 04:36:14
@@ -3221,7 +3221,9 @@
set__list_to_set(HeadVars0, NonLocals),
instmap_delta_from_mode_list(HeadVars0, Modes0, ModuleInfo0,
InstmapDelta),
- goal_info_init(NonLocals, InstmapDelta, Detism, GoalInfo),
+ goal_info_init(NonLocals, InstmapDelta, Detism, GoalInfo0),
+ pred_info_context(PredInfo0, ProgContext),
+ goal_info_set_context(GoalInfo0, ProgContext, GoalInfo),
BodyGoal = BodyGoalExpr - GoalInfo,
proc_info_set_goal(ProcInfo0, BodyGoal, ProcInfo),
dgj
--
David Jeffery (dgj at cs.mu.oz.au) | If your thesis is utterly vacuous
PhD student, | Use first-order predicate calculus.
Dept. of Comp. Sci. & Soft. Eng.| With sufficient formality
The University of Melbourne | The sheerist banality
Australia | Will be hailed by the critics: "Miraculous!"
| -- Anon.
--------------------------------------------------------------------------
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