[m-rev.] for review: support --no-static-ground-terms in LLDS grades
Zoltan Somogyi
zs at csse.unimelb.edu.au
Thu Jan 17 15:27:33 AEDT 2008
On 15-Jan-2008, Julien Fischer <juliensf at csse.unimelb.edu.au> wrote:
>> compiler/var_locn.m:
>> Add a type `may_use_static_ground_terms'.
>>
>> Make `var_locn_assign_cell_to_var' take an argument which tells it
>> whether to generate references to static cells.
>>
>> compiler/code_info.m:
>> Keep the setting of `--static-ground-terms' in a new code_info_static
>> field.
>
> That looks fine.
Actually, that is not fine. There are two problems.
First, the change to code_info was unnecessary, as the value of
--static-ground-terms was already in the code_info structure, though
it was buried inside the exprn_opts subfield of the var_locn_info field.
Second, not all the places that implicitly assumed --no-static-ground-terms
were updated, and the failure of valid/two_way_unif shows it. That was due
to var_locn_assign_const_to_var not being updated. (However, I think there
may be other places that rely on --no-static-ground-terms as well.)
This shows that "static ground terms" has at least two, slightly different
meanings: static memory cells (function symbols of nonzero arity), static
representation for all constants (function symbols of zero arity), or both.
The option currently means "both", but I think you structure reuse needs
only the first. We could separate the two notions, with an independent
option for each. We should discuss this in person.
Zoltan.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to: mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions: mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------
More information about the reviews
mailing list