mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-15 01:13:30 +00:00
Zoltan's recent addition of support for formatting fixed size integer types
using string.format and friends works by casting the fixed size integer value
to an int or uint value and then re-using the existing code we already have for
formatting those. This works in all cases except when formatting 64-bit integer
types on systems where int / uint is a 32-bit quantity (notably, both the C#
and Java backends). This diff lifts that restrictions.
library/string.format.m:
Add support for formatting 64-bit integers without having to cast them
to an int or uint.
Export new format predicates for use by the code generated by
compiler/format_call.m.
compiler/format_call.m:
Generate calls to the 64-bit versions of the format_*_component predicates
where necessary.
compiler/simplify_proc.m:
Update the list of predicates that may be introduced by the compiler.
NEWS:
Delete the mention of the restriction.
tests/hard_coded/opt_format.{m,exp}:
Extend this test to cover 64-bit integers.
15 lines
408 B
Plaintext
15 lines
408 B
Plaintext
abc_42_def_%x_ghi_HAL_jkl_1111_mno_2222_pqr\
|
|
cba_y_def_%143_ghi_IBM _jkl\
|
|
cba_JCN_fed_%z_ghi_241_jkl\
|
|
abc_0343_def_%v_ghi_KDO_jkl\
|
|
|
|
abc_42_def_%a_ghi_WHAL_jkl_3333_mno_4444_pqr\
|
|
cba_b_def_%143_ghi_WIBM_jkl\
|
|
cba_WJCN_fed_%c_ghi_241_jkl\
|
|
abc_ 343_def_%d_ghi_ WKDO_jkl\
|
|
|
|
abc_42_def_%e_ghi_XHAL_jkl_5555_mno_6666_pqr\
|
|
cba_f_def_%143_ghi_XIBM_jkl\
|
|
cba_XJCN_fed_%g_ghi_241_jkl\
|
|
abc_ 343_def_%h_ghi_ XKDO_jkl\
|