[m-rev.] for review: fix some problems with non-ASCII strings
Julien Fischer
juliensf at csse.unimelb.edu.au
Tue May 17 13:31:01 AEST 2011
On Tue, 17 May 2011, Peter Wang wrote:
> Branches: main
>
> Fix some problems with non-ASCII strings.
>
> compiler/error_util.m:
> Make string formatting routines count code points instead of code
> units.
>
> Iterate over non-ASCII strings correctly.
>
> compiler/llds_out_data.m:
> compiler/stack_layout.m:
> Explicitly count UTF-8 code units when counting the length of strings
> that will be written to C source files, in case the compiler is built
> in a grade which uses some other encoding. (The length argument to
> the `MR_string_const' macro isn't actually used, so that change won't
> have any practical effect.)
>
> compiler/inst_check.m:
> compiler/mercury_to_mercury.m:
> compiler/structure_reuse.direct.choose_reuse.m:
> Fix some code unit counts which should be code point counts.
>
> compiler/make.m:
> Iterate over non-ASCII characters correctly.
>
> compiler/passes_aux.m:
> Simplify the implementation of `stage_num_str'.
>
> compiler/timestamp.m:
> Make `string_to_timestamp' handle non-ASCII strings cleanly,
> although they should never occur.
>
> compiler/x86_64_out.m:
> Split long comments at code point boundaries.
>
> compiler/elds_to_erlang.m:
> compiler/erl_code_gen.m:
> compiler/mlds_to_cs.m:
> compiler/pickle.m:
> compiler/switch_util.m:
> Add some comments relating to non-ASCII characters.
>
> library/parsing_utils.m:
> Fix the string and keyword parsers to work on non-ASCII characters.
>
> library/pprint.m:
> library/pretty_printer.m:
> Fix code unit counts which should be code point counts.
>
> library/string.m:
> Add `count_utf8_code_units'.
>
> Fix the portable implementation of `string.to_char_list' (not
> actually used) to work on non-ASCII strings.
>
> Make string formatting routines count code points instead of code
> units.
>
> library/term_io.m:
> Use a direct string comparison to check string is non-empty.
>
> tests/general/test_parsing_utils.exp:
> tests/general/test_parsing_utils.m:
> tests/hard_coded/test_pretty_printer.exp:
> tests/hard_coded/test_pretty_printer.m:
> Test non-ASCII strings.
That looks fine.
Julien.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to: mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions: mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------
More information about the reviews
mailing list