lib/strconv: decimal.ww header documents i_sz/lowbit_lit hoist sub-cases (#32 c2)
Add a sub-bullet to the 8-spelling-divergences list documenting two
implementation sub-cases reviewer-fold3 surfaced during the 07e57ff
decimal.ha port: (1) `i_sz` per-iteration size-cast hoist inside
leftshift_newdigits' for-loop (decimal.ww:93); (2) `lowbit_lit`
stepwise boolean decomposition in should_round_up (decimal.ww:242)
dodging ww parser precedence on Hare's `(nd > 0 && d.digits[nd - 1]
& 1 != 0)` (ref/hare/strconv/decimal.ha:158). Both are in-file
instances of the documented hoist+restructure patterns — rule-9
doc-completeness, not new divergence. Combined.ww regen for
lib/strconv (compiler-imported into w6c + wwdump + smoke) uses the
build's include paths (`-I lib/ww -I lib/ww/lex -I lib/ww/parse
-I selfhost/cmd/wcc`) for transitive import closure; bare `ww build`
without these flags produces truncated output (reviewer-32c2 +
reviewer-fold3 both hit this).
This commit is contained in:
@@ -753,6 +753,13 @@ export fn exists(path: str) bool = {
|
||||
// → ww requires a `{}` block body throughout.
|
||||
// - Hare bare `assert(cond)` builtin → `os.assert(cond, msg)`;
|
||||
// wwstage cgen has no `assert` intercept (deferred fold).
|
||||
// - In-file instances of the above hoist pattern: `i_sz` (line 93)
|
||||
// hoists a per-iteration size cast out of a for-loop comparison
|
||||
// (bullet 3 sub-case — the size-cast hoist applied inside a loop
|
||||
// body, not just at function entry); `lowbit_lit` (line 242)
|
||||
// decomposes Hare's `(nd > 0 && d.digits[nd - 1] & 1 != 0)` into
|
||||
// a stepwise boolean local to dodge ww parser precedence on mixed
|
||||
// `&` / `&&` / `!=` within a single expression.
|
||||
//
|
||||
// CGEN class closures consumed (post-prereqs):
|
||||
// - #131 (4acab6e) — `len(d.digits)` compile-time-folds cs==ww
|
||||
|
||||
Reference in New Issue
Block a user