Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/11706-main-reds-after-11674.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Repair two ratchet reds left on `main` after #11674 and the shapes P4 series. The thread-local ratchet is re-recorded: `async_hooks.rs` 7→6, `gc/layout_tables.rs` 3→2, `node_stream_constructors.rs` 3→2, and a stale `gc/layout.rs` entry is dropped. These reds failed Windows GC structural audits and tls-budget. #11674's test-local `ANON_CLASS_ID` in `static_shapes_tests.rs` is renamed to `REP_SEED_ANON_CLASS_ID`, which clears the class-id audit's false mirror-drift report against `put_value.rs`.
19 changes: 13 additions & 6 deletions crates/perry-runtime/src/object/static_shapes_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ fn a_rep_literal_seed_is_the_shape_its_lazy_mints_reach_and_keeps_its_f64_lanes(
use crate::object::field_rep::{slot_rep, with_slot_rep, REP_F64};
use crate::object::shapes::object_shape_stamp;
let _lock = crate::gc::global_side_table_test_lock();
const ANON_CLASS_ID: u32 = 0x0075_5eed;
const REP_SEED_ANON_CLASS_ID: u32 = 0x0075_5eed;
let rep = with_slot_rep(with_slot_rep(0, 0, REP_F64), 1, REP_F64);
let requested = SHAPE_ID_BASE + 0x5678;
let id = seed_with_rep(requested, &["lt5s_a", "lt5s_b"], rep);
Expand All @@ -76,27 +76,34 @@ fn a_rep_literal_seed_is_the_shape_its_lazy_mints_reach_and_keeps_its_f64_lanes(

// The literal's module-init mint WITHOUT a static id (a module whose
// guards embed none): the lazy mint of the same facts is the seeded id.
unsafe { crate::object::js_register_anon_shape_class_id(ANON_CLASS_ID) };
unsafe { crate::object::js_register_anon_shape_class_id(REP_SEED_ANON_CLASS_ID) };
let packed = b"lt5s_a\0lt5s_b\0";
let keys = crate::object::js_build_class_keys_array(
ANON_CLASS_ID,
REP_SEED_ANON_CLASS_ID,
2,
packed.as_ptr(),
packed.len() as u32,
0,
) as u64;
assert_eq!(
shapes::js_object_shape_id_for_class_keys(keys, 2, ANON_CLASS_ID, rep),
shapes::js_object_shape_id_for_class_keys(keys, 2, REP_SEED_ANON_CLASS_ID, rep),
requested,
"the literal's lazy mint must resolve to the seeded id"
);
// ...and its static request (module init with the id) hits.
assert_eq!(
js_object_shape_id_for_class_keys_static(keys, 2, 2, ANON_CLASS_ID, requested, rep),
js_object_shape_id_for_class_keys_static(
keys,
2,
2,
REP_SEED_ANON_CLASS_ID,
requested,
rep
),
requested
);
// The all-`Any` sibling is other facts: never the static id.
let any = shapes::js_object_shape_id_for_class_keys(keys, 2, ANON_CLASS_ID, 0);
let any = shapes::js_object_shape_id_for_class_keys(keys, 2, REP_SEED_ANON_CLASS_ID, 0);
assert_ne!(
any, requested,
"the rep is identity: Any lanes are another shape"
Expand Down
9 changes: 4 additions & 5 deletions scripts/thread_local_cold_allowlist.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"_comment": "Files still declaring raw `thread_local!`. The count is the number of DECLARATIONS that survive into a shipping build \u2014 each one pays `_tlv_get_addr` per read on Darwin \u2014 and it is a ratchet, so adding a `static` to an already-listed file fails whether or not it opens a new block. New code should use `crate::perry_thread_local!` \u2014 see crates/perry-runtime/src/tls_hot.rs. Regenerate with scripts/check_thread_locals.py --update.",
"_hot_declarations": 528,
"_hot_declarations": 522,
"files": {
"crates/perry-runtime/src/agent.rs": 1,
"crates/perry-runtime/src/arena/block.rs": 5,
"crates/perry-runtime/src/arena/page_meta/mod.rs": 2,
"crates/perry-runtime/src/async_context.rs": 3,
"crates/perry-runtime/src/async_hooks.rs": 7,
"crates/perry-runtime/src/async_hooks.rs": 6,
"crates/perry-runtime/src/builtins/console.rs": 4,
"crates/perry-runtime/src/builtins/formatting.rs": 9,
"crates/perry-runtime/src/builtins/formatting/boxed_primitives.rs": 1,
Expand All @@ -31,8 +31,7 @@
"crates/perry-runtime/src/gc/barrier_arming.rs": 3,
"crates/perry-runtime/src/gc/cycle_malloc_trim.rs": 1,
"crates/perry-runtime/src/gc/fromspace_scan.rs": 1,
"crates/perry-runtime/src/gc/layout.rs": 1,
"crates/perry-runtime/src/gc/layout_tables.rs": 3,
"crates/perry-runtime/src/gc/layout_tables.rs": 2,
"crates/perry-runtime/src/gc/malloc.rs": 2,
"crates/perry-runtime/src/gc/mod.rs": 3,
"crates/perry-runtime/src/gc/promote_in_place.rs": 11,
Expand All @@ -53,7 +52,7 @@
"crates/perry-runtime/src/node_http2_constants.rs": 1,
"crates/perry-runtime/src/node_inspector.rs": 2,
"crates/perry-runtime/src/node_repl.rs": 1,
"crates/perry-runtime/src/node_stream_constructors.rs": 3,
"crates/perry-runtime/src/node_stream_constructors.rs": 2,
"crates/perry-runtime/src/node_stream_tests.rs": 24,
"crates/perry-runtime/src/node_submodules/blob.rs": 4,
"crates/perry-runtime/src/node_submodules/diagnostics.rs": 10,
Expand Down
Loading