summaryrefslogtreecommitdiff
path: root/chapter17/README.md
diff options
context:
space:
mode:
authorCliff Click <cliffc@acm.org>2026-09-29 17:10:17 -0700
committerCliff Click <cliffc@acm.org>2026-09-29 17:10:17 -0700
commit2d51b64758db57e7d549639d12af35d03a0bd3d8 (patch)
tree1a2ffc36441f94d99038fef8c329f2dd5c9cba69 /chapter17/README.md
parent75b57151ed57efc3e74cf2bf929c1800dd97680e (diff)
downloadSimple-2d51b64758db57e7d549639d12af35d03a0bd3d8.tar.gz
Simple-2d51b64758db57e7d549639d12af35d03a0bd3d8.zip
Forward port lazy mem eval to ch18
Diffstat (limited to 'chapter17/README.md')
-rw-r--r--chapter17/README.md15
1 files changed, 15 insertions, 0 deletions
diff --git a/chapter17/README.md b/chapter17/README.md
index cdbca21b..a3a2d992 100644
--- a/chapter17/README.md
+++ b/chapter17/README.md
@@ -165,3 +165,18 @@ for( int i=0; i<ary#; i++ )
return i;
return -1;
```
+
+## Memory effects
+
+The lazy memory representation from [Chapter 10b](../chapter10b/README.md) and
+constructor layout from [Chapter 16](../chapter16/README.md#memory-through-constructors)
+continue here. ScopeNode tracks one `$mem` binding. Field and array writes,
+including increments, update their alias in a MemMerge. Branches, conditional
+expressions, and loops merge whole memory with BulkMemPhi; MemPhis are discovered
+as field uses require them.
+
+Readonly references retain their deep immutability when Loads fold through
+Stores or allocations. Forward reference types still resolve lazily. Phi
+factoring uses the same one-step Load safety check. Allocation memory remains
+shared across the struct's aliases, so the sole-use Store-to-New check may
+leave a Load that separate memory projections allowed to fold.