[m-dev.] diff: fix bug in type specialization
Simon Taylor
stayl at cs.mu.OZ.AU
Mon Sep 4 18:21:54 AEDT 2000
Hi,
This change fixes a bug reported by Zoltan.
Simon.
Estimated hours taken: 0.25
compiler/make_hlds.m:
Fix a bug in type specialization of functions -- the
non-locals set of the goal created by make_hlds.m
to call the non-specialized version of the function
was not being initialized.
This caused compilation of tests/hard_coded/typeclasses/type_spec.m
to abort during code generation when compiled with
--no-user-guided-type-specialization. When type specialization
is enabled, the goal is requantified by the optimization passes
and the problem goes away.
Index: make_hlds.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/make_hlds.m,v
retrieving revision 1.344
diff -u -u -r1.344 make_hlds.m
--- make_hlds.m 2000/08/25 06:06:59 1.344
+++ make_hlds.m 2000/09/04 05:05:46
@@ -7088,7 +7088,8 @@
goal_info_get_context(GoalInfo, Context),
create_atomic_unification(RetArg,
functor(ConsId, FuncArgs), Context,
- explicit, [], Goal)
+ explicit, [], GoalExpr - _),
+ Goal = GoalExpr - GoalInfo
).
%-----------------------------------------------------------------------------%
--------------------------------------------------------------------------
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