summaryrefslogtreecommitdiff
path: root/skills/chapter25-codex-notes.md
diff options
context:
space:
mode:
authorCliff Click <cliffc@acm.org>2026-09-26 16:02:24 -0700
committerCliff Click <cliffc@acm.org>2026-09-26 16:02:24 -0700
commit4391fcc03a214e6296e19ca42487de023ab12f6a (patch)
tree7eca88e0bea31cdae4d5f485b84604a41c82f795 /skills/chapter25-codex-notes.md
parentdd907c2d86eaaad0910e7bfe3f0d25e5caf8bdf7 (diff)
downloadSimple-4391fcc03a214e6296e19ca42487de023ab12f6a.tar.gz
Simple-4391fcc03a214e6296e19ca42487de023ab12f6a.zip
bug fix widen
Failed lattice law tests mixing constants and have wide type ints; or mixing wide ints and constant arrays.
Diffstat (limited to 'skills/chapter25-codex-notes.md')
-rw-r--r--skills/chapter25-codex-notes.md12
1 files changed, 12 insertions, 0 deletions
diff --git a/skills/chapter25-codex-notes.md b/skills/chapter25-codex-notes.md
index 64738421..1aac07a2 100644
--- a/skills/chapter25-codex-notes.md
+++ b/skills/chapter25-codex-notes.md
@@ -367,6 +367,18 @@ Consequences:
## Types and monotonicity
+- Integer widening starts in Chapter 24. `nonZero()` preserves `_widen` when
+ narrowing a range. B10's correction is in 24, with `TypeTest.testNonZeroWidening`
+ in 24-25. Both now use widening 0-3 and dual widening `3-widen`, preserve
+ singleton widening, and give TypeConAry the same widening coordinate. Loop Phis
+ widen only below-center nonconstant ranges: above-center widening can fall to
+ an unwidened constant, violating SCCP monotonicity. Existing Chapter14/21 tests
+ exposed this during the backport.
+- TypeConAry's `_make(any,widen)` shares the backing array and returns an
+ uninterned type. `xdual()` must leave interning to Type.intern's dual-pair setup;
+ ordinary factories and ymeet's widening replacement intern their results.
+ Chapters 24-25 use this API and a distinct array tag. Chapters 22-23 only receive
+ compatible cleanup; their sentinel-based representations predate widening.
- Cyclic structural equality starts in Chapter 23. Chapters 9-22 compare
interned children by identity and check type kinds in `Type.equals`.
In recursive equality, leaf dispatch must also check `_type` before calling