[m-dev.] for review: clip instmap deltas to typeinfo completed nonlocals
Tyson Dowd
trd at cs.mu.OZ.AU
Wed Aug 2 21:55:16 AEST 2000
On 30-Jul-2000, Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:
> For review by anyone.
Don't forget to add the hours taken to this commit log.
>
> If we are using typeinfo liveness, then clip the instmap delta fields in
> goal_infos not to the nonlocals, but to the nonlocals plus the
> type info or typeclass info variables needed to describe the types of the
> nonlocals (this set is now called the "typeinfo completed nonlocals").
>
> This is necessary for the proper handling of code such as resume_typeinfos.m
> in tests/debugger. This involves a call to a procedure with an existentially
> typed argument, where the returned argument is processed only in ways that do
> not need the typeinfo describing it. The typeinfo therefore used to be local
> to the call binding it.
Suggest rewording the last sentence to : Previously, the typeinfo
variable was calculated to be local to the call binding it.
The word "used" is confusing in this context, since the whole problem is
that the compiler "used" to consider the typeinfo not "used".
> Index: compiler/unify_proc.m
> ===================================================================
> RCS file: /home/mercury1/repository/mercury/compiler/unify_proc.m,v
> retrieving revision 1.83
> diff -u -b -r1.83 unify_proc.m
> --- compiler/unify_proc.m 2000/04/18 03:35:36 1.83
> +++ compiler/unify_proc.m 2000/07/29 03:23:06
> @@ -700,8 +700,10 @@
> unify_proc__quantify_clause_body(HeadVars, Goal, Context, Clauses) -->
> unify_proc__info_get_varset(Varset0),
> unify_proc__info_get_types(Types0),
> - { implicitly_quantify_clause_body(HeadVars, Goal,
> - Varset0, Types0, Body, Varset, Types, _Warnings) },
> + unify_proc__info_get_type_info_varmap(TVarMap),
> + { TypeInfoLiveness = no },
> + { implicitly_quantify_clause_body(HeadVars, Goal, Varset0, Types0,
> + TVarMap, TypeInfoLiveness, Body, Varset, Types, _Warnings) },
> unify_proc__info_set_varset(Varset),
> unify_proc__info_set_types(Types),
> { Clauses = [clause([], Body, Context)] }.
When the value for TypeInfoLiveness comes from globals, it makes sense.
But here it is set without reference to the globals. This needs an
explanatory comment of some sort.
Apart from this the diff is fine.
--
Tyson Dowd #
# Surreal humour isn't everyone's cup of fur.
trd at cs.mu.oz.au #
http://www.cs.mu.oz.au/~trd #
--
Tyson Dowd #
# Surreal humour isn't everyone's cup of fur.
trd at cs.mu.oz.au #
http://www.cs.mu.oz.au/~trd #
--------------------------------------------------------------------------
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