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: 0 additions & 1 deletion quest/m3/ts-unsafe/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,4 @@ Public API: the translator's output.
## Required

- [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
- [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
19 changes: 0 additions & 19 deletions quest/m3/ts-unsafe/nonzero-unchecked-ops.md

This file was deleted.

4 changes: 2 additions & 2 deletions ts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,8 @@ Each integer's inherent methods are std's, and a `NonZero`'s, a `Wrapping`'s, an
`Saturating`'s are its integer's, as std defines them: a `Wrapping`'s `pow` is
`wrapping_pow`. `pow` and `abs` panic on overflow as a debug build's do. An `unchecked_`
method and `NonZero::new_unchecked` are their checked form, `rs.precondition(rs.u32CheckedAdd(a, b), ...)`,
which aborts where it gives `None` as a debug build's check of the precondition does; a
`NonZero`'s own `unchecked_` methods are refused. Those the operators
which aborts where it gives `None` as a debug build's check of the precondition does, a
`NonZero`'s own at std's call of its integer's. Those the operators
lack are one runtime function for every width, `rs.intCheckedPow(a, n, 64, false)`, given
the width and sign, which computes on the value's `bigint`.

Expand Down
2 changes: 1 addition & 1 deletion ts/fixtures/lang/methods/caller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function methods(): Uint8Array[] {
const be = (v: bigint) => Array.from({ length: bits / 8 }, (_, i) => Number((v >> BigInt(bits - 8 - 8 * i)) & 0xffn));
const u32 = (n: number) => [n >>> 24, (n >>> 16) & 0xff, (n >>> 8) & 0xff, n & 0xff];
let i = 0;
for (let kind = 0; kind < 49; kind++) {
for (let kind = 0; kind < 51; kind++) {
for (const a of edges) {
if (exponents.has(kind)) {
for (const n of shifts) cases.push(Uint8Array.of(...o, kind, ...be(a), ...be(others[i++ % others.length]), ...u32(n)));
Expand Down
Loading