[m-rev.] for review: module qualify type_ctor_infos for builtins
Fergus Henderson
fjh at cs.mu.OZ.AU
Tue Aug 13 18:59:32 AEST 2002
On 13-Aug-2002, Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:
> Remove the need for the #defines in mercury_bootstrap.h that module qualify the
> names of the type_ctor_infos for the builtin types.
>
> Note that we cannot remove the #defines themselves until after this change has
> been installed on all our machines.
>
> compiler/rtti.m:
> When generating names for RTTI data structures, substitute module name
> builtin for the empty module name. At this stage of compilation,
> after everything has been module qualified, the only things with
> an empty module name should be the builtins,
...
> + RttiTypeCtor = rtti_type_ctor(ModuleNameSym0, TypeName0, TypeArity),
> + ( ModuleNameSym0 = unqualified("") ->
> + ModuleNameSym = unqualified("builtin")
> + ;
> + ModuleNameSym = ModuleNameSym0
> + ),
> + sym_name_mangle(ModuleNameSym, ModuleName),
> + name_mangle(TypeName0, TypeName),
You should use mercury_public_builtin_module rather than hard-coding
"builtin" (since the plan is to change it to "std.builtin" at some point).
Also, a comment in the source code here might help.
Otherwise that looks fine.
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
The University of Melbourne | of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list