[m-dev.] for review: MLDS string switches

Tyson Dowd trd at cs.mu.OZ.AU
Thu Nov 9 12:41:01 AEDT 2000


On 09-Nov-2000, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> Estimated hours taken: 8
> 
> Get the MLDS back-end to generate better code for string switches.
> 
> compiler/ml_code_util.m:
> compiler/ml_unify_gen.m:
> 	Move the routines for generating static constants from
> 	ml_unify_gen.m to ml_code_util.m, for use by ml_string_switch.m.
> 
> compiler/ml_string_switch.m:
> 	New file, adapted from string_switch.m.
> 	This handles generation of string switches for the MLDS back-end.
> 	It generates string switches using string hashing and either
> 	computed gotos or int switches.
> 
> compiler/ml_switch_gen.m:
> 	Add support for string switches.
> 	Export the target_supports_* predicates, for use in ml_string_switch.m.
> 	(Perhaps these predicates should be moved into a different module?)

Perhaps ml_code_util or ml_util would be better?

> 	Add `target_supports_goto'.
> 
> compiler/notes/compiler_design.html:
> 	Mention the new module.  Also mention other MLDS modules that
> 	have been recently added and not yet documented here.
> 

That change looks fine, thanks.

-- 
       Tyson Dowd           # 
                            #  Surreal humour isn't everyone's cup of fur.
     trd at cs.mu.oz.au        # 
http://www.cs.mu.oz.au/~trd #
--------------------------------------------------------------------------
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