mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-18 10:53:40 +00:00
Enable support for literals of the new types.
Begin implementing library support for 8, 16, and 32 bit types.
Update the compiler to represent values of their own constants.
library/int8.m:
library/int16.m:
library/int32.m:
library/uint8.m:
library/uint16.m:
library/uint32.m:
Begin filling these modules out.
library/uint.m:
Unrelated change: add the predicates plus/2, minus/2 and
times/2 for uints.
library/integer.m:
Add predicates for converting integer/0 values into values
of the new types.
Add functions for converting values of the new types into
integer/0 values.
library/string.m:
Add functions for converting values of the new types to strings.
library/private_builtin.m:
Replace the placeholder definitions for the builtin unify and compare
predicates for the new types with their actual definitions.
library/erlang_rtti_implementation.m:
library/rtti_implementation.m:
Replace placeholder definitions for the new types with their
actual definitions.
library/io.m:
Add predicates for writing values of the new types to file streams.
library/stream.string_writer.m:
Implement generic write and print for values of the new types.
library/string.to_string.m:
Likewise for string/1.
library/term.m:
library/term_conversion.m:
Add predicates and functions for converting the new types to
and from terms.
compiler/builtin_ops.m:
compiler/elds.m:
compiler/hlds_data.m:
compiler/llds.m:
compiler/mlds.m:
compiler/prog_data.m:
Replace placeholders for the new types with the new types.
compiler/superhomogeneous.m:
Enable literals of the new types.
compiler/mlds_to_cs.m:
Avoid a warning from the C# compiler for bitwise-or operators
with sbyte operands.
compiler/c_util.m:
compiler/elds_to_erlang.m:
compiler/hlds_out_util.m:
compiler/llds_out_data.m:
compiler/lookup_switch.m:
compiler/mlds_to_c.m:
compiler/mlds_to_java.m:
compiler/opt_debug.m:
compiler/parse_tree_out_info.m:
compiler/parse_tree_to_term.m:
compiler/prog_out.m:
compiler/prog_rep.m:
compiler/prog_util.m:
Replace placeholder code for the new types with code that uses the new
types.
tests/invalid/invalid_int.m:
tests/invalid/invalid_int.err_exp2:
Extend this test case to cover the fixed size integer types.
30 lines
1.8 KiB
Plaintext
30 lines
1.8 KiB
Plaintext
invalid_int.m:019: Error: the integer literal
|
|
invalid_int.m:019: `0b10000000000000000000000000000000000000000000000000000000000000000'
|
|
invalid_int.m:019: is outside the range of that type.
|
|
invalid_int.m:024: Error: the integer literal `0o2000000000000000000000' is
|
|
invalid_int.m:024: outside the range of that type.
|
|
invalid_int.m:030: Error: the integer literal `0x10000000000000000' is outside
|
|
invalid_int.m:030: the range of that type.
|
|
invalid_int.m:035: Error: the integer literal `9223372036854775808' is outside
|
|
invalid_int.m:035: the range of that type.
|
|
invalid_int.m:040: Error: the 8-bit integer literal `-129i8' is outside the
|
|
invalid_int.m:040: range of that type.
|
|
invalid_int.m:043: Error: the 8-bit integer literal `128i8' is outside the
|
|
invalid_int.m:043: range of that type.
|
|
invalid_int.m:048: Error: the unsigned 8-bit integer literal `256u8' is outside
|
|
invalid_int.m:048: the range of that type.
|
|
invalid_int.m:049: Error: the unsigned 8-bit integer literal `257u8' is outside
|
|
invalid_int.m:049: the range of that type.
|
|
invalid_int.m:054: Error: the 16-bit integer literal `-32769i16' is outside the
|
|
invalid_int.m:054: range of that type.
|
|
invalid_int.m:057: Error: the 16-bit integer literal `32768i16' is outside the
|
|
invalid_int.m:057: range of that type.
|
|
invalid_int.m:063: Error: the unsigned 16-bit integer literal `65536u16' is
|
|
invalid_int.m:063: outside the range of that type.
|
|
invalid_int.m:068: Error: the 32-bit integer literal `-2147483649i32' is
|
|
invalid_int.m:068: outside the range of that type.
|
|
invalid_int.m:071: Error: the 32-bit integer literal `2147483648i32' is outside
|
|
invalid_int.m:071: the range of that type.
|
|
invalid_int.m:077: Error: the unsigned 32-bit integer literal `4294967296u32'
|
|
invalid_int.m:077: is outside the range of that type.
|