Sweeping rename so the lib/ surface mirrors Hare's stdlib spellings. - ascii: rune-taking predicates; ishex -> isxdigit - bufio: rinit -> init; take1/takeline -> readbyte/readline - bytes: indexsub -> index - encoding/utf8: runelen -> runesz - errors: eEOF/eShortRead/... -> eof/underread/... - fmt: errln -> errorln; println/fprintln return i64 - os: readfull/writefull -> readall/writeall; unlink -> remove - path: isabs -> abs; drop lastindex (now strings.rbyteindex) - strconv: u64toa/i64toa -> u64tos/i64tos; parse64/parseu64 -> stoi64/stou64 - strings: drop len/isempty; equal -> compare; indexbyte -> byteindex; +rbyteindex - types: drop numeric helpers (moved to math) - new lib/endian (htonu16/ntohu16), lib/math (absi32/absi64) - net: drop htons (use endian.htonu16) Callers in selfhost/, lib/ww/, cmd/w6c/cgen.c, and test/wcc/700_e2e.c updated to match.
19 lines
565 B
Plaintext
19 lines
565 B
Plaintext
// types — integer limits. Mirrors Hare's types::limits (I8_MAX, …)
|
|
// platform-fixed for amd64. Numeric helpers live in lib/math, matching
|
|
// Hare's split between types::limits and math::.
|
|
|
|
def I8_MAX: i8 = 127;
|
|
def I16_MAX: i16 = 32767;
|
|
def I32_MAX: i32 = 2147483647;
|
|
def I64_MAX: i64 = 9223372036854775807;
|
|
|
|
def I8_MIN: i8 = -128;
|
|
def I16_MIN: i16 = -32768;
|
|
def I32_MIN: i32 = -2147483648;
|
|
def I64_MIN: i64 = -9223372036854775808;
|
|
|
|
def U8_MAX: u8 = 255;
|
|
def U16_MAX: u16 = 65535;
|
|
def U32_MAX: u32 = 4294967295;
|
|
def U64_MAX: u64 = 18446744073709551615;
|