[m-rev.] Re: trivial diff: add XXX comments to bytecode_data.m
Fergus Henderson
fjh at cs.mu.OZ.AU
Fri Jan 10 21:35:50 AEDT 2003
On 10-Jan-2003, Fergus Henderson <fjh at cs.mu.oz.au> wrote:
> compiler/bytecode_data.m:
> Add some XXX comments about places which are assuming 8-bit characters.
Estimated ours taken: 0.25
Branches: main
compiler/fact_table.m:
compiler/mercury_to_mercury.m:
compiler/rl_file.pp:
Add some more XXX comments about places which may be assuming
8-bit characters.
Workspace: /home/ceres/fjh/mercury
Index: compiler/fact_table.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/fact_table.m,v
retrieving revision 1.43
diff -u -d -r1.43 fact_table.m
--- compiler/fact_table.m 20 Dec 2002 09:46:18 -0000 1.43
+++ compiler/fact_table.m 23 Dec 2002 13:39:38 -0000
@@ -2171,6 +2171,9 @@
(
Key = term__string(String)
->
+ % XXX This method of hashing strings may not work
+ % if cross-compiling between systems that have different
+ % character representations.
string__to_char_list(String, Cs),
list__map(lambda([C::in, I::out] is det, char__to_int(C, I)),
Cs, Ns)
Index: compiler/mercury_to_mercury.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/mercury_to_mercury.m,v
retrieving revision 1.220
diff -u -d -r1.220 mercury_to_mercury.m
--- compiler/mercury_to_mercury.m 12 Aug 2002 02:37:08 -0000 1.220
+++ compiler/mercury_to_mercury.m 21 Oct 2002 12:05:44 -0000
@@ -2761,6 +2761,9 @@
% may require similar changes there.
mercury_escape_char(Char, EscapeCode) :-
+ % XXX This may cause problems interfacing with versions of the compiler
+ % that have been built in grades which use different character
+ % representations.
char__to_int(Char, Int),
string__int_to_base_string(Int, 8, OctalString0),
string__pad_left(OctalString0, '0', 3, OctalString),
Index: compiler/rl_file.pp
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/rl_file.pp,v
retrieving revision 1.3
diff -u -d -r1.3 rl_file.pp
--- compiler/rl_file.pp 20 Mar 2002 12:35:47 -0000 1.3
+++ compiler/rl_file.pp 10 Jan 2003 06:55:05 -0000
@@ -217,6 +217,8 @@
rl_state::di, rl_state::uo) is det.
rl_file__write_char(Writer, Char) -->
+ % XXX what about Unicode characters?
+ % The value returned by char__to_int might not fit in a byte.
{ char__to_int(Char, Int) },
call(Writer, Int).
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
The University of Melbourne | of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list