[m-dev.] Stray symbols in Mercury libraries

Fergus Henderson fjh at cs.mu.OZ.AU
Mon Feb 7 13:34:46 AEDT 2000


On 07-Feb-2000, Warwick Harvey <wharvey at cs.monash.edu.au> wrote:
> I've been working on cleaning up the namespace pollution caused by the 
> CLP(R) library.  In order to catch more exported symbols needing renaming 
> than I might have otherwise, I thought I'd actually look at the symbols 
> appearing in the final `.a' file.  While I was at it, I thought I'd do the 
> same for the Mercury libraries.  I found the following 90 exported symbols 
> (in the `asm_fast.gc' grade) which weren't prefixed by one of the standard 
> `MR_', `ML_', `_entry_', `mercury_', etc. prefixes.
> 
> Anyway, I figured I'd work on a patch to add appropriate prefixes to these 
> symbols,

Great!

> but before I started thought I'd check to see if anybody could see 
> any particular reason why any of them shouldn't be renamed, or might warrant 
> special treatment (i.e. anything other than rename, recompile, see what 
> breaks), or shouldn't be done at this time.

For all of these symbols, you should grep for them rather than
just recompiling, because our use of conditional compilation means
that often symbols are only used in certain grades or if certain
configuration macros are defined.  Also you need to use grep
to catch occurrences of these function names in comments.

But you're right that all of these symbols should be renamed
with one of the standard prefixes.  AFAIK there shouldn't be
any special treatment required for any of those symbols.

> sys_init_array_module_builtins
> sys_init_builtin_types_module
> sys_init_copy_module
> sys_init_type_info_module
> sys_init_unify_c_pointer_module
> sys_init_unify_univ_module

For these, you need to be careful to update the special
"INIT sys_init_*" comments, which are parsed and
treated specially by util/mkinit.c.

For more information on what we need to do to clean up the
Mercury runtime's namespace cleanliness, see
<http://www.cs.mu.oz.au/research/mercury/mailing-lists/mercury-developers/mercury-developers.9909/0098.html>.

-- 
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.
--------------------------------------------------------------------------
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