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
9 changes: 9 additions & 0 deletions changelog.d/9330-tombstones-default-on.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
### Performance

- **Tombstone deletes are default-on again.** #9038's O(1) delete (6.5× on
populated delete, ~15× vs node at the time) was rolled back to opt-in by
#9212 because of #9200 — an evacuating minor could sweep a deleted
receiver's live keys array, leaving it shapeless. #9317 fixed that
structurally (every post-birth ShapeId publish arms `old_carrier` through a
single funnel), so the win returns to the default configuration.
`PERRY_OBJECT_TOMBSTONES=0` remains the kill switch.
18 changes: 12 additions & 6 deletions crates/perry-runtime/src/object/delete_rest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1500,13 +1500,19 @@ fn object_tombstone_deletes_enabled() -> bool {
}
static ON: std::sync::OnceLock<bool> = std::sync::OnceLock::new();
*ON.get_or_init(|| {
// #9200: keep tombstones opt-in until an evacuating-GC interaction
// with class dispatch is fixed. The default-on route can restore a
// deleted receiver to its canonical class shape after relocation,
// making Object.keys() empty and fixed-slot reads return wrong data.
matches!(
// DEFAULT-ON again (#9038's 6.5x populated-delete win). #9212 made
// this opt-in because of #9200 — an unarmed successor descriptor let
// an evacuating minor sweep a deleted receiver's live keys array —
// and #9317 fixed that structurally: every post-birth ShapeId publish
// now routes through `stamp_object_shape_id_with_carrier_note`, which
// arms `old_carrier` for any non-nursery receiver, so the descriptor
// (and the keys array only it reaches) is rooted by construction.
// `PERRY_OBJECT_TOMBSTONES=0` remains the kill switch for A/B and
// attribution — the same switch that isolated #9108, #9110 and #9200
// each in one command.
!matches!(
std::env::var("PERRY_OBJECT_TOMBSTONES").as_deref(),
Ok("1") | Ok("on") | Ok("true")
Ok("0") | Ok("off") | Ok("false")
)
})
}
Expand Down
Loading