[m-dev.] fix for bytecode generator
Simon TAYLOR
stayl at students.cs.mu.oz.au
Wed Mar 19 20:29:23 AEDT 1997
Hi Bert,
> Is it possible to avoid the test "FunctorList = [Char]" by changing
> the declaration of sym_name prog_data.m to:
>
> :- type sym_name ----> unqualified(string) % Can remove?
> ; qualified(module_specifier, string)
> ; char_const(char). % Added
If we were to add a specialised representation of characters, it would go
into the cons_id data type, as was done for byte_cons_id.
> This simplifies the code, but means changing other code that uses
> `unqualified(string)' to represent a char constant.
Should characters be treated differently to other enumeration types?
Currently the only places characters are treated separately are
code_util__cons_id_to_tag and bytecode_gen__map_cons_id. If we
did change the representation there would need to be a similar check
in the code to do the conversion during mode analysis (overloading
isn't resolved until after type-checking), so I don't think the change
would actually save much.
Simon.
More information about the developers
mailing list