[m-dev.] diff: accurate gc typeinfo variable bug.
Fergus Henderson
fjh at cs.mu.oz.au
Sat May 10 15:51:48 AEST 1997
Tyson Richard DOWD, you wrote:
>
> Fergus, can you please review this?
> + % If a variable is unused in the goal, it shouldn't be
> + % in the initial liveness. (If we allowed it to start
> + % live, it wouldn't ever become dead, because it would
> + % have to be used to be killed).
> + % So we intersect the headvars with the non-locals.
> + proc_info_goal(ProcInfo, _Goal - GoalInfo),
> + goal_info_get_nonlocals(GoalInfo, NonLocals),
> + set__intersect(Liveness2, NonLocals, Liveness3),
> + % If doing accurate garbage collection, the corresponding
> + % typeinfos need to be added to these.
> + module_info_globals(ModuleInfo, Globals),
> + globals__get_gc_method(Globals, GCmethod),
> + (
> + GCmethod = accurate
> + ->
> + proc_info_get_typeinfo_vars_setwise(ProcInfo, Liveness3,
> + TypeInfoVars),
> + set__union(Liveness3, TypeInfoVars, Liveness)
> + ;
> + Liveness = Liveness3
Are you sure that these two steps are done in the right order?
Shouldn't the typeinfo vars be intersected with the non-locals too?
--
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