[m-rev.] for review: record use of reserved addresses
Julien Fischer
juliensf at csse.unimelb.edu.au
Tue Sep 25 14:34:59 AEST 2007
On Tue, 25 Sep 2007, Zoltan Somogyi wrote:
> When deciding on the representation of a type, record whether the
> representation uses reserved addresses. We already do this for reserved tags,
> so not doing it for reserved addresses is an asymmetry.
>
> compiler/hlds_data.m:
> Add the required slot to the hlds_du_type function symbol.
>
> Rename is_enum as is_mercury_enum, since now we have is_foreign_enum
> as well, and is_enum is misleading.
>
> Replace some bools with purpose-specific types.
>
> compiler/prog_data.m:
> Define those purpose-specific types. They are defined here since we
> also use them in the parse tree.
>
> compiler/add_type.m:
> compiler/make_tags.m:
> Record in the slot whether a type representation uses reserved
> addresses.
>
> compiler/switch_gen.m:
> Use the new slot, instead of going through the tags of the cons_ids
> in all the switch arms.
>
> Convert most of an if-then-else chain to a switch.
>
> compiler/type_util.m:
> Factor out some common code, and replace some map.searches (that could
> fail only if previous code screwed up) with map.lookup.
>
> compiler/*.m:
> Conform to the changes above.
That looks fine.
Julien.
--------------------------------------------------------------------------
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