mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-16 01:43:35 +00:00
Begin implementing library support for uints.
Update the compiler to use the uint type.
library/uint.m:
Begin filling this module in.
library/private_builtin.m:
Use the proper argument type for builtin_{unify,compare}_uint
and provide actual implementations for them.
library/table_builtin.m:
Add tabling builtins for uints.
library/string.m:
Add a function to convert a uint to a decimal string.
(XXX NYI for Erlang).
library/io.m:
Add write_uint/[45].
Add the stream instance for uints and text output streams.
library/stream.string_writer.m:
Add put_uint/4.
Support uints in string_writer.write etc.
library/pprint.m:
Make uint an instance of the doc/1 type class.
library/pretty_printer.m:
Add a default formatter for uints.
library/int.m:
Unrelated change: fix formatting.
compiler/builtin_ops.m:
compiler/elds.m:
compiler/elds_to_erlang.m:
compiler/hlds_data.m:
compiler/llds.m:
compiler/llds_out_data.m:
compiler/mercury_to_mercury.m:
compiler/ml_lookup_switch.m:
compiler/mlds.m:
compiler/mlds_to_c.m:
compiler/mlds_to_cs.m:
compiler/opt_debug.m
compiler/parse_tree_out.m:
compiler/parse_tree_out_info.m:
compiler/prog_data.m:
compiler/prog_out.m:
compiler/prog_rep.m:
compiler/hlds_out_util.m:
Use the uint type in places where we should.
compiler/mlds_to_java.m:
Fix a bug that causes us to generate badly typed Java.
For div and mod we need to cast the entire expression to
an int, not just the first operand.
compiler/c_util.m:
compiler/mlds_to_cs.m:
Add predicates for outputting unsigned integers in C and C#.
tests/hard_coded/test_pretty_printer_defaults.exp:
Conform to the above change to the pretty_printer module.
25 lines
2.0 KiB
Plaintext
25 lines
2.0 KiB
Plaintext
two("builtin", two("float", two(0, '<<function>>', empty, empty), two("character", two(0, '<<function>>', empty, empty), empty, empty), four("int", two(0, '<<function>>', empty, empty), "string", two(0, '<<function>>', empty, empty), "uint", two(0, '<<function>>', empty, empty), empty, empty, empty, empty)), two("array", two("array", two(1, '<<function>>', empty, empty), empty, empty), empty, empty), four("list", two("list", two(1, '<<function>>', empty, empty), empty, empty), "tree234", two("tree234", two(2, '<<function>>', empty, empty), empty, empty), "version_array", two("version_array", two(1, '<<function>>', empty, empty), empty, empty), empty, empty, empty, empty))
|
|
list: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
|
|
20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
|
|
39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, ...]
|
|
array: array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
|
|
18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
|
|
37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, ..., ...])
|
|
map: map([(1 -> 1), (2 -> 2), (3 -> 3), (4 -> 4), (5 -> 5), (6 -> 6),
|
|
(7 -> 7), (8 -> 8), (9 -> 9), (10 -> 10), (11 -> 11), (12 -> 12),
|
|
(13 -> 13), (14 -> 14), (15 -> 15), (16 -> 16), (17 -> 17), (18 -> 18),
|
|
(19 -> 19), (20 -> 20), (21 -> 21), (22 -> 22), (23 -> 23), (24 -> 24),
|
|
(25 -> 25), (26 -> 26), (27 -> 27), (28 -> 28), (29 -> 29), (30 -> 30),
|
|
(31 -> 31), (32 -> 32), (33 -> 33), (34 -> 34), (35 -> 35), (36 -> 36),
|
|
(37 -> 37), (38 -> 38), (39 -> 39), (40 -> 40), (41 -> 41), (42 -> 42),
|
|
(43 -> 43), (44 -> 44), (45 -> 45), (46 -> 46), (47 -> 47), (48 -> 48),
|
|
(... -> ...), ...])
|
|
tuple: {1, '2', 3.0, "four"}
|
|
strings: "this is a string"
|
|
ints: 42 -123
|
|
floats: 3.141 -10.0
|
|
chars: ['a', '*', '\n']
|
|
version_array:version_array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
|
|
15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
|
|
34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, ...])
|