lang migration: rename signed integer types sN -> iN
Mechanical sweep of all .sx sources, plan docs, and tests/expected snapshots for the sx language rename (s8/s16/s32/s64 -> i8/i16/i32/i64). Verified: tools/run_tests.sh 23/23. Note: the ios-sim build has 2 pre-existing 'restart' dot-call errors from the sx opt-in UFCS change (sx a47ea14) — independent of this rename (present pre-sweep); migrated in the follow-up commit.
This commit is contained in:
@@ -25,9 +25,9 @@ the step asks for an honest accounting.
|
||||
|
||||
## Category: Numerics / parsing
|
||||
|
||||
### 1. String → number parsing (`parse_s64`, `parse_f32`)
|
||||
- **m3te location:** `main.sx:156` (`parse_s64`), `main.sx:122` (`parse_f32`).
|
||||
- **What it does:** decimal ASCII `string` → `s64` / `f32` (sign + integer +
|
||||
### 1. String → number parsing (`parse_i64`, `parse_f32`)
|
||||
- **m3te location:** `main.sx:156` (`parse_i64`), `main.sx:122` (`parse_f32`).
|
||||
- **What it does:** decimal ASCII `string` → `i64` / `f32` (sign + integer +
|
||||
optional fractional part).
|
||||
- **Why general-purpose:** the exact inverse of the formatters everyone already
|
||||
uses; needed by any program that reads numbers from argv, env, config, or a
|
||||
@@ -46,7 +46,7 @@ the step asks for an honest accounting.
|
||||
- **m3te location:** `board.sx:55` (`Rng` struct: `next_u32` `board.sx:59`,
|
||||
`next_range` `board.sx:66`), `board.sx:71` (`rng_seeded`), constants
|
||||
`board.sx:51-53`.
|
||||
- **What it does:** a 32-bit linear-congruential generator carried in `s64`
|
||||
- **What it does:** a 32-bit linear-congruential generator carried in `i64`
|
||||
and masked to 32 bits — `next_u32()`, `next_range(n)` (uniform-ish `[0,n)`),
|
||||
`rng_seeded(seed)`.
|
||||
- **Why general-purpose:** a seedable, reproducible RNG is a textbook stdlib
|
||||
@@ -172,7 +172,7 @@ them, so they are explicitly **not** counted above:
|
||||
|
||||
## Summary (top gaps, ranked)
|
||||
|
||||
1. **String → number parsing** (`parse_s64` / `parse_f32`) — clean, universally
|
||||
1. **String → number parsing** (`parse_i64` / `parse_f32`) — clean, universally
|
||||
needed, the missing inverse of the existing formatters.
|
||||
2. **Seedable PRNG** (`Rng` LCG) — textbook stdlib primitive, entirely absent.
|
||||
3. **`from_cstr` C-string bridge** (+ public `strlen`) — the most-repeated FFI
|
||||
|
||||
Reference in New Issue
Block a user