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/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ generic std gap is planned here even when moq never calls it.
- [Comparing pointers to arrays of other values than bytes](/quest/m3/ts-array-ref-identity.md) - `ptr::eq` of pointers to a `[T; N]` of non-bytes translates, as a slice lends them too
- [An Arc's pointer](/quest/m3/ts-arc-pointers.md) - `Arc::as_ptr` and `Rc::as_ptr` translate, comparable by `ptr::addr_eq`
- [The rest of a vector's methods](/quest/m3/ts-vec-rest.md) - `try_reserve`, a deque's rotations and searches, and `Vec::splice` translate
- [Type errors at the Rust that made them](/quest/m3/ts-span-precision.md) - a `tsc` error on output names the tail expression or call argument that made it
- [Fresh writes beside a zipped iterator that points at a part](/quest/m3/ts-fresh-shapes.md) - zipping slots with a `Vec<[T; N]>`, `vec![row; n]`, or `copied` of what the slot holds translates
- [Fresh writes through a vector's own accessors](/quest/m3/ts-fresh-vec-access.md) - a whole write into a vector's element stays fresh through a shared borrow, `first_mut`, a by-value array `for`, and a byte-holding collect
- [Python's wake on the loop's own thread](/quest/m3/ffi-python-wake.md) - a wake on the event loop's thread resumes the future with no socket pair
Expand Down
20 changes: 0 additions & 20 deletions quest/m3/ts-span-precision.md

This file was deleted.

2 changes: 1 addition & 1 deletion ts/fixtures/codec/expected/coding/varint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ export function readLeadingOnes(bufData: Uint8Array, bufStart: number, bufLen: n
}
} else if (_9 === 4) {
if (bufLen >= 5) {
_8_0 = fromHalves(((bufData[bufStart] & 7)) as rt.u32, ((bufData[bufStart + 1] << 24) | (bufData[bufStart + 2] << 16) | (bufData[bufStart + 3] << 8) | bufData[bufStart + 4]) >>> 0);
_8_0 = fromHalves((bufData[bufStart] & 7) as rt.u32, ((bufData[bufStart + 1] << 24) | (bufData[bufStart + 2] << 16) | (bufData[bufStart + 3] << 8) | bufData[bufStart + 4]) >>> 0);
_8_1Data = bufData;
_8_1Start = bufStart + 5;
_8_1Len = bufLen - 5;
Expand Down
6 changes: 3 additions & 3 deletions ts/fixtures/lang/arrays/expected/arrays.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export function maps(data: rt.ByteSlice, out: rt.ByteVec): void {
const bytes: Uint8Array = Uint8Array.of(op, op ^ 1, op ^ 2, op ^ 3);
const wide: rt.u16[] = rt.arrayMap(bytes, (b2: rt.u8): rt.u16 => {
rt.byteVecPush(seen, b2);
return ((((b2 as rt.u16)) << 8) & 0xffff) | op as rt.u16;
return (((b2 as rt.u16) << 8) & 0xffff) | op as rt.u16;
});
const narrow: Uint8Array = rt.bytesMap(wide, (w3: rt.u16): rt.u8 => {
return (w3 >> 4) & 0xff;
Expand Down Expand Up @@ -252,7 +252,7 @@ export function lent(data: rt.ByteSlice, out: rt.ByteVec): void {
}
} else if (_21 === 1) {
const _40: rt.Place<rt.u16>[] = rt.arrayPlaces(wide);
_40[0].v = rt.u16WrappingAdd(_40[0].v, (((op as rt.u16)) << 7) & 0xffff);
_40[0].v = rt.u16WrappingAdd(_40[0].v, ((op as rt.u16) << 7) & 0xffff);
const swapped = _40[0].v;
_40[0].v = _40[1].v;
_40[1].v = swapped;
Expand Down Expand Up @@ -391,7 +391,7 @@ export function asSlices(data: rt.ByteSlice, out: rt.ByteVec): void {
const all: rt.u32[][] = pairs;
const _93: rt.usize = rt.usizeRem(i, 2);
rt.idx(all, _93);
rt.sliceCopyFromSlice(all[_93], [op as rt.u32, (((op as rt.u32)) << 20) >>> 0]);
rt.sliceCopyFromSlice(all[_93], [op as rt.u32, ((op as rt.u32) << 20) >>> 0]);
rt.sliceSwap(all, 0, 1);
} else if (_22 === 5) {
const _108: rt.u16[] = [];
Expand Down
4 changes: 2 additions & 2 deletions ts/fixtures/lang/boxes/expected/boxes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ export function boxes(kind: rt.u8, data: rt.ByteSlice, out: rt.ByteVec): void {
} else if (_15 === 4) {
const pairs: [rt.u8, rt.u16][] = rt.iterToArray(rt.iterMap(rt.iterSlice(rt.byteSliceView(data2)), (_2: rt.u8): [rt.u8, rt.u16] => {
const b2: rt.u8 = _2;
return [b2, (((b2 as rt.u16)) << 4) & 0xffff] as [rt.u8, rt.u16];
return [b2, ((b2 as rt.u16) << 4) & 0xffff] as [rt.u8, rt.u16];
}), undefined, 4, true);
const boxed3: [rt.u8, rt.u16][] = rt.sliceRange(pairs, 0).map(copy$tuple2_u8_u16);
const iter3: rt.Iter<[rt.u8, rt.u16]> = rt.iterSlice(boxed3);
Expand Down Expand Up @@ -823,7 +823,7 @@ export function impls(kind: rt.u8, data: rt.ByteSlice, out: rt.ByteVec): void {
return rt.u16Mul(_216 as rt.u16, 257);
}), undefined, 2, true);
const v: rt.u16[] = rt.iterToArray(rt.iterMap(rt.iterSlice(rt.byteSliceView(rt.byteSliceRange(data2, 0, rt.usizeSub(data2.length, half)))), (_218: rt.u8): rt.u16 => {
return (((_218 as rt.u16)) << 3) & 0xffff;
return ((_218 as rt.u16) << 3) & 0xffff;
}), undefined, 2, true);
w = rt.boxSliceCloneFrom(w, v);
w.reverse();
Expand Down
20 changes: 10 additions & 10 deletions ts/fixtures/lang/capacity/expected/capacity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export function vecSteps$array160_u64(dataData: Uint8Array, dataStart: number, d
} else if (_42 === 8) {
rt.vecInsert(v, rt.usizeRem(arg as rt.usize, rt.usizeAdd(v.length, 1)), copy$array_u64(make(arg)));
} else if (_42 === 9) {
if (!((v.length === 0))) {
if (!(v.length === 0)) {
rt.vecRemove(v, rt.usizeRem(arg as rt.usize, v.length));
Known.loose(k);
}
Expand Down Expand Up @@ -184,7 +184,7 @@ export function vecSteps$array160_u64(dataData: Uint8Array, dataStart: number, d
v = old;
Known.put(Known.new(0), out, taken.length, rt.vecCapacity(taken, 1280));
} else if (_42 === 21) {
if (!((v.length === 0))) {
if (!(v.length === 0)) {
rt.vecSwapRemove(v, rt.usizeRem(arg as rt.usize, v.length));
Known.loose(k);
}
Expand Down Expand Up @@ -330,7 +330,7 @@ export function vecSteps$tuple2_u64_u8(dataData: Uint8Array, dataStart: number,
} else if (_42 === 8) {
rt.vecInsert(v, rt.usizeRem(arg as rt.usize, rt.usizeAdd(v.length, 1)), copy$tuple2_u64_u8(make(arg)));
} else if (_42 === 9) {
if (!((v.length === 0))) {
if (!(v.length === 0)) {
rt.vecRemove(v, rt.usizeRem(arg as rt.usize, v.length));
Known.loose(k);
}
Expand Down Expand Up @@ -393,7 +393,7 @@ export function vecSteps$tuple2_u64_u8(dataData: Uint8Array, dataStart: number,
v = old;
Known.put(Known.new(0), out, taken.length, rt.vecCapacity(taken, 16));
} else if (_42 === 21) {
if (!((v.length === 0))) {
if (!(v.length === 0)) {
rt.vecSwapRemove(v, rt.usizeRem(arg as rt.usize, v.length));
Known.loose(k);
}
Expand Down Expand Up @@ -539,7 +539,7 @@ export function vecSteps$u16(dataData: Uint8Array, dataStart: number, dataLen: n
} else if (_42 === 8) {
rt.vecInsert(v, rt.usizeRem(arg as rt.usize, rt.usizeAdd(v.length, 1)), make(arg));
} else if (_42 === 9) {
if (!((v.length === 0))) {
if (!(v.length === 0)) {
rt.vecRemove(v, rt.usizeRem(arg as rt.usize, v.length));
Known.loose(k);
}
Expand Down Expand Up @@ -602,7 +602,7 @@ export function vecSteps$u16(dataData: Uint8Array, dataStart: number, dataLen: n
v = old;
Known.put(Known.new(0), out, taken.length, rt.vecCapacity(taken, 2));
} else if (_42 === 21) {
if (!((v.length === 0))) {
if (!(v.length === 0)) {
rt.vecSwapRemove(v, rt.usizeRem(arg as rt.usize, v.length));
Known.loose(k);
}
Expand Down Expand Up @@ -748,7 +748,7 @@ export function vecSteps$u8(dataData: Uint8Array, dataStart: number, dataLen: nu
} else if (_42 === 8) {
rt.byteVecInsert(v, rt.usizeRem(arg as rt.usize, rt.usizeAdd(v.length, 1)), make(arg));
} else if (_42 === 9) {
if (!((v.length === 0))) {
if (!(v.length === 0)) {
rt.byteVecRemove(v, rt.usizeRem(arg as rt.usize, v.length));
Known.loose(k);
}
Expand Down Expand Up @@ -809,7 +809,7 @@ export function vecSteps$u8(dataData: Uint8Array, dataStart: number, dataLen: nu
v = old;
Known.put(Known.new(0), out, taken.length, taken.data.length);
} else if (_42 === 21) {
if (!((v.length === 0))) {
if (!(v.length === 0)) {
rt.byteVecSwapRemove(v, rt.usizeRem(arg as rt.usize, v.length));
Known.loose(k);
}
Expand Down Expand Up @@ -958,7 +958,7 @@ export function vecSteps$unit(dataData: Uint8Array, dataStart: number, dataLen:
make(arg);
rt.vecInsert(_88, _89, undefined);
} else if (_42 === 9) {
if (!((v.length === 0))) {
if (!(v.length === 0)) {
rt.vecRemove(v, rt.usizeRem(arg as rt.usize, v.length));
Known.loose(k);
}
Expand Down Expand Up @@ -1023,7 +1023,7 @@ export function vecSteps$unit(dataData: Uint8Array, dataStart: number, dataLen:
v = old;
Known.put(Known.new(0), out, taken.length, rt.vecCapacity(taken, 0));
} else if (_42 === 21) {
if (!((v.length === 0))) {
if (!(v.length === 0)) {
rt.vecSwapRemove(v, rt.usizeRem(arg as rt.usize, v.length));
Known.loose(k);
}
Expand Down
2 changes: 1 addition & 1 deletion ts/fixtures/lang/chars/expected/chars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export function scalars(data: rt.ByteSlice): rt.u32[] {
const all: rt.u32[] = rt.vecExact([0, 127, 128, 255, 256, 2047, 2048, 55295, 55296, 56319, 56320, 57343, 57344, 65533, 65535, 65536, 1114109, 1114111, 1114112, 4294967295].slice(), 4);
let rest: rt.ByteSlice = data;
while (true) {
if (!((rest.length === 0))) {
if (!(rest.length === 0)) {
const buf: Uint8Array = rt.bytes(4);
const n: rt.usize = rt.min(rest.length, 4);
rt.byteSliceCopyFromSlice(rt.byteSliceRange(rt.byteSliceFrom(buf), 0, n), rt.byteSliceRange(rest, 0, n));
Expand Down
2 changes: 1 addition & 1 deletion ts/fixtures/lang/collections/expected/collections.Rank.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export function eq$cmp_PartialEq(self: Rank, other: Rank): boolean {
}
} else if (self.tag === "High") {
if (other.tag === "High") {
if (!((self.x === other.x))) {
if (!(self.x === other.x)) {
return false;
}
return self.y === other.y;
Expand Down
4 changes: 2 additions & 2 deletions ts/fixtures/lang/collections/expected/collections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -961,7 +961,7 @@ export function deques(data: rt.ByteSlice, out: rt.ByteVec): void {
rt.dequeReserve(touch(q), 1);
rt.byteVecPush(out, q.n & 0xff);
rt.iterExtendBytes(out, rt.iterRev(rt.dequeIter(q)), undefined, true);
if (!((q.n === 0))) {
if (!(q.n === 0)) {
rt.byteVecPush(out, rt.dequeIndex(q, rt.usizeDiv(q.n, 2)));
}
rt.dequeRetain(q, (b4: rt.u8): boolean => {
Expand Down Expand Up @@ -4731,7 +4731,7 @@ export function partialCmp$cmp_PartialOrd_boxed_Box_collections_Boxed(self: Boxe
*/
export function refOrders(_kind: rt.u8, data: rt.ByteSlice, out: rt.ByteVec): void {
let data2!: rt.ByteSlice;
if (!((data.length === 0))) {
if (!(data.length === 0)) {
data2 = data;
} else {
data2 = rt.byteSliceRange(rt.byteSliceFrom(Uint8Array.of(0)), 0);
Expand Down
2 changes: 1 addition & 1 deletion ts/fixtures/lang/combinators/expected/combinators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export function options(a: rt.u8 | undefined, b: rt.u8 | undefined, limit: rt.u8
}) !== undefined ? 1 : 0);
push(result_map$132mdj8(option_okOrElse$1v98j0a(b, (): rt.u16 => {
rt.byteVecPush(out, 167);
return (((limit as rt.u16)) << 1) & 0xffff;
return ((limit as rt.u16) << 1) & 0xffff;
}), (x10: rt.u8): rt.u8 => {
return x10 ^ limit;
}), out);
Expand Down
4 changes: 2 additions & 2 deletions ts/fixtures/lang/conversions/expected/conversions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export function put$conversions_Value_String(self: string, out: rt.ByteVec): voi
/** The value `data` makes from `at`. */
export function make$conversions_Value_Option_u16(data: rt.ByteSlice, at: rt.usize): rt.u16 | undefined {
const b: rt.u8 = byte(data, at);
return thenSome$0b23a33(rt.u8Rem(b, 4) !== 0, (((b as rt.u16)) << 4) & 0xffff);
return thenSome$0b23a33(rt.u8Rem(b, 4) !== 0, ((b as rt.u16) << 4) & 0xffff);
}

/** Its bytes. */
Expand Down Expand Up @@ -129,7 +129,7 @@ export function put$conversions_Value_array40_u8(self: rt.ByteSlice, out: rt.Byt

/** The value `data` makes from `at`. */
export function make$conversions_Value_array2_u32(data: rt.ByteSlice, at: rt.usize): rt.u32[] {
return [rt.u8Rem(byte(data, at), 4) as rt.u32, (((byte(data, rt.usizeAdd(at, 1)) as rt.u32)) << 20) >>> 0];
return [rt.u8Rem(byte(data, at), 4) as rt.u32, ((byte(data, rt.usizeAdd(at, 1)) as rt.u32) << 20) >>> 0];
}

/** Its bytes. */
Expand Down
Loading