Skip to content

Commit 558eb60

Browse files
author
Ralph Küpper
committed
docs(array): point the #7768 placeholders at the real PR number (#7765)
1 parent f282919 commit 558eb60

6 files changed

Lines changed: 8 additions & 8 deletions

File tree

changelog.d/7768-array-receiver-tag-gates-collection-probes.md renamed to changelog.d/7765-array-receiver-tag-gates-collection-probes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
### Array element reads stop asking whether an array is a Map (#7768)
1+
### Array element reads stop asking whether an array is a Map (#7765)
22

33
`gc-handoff/apps/asyncpipe.ts` — an async service pipeline, and the worst gap in
44
the corpus at 13x node — spent **13.5% of its run in `set::is_registered_set` +

crates/perry-runtime/src/array/collection_tag_tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! Receiver-tag gating of the `Map`/`Set` registry probes (#7768).
1+
//! Receiver-tag gating of the `Map`/`Set` registry probes (#7765).
22
//!
33
//! `js_array_get_f64` and `js_array_length` used to ask both collection
44
//! registries "is this receiver a Set? a Map?" on every element read of an

crates/perry-runtime/src/array/indexing.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ fn array_get_property_by_key(arr: *const ArrayHeader, key: *const crate::StringH
545545
/// FOR DENSE KEYS/PROPERTY ARRAYS ONLY — general JS arrays may have
546546
/// `length > capacity` (sparse), where this cap would be incorrect.
547547
pub(crate) unsafe fn keys_array_len_capped_to_capacity(arr: *const ArrayHeader) -> usize {
548-
// #7768: a well-formed dense keys array answers from its own two words.
548+
// #7765: a well-formed dense keys array answers from its own two words.
549549
// `js_array_length` re-derives the same number through a proxy probe, a
550550
// second header read for its lazy/object arms, and a `clean_arr_ptr`
551551
// forwarding walk — once per property read on the field-get funnel.
@@ -664,7 +664,7 @@ pub extern "C" fn js_array_length(arr: *const ArrayHeader) -> u32 {
664664
};
665665
if !arr.is_null() {
666666
let addr = arr as usize;
667-
// #7768: gate both probes on the receiver's own type tag — see
667+
// #7765: gate both probes on the receiver's own type tag — see
668668
// `js_array_get_f64` for why the tag answers, why it is ABA-proof, and
669669
// why a header-less buffer receiver still lands on the same result.
670670
// This reads the byte the `GC_TYPE_LAZY_ARRAY` / `GC_TYPE_OBJECT` block
@@ -895,7 +895,7 @@ pub extern "C" fn js_array_get_f64(arr: *const ArrayHeader, index: u32) -> f64 {
895895
crate::buffer::js_buffer_get(arr as *const crate::buffer::BufferHeader, index as i32);
896896
return byte_val as f64;
897897
}
898-
// #7768: ONE `GcHeader` read now gates both collection probes below and
898+
// #7765: ONE `GcHeader` read now gates both collection probes below and
899899
// supplies the descriptor flags further down, which `array_object_flags`
900900
// used to re-derive through a second `clean_arr_ptr` and a second header
901901
// read. On `gc-handoff/apps/asyncpipe_big.ts` this call site was 76% of all

crates/perry-runtime/src/map.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ fn register_map(ptr: *mut MapHeader, entries: *mut f64, capacity: usize) {
193193

194194
/// Every entry into [`is_registered_map`], i.e. every caller that could not
195195
/// rule a `Map` out more cheaply. The `js_array_get_f64` / `js_array_length`
196-
/// receiver-tag gates (#7768) are asserted against this: a plain-array element
196+
/// receiver-tag gates (#7765) are asserted against this: a plain-array element
197197
/// read must not move it. Remove those gates and the assertion fails, which is
198198
/// the point — a fast path nobody can prove ran is not a fast path.
199199
///

crates/perry-runtime/src/object/field_get_set/get_field_by_name_tail.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ pub(crate) fn get_field_by_name_object_tail(
461461
// been true since `js_set_alloc` moved to
462462
// `arena_alloc_gc(_, _, GC_TYPE_SET)`: a registered Set IS a GC
463463
// allocation and its `obj_type` classifies it. `js_array_get_f64` and
464-
// `js_array_length` gate their probes on exactly that byte (#7768);
464+
// `js_array_length` gate their probes on exactly that byte (#7765);
465465
// this receiver is not proven to carry a header at this point, so it
466466
// still asks the registry.)
467467
if crate::set::is_registered_set(obj as usize) {

scripts/addr_class_allowlist.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,4 +151,4 @@ crates/perry-runtime/src/child_process/value_util.rs | * | pre-existing GcHeader
151151
crates/perry-runtime/src/closure/dispatch/ | * | pre-existing GcHeader probe predating addr_class; address validated by call-site guards (magnitude/registry/is_valid_obj_ptr) -- migrate to addr_class::try_read_gc_header in a follow-up (split of closure/dispatch.rs)
152152
crates/perry-runtime/src/bun_compat/string_width.rs | 0xE0000..=0xE007F | Unicode "Tags" codepoint block (U+E0000..U+E007F) tested against a char, not a handle-band address
153153
crates/perry-runtime/src/bun_compat/width_tables.rs | * | pure Unicode East-Asian-width codepoint-range table; every hex literal is a Unicode code point (e.g. U+F0000 / U+100000 SPUA-A/B planes), never a handle-band address
154-
crates/perry-runtime/src/array/collection_tag_tests.rs | * | unit tests for the #7768 receiver-tag gate: they read AND re-stamp `GcHeader.obj_type` on an address they allocated themselves, which is the whole subject under test. `try_read_gc_header` cannot serve them (it hands out a shared reference, and the recycling test must WRITE the tag to model `arena_alloc_gc` handing the bytes to the next owner).
154+
crates/perry-runtime/src/array/collection_tag_tests.rs | * | unit tests for the #7765 receiver-tag gate: they read AND re-stamp `GcHeader.obj_type` on an address they allocated themselves, which is the whole subject under test. `try_read_gc_header` cannot serve them (it hands out a shared reference, and the recycling test must WRITE the tag to model `arena_alloc_gc` handing the bytes to the next owner).

0 commit comments

Comments
 (0)