From 5e0d5fb6ea6c939f2ff8c0fdcdf6e0780ff0c0b5 Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Wed, 2 Dec 2026 15:19:29 -0800 Subject: [PATCH] Docs: the array-field bound's lowering doc and the parked-handles test say the sink, not a clamp The two doc lines 511f31b0ba missed: memory::provenance's array_bound and engine_parked_handles' compile test still said each run-time index into the array field is clamped. Lowering sends such an access to the private sink where an index is past its array. Doc text only; cargo fmt. --- crates/metal2vulkan/src/memory/provenance.rs | 2 +- crates/metal2vulkan/src/tests/engine_parked_handles.rs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/metal2vulkan/src/memory/provenance.rs b/crates/metal2vulkan/src/memory/provenance.rs index e990369ab..0a40e940c 100644 --- a/crates/metal2vulkan/src/memory/provenance.rs +++ b/crates/metal2vulkan/src/memory/provenance.rs @@ -1523,7 +1523,7 @@ impl<'a> Cx<'a> { /// The fact of GEP `id` into an array field ([`array_geps`]) over `base` whose roots are /// stack allocations only: its offsets are its constant displacement plus at most the array /// field's bytes past its first element; `f`, the unbounded fact, for any other GEP. Lowering - /// clamps each such GEP's run-time indices into the private arena to their arrays + /// sends such a GEP's private-arena access to the sink where a run-time index is past its array /// (`lower::access::local`), and a typed object's access never leaves its levels /// (`memory::alloca`), so no run reaches past the field. fn array_bound( diff --git a/crates/metal2vulkan/src/tests/engine_parked_handles.rs b/crates/metal2vulkan/src/tests/engine_parked_handles.rs index 13c632ce5..ebe591237 100644 --- a/crates/metal2vulkan/src/tests/engine_parked_handles.rs +++ b/crates/metal2vulkan/src/tests/engine_parked_handles.rs @@ -45,7 +45,8 @@ fn fixture() -> Option> { } /// Heap handles stored into fields no load reads compile, write nothing there, and pass L3 where -/// the profile has the sampled heap; the run-time indices into the struct's arrays are clamped. +/// the profile has the sampled heap; the struct's arrays are reached at run-time indices, each +/// access bounded to its array. #[test] fn heap_handles_parked_where_nothing_reads_them_compile() { let Some(bc) = fixture() else { return };