From 866173af5e99ce0a7767a03732f6bdc7b1422d43 Mon Sep 17 00:00:00 2001 From: Luke Curley <432854+kixelated@users.noreply.github.com> Date: Fri, 6 Nov 2026 23:16:56 -0800 Subject: [PATCH 1/2] chore(quest): claim quest/m3/ts-unsafe/binary-heap-mir.md Quest-Claim: 28367262a3ae75b7 From 63d2c1649f941be9be7790214f8402987ce3bfec Mon Sep 17 00:00:00 2001 From: Luke Curley <432854+kixelated@users.noreply.github.com> Date: Sat, 7 Nov 2026 06:40:10 -0800 Subject: [PATCH 2/2] quest(m3): delete BinaryHeap from std's MIR, keeping the runtime's port std's BinaryHeap needs std structs and writing std functions translated from MIR, which the translator refuses, and Hole's pointer arithmetic into arrays of objects, which the epic's 2026-11-01 decision refuses. The port follows std's sifts line for line and is tested against native on every `just ci`. Co-Authored-By: Claude Opus 5.5 --- quest/m3/ts-unsafe/README.md | 1 - quest/m3/ts-unsafe/binary-heap-mir.md | 17 ----------------- 2 files changed, 18 deletions(-) delete mode 100644 quest/m3/ts-unsafe/binary-heap-mir.md diff --git a/quest/m3/ts-unsafe/README.md b/quest/m3/ts-unsafe/README.md index 8ec3e33af..11ff98295 100644 --- a/quest/m3/ts-unsafe/README.md +++ b/quest/m3/ts-unsafe/README.md @@ -75,7 +75,6 @@ Public API: the translator's output. - [A raw pointer behind a reference](/quest/m3/ts-unsafe/raw-behind-ref.md) - `&raw const *r` of a value JS copies points where the reference came from - [Vec::from_raw_parts of a typed allocation](/quest/m3/ts-unsafe/vec-from-raw-parts.md) - a `Vec` adopts an `alloc`ed array of `T`s, with its length, capacity, and drops - [Vec::drain from std's MIR](/quest/m3/ts-unsafe/vec-drain-mir.md) - std's `Drain` translates, replacing the runtime's port -- [BinaryHeap from std's MIR](/quest/m3/ts-unsafe/binary-heap-mir.md) - std's `BinaryHeap` and `PeekMut` translate, replacing the runtime's port - [Unchecked integer operations](/quest/m3/ts-unsafe/unchecked-ops.md) - `unchecked_*` and `NonZero::new_unchecked` translate, aborting on a violated precondition - [NonZero's unchecked arithmetic](/quest/m3/ts-unsafe/nonzero-unchecked-ops.md) - `NonZero::unchecked_add` and `unchecked_mul` translate, aborting at std's site - [UnsafeCell's raw accessors](/quest/m3/ts-unsafe/unsafecell.md) - `UnsafeCell::raw_get`, `from_mut`, and `replace` translate diff --git a/quest/m3/ts-unsafe/binary-heap-mir.md b/quest/m3/ts-unsafe/binary-heap-mir.md deleted file mode 100644 index 486400026..000000000 --- a/quest/m3/ts-unsafe/binary-heap-mir.md +++ /dev/null @@ -1,17 +0,0 @@ -# [M] BinaryHeap from std's MIR - -## Goal - -[rust2-ts](/ts/README.md) translates `BinaryHeap` and `PeekMut` from std's MIR, whose -`Hole` moves elements through raw pointers into the `Vec`'s storage, replacing -`rs.BinaryHeap` and `rs.PeekMut`, the hand-written port of std's sifts that -[#252](https://github.com/moq-dev/rust2/pull/252) mapped them to -(`ts/src/lower/collections.rs`). The lang fixture's `orders` differential case proves it -still matches std's comparisons, pop order, and drops. - -## Plan - -No consumer at the moq pin; the port works but must track std by hand. The B-tree port of -[#577](https://github.com/moq-dev/rust2/pull/577) is the precedent. - -Public API: the translator's output.