[m-rev.] for review: Build string switch tries in the target string encoding.

Julien Fischer jfischer at opturion.com
Mon Mar 23 11:53:12 AEDT 2015

Hi Peter,

On Tue, 17 Mar 2015, Peter Wang wrote:

> Build string switch tries in the target string encoding.
> The compiler should work in code units of the TARGET string encoding
> when building tries for string switches.  Using its own string encoding
> would be incorrect if it differs from the target encoding.  Currently
> that would only occur if the compiler is built in a java/csharp grade
> (uses UTF-16 internally) and invoked to target high-level C (uses UTF-8).
> Another motivation for this change is to remove a place where the
> compiler behaviour depends on the setting of `--cross-compiling'.
> compiler/backend_libs.m:
> compiler/string_encoding.m:
> 	Add new module with helper predicates.
> compiler/ml_string_switch.m:
> 	Convert strings to/from code units in the target string
> 	encoding.
> compiler/ml_switch_gen.m:
> 	Remove restriction on compiling string switches using tries when
> 	`--cross-compiling' is enabled.
> compiler/notes/compiler_design.html:
> 	Document the new module.

That looks fine.


More information about the reviews mailing list