Repository navigation
Commit 2b46afb
committed
feat(vm): forward interleaved direct-eval environments (#785)
Add a precise Environment forwarding record that owns only a replacement parent edge while every own-binding query, read, write, tag, alias, and deletion targets the original live declarative or object record. No binding values or hash tables are copied, and published parent links remain immutable.
Route identifier resolution, captured References, with bindings, lexical-conflict checks, and variable-scope selection through the original record. Quick VM binding caches reject forwarding chains and retain the ordinary exact VM path.
Trace and relocate the target edge, clear it before Environment reuse, and preserve target lock ownership under no-GIL execution.
Validation: Environment clusters pass 13/13 normally and 13/13 under TSan; focused forwarding witnesses pass 2/2 in both modes, with zero failures, leaks, or sanitizer reports. Test262 flips: 0 because compiler admission of interleaved boundaries remains fail-closed.
Advances #771 and #785.1 parent 87ee7e7 commit 2b46afb
3 files changed
Lines changed: 237 additions & 88 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1146 | 1146 | | |
1147 | 1147 | | |
1148 | 1148 | | |
| 1149 | + | |
1149 | 1150 | | |
1150 | 1151 | | |
1151 | 1152 | | |
| |||
1172 | 1173 | | |
1173 | 1174 | | |
1174 | 1175 | | |
| 1176 | + | |
1175 | 1177 | | |
1176 | 1178 | | |
1177 | 1179 | | |
| |||
1201 | 1203 | | |
1202 | 1204 | | |
1203 | 1205 | | |
| 1206 | + | |
1204 | 1207 | | |
1205 | 1208 | | |
1206 | 1209 | | |
| |||
1250 | 1253 | | |
1251 | 1254 | | |
1252 | 1255 | | |
| 1256 | + | |
1253 | 1257 | | |
1254 | 1258 | | |
1255 | 1259 | | |
| |||
0 commit comments