diff --git a/quest/m3/README.md b/quest/m3/README.md index c8bf71a1d..70c5cf3c3 100644 --- a/quest/m3/README.md +++ b/quest/m3/README.md @@ -30,5 +30,4 @@ generic std gap is planned here even when moq never calls it. - [A deque's two slices](/quest/m3/ts-deque-slices.md) - `VecDeque::as_slices` and `{:?}` of a deque's `Iter`, `IterMut`, and `Drain` translate, split where std's are - [LinkedList](/quest/m3/ts-linked-list.md) - `LinkedList` and its methods translate - [Zip's next_back in constant time](/quest/m3/ts-zip-back.md) - a reversed zip of random-access iterators skips the longer side's excess at once -- [Debug of Bound](/quest/m3/ts-bound-debug.md) - `{:?}` of a `Bound`, as a range's `start_bound` gives, translates - [Orderings by a crate's impl on references](/quest/m3/ts-ord-ref-impls.md) - a tuple, `Option`, or slice of `&T` orders by the crate's `PartialOrd` for `&T` diff --git a/quest/m3/ts-bound-debug.md b/quest/m3/ts-bound-debug.md deleted file mode 100644 index 37480acff..000000000 --- a/quest/m3/ts-bound-debug.md +++ /dev/null @@ -1,16 +0,0 @@ -# [XS] Debug of Bound - -## Goal - -[rust2-ts](/ts/README.md) translates `{:?}` of a `Bound` and a `Bound<&T>`, such as a -range's `start_bound()`, writing `Included(3)`, `Excluded(3)`, or `Unbounded` with the -formatter's options as std's derived `Debug` does, proven by a differential test against -native Rust. - -## Plan - -Found by [#325](https://github.com/moq-dev/rust2/pull/325), whose fixture encodes -bounds as bytes instead. Planned without a moq consumer, under the maintainer's -2026-10-27 decision that rust2 aims to support all of std. - -Public API: the translator's output. diff --git a/ts/README.md b/ts/README.md index 89c520ac4..5fd8f3163 100644 --- a/ts/README.md +++ b/ts/README.md @@ -213,7 +213,8 @@ std's Unicode tables, which the runtime carries, not the engine's. `Debug` of st collections writes their items in the order each iterates, a hash map's or set's included, and of their iterators and `Chars` the items each has left, in std's wrapper; a deque's `Iter` and `IterMut`, which write its buffer's two halves, and its `Drain`, which writes its -counts, are refused. A caller prints a +counts, are refused. `Debug` of `Bound`, `Ordering`, `Reverse`, and `ControlFlow` is +their derived one, whichever way each is held. A caller prints a `printable` type as `to_string()` and `format!("{err:?}")` would: `rt.fmtToString((f) => DecodeError.fmt$Display(err, f))` and `rt.fmtFormat([(f) => DecodeError.fmt$Debug(err, f)])`, after diff --git a/ts/fixtures/lang/expected/fmt.ts b/ts/fixtures/lang/expected/fmt.ts index 5a699c281..4157def3e 100644 --- a/ts/fixtures/lang/expected/fmt.ts +++ b/ts/fixtures/lang/expected/fmt.ts @@ -808,6 +808,182 @@ export function collections(data: rt.ByteSlice, out: rt.ByteVec): void { put(out, rt.fmtFormat([args16[0], "|", rt.fmtSpec({ alternate: true }, args16[0]), "|", rt.fmtSpec({ align: ">", width: 3 }, args16[0]), "|", args16[1], "|", rt.fmtSpec({ alternate: true }, args16[1]), "|", rt.fmtSpec({ alternate: true, zero: true, debugHex: "x", width: 4 }, args16[1])])); } +/** + * `Debug` of std's enums beside its ranges and comparisons, each derived: a variant with + * a field passes the options to it, and one without writes its name unpadded. A + * `ControlFlow` that `?` would break with holds the `Err` or `None` it was applied to. + */ +export function enums(data: rt.ByteSlice, out: rt.ByteVec): void { + let flow!: rt.Result; + let unit!: rt.Result; + let erred!: rt.Result; + let none!: rt.u8 | undefined; + let unitNone!: undefined | rt.None; + const at: (a0: rt.usize) => rt.u8 = (i: rt.usize): rt.u8 => { + return unwrapOr$0r2bmpr(rt.byteSliceGet(data, i), 0); + }; + const w: rt.usize = rt.u8Rem(at(0), 10) as rt.usize; + const n: rt.RangeBound = pick$u8(at(1), at(2)); + const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtBound(n, f, rt.u8Debug), rt.fmtCount(w)]; + put(out, rt.fmtFormat([args2[0], "|", rt.fmtSpec({ alternate: true }, args2[0]), "|", rt.fmtSpec({ debugHex: "x" }, args2[0]), "|", rt.fmtSpec({ alternate: true, debugHex: "X" }, args2[0]), "|", rt.fmtSpec({ align: ">", width: rt.fmtCountOf(args2[1]) }, args2[0]), "|", rt.fmtSpec({ fill: "_", align: "^", width: 7 }, args2[0]), "|", rt.fmtSpec({ plus: true, zero: true, width: 4 }, args2[0])])); + const _32: rt.u8 = at(3); + const _37: rt.usize = rt.usizeRem(at(4) as rt.usize, ["", "a", "héllo", "日本語", "tab\tnew\nline\r", "quote\"back\\slash'", "\u0000\u0001\u001f", "€Ÿ ­", "é", "‍ᅟ\u2028 ", "͸􏿽𽀀𿱀", "😀 🇦", "゙゚ン", "{}"].length); + if (!(_37 < 14)) { + rt.panic("index out of bounds: the len is " + 14 + " but the index is " + _37); + } + const s: rt.RangeBound = pick$str(_32, ["", "a", "héllo", "日本語", "tab\tnew\nline\r", "quote\"back\\slash'", "\u0000\u0001\u001f", "€Ÿ ­", "é", "‍ᅟ\u2028 ", "͸􏿽𽀀𿱀", "😀 🇦", "゙゚ン", "{}"][_37]); + const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtBound(s, f, rt.fmtStr), rt.fmtCount(w)]; + put(out, rt.fmtFormat([args4[0], "|", rt.fmtSpec({ alternate: true }, args4[0]), "|", rt.fmtSpec({ align: ">", width: 9 }, args4[0]), "|", rt.fmtSpec({ fill: "*", align: "<", width: rt.fmtCountOf(args4[1]), precision: 2 }, args4[0])])); + const part = pick$char(at(5), at(6) as rt.char); + const args6: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtBound(part, f, rt.fmtCharDebug)]; + put(out, rt.fmtFormat([args6[0], "|", rt.fmtSpec({ alternate: true }, args6[0]), "|", rt.fmtSpec({ align: "^", width: 6 }, args6[0])])); + const part2 = pick$Option_u8(at(7), thenSome$0d5am30(rt.u8Rem(at(8), 2) === 0, at(9))); + const args8: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtBound(part2, f, (value: rt.u8 | undefined, f: rt.Formatter) => rt.fmtOption(value, f, rt.u8Debug))]; + put(out, rt.fmtFormat([args8[0], "|", rt.fmtSpec({ alternate: true }, args8[0]), "|", rt.fmtSpec({ debugHex: "x" }, args8[0]), "|", rt.fmtSpec({ align: ">", width: 4 }, args8[0])])); + const part4 = pick$u8s(at(10), rt.byteSliceRange(data, 0, rt.min(data.length, 3))); + const args10: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtBound(part4, f, (value: rt.ByteSlice, f: rt.Formatter) => rt.fmtList(rt.byteSliceView(value), f, rt.u8Debug))]; + put(out, rt.fmtFormat([args10[0], "|", rt.fmtSpec({ alternate: true }, args10[0]), "|", rt.fmtSpec({ debugHex: "x" }, args10[0]), "|", rt.fmtSpec({ width: 3 }, args10[0])])); + const _128: rt.u8 = at(11); + const _134: rt.usize = rt.usizeRem(at(12) as rt.usize, ["", "a", "héllo", "日本語", "tab\tnew\nline\r", "quote\"back\\slash'", "\u0000\u0001\u001f", "€Ÿ ­", "é", "‍ᅟ\u2028 ", "͸􏿽𽀀𿱀", "😀 🇦", "゙゚ン", "{}"].length); + if (!(_134 < 14)) { + rt.panic("index out of bounds: the len is " + 14 + " but the index is " + _134); + } + const clip: rt.RangeBound = pick$Clip(_128, { _0: ["", "a", "héllo", "日本語", "tab\tnew\nline\r", "quote\"back\\slash'", "\u0000\u0001\u001f", "€Ÿ ­", "é", "‍ᅟ\u2028 ", "͸􏿽𽀀𿱀", "😀 🇦", "゙゚ン", "{}"][_134] }); + const _152: rt.RangeBound = clip; + const _155: rt.RangeBound | undefined = clip; + const _157: [rt.RangeBound, rt.RangeBound] = [n, s]; + const args12: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtBound(_152, f, (value: Clip.Clip, f: rt.Formatter) => Clip.fmt$Debug(value, f)), (f: rt.Formatter) => rt.fmtOption(_155, f, (value: rt.RangeBound, f: rt.Formatter) => rt.fmtBound(value, f, (value: Clip.Clip, f: rt.Formatter) => Clip.fmt$Debug(value, f))), (f: rt.Formatter) => rt.fmtTuple([(f: rt.Formatter) => rt.fmtBound(_157[0], f, rt.u8Debug), (f: rt.Formatter) => rt.fmtBound(_157[1], f, rt.fmtStr)], f)]; + put(out, rt.fmtFormat([rt.fmtSpec({ width: 8, precision: 2 }, args12[0]), "|", rt.fmtSpec({ alternate: true }, args12[1]), "|", args12[2]])); + const r: rt.RangeInclusive = new rt.RangeInclusive(at(1), at(2), rt.u8Step); + const _179: rt.RangeBound = rt.rangeInclusiveStartBound(r) as rt.RangeBound; + const _182: rt.RangeBound = rt.rangeInclusiveEndBound(r) as rt.RangeBound; + new rt.RangeFrom(at(1), rt.u8Step); + const _185: rt.RangeBound = { tag: "Unbounded" } as rt.RangeBound; + const _192: rt.RangeBound = { tag: "Excluded", _0: { end: at(2) }.end } as rt.RangeBound; + const _199: rt.RangeBound = { tag: "Unbounded" } as rt.RangeBound; + const args14: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtBound(_179, f, rt.u8Debug), (f: rt.Formatter) => rt.fmtBound(_182, f, rt.u8Debug), (f: rt.Formatter) => rt.fmtBound(_185, f, rt.u8Debug), (f: rt.Formatter) => rt.fmtBound(_192, f, rt.u8Debug), (f: rt.Formatter) => rt.fmtBound(_199, f, rt.u8Debug)]; + put(out, rt.fmtFormat([args14[0], " ", args14[1], " ", args14[2], " ", rt.fmtSpec({ debugHex: "x" }, args14[3]), " ", rt.fmtSpec({ alternate: true }, args14[4])])); + const ord: rt.Ordering = rt.cmp(at(1), at(2)); + const all: rt.Ordering[] = [-1, 0, 1]; + const args16: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtOrdering(ord, f), (f: rt.Formatter) => rt.fmtList(all, f, rt.fmtOrdering)]; + put(out, rt.fmtFormat([args16[0], "|", rt.fmtSpec({ align: ">", width: 8 }, args16[0]), "|", rt.fmtSpec({ alternate: true }, args16[0]), "|", args16[1], "|", rt.fmtSpec({ alternate: true }, args16[1])])); + const rev: rt.u8 = at(1); + const _244: rt.usize = rt.usizeRem(at(4) as rt.usize, ["", "a", "héllo", "日本語", "tab\tnew\nline\r", "quote\"back\\slash'", "\u0000\u0001\u001f", "€Ÿ ­", "é", "‍ᅟ\u2028 ", "͸􏿽𽀀𿱀", "😀 🇦", "゙゚ン", "{}"].length); + if (!(_244 < 14)) { + rt.panic("index out of bounds: the len is " + 14 + " but the index is " + _244); + } + const nested_: string = ["", "a", "héllo", "日本語", "tab\tnew\nline\r", "quote\"back\\slash'", "\u0000\u0001\u001f", "€Ÿ ­", "é", "‍ᅟ\u2028 ", "͸􏿽𽀀𿱀", "😀 🇦", "゙゚ン", "{}"][_244]; + const args18: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtDebugTupleFields(f, "Reverse", [(f: rt.Formatter) => rt.u8Debug(rev, f)]), rt.fmtCount(w), (f: rt.Formatter) => rt.fmtDebugTupleFields(f, "Reverse", [(f: rt.Formatter) => rt.fmtDebugTupleFields(f, "Reverse", [(f: rt.Formatter) => rt.fmtStr(nested_, f)])])]; + put(out, rt.fmtFormat([args18[0], "|", rt.fmtSpec({ alternate: true }, args18[0]), "|", rt.fmtSpec({ debugHex: "x" }, args18[0]), "|", rt.fmtSpec({ align: ">", width: rt.fmtCountOf(args18[1]) }, args18[0]), "|", args18[2], "|", rt.fmtSpec({ alternate: true }, args18[2])])); + const _272: rt.usize = rt.usizeRem(at(4) as rt.usize, ["", "a", "héllo", "日本語", "tab\tnew\nline\r", "quote\"back\\slash'", "\u0000\u0001\u001f", "€Ÿ ­", "é", "‍ᅟ\u2028 ", "͸􏿽𽀀𿱀", "😀 🇦", "゙゚ン", "{}"].length); + if (!(_272 < 14)) { + rt.panic("index out of bounds: the len is " + 14 + " but the index is " + _272); + } + const _271: string[] = ["", "a", "héllo", "日本語", "tab\tnew\nline\r", "quote\"back\\slash'", "\u0000\u0001\u001f", "€Ÿ ­", "é", "‍ᅟ\u2028 ", "͸􏿽𽀀𿱀", "😀 🇦", "゙゚ン", "{}"]; + if (rt.u8Rem(at(1), 2) === 0) { + flow = rt.Err(_271[_272]); + } else { + flow = rt.Ok(rt.u16Mul(at(2) as rt.u16, 300)); + } + const args20: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtControlFlow(flow, f, rt.u16Debug, rt.fmtStr), rt.fmtCount(w)]; + put(out, rt.fmtFormat([args20[0], "|", rt.fmtSpec({ alternate: true }, args20[0]), "|", rt.fmtSpec({ debugHex: "x" }, args20[0]), "|", rt.fmtSpec({ align: ">", width: rt.fmtCountOf(args20[1]) }, args20[0])])); + if (rt.u8Rem(at(1), 2) === 0) { + unit = rt.Err(at(2)); + } else { + unit = rt.OK; + } + const args22: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtControlFlow(unit, f, rt.fmtUnit, rt.u8Debug)]; + put(out, rt.fmtFormat([args22[0], "|", rt.fmtSpec({ alternate: true }, args22[0]), "|", rt.fmtSpec({ zero: true, width: 3 }, args22[0])])); + if (rt.u8Rem(at(1), 2) === 0) { + erred = rt.Err(at(2)); + } else { + erred = rt.Ok(at(2) as rt.u16); + } + const args24: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtControlFlow(erred, f, rt.u16Debug, (value: rt.Result, f: rt.Formatter) => rt.fmtResult(value, f, (value: never, _f: rt.Formatter) => rt.unreachable(value), rt.u8Debug), true)]; + put(out, rt.fmtFormat([args24[0], "|", rt.fmtSpec({ alternate: true }, args24[0]), "|", rt.fmtSpec({ align: ">", width: 5 }, args24[0])])); + if (rt.u8Rem(at(1), 2) === 0) { + none = undefined; + } else { + none = at(2); + } + if (rt.u8Rem(at(2), 2) === 0) { + unitNone = rt.None; + } else { + unitNone = undefined; + } + const args26: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtControlFlowOption(none, f, rt.u8Debug, (value: never | undefined, f: rt.Formatter) => rt.fmtOption(value, f, (value: never, _f: rt.Formatter) => rt.unreachable(value))), (f: rt.Formatter) => rt.fmtControlFlowOption(unitNone, f, rt.fmtUnit, (value: never | undefined, f: rt.Formatter) => rt.fmtOption(value, f, (value: never, _f: rt.Formatter) => rt.unreachable(value)), rt.None)]; + put(out, rt.fmtFormat([args26[0], "|", rt.fmtSpec({ alternate: true }, args26[0]), "|", rt.fmtSpec({ align: "<", width: 4 }, args26[0]), "|", args26[1], "|", rt.fmtSpec({ alternate: true }, args26[1])])); + const part5 = rt.Ok(at(2)); + const args28: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtResult(part5, f, rt.u8Debug, (value: never, _f: rt.Formatter) => rt.unreachable(value))]; + put(out, rt.fmtFormat([args28[0], "|", rt.fmtSpec({ alternate: true }, args28[0])])); +} + +export function pick$Clip(by: rt.u8, x: Clip.Clip): rt.RangeBound { + const _3: rt.u8 = rt.u8Rem(by, 3); + if (_3 === 0) { + return { tag: "Included", _0: x } as rt.RangeBound; + } + if (_3 === 1) { + return { tag: "Excluded", _0: x } as rt.RangeBound; + } + return { tag: "Unbounded" } as rt.RangeBound; +} + +export function pick$Option_u8(by: rt.u8, x: rt.u8 | undefined): rt.RangeBound { + const _3: rt.u8 = rt.u8Rem(by, 3); + if (_3 === 0) { + return { tag: "Included", _0: x } as rt.RangeBound; + } + if (_3 === 1) { + return { tag: "Excluded", _0: x } as rt.RangeBound; + } + return { tag: "Unbounded" } as rt.RangeBound; +} + +export function pick$char(by: rt.u8, x: rt.char): rt.RangeBound { + const _3: rt.u8 = rt.u8Rem(by, 3); + if (_3 === 0) { + return { tag: "Included", _0: x } as rt.RangeBound; + } + if (_3 === 1) { + return { tag: "Excluded", _0: x } as rt.RangeBound; + } + return { tag: "Unbounded" } as rt.RangeBound; +} + +export function pick$str(by: rt.u8, x: string): rt.RangeBound { + const _3: rt.u8 = rt.u8Rem(by, 3); + if (_3 === 0) { + return { tag: "Included", _0: x } as rt.RangeBound; + } + if (_3 === 1) { + return { tag: "Excluded", _0: x } as rt.RangeBound; + } + return { tag: "Unbounded" } as rt.RangeBound; +} + +export function pick$u8(by: rt.u8, x: rt.u8): rt.RangeBound { + const _3: rt.u8 = rt.u8Rem(by, 3); + if (_3 === 0) { + return { tag: "Included", _0: x } as rt.RangeBound; + } + if (_3 === 1) { + return { tag: "Excluded", _0: x } as rt.RangeBound; + } + return { tag: "Unbounded" } as rt.RangeBound; +} + +export function pick$u8s(by: rt.u8, x: rt.ByteSlice): rt.RangeBound { + const _3: rt.u8 = rt.u8Rem(by, 3); + if (_3 === 0) { + return { tag: "Included", _0: x } as rt.RangeBound; + } + if (_3 === 1) { + return { tag: "Excluded", _0: x } as rt.RangeBound; + } + return { tag: "Unbounded" } as rt.RangeBound; +} + /** * std's iterators' `Debug`, each the items it has left in its own wrapper, through each * element's `Debug` with the formatter's options: consumed from either end, empty, and diff --git a/ts/fixtures/lang/expected/harness.ts b/ts/fixtures/lang/expected/harness.ts index 99af9b2f2..59cca7b8a 100644 --- a/ts/fixtures/lang/expected/harness.ts +++ b/ts/fixtures/lang/expected/harness.ts @@ -21,7 +21,7 @@ import { dyns, shared, anys, fns } from "./dyns.ts"; import { edits, bytes as edits_bytes } from "./edits.ts"; import { eqs } from "./errors.ts"; import { floats, mulAdds, formats, parses } from "./floats.ts"; -import { ints, strings, derived, written, counts, rounding, panics, wrapped, collections, iters as fmt_iters, writes } from "./fmt.ts"; +import { ints, strings, derived, written, counts, rounding, panics, wrapped, collections, enums, iters as fmt_iters, writes } from "./fmt.ts"; import { folds } from "./folds.ts"; import { methods } from "./generics.ts"; import { values, random, bytes as hashes_bytes } from "./hashes.ts"; @@ -201,7 +201,9 @@ export function cases(): [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) fmt_iters(data72, out73); }] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["zeros::unread", unread as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["iters::range_froms", rangeFroms as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["iters::range_methods", rangeMethods as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["clones::iters", iters as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["collections::cell_eqs", cellEqs as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["iters::compares", compares as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["collections::unlike_compares", unlikeCompares as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["cycles::cycles", cycles as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["pointers::lapsed", (_2173: rt.u8, data73: rt.ByteSlice, out74: rt.ByteVec): undefined => { lapsed(data73, out74); - }] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["cows::slices", slices as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["cows::bytes", bytes as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["wraps::u8s", u8s as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["wraps::u16s", u16s as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["wraps::u32s", u32s as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["wraps::u64s", u64s as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["wraps::u128s", u128s as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["wraps::usizes", usizes as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["wraps::i8s", i8s as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["wraps::i16s", i16s as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["wraps::i32s", i32s as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["wraps::i64s", i64s as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["wraps::i128s", i128s as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["wraps::isizes", isizes as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined]]; + }] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["cows::slices", slices as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["cows::bytes", bytes as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["wraps::u8s", u8s as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["wraps::u16s", u16s as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["wraps::u32s", u32s as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["wraps::u64s", u64s as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["wraps::u128s", u128s as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["wraps::usizes", usizes as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["wraps::i8s", i8s as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["wraps::i16s", i16s as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["wraps::i32s", i32s as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["wraps::i64s", i64s as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["wraps::i128s", i128s as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["wraps::isizes", isizes as (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined], ["fmt::enums", (_2174: rt.u8, data74: rt.ByteSlice, out75: rt.ByteVec): undefined => { + enums(data74, out75); + }] as [string, (a0: rt.u8, a1: rt.ByteSlice, a2: rt.ByteVec) => undefined]]; } /** Run one case. */ diff --git a/ts/fixtures/lang/expected/iters.ts b/ts/fixtures/lang/expected/iters.ts index 65cf5c63c..c58bbe768 100644 --- a/ts/fixtures/lang/expected/iters.ts +++ b/ts/fixtures/lang/expected/iters.ts @@ -4387,9 +4387,9 @@ export function bounded$NonZero_u128(table: rt.u128[], at: rt.usize[], out: rt.B const from: rt.RangeFrom = _137[0]; const to: { end: rt.u128 } = _137[1]; const through: { end: rt.u128; inclusive: true } = _137[2]; - rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([rt.rangeInclusiveStartBound(inclusive) as rt.RangeBound, rt.rangeInclusiveEndBound(inclusive) as rt.RangeBound, { tag: "Included", _0: from.start } as rt.RangeBound, { tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: to.end } as rt.RangeBound, { tag: "Included", _0: through.end } as rt.RangeBound], (bound: rt.RangeBound): rt.u8 => { - return boundOf$NonZero_u128(table, bound); - })), undefined, true); + const part = [rt.rangeInclusiveStartBound(inclusive) as rt.RangeBound, rt.rangeInclusiveEndBound(inclusive) as rt.RangeBound, { tag: "Included", _0: from.start } as rt.RangeBound, { tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: to.end } as rt.RangeBound, { tag: "Included", _0: through.end } as rt.RangeBound]; + const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtList(part, f, (value: rt.RangeBound, f: rt.Formatter) => rt.fmtBound(value, f, rt.u128Debug))]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0]])), undefined, true); return [a, b] as [rt.u128, rt.u128]; } @@ -4457,9 +4457,9 @@ export function bounded$NonZero_u64(table: rt.u64[], at: rt.usize[], out: rt.Byt const from: rt.RangeFrom = _137[0]; const to: { end: rt.u64 } = _137[1]; const through: { end: rt.u64; inclusive: true } = _137[2]; - rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([rt.rangeInclusiveStartBound(inclusive) as rt.RangeBound, rt.rangeInclusiveEndBound(inclusive) as rt.RangeBound, { tag: "Included", _0: from.start } as rt.RangeBound, { tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: to.end } as rt.RangeBound, { tag: "Included", _0: through.end } as rt.RangeBound], (bound: rt.RangeBound): rt.u8 => { - return boundOf$NonZero_u64(table, bound); - })), undefined, true); + const part = [rt.rangeInclusiveStartBound(inclusive) as rt.RangeBound, rt.rangeInclusiveEndBound(inclusive) as rt.RangeBound, { tag: "Included", _0: from.start } as rt.RangeBound, { tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: to.end } as rt.RangeBound, { tag: "Included", _0: through.end } as rt.RangeBound]; + const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtList(part, f, (value: rt.RangeBound, f: rt.Formatter) => rt.fmtBound(value, f, rt.u64Debug))]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0]])), undefined, true); return [a, b] as [rt.u64, rt.u64]; } @@ -4527,9 +4527,9 @@ export function bounded$NonZero_u8(table: rt.u8[], at: rt.usize[], out: rt.ByteV const from: rt.RangeFrom = _137[0]; const to: { end: rt.u8 } = _137[1]; const through: { end: rt.u8; inclusive: true } = _137[2]; - rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([rt.rangeInclusiveStartBound(inclusive) as rt.RangeBound, rt.rangeInclusiveEndBound(inclusive) as rt.RangeBound, { tag: "Included", _0: from.start } as rt.RangeBound, { tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: to.end } as rt.RangeBound, { tag: "Included", _0: through.end } as rt.RangeBound], (bound: rt.RangeBound): rt.u8 => { - return boundOf$NonZero_u8(table, bound); - })), undefined, true); + const part = [rt.rangeInclusiveStartBound(inclusive) as rt.RangeBound, rt.rangeInclusiveEndBound(inclusive) as rt.RangeBound, { tag: "Included", _0: from.start } as rt.RangeBound, { tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: to.end } as rt.RangeBound, { tag: "Included", _0: through.end } as rt.RangeBound]; + const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtList(part, f, (value: rt.RangeBound, f: rt.Formatter) => rt.fmtBound(value, f, rt.u8Debug))]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0]])), undefined, true); return [a, b] as [rt.u8, rt.u8]; } @@ -4597,9 +4597,9 @@ export function bounded$NonZero_usize(table: rt.usize[], at: rt.usize[], out: rt const from: rt.RangeFrom = _137[0]; const to: { end: rt.usize } = _137[1]; const through: { end: rt.usize; inclusive: true } = _137[2]; - rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([rt.rangeInclusiveStartBound(inclusive) as rt.RangeBound, rt.rangeInclusiveEndBound(inclusive) as rt.RangeBound, { tag: "Included", _0: from.start } as rt.RangeBound, { tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: to.end } as rt.RangeBound, { tag: "Included", _0: through.end } as rt.RangeBound], (bound: rt.RangeBound): rt.u8 => { - return boundOf$NonZero_usize(table, bound); - })), undefined, true); + const part = [rt.rangeInclusiveStartBound(inclusive) as rt.RangeBound, rt.rangeInclusiveEndBound(inclusive) as rt.RangeBound, { tag: "Included", _0: from.start } as rt.RangeBound, { tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: to.end } as rt.RangeBound, { tag: "Included", _0: through.end } as rt.RangeBound]; + const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtList(part, f, (value: rt.RangeBound, f: rt.Formatter) => rt.fmtBound(value, f, rt.usizeDebug))]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0]])), undefined, true); return [a, b] as [rt.usize, rt.usize]; } @@ -4667,9 +4667,9 @@ export function bounded$char(table: rt.char[], at: rt.usize[], out: rt.ByteVec): const from: rt.RangeFrom = _137[0]; const to: { end: rt.char } = _137[1]; const through: { end: rt.char; inclusive: true } = _137[2]; - rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([rt.rangeInclusiveStartBound(inclusive) as rt.RangeBound, rt.rangeInclusiveEndBound(inclusive) as rt.RangeBound, { tag: "Included", _0: from.start } as rt.RangeBound, { tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: to.end } as rt.RangeBound, { tag: "Included", _0: through.end } as rt.RangeBound], (bound: rt.RangeBound): rt.u8 => { - return boundOf$char(table, bound); - })), undefined, true); + const part = [rt.rangeInclusiveStartBound(inclusive) as rt.RangeBound, rt.rangeInclusiveEndBound(inclusive) as rt.RangeBound, { tag: "Included", _0: from.start } as rt.RangeBound, { tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: to.end } as rt.RangeBound, { tag: "Included", _0: through.end } as rt.RangeBound]; + const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtList(part, f, (value: rt.RangeBound, f: rt.Formatter) => rt.fmtBound(value, f, rt.fmtCharDebug))]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0]])), undefined, true); return [a, b] as [rt.char, rt.char]; } @@ -4737,9 +4737,9 @@ export function bounded$f32(table: rt.f32[], at: rt.usize[], out: rt.ByteVec): [ const from: rt.RangeFrom = _137[0]; const to: { end: rt.f32 } = _137[1]; const through: { end: rt.f32; inclusive: true } = _137[2]; - rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([rt.rangeInclusiveStartBound(inclusive) as rt.RangeBound, rt.rangeInclusiveEndBound(inclusive) as rt.RangeBound, { tag: "Included", _0: from.start } as rt.RangeBound, { tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: to.end } as rt.RangeBound, { tag: "Included", _0: through.end } as rt.RangeBound], (bound: rt.RangeBound): rt.u8 => { - return boundOf$f32(table, bound); - })), undefined, true); + const part = [rt.rangeInclusiveStartBound(inclusive) as rt.RangeBound, rt.rangeInclusiveEndBound(inclusive) as rt.RangeBound, { tag: "Included", _0: from.start } as rt.RangeBound, { tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: to.end } as rt.RangeBound, { tag: "Included", _0: through.end } as rt.RangeBound]; + const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtList(part, f, (value: rt.RangeBound, f: rt.Formatter) => rt.fmtBound(value, f, rt.f32Debug))]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0]])), undefined, true); return [a, b] as [rt.f32, rt.f32]; } @@ -4807,9 +4807,9 @@ export function bounded$f64(table: rt.f64[], at: rt.usize[], out: rt.ByteVec): [ const from: rt.RangeFrom = _137[0]; const to: { end: rt.f64 } = _137[1]; const through: { end: rt.f64; inclusive: true } = _137[2]; - rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([rt.rangeInclusiveStartBound(inclusive) as rt.RangeBound, rt.rangeInclusiveEndBound(inclusive) as rt.RangeBound, { tag: "Included", _0: from.start } as rt.RangeBound, { tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: to.end } as rt.RangeBound, { tag: "Included", _0: through.end } as rt.RangeBound], (bound: rt.RangeBound): rt.u8 => { - return boundOf$f64(table, bound); - })), undefined, true); + const part = [rt.rangeInclusiveStartBound(inclusive) as rt.RangeBound, rt.rangeInclusiveEndBound(inclusive) as rt.RangeBound, { tag: "Included", _0: from.start } as rt.RangeBound, { tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: to.end } as rt.RangeBound, { tag: "Included", _0: through.end } as rt.RangeBound]; + const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtList(part, f, (value: rt.RangeBound, f: rt.Formatter) => rt.fmtBound(value, f, rt.f64Debug))]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0]])), undefined, true); return [a, b] as [rt.f64, rt.f64]; } @@ -4877,9 +4877,9 @@ export function bounded$i128(table: rt.i128[], at: rt.usize[], out: rt.ByteVec): const from: rt.RangeFrom = _137[0]; const to: { end: rt.i128 } = _137[1]; const through: { end: rt.i128; inclusive: true } = _137[2]; - rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([rt.rangeInclusiveStartBound(inclusive) as rt.RangeBound, rt.rangeInclusiveEndBound(inclusive) as rt.RangeBound, { tag: "Included", _0: from.start } as rt.RangeBound, { tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: to.end } as rt.RangeBound, { tag: "Included", _0: through.end } as rt.RangeBound], (bound: rt.RangeBound): rt.u8 => { - return boundOf$i128(table, bound); - })), undefined, true); + const part = [rt.rangeInclusiveStartBound(inclusive) as rt.RangeBound, rt.rangeInclusiveEndBound(inclusive) as rt.RangeBound, { tag: "Included", _0: from.start } as rt.RangeBound, { tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: to.end } as rt.RangeBound, { tag: "Included", _0: through.end } as rt.RangeBound]; + const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtList(part, f, (value: rt.RangeBound, f: rt.Formatter) => rt.fmtBound(value, f, rt.i128Debug))]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0]])), undefined, true); return [a, b] as [rt.i128, rt.i128]; } @@ -4947,9 +4947,9 @@ export function bounded$i16(table: rt.i16[], at: rt.usize[], out: rt.ByteVec): [ const from: rt.RangeFrom = _137[0]; const to: { end: rt.i16 } = _137[1]; const through: { end: rt.i16; inclusive: true } = _137[2]; - rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([rt.rangeInclusiveStartBound(inclusive) as rt.RangeBound, rt.rangeInclusiveEndBound(inclusive) as rt.RangeBound, { tag: "Included", _0: from.start } as rt.RangeBound, { tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: to.end } as rt.RangeBound, { tag: "Included", _0: through.end } as rt.RangeBound], (bound: rt.RangeBound): rt.u8 => { - return boundOf$i16(table, bound); - })), undefined, true); + const part = [rt.rangeInclusiveStartBound(inclusive) as rt.RangeBound, rt.rangeInclusiveEndBound(inclusive) as rt.RangeBound, { tag: "Included", _0: from.start } as rt.RangeBound, { tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: to.end } as rt.RangeBound, { tag: "Included", _0: through.end } as rt.RangeBound]; + const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtList(part, f, (value: rt.RangeBound, f: rt.Formatter) => rt.fmtBound(value, f, rt.i16Debug))]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0]])), undefined, true); return [a, b] as [rt.i16, rt.i16]; } @@ -5017,9 +5017,9 @@ export function bounded$i32(table: rt.i32[], at: rt.usize[], out: rt.ByteVec): [ const from: rt.RangeFrom = _137[0]; const to: { end: rt.i32 } = _137[1]; const through: { end: rt.i32; inclusive: true } = _137[2]; - rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([rt.rangeInclusiveStartBound(inclusive) as rt.RangeBound, rt.rangeInclusiveEndBound(inclusive) as rt.RangeBound, { tag: "Included", _0: from.start } as rt.RangeBound, { tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: to.end } as rt.RangeBound, { tag: "Included", _0: through.end } as rt.RangeBound], (bound: rt.RangeBound): rt.u8 => { - return boundOf$i32(table, bound); - })), undefined, true); + const part = [rt.rangeInclusiveStartBound(inclusive) as rt.RangeBound, rt.rangeInclusiveEndBound(inclusive) as rt.RangeBound, { tag: "Included", _0: from.start } as rt.RangeBound, { tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: to.end } as rt.RangeBound, { tag: "Included", _0: through.end } as rt.RangeBound]; + const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtList(part, f, (value: rt.RangeBound, f: rt.Formatter) => rt.fmtBound(value, f, rt.i32Debug))]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0]])), undefined, true); return [a, b] as [rt.i32, rt.i32]; } @@ -5087,9 +5087,9 @@ export function bounded$i64(table: rt.i64[], at: rt.usize[], out: rt.ByteVec): [ const from: rt.RangeFrom = _137[0]; const to: { end: rt.i64 } = _137[1]; const through: { end: rt.i64; inclusive: true } = _137[2]; - rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([rt.rangeInclusiveStartBound(inclusive) as rt.RangeBound, rt.rangeInclusiveEndBound(inclusive) as rt.RangeBound, { tag: "Included", _0: from.start } as rt.RangeBound, { tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: to.end } as rt.RangeBound, { tag: "Included", _0: through.end } as rt.RangeBound], (bound: rt.RangeBound): rt.u8 => { - return boundOf$i64(table, bound); - })), undefined, true); + const part = [rt.rangeInclusiveStartBound(inclusive) as rt.RangeBound, rt.rangeInclusiveEndBound(inclusive) as rt.RangeBound, { tag: "Included", _0: from.start } as rt.RangeBound, { tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: to.end } as rt.RangeBound, { tag: "Included", _0: through.end } as rt.RangeBound]; + const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtList(part, f, (value: rt.RangeBound, f: rt.Formatter) => rt.fmtBound(value, f, rt.i64Debug))]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0]])), undefined, true); return [a, b] as [rt.i64, rt.i64]; } @@ -5157,9 +5157,9 @@ export function bounded$i8(table: rt.i8[], at: rt.usize[], out: rt.ByteVec): [rt const from: rt.RangeFrom = _137[0]; const to: { end: rt.i8 } = _137[1]; const through: { end: rt.i8; inclusive: true } = _137[2]; - rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([rt.rangeInclusiveStartBound(inclusive) as rt.RangeBound, rt.rangeInclusiveEndBound(inclusive) as rt.RangeBound, { tag: "Included", _0: from.start } as rt.RangeBound, { tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: to.end } as rt.RangeBound, { tag: "Included", _0: through.end } as rt.RangeBound], (bound: rt.RangeBound): rt.u8 => { - return boundOf$i8(table, bound); - })), undefined, true); + const part = [rt.rangeInclusiveStartBound(inclusive) as rt.RangeBound, rt.rangeInclusiveEndBound(inclusive) as rt.RangeBound, { tag: "Included", _0: from.start } as rt.RangeBound, { tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: to.end } as rt.RangeBound, { tag: "Included", _0: through.end } as rt.RangeBound]; + const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtList(part, f, (value: rt.RangeBound, f: rt.Formatter) => rt.fmtBound(value, f, rt.i8Debug))]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0]])), undefined, true); return [a, b] as [rt.i8, rt.i8]; } @@ -5227,9 +5227,9 @@ export function bounded$isize(table: rt.isize[], at: rt.usize[], out: rt.ByteVec const from: rt.RangeFrom = _137[0]; const to: { end: rt.isize } = _137[1]; const through: { end: rt.isize; inclusive: true } = _137[2]; - rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([rt.rangeInclusiveStartBound(inclusive) as rt.RangeBound, rt.rangeInclusiveEndBound(inclusive) as rt.RangeBound, { tag: "Included", _0: from.start } as rt.RangeBound, { tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: to.end } as rt.RangeBound, { tag: "Included", _0: through.end } as rt.RangeBound], (bound: rt.RangeBound): rt.u8 => { - return boundOf$isize(table, bound); - })), undefined, true); + const part = [rt.rangeInclusiveStartBound(inclusive) as rt.RangeBound, rt.rangeInclusiveEndBound(inclusive) as rt.RangeBound, { tag: "Included", _0: from.start } as rt.RangeBound, { tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: to.end } as rt.RangeBound, { tag: "Included", _0: through.end } as rt.RangeBound]; + const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtList(part, f, (value: rt.RangeBound, f: rt.Formatter) => rt.fmtBound(value, f, rt.isizeDebug))]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0]])), undefined, true); return [a, b] as [rt.isize, rt.isize]; } @@ -5297,9 +5297,9 @@ export function bounded$u128(table: rt.u128[], at: rt.usize[], out: rt.ByteVec): const from: rt.RangeFrom = _137[0]; const to: { end: rt.u128 } = _137[1]; const through: { end: rt.u128; inclusive: true } = _137[2]; - rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([rt.rangeInclusiveStartBound(inclusive) as rt.RangeBound, rt.rangeInclusiveEndBound(inclusive) as rt.RangeBound, { tag: "Included", _0: from.start } as rt.RangeBound, { tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: to.end } as rt.RangeBound, { tag: "Included", _0: through.end } as rt.RangeBound], (bound: rt.RangeBound): rt.u8 => { - return boundOf$u128(table, bound); - })), undefined, true); + const part = [rt.rangeInclusiveStartBound(inclusive) as rt.RangeBound, rt.rangeInclusiveEndBound(inclusive) as rt.RangeBound, { tag: "Included", _0: from.start } as rt.RangeBound, { tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: to.end } as rt.RangeBound, { tag: "Included", _0: through.end } as rt.RangeBound]; + const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtList(part, f, (value: rt.RangeBound, f: rt.Formatter) => rt.fmtBound(value, f, rt.u128Debug))]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0]])), undefined, true); return [a, b] as [rt.u128, rt.u128]; } @@ -5367,9 +5367,9 @@ export function bounded$u16(table: rt.u16[], at: rt.usize[], out: rt.ByteVec): [ const from: rt.RangeFrom = _137[0]; const to: { end: rt.u16 } = _137[1]; const through: { end: rt.u16; inclusive: true } = _137[2]; - rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([rt.rangeInclusiveStartBound(inclusive) as rt.RangeBound, rt.rangeInclusiveEndBound(inclusive) as rt.RangeBound, { tag: "Included", _0: from.start } as rt.RangeBound, { tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: to.end } as rt.RangeBound, { tag: "Included", _0: through.end } as rt.RangeBound], (bound: rt.RangeBound): rt.u8 => { - return boundOf$u16(table, bound); - })), undefined, true); + const part = [rt.rangeInclusiveStartBound(inclusive) as rt.RangeBound, rt.rangeInclusiveEndBound(inclusive) as rt.RangeBound, { tag: "Included", _0: from.start } as rt.RangeBound, { tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: to.end } as rt.RangeBound, { tag: "Included", _0: through.end } as rt.RangeBound]; + const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtList(part, f, (value: rt.RangeBound, f: rt.Formatter) => rt.fmtBound(value, f, rt.u16Debug))]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0]])), undefined, true); return [a, b] as [rt.u16, rt.u16]; } @@ -5437,9 +5437,9 @@ export function bounded$u32(table: rt.u32[], at: rt.usize[], out: rt.ByteVec): [ const from: rt.RangeFrom = _137[0]; const to: { end: rt.u32 } = _137[1]; const through: { end: rt.u32; inclusive: true } = _137[2]; - rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([rt.rangeInclusiveStartBound(inclusive) as rt.RangeBound, rt.rangeInclusiveEndBound(inclusive) as rt.RangeBound, { tag: "Included", _0: from.start } as rt.RangeBound, { tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: to.end } as rt.RangeBound, { tag: "Included", _0: through.end } as rt.RangeBound], (bound: rt.RangeBound): rt.u8 => { - return boundOf$u32(table, bound); - })), undefined, true); + const part = [rt.rangeInclusiveStartBound(inclusive) as rt.RangeBound, rt.rangeInclusiveEndBound(inclusive) as rt.RangeBound, { tag: "Included", _0: from.start } as rt.RangeBound, { tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: to.end } as rt.RangeBound, { tag: "Included", _0: through.end } as rt.RangeBound]; + const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtList(part, f, (value: rt.RangeBound, f: rt.Formatter) => rt.fmtBound(value, f, rt.u32Debug))]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0]])), undefined, true); return [a, b] as [rt.u32, rt.u32]; } @@ -5507,9 +5507,9 @@ export function bounded$u64(table: rt.u64[], at: rt.usize[], out: rt.ByteVec): [ const from: rt.RangeFrom = _137[0]; const to: { end: rt.u64 } = _137[1]; const through: { end: rt.u64; inclusive: true } = _137[2]; - rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([rt.rangeInclusiveStartBound(inclusive) as rt.RangeBound, rt.rangeInclusiveEndBound(inclusive) as rt.RangeBound, { tag: "Included", _0: from.start } as rt.RangeBound, { tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: to.end } as rt.RangeBound, { tag: "Included", _0: through.end } as rt.RangeBound], (bound: rt.RangeBound): rt.u8 => { - return boundOf$u64(table, bound); - })), undefined, true); + const part = [rt.rangeInclusiveStartBound(inclusive) as rt.RangeBound, rt.rangeInclusiveEndBound(inclusive) as rt.RangeBound, { tag: "Included", _0: from.start } as rt.RangeBound, { tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: to.end } as rt.RangeBound, { tag: "Included", _0: through.end } as rt.RangeBound]; + const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtList(part, f, (value: rt.RangeBound, f: rt.Formatter) => rt.fmtBound(value, f, rt.u64Debug))]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0]])), undefined, true); return [a, b] as [rt.u64, rt.u64]; } @@ -5577,9 +5577,9 @@ export function bounded$u8(table: rt.ByteSlice, at: rt.usize[], out: rt.ByteVec) const from: rt.RangeFrom = _137[0]; const to: { end: rt.u8 } = _137[1]; const through: { end: rt.u8; inclusive: true } = _137[2]; - rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([rt.rangeInclusiveStartBound(inclusive) as rt.RangeBound, rt.rangeInclusiveEndBound(inclusive) as rt.RangeBound, { tag: "Included", _0: from.start } as rt.RangeBound, { tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: to.end } as rt.RangeBound, { tag: "Included", _0: through.end } as rt.RangeBound], (bound: rt.RangeBound): rt.u8 => { - return boundOf$u8(table, bound); - })), undefined, true); + const part = [rt.rangeInclusiveStartBound(inclusive) as rt.RangeBound, rt.rangeInclusiveEndBound(inclusive) as rt.RangeBound, { tag: "Included", _0: from.start } as rt.RangeBound, { tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: to.end } as rt.RangeBound, { tag: "Included", _0: through.end } as rt.RangeBound]; + const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtList(part, f, (value: rt.RangeBound, f: rt.Formatter) => rt.fmtBound(value, f, rt.u8Debug))]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0]])), undefined, true); return [a, b] as [rt.u8, rt.u8]; } @@ -5647,354 +5647,12 @@ export function bounded$usize(table: rt.usize[], at: rt.usize[], out: rt.ByteVec const from: rt.RangeFrom = _137[0]; const to: { end: rt.usize } = _137[1]; const through: { end: rt.usize; inclusive: true } = _137[2]; - rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([rt.rangeInclusiveStartBound(inclusive) as rt.RangeBound, rt.rangeInclusiveEndBound(inclusive) as rt.RangeBound, { tag: "Included", _0: from.start } as rt.RangeBound, { tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: to.end } as rt.RangeBound, { tag: "Included", _0: through.end } as rt.RangeBound], (bound: rt.RangeBound): rt.u8 => { - return boundOf$usize(table, bound); - })), undefined, true); + const part = [rt.rangeInclusiveStartBound(inclusive) as rt.RangeBound, rt.rangeInclusiveEndBound(inclusive) as rt.RangeBound, { tag: "Included", _0: from.start } as rt.RangeBound, { tag: "Unbounded" } as rt.RangeBound, { tag: "Excluded", _0: to.end } as rt.RangeBound, { tag: "Included", _0: through.end } as rt.RangeBound]; + const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtList(part, f, (value: rt.RangeBound, f: rt.Formatter) => rt.fmtBound(value, f, rt.usizeDebug))]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0]])), undefined, true); return [a, b] as [rt.usize, rt.usize]; } -/** Which kind of bound `bound` is, and where its value is in `table`. */ -export function boundOf$NonZero_u128(table: rt.u128[], bound: rt.RangeBound): rt.u8 { - const at: (a0: rt.u128) => rt.u8 = (x: rt.u128): rt.u8 => { - return mapOr$02k4ito(rt.iterPosition(rt.iterSlice(table), (y: rt.u128): boolean => { - return rt.u128Eq(y, x); - }), 63, (i: rt.usize): rt.u8 => { - return i & 0xff; - }); - }; - if (bound.tag === "Included") { - return 64 | at((bound as { tag: "Included"; _0: rt.u128 })._0); - } - if (bound.tag === "Excluded") { - return 128 | at((bound as { tag: "Excluded"; _0: rt.u128 })._0); - } - return 0; -} - -/** Which kind of bound `bound` is, and where its value is in `table`. */ -export function boundOf$NonZero_u64(table: rt.u64[], bound: rt.RangeBound): rt.u8 { - const at: (a0: rt.u64) => rt.u8 = (x: rt.u64): rt.u8 => { - return mapOr$02k4ito(rt.iterPosition(rt.iterSlice(table), (y: rt.u64): boolean => { - return rt.u64Eq(y, x); - }), 63, (i: rt.usize): rt.u8 => { - return i & 0xff; - }); - }; - if (bound.tag === "Included") { - return 64 | at((bound as { tag: "Included"; _0: rt.u64 })._0); - } - if (bound.tag === "Excluded") { - return 128 | at((bound as { tag: "Excluded"; _0: rt.u64 })._0); - } - return 0; -} - -/** Which kind of bound `bound` is, and where its value is in `table`. */ -export function boundOf$NonZero_u8(table: rt.u8[], bound: rt.RangeBound): rt.u8 { - const at: (a0: rt.u8) => rt.u8 = (x: rt.u8): rt.u8 => { - return mapOr$02k4ito(rt.iterPosition(rt.iterSlice(table), (y: rt.u8): boolean => { - return y === x; - }), 63, (i: rt.usize): rt.u8 => { - return i & 0xff; - }); - }; - if (bound.tag === "Included") { - return 64 | at((bound as { tag: "Included"; _0: rt.u8 })._0); - } - if (bound.tag === "Excluded") { - return 128 | at((bound as { tag: "Excluded"; _0: rt.u8 })._0); - } - return 0; -} - -/** Which kind of bound `bound` is, and where its value is in `table`. */ -export function boundOf$NonZero_usize(table: rt.usize[], bound: rt.RangeBound): rt.u8 { - const at: (a0: rt.usize) => rt.u8 = (x: rt.usize): rt.u8 => { - return mapOr$02k4ito(rt.iterPosition(rt.iterSlice(table), (y: rt.usize): boolean => { - return y === x; - }), 63, (i: rt.usize): rt.u8 => { - return i & 0xff; - }); - }; - if (bound.tag === "Included") { - return 64 | at((bound as { tag: "Included"; _0: rt.usize })._0); - } - if (bound.tag === "Excluded") { - return 128 | at((bound as { tag: "Excluded"; _0: rt.usize })._0); - } - return 0; -} - -/** Which kind of bound `bound` is, and where its value is in `table`. */ -export function boundOf$char(table: rt.char[], bound: rt.RangeBound): rt.u8 { - const at: (a0: rt.char) => rt.u8 = (x: rt.char): rt.u8 => { - return mapOr$02k4ito(rt.iterPosition(rt.iterSlice(table), (y: rt.char): boolean => { - return y === x; - }), 63, (i: rt.usize): rt.u8 => { - return i & 0xff; - }); - }; - if (bound.tag === "Included") { - return 64 | at((bound as { tag: "Included"; _0: rt.char })._0); - } - if (bound.tag === "Excluded") { - return 128 | at((bound as { tag: "Excluded"; _0: rt.char })._0); - } - return 0; -} - -/** Which kind of bound `bound` is, and where its value is in `table`. */ -export function boundOf$f32(table: rt.f32[], bound: rt.RangeBound): rt.u8 { - const at: (a0: rt.f32) => rt.u8 = (x: rt.f32): rt.u8 => { - return mapOr$02k4ito(rt.iterPosition(rt.iterSlice(table), (y: rt.f32): boolean => { - return y === x; - }), 63, (i: rt.usize): rt.u8 => { - return i & 0xff; - }); - }; - if (bound.tag === "Included") { - return 64 | at((bound as { tag: "Included"; _0: rt.f32 })._0); - } - if (bound.tag === "Excluded") { - return 128 | at((bound as { tag: "Excluded"; _0: rt.f32 })._0); - } - return 0; -} - -/** Which kind of bound `bound` is, and where its value is in `table`. */ -export function boundOf$f64(table: rt.f64[], bound: rt.RangeBound): rt.u8 { - const at: (a0: rt.f64) => rt.u8 = (x: rt.f64): rt.u8 => { - return mapOr$02k4ito(rt.iterPosition(rt.iterSlice(table), (y: rt.f64): boolean => { - return y === x; - }), 63, (i: rt.usize): rt.u8 => { - return i & 0xff; - }); - }; - if (bound.tag === "Included") { - return 64 | at((bound as { tag: "Included"; _0: rt.f64 })._0); - } - if (bound.tag === "Excluded") { - return 128 | at((bound as { tag: "Excluded"; _0: rt.f64 })._0); - } - return 0; -} - -/** Which kind of bound `bound` is, and where its value is in `table`. */ -export function boundOf$i128(table: rt.i128[], bound: rt.RangeBound): rt.u8 { - const at: (a0: rt.i128) => rt.u8 = (x: rt.i128): rt.u8 => { - return mapOr$02k4ito(rt.iterPosition(rt.iterSlice(table), (y: rt.i128): boolean => { - return rt.i128Eq(y, x); - }), 63, (i: rt.usize): rt.u8 => { - return i & 0xff; - }); - }; - if (bound.tag === "Included") { - return 64 | at((bound as { tag: "Included"; _0: rt.i128 })._0); - } - if (bound.tag === "Excluded") { - return 128 | at((bound as { tag: "Excluded"; _0: rt.i128 })._0); - } - return 0; -} - -/** Which kind of bound `bound` is, and where its value is in `table`. */ -export function boundOf$i16(table: rt.i16[], bound: rt.RangeBound): rt.u8 { - const at: (a0: rt.i16) => rt.u8 = (x: rt.i16): rt.u8 => { - return mapOr$02k4ito(rt.iterPosition(rt.iterSlice(table), (y: rt.i16): boolean => { - return y === x; - }), 63, (i: rt.usize): rt.u8 => { - return i & 0xff; - }); - }; - if (bound.tag === "Included") { - return 64 | at((bound as { tag: "Included"; _0: rt.i16 })._0); - } - if (bound.tag === "Excluded") { - return 128 | at((bound as { tag: "Excluded"; _0: rt.i16 })._0); - } - return 0; -} - -/** Which kind of bound `bound` is, and where its value is in `table`. */ -export function boundOf$i32(table: rt.i32[], bound: rt.RangeBound): rt.u8 { - const at: (a0: rt.i32) => rt.u8 = (x: rt.i32): rt.u8 => { - return mapOr$02k4ito(rt.iterPosition(rt.iterSlice(table), (y: rt.i32): boolean => { - return y === x; - }), 63, (i: rt.usize): rt.u8 => { - return i & 0xff; - }); - }; - if (bound.tag === "Included") { - return 64 | at((bound as { tag: "Included"; _0: rt.i32 })._0); - } - if (bound.tag === "Excluded") { - return 128 | at((bound as { tag: "Excluded"; _0: rt.i32 })._0); - } - return 0; -} - -/** Which kind of bound `bound` is, and where its value is in `table`. */ -export function boundOf$i64(table: rt.i64[], bound: rt.RangeBound): rt.u8 { - const at: (a0: rt.i64) => rt.u8 = (x: rt.i64): rt.u8 => { - return mapOr$02k4ito(rt.iterPosition(rt.iterSlice(table), (y: rt.i64): boolean => { - return rt.i64Eq(y, x); - }), 63, (i: rt.usize): rt.u8 => { - return i & 0xff; - }); - }; - if (bound.tag === "Included") { - return 64 | at((bound as { tag: "Included"; _0: rt.i64 })._0); - } - if (bound.tag === "Excluded") { - return 128 | at((bound as { tag: "Excluded"; _0: rt.i64 })._0); - } - return 0; -} - -/** Which kind of bound `bound` is, and where its value is in `table`. */ -export function boundOf$i8(table: rt.i8[], bound: rt.RangeBound): rt.u8 { - const at: (a0: rt.i8) => rt.u8 = (x: rt.i8): rt.u8 => { - return mapOr$02k4ito(rt.iterPosition(rt.iterSlice(table), (y: rt.i8): boolean => { - return y === x; - }), 63, (i: rt.usize): rt.u8 => { - return i & 0xff; - }); - }; - if (bound.tag === "Included") { - return 64 | at((bound as { tag: "Included"; _0: rt.i8 })._0); - } - if (bound.tag === "Excluded") { - return 128 | at((bound as { tag: "Excluded"; _0: rt.i8 })._0); - } - return 0; -} - -/** Which kind of bound `bound` is, and where its value is in `table`. */ -export function boundOf$isize(table: rt.isize[], bound: rt.RangeBound): rt.u8 { - const at: (a0: rt.isize) => rt.u8 = (x: rt.isize): rt.u8 => { - return mapOr$02k4ito(rt.iterPosition(rt.iterSlice(table), (y: rt.isize): boolean => { - return y === x; - }), 63, (i: rt.usize): rt.u8 => { - return i & 0xff; - }); - }; - if (bound.tag === "Included") { - return 64 | at((bound as { tag: "Included"; _0: rt.isize })._0); - } - if (bound.tag === "Excluded") { - return 128 | at((bound as { tag: "Excluded"; _0: rt.isize })._0); - } - return 0; -} - -/** Which kind of bound `bound` is, and where its value is in `table`. */ -export function boundOf$u128(table: rt.u128[], bound: rt.RangeBound): rt.u8 { - const at: (a0: rt.u128) => rt.u8 = (x: rt.u128): rt.u8 => { - return mapOr$02k4ito(rt.iterPosition(rt.iterSlice(table), (y: rt.u128): boolean => { - return rt.u128Eq(y, x); - }), 63, (i: rt.usize): rt.u8 => { - return i & 0xff; - }); - }; - if (bound.tag === "Included") { - return 64 | at((bound as { tag: "Included"; _0: rt.u128 })._0); - } - if (bound.tag === "Excluded") { - return 128 | at((bound as { tag: "Excluded"; _0: rt.u128 })._0); - } - return 0; -} - -/** Which kind of bound `bound` is, and where its value is in `table`. */ -export function boundOf$u16(table: rt.u16[], bound: rt.RangeBound): rt.u8 { - const at: (a0: rt.u16) => rt.u8 = (x: rt.u16): rt.u8 => { - return mapOr$02k4ito(rt.iterPosition(rt.iterSlice(table), (y: rt.u16): boolean => { - return y === x; - }), 63, (i: rt.usize): rt.u8 => { - return i & 0xff; - }); - }; - if (bound.tag === "Included") { - return 64 | at((bound as { tag: "Included"; _0: rt.u16 })._0); - } - if (bound.tag === "Excluded") { - return 128 | at((bound as { tag: "Excluded"; _0: rt.u16 })._0); - } - return 0; -} - -/** Which kind of bound `bound` is, and where its value is in `table`. */ -export function boundOf$u32(table: rt.u32[], bound: rt.RangeBound): rt.u8 { - const at: (a0: rt.u32) => rt.u8 = (x: rt.u32): rt.u8 => { - return mapOr$02k4ito(rt.iterPosition(rt.iterSlice(table), (y: rt.u32): boolean => { - return y === x; - }), 63, (i: rt.usize): rt.u8 => { - return i & 0xff; - }); - }; - if (bound.tag === "Included") { - return 64 | at((bound as { tag: "Included"; _0: rt.u32 })._0); - } - if (bound.tag === "Excluded") { - return 128 | at((bound as { tag: "Excluded"; _0: rt.u32 })._0); - } - return 0; -} - -/** Which kind of bound `bound` is, and where its value is in `table`. */ -export function boundOf$u64(table: rt.u64[], bound: rt.RangeBound): rt.u8 { - const at: (a0: rt.u64) => rt.u8 = (x: rt.u64): rt.u8 => { - return mapOr$02k4ito(rt.iterPosition(rt.iterSlice(table), (y: rt.u64): boolean => { - return rt.u64Eq(y, x); - }), 63, (i: rt.usize): rt.u8 => { - return i & 0xff; - }); - }; - if (bound.tag === "Included") { - return 64 | at((bound as { tag: "Included"; _0: rt.u64 })._0); - } - if (bound.tag === "Excluded") { - return 128 | at((bound as { tag: "Excluded"; _0: rt.u64 })._0); - } - return 0; -} - -/** Which kind of bound `bound` is, and where its value is in `table`. */ -export function boundOf$u8(table: rt.ByteSlice, bound: rt.RangeBound): rt.u8 { - const at: (a0: rt.u8) => rt.u8 = (x: rt.u8): rt.u8 => { - return mapOr$02k4ito(rt.iterPosition(rt.iterSlice(rt.byteSliceView(table)), (y: rt.u8): boolean => { - return y === x; - }), 63, (i: rt.usize): rt.u8 => { - return i & 0xff; - }); - }; - if (bound.tag === "Included") { - return 64 | at((bound as { tag: "Included"; _0: rt.u8 })._0); - } - if (bound.tag === "Excluded") { - return 128 | at((bound as { tag: "Excluded"; _0: rt.u8 })._0); - } - return 0; -} - -/** Which kind of bound `bound` is, and where its value is in `table`. */ -export function boundOf$usize(table: rt.usize[], bound: rt.RangeBound): rt.u8 { - const at: (a0: rt.usize) => rt.u8 = (x: rt.usize): rt.u8 => { - return mapOr$02k4ito(rt.iterPosition(rt.iterSlice(table), (y: rt.usize): boolean => { - return y === x; - }), 63, (i: rt.usize): rt.u8 => { - return i & 0xff; - }); - }; - if (bound.tag === "Included") { - return 64 | at((bound as { tag: "Included"; _0: rt.usize })._0); - } - if (bound.tag === "Excluded") { - return 128 | at((bound as { tag: "Excluded"; _0: rt.usize })._0); - } - return 0; -} - /** `RangeBounds::contains`, through the trait. */ export function boundsContain$NonZero_u128_RangeFrom_NonZero_u128(r: rt.RangeFrom, x: rt.u128): boolean { return rt.rangeFromContains(r, x); @@ -6631,14 +6289,17 @@ export function stepped$NonZero_u128(table: rt.u128[], at: rt.usize[], out: rt.B const _77: rt.usize = rt.hashLen(rt.hashExtendKeys(rt.hashNew(rt.hashing(rt.rangeHash(rt.hash128), rt.rangeEq(rt.u128Eq))) as rt.HashSet>, rt.iterSlice(_62), undefined, undefined, 29360128)); const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtOption(read, f, rt.u128Debug), (f: rt.Formatter) => rt.fmtRangeInclusive(r, f, rt.u128Debug), (f: rt.Formatter) => rt.usizeDisplay(_77, f)]; rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args2[0], " ", args2[1], " ", args2[2]])), undefined, true); - rt.iterExtendBytes(out, rt.iterSlice(Uint8Array.of(boundOf$NonZero_u128(table, rt.rangeInclusiveStartBound(r) as rt.RangeBound), boundOf$NonZero_u128(table, rt.rangeInclusiveEndBound(r) as rt.RangeBound))), undefined, true); - const _98: boolean = rt.rangeInclusiveIsEmpty(r); - const _103: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.nonZeroStep(rt.u128Step, { hi: 0xffffffff, w2: 0xffffffff, w1: 0xffffffff, lo: 0xffffffff } as rt.u128)); - const _100: boolean = rt.rangeEq(rt.u128Eq)(r, _103); - const _109: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.nonZeroStep(rt.u128Step, { hi: 0xffffffff, w2: 0xffffffff, w1: 0xffffffff, lo: 0xffffffff } as rt.u128)); - const _106: boolean = rt.rangeEq(rt.u128Eq)(r, _109); - const _113: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.nonZeroStep(rt.u128Step, { hi: 0xffffffff, w2: 0xffffffff, w1: 0xffffffff, lo: 0xffffffff } as rt.u128)); - rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_98, _100, _106, !rt.rangeEq(rt.u128Eq)(r, _113)], (a0: boolean): rt.u8 => { + const _96: rt.RangeBound = rt.rangeInclusiveStartBound(r) as rt.RangeBound; + const _99: rt.RangeBound = rt.rangeInclusiveEndBound(r) as rt.RangeBound; + const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtBound(_96, f, rt.u128Debug), (f: rt.Formatter) => rt.fmtBound(_99, f, rt.u128Debug)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0], " ", args4[1]])), undefined, true); + const _109: boolean = rt.rangeInclusiveIsEmpty(r); + const _114: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.nonZeroStep(rt.u128Step, { hi: 0xffffffff, w2: 0xffffffff, w1: 0xffffffff, lo: 0xffffffff } as rt.u128)); + const _111: boolean = rt.rangeEq(rt.u128Eq)(r, _114); + const _120: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.nonZeroStep(rt.u128Step, { hi: 0xffffffff, w2: 0xffffffff, w1: 0xffffffff, lo: 0xffffffff } as rt.u128)); + const _117: boolean = rt.rangeEq(rt.u128Eq)(r, _120); + const _124: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.nonZeroStep(rt.u128Step, { hi: 0xffffffff, w2: 0xffffffff, w1: 0xffffffff, lo: 0xffffffff } as rt.u128)); + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_109, _111, _117, !rt.rangeEq(rt.u128Eq)(r, _124)], (a0: boolean): rt.u8 => { return a0 ? 1 : 0; })), undefined, true); rt.iterExtendBytes(out, rt.iterMap(rt.iterSlice(table), (x: rt.u128): rt.u8 => { @@ -6648,11 +6309,11 @@ export function stepped$NonZero_u128(table: rt.u128[], at: rt.usize[], out: rt.B rt.rangeHash(rt.hash128)(r, h3); }; rt.iterExtendBytes(out, rt.iterSlice(_7(part3)), undefined, true); - const _129: [rt.u128, rt.u128] = rt.rangeInclusiveIntoInner(r); - const start2: rt.u128 = _129[0]; - const end2: rt.u128 = _129[1]; - const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.u128Debug(start2, f), (f: rt.Formatter) => rt.u128Debug(end2, f)]; - rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0], " ", args4[1]])), undefined, true); + const _140: [rt.u128, rt.u128] = rt.rangeInclusiveIntoInner(r); + const start2: rt.u128 = _140[0]; + const end2: rt.u128 = _140[1]; + const args6: rt.Fmt[] = [(f: rt.Formatter) => rt.u128Debug(start2, f), (f: rt.Formatter) => rt.u128Debug(end2, f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args6[0], " ", args6[1]])), undefined, true); } } @@ -6722,14 +6383,17 @@ export function stepped$NonZero_u64(table: rt.u64[], at: rt.usize[], out: rt.Byt const _77: rt.usize = rt.hashLen(rt.hashExtendKeys(rt.hashNew(rt.hashing(rt.rangeHash(rt.hash64), rt.rangeEq(rt.u64Eq))) as rt.HashSet>, rt.iterSlice(_62), undefined, undefined, 58720256)); const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtOption(read, f, rt.u64Debug), (f: rt.Formatter) => rt.fmtRangeInclusive(r, f, rt.u64Debug), (f: rt.Formatter) => rt.usizeDisplay(_77, f)]; rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args2[0], " ", args2[1], " ", args2[2]])), undefined, true); - rt.iterExtendBytes(out, rt.iterSlice(Uint8Array.of(boundOf$NonZero_u64(table, rt.rangeInclusiveStartBound(r) as rt.RangeBound), boundOf$NonZero_u64(table, rt.rangeInclusiveEndBound(r) as rt.RangeBound))), undefined, true); - const _98: boolean = rt.rangeInclusiveIsEmpty(r); - const _103: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.nonZeroStep(rt.u64Step, { hi: 0xffffffff, lo: 0xffffffff } as rt.u64)); - const _100: boolean = rt.rangeEq(rt.u64Eq)(r, _103); - const _109: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.nonZeroStep(rt.u64Step, { hi: 0xffffffff, lo: 0xffffffff } as rt.u64)); - const _106: boolean = rt.rangeEq(rt.u64Eq)(r, _109); - const _113: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.nonZeroStep(rt.u64Step, { hi: 0xffffffff, lo: 0xffffffff } as rt.u64)); - rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_98, _100, _106, !rt.rangeEq(rt.u64Eq)(r, _113)], (a0: boolean): rt.u8 => { + const _96: rt.RangeBound = rt.rangeInclusiveStartBound(r) as rt.RangeBound; + const _99: rt.RangeBound = rt.rangeInclusiveEndBound(r) as rt.RangeBound; + const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtBound(_96, f, rt.u64Debug), (f: rt.Formatter) => rt.fmtBound(_99, f, rt.u64Debug)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0], " ", args4[1]])), undefined, true); + const _109: boolean = rt.rangeInclusiveIsEmpty(r); + const _114: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.nonZeroStep(rt.u64Step, { hi: 0xffffffff, lo: 0xffffffff } as rt.u64)); + const _111: boolean = rt.rangeEq(rt.u64Eq)(r, _114); + const _120: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.nonZeroStep(rt.u64Step, { hi: 0xffffffff, lo: 0xffffffff } as rt.u64)); + const _117: boolean = rt.rangeEq(rt.u64Eq)(r, _120); + const _124: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.nonZeroStep(rt.u64Step, { hi: 0xffffffff, lo: 0xffffffff } as rt.u64)); + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_109, _111, _117, !rt.rangeEq(rt.u64Eq)(r, _124)], (a0: boolean): rt.u8 => { return a0 ? 1 : 0; })), undefined, true); rt.iterExtendBytes(out, rt.iterMap(rt.iterSlice(table), (x: rt.u64): rt.u8 => { @@ -6739,11 +6403,11 @@ export function stepped$NonZero_u64(table: rt.u64[], at: rt.usize[], out: rt.Byt rt.rangeHash(rt.hash64)(r, h3); }; rt.iterExtendBytes(out, rt.iterSlice(_7(part3)), undefined, true); - const _129: [rt.u64, rt.u64] = rt.rangeInclusiveIntoInner(r); - const start2: rt.u64 = _129[0]; - const end2: rt.u64 = _129[1]; - const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.u64Debug(start2, f), (f: rt.Formatter) => rt.u64Debug(end2, f)]; - rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0], " ", args4[1]])), undefined, true); + const _140: [rt.u64, rt.u64] = rt.rangeInclusiveIntoInner(r); + const start2: rt.u64 = _140[0]; + const end2: rt.u64 = _140[1]; + const args6: rt.Fmt[] = [(f: rt.Formatter) => rt.u64Debug(start2, f), (f: rt.Formatter) => rt.u64Debug(end2, f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args6[0], " ", args6[1]])), undefined, true); } } @@ -6813,14 +6477,17 @@ export function stepped$NonZero_u8(table: rt.u8[], at: rt.usize[], out: rt.ByteV const _77: rt.usize = rt.hashLen(rt.hashExtendKeys(rt.hashNew(rt.hashing(rt.rangeHash(rt.hash8), rt.rangeEq(rt.same))) as rt.HashSet>, rt.iterSlice(_62), undefined, undefined, 234881024)); const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtOption(read, f, rt.u8Debug), (f: rt.Formatter) => rt.fmtRangeInclusive(r, f, rt.u8Debug), (f: rt.Formatter) => rt.usizeDisplay(_77, f)]; rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args2[0], " ", args2[1], " ", args2[2]])), undefined, true); - rt.iterExtendBytes(out, rt.iterSlice(Uint8Array.of(boundOf$NonZero_u8(table, rt.rangeInclusiveStartBound(r) as rt.RangeBound), boundOf$NonZero_u8(table, rt.rangeInclusiveEndBound(r) as rt.RangeBound))), undefined, true); - const _98: boolean = rt.rangeInclusiveIsEmpty(r); - const _103: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.nonZeroStep(rt.u8Step, 255)); - const _100: boolean = rt.rangeEq(rt.same)(r, _103); - const _109: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.nonZeroStep(rt.u8Step, 255)); - const _106: boolean = rt.rangeEq(rt.same)(r, _109); - const _113: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.nonZeroStep(rt.u8Step, 255)); - rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_98, _100, _106, !rt.rangeEq(rt.same)(r, _113)], (a0: boolean): rt.u8 => { + const _96: rt.RangeBound = rt.rangeInclusiveStartBound(r) as rt.RangeBound; + const _99: rt.RangeBound = rt.rangeInclusiveEndBound(r) as rt.RangeBound; + const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtBound(_96, f, rt.u8Debug), (f: rt.Formatter) => rt.fmtBound(_99, f, rt.u8Debug)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0], " ", args4[1]])), undefined, true); + const _109: boolean = rt.rangeInclusiveIsEmpty(r); + const _114: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.nonZeroStep(rt.u8Step, 255)); + const _111: boolean = rt.rangeEq(rt.same)(r, _114); + const _120: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.nonZeroStep(rt.u8Step, 255)); + const _117: boolean = rt.rangeEq(rt.same)(r, _120); + const _124: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.nonZeroStep(rt.u8Step, 255)); + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_109, _111, _117, !rt.rangeEq(rt.same)(r, _124)], (a0: boolean): rt.u8 => { return a0 ? 1 : 0; })), undefined, true); rt.iterExtendBytes(out, rt.iterMap(rt.iterSlice(table), (x: rt.u8): rt.u8 => { @@ -6830,11 +6497,11 @@ export function stepped$NonZero_u8(table: rt.u8[], at: rt.usize[], out: rt.ByteV rt.rangeHash(rt.hash8)(r, h3); }; rt.iterExtendBytes(out, rt.iterSlice(_7(part3)), undefined, true); - const _129: [rt.u8, rt.u8] = rt.rangeInclusiveIntoInner(r); - const start2: rt.u8 = _129[0]; - const end2: rt.u8 = _129[1]; - const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.u8Debug(start2, f), (f: rt.Formatter) => rt.u8Debug(end2, f)]; - rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0], " ", args4[1]])), undefined, true); + const _140: [rt.u8, rt.u8] = rt.rangeInclusiveIntoInner(r); + const start2: rt.u8 = _140[0]; + const end2: rt.u8 = _140[1]; + const args6: rt.Fmt[] = [(f: rt.Formatter) => rt.u8Debug(start2, f), (f: rt.Formatter) => rt.u8Debug(end2, f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args6[0], " ", args6[1]])), undefined, true); } } @@ -6904,14 +6571,17 @@ export function stepped$NonZero_usize(table: rt.usize[], at: rt.usize[], out: rt const _77: rt.usize = rt.hashLen(rt.hashExtendKeys(rt.hashNew(rt.hashing(rt.rangeHash(rt.hash32), rt.rangeEq(rt.same))) as rt.HashSet>, rt.iterSlice(_62), undefined, undefined, 117440512)); const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtOption(read, f, rt.usizeDebug), (f: rt.Formatter) => rt.fmtRangeInclusive(r, f, rt.usizeDebug), (f: rt.Formatter) => rt.usizeDisplay(_77, f)]; rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args2[0], " ", args2[1], " ", args2[2]])), undefined, true); - rt.iterExtendBytes(out, rt.iterSlice(Uint8Array.of(boundOf$NonZero_usize(table, rt.rangeInclusiveStartBound(r) as rt.RangeBound), boundOf$NonZero_usize(table, rt.rangeInclusiveEndBound(r) as rt.RangeBound))), undefined, true); - const _98: boolean = rt.rangeInclusiveIsEmpty(r); - const _103: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.nonZeroStep(rt.usizeStep, 4294967295)); - const _100: boolean = rt.rangeEq(rt.same)(r, _103); - const _109: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.nonZeroStep(rt.usizeStep, 4294967295)); - const _106: boolean = rt.rangeEq(rt.same)(r, _109); - const _113: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.nonZeroStep(rt.usizeStep, 4294967295)); - rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_98, _100, _106, !rt.rangeEq(rt.same)(r, _113)], (a0: boolean): rt.u8 => { + const _96: rt.RangeBound = rt.rangeInclusiveStartBound(r) as rt.RangeBound; + const _99: rt.RangeBound = rt.rangeInclusiveEndBound(r) as rt.RangeBound; + const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtBound(_96, f, rt.usizeDebug), (f: rt.Formatter) => rt.fmtBound(_99, f, rt.usizeDebug)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0], " ", args4[1]])), undefined, true); + const _109: boolean = rt.rangeInclusiveIsEmpty(r); + const _114: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.nonZeroStep(rt.usizeStep, 4294967295)); + const _111: boolean = rt.rangeEq(rt.same)(r, _114); + const _120: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.nonZeroStep(rt.usizeStep, 4294967295)); + const _117: boolean = rt.rangeEq(rt.same)(r, _120); + const _124: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.nonZeroStep(rt.usizeStep, 4294967295)); + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_109, _111, _117, !rt.rangeEq(rt.same)(r, _124)], (a0: boolean): rt.u8 => { return a0 ? 1 : 0; })), undefined, true); rt.iterExtendBytes(out, rt.iterMap(rt.iterSlice(table), (x: rt.usize): rt.u8 => { @@ -6921,11 +6591,11 @@ export function stepped$NonZero_usize(table: rt.usize[], at: rt.usize[], out: rt rt.rangeHash(rt.hash32)(r, h3); }; rt.iterExtendBytes(out, rt.iterSlice(_7(part3)), undefined, true); - const _129: [rt.usize, rt.usize] = rt.rangeInclusiveIntoInner(r); - const start2: rt.usize = _129[0]; - const end2: rt.usize = _129[1]; - const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.usizeDebug(start2, f), (f: rt.Formatter) => rt.usizeDebug(end2, f)]; - rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0], " ", args4[1]])), undefined, true); + const _140: [rt.usize, rt.usize] = rt.rangeInclusiveIntoInner(r); + const start2: rt.usize = _140[0]; + const end2: rt.usize = _140[1]; + const args6: rt.Fmt[] = [(f: rt.Formatter) => rt.usizeDebug(start2, f), (f: rt.Formatter) => rt.usizeDebug(end2, f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args6[0], " ", args6[1]])), undefined, true); } } @@ -6995,14 +6665,17 @@ export function stepped$char(table: rt.char[], at: rt.usize[], out: rt.ByteVec): const _77: rt.usize = rt.hashLen(rt.hashExtendKeys(rt.hashNew(rt.hashing(rt.rangeHash(rt.hash32), rt.rangeEq(rt.same))) as rt.HashSet>, rt.iterSlice(_62), undefined, undefined, 117440512)); const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtOption(read, f, rt.fmtCharDebug), (f: rt.Formatter) => rt.fmtRangeInclusive(r, f, rt.fmtCharDebug), (f: rt.Formatter) => rt.usizeDisplay(_77, f)]; rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args2[0], " ", args2[1], " ", args2[2]])), undefined, true); - rt.iterExtendBytes(out, rt.iterSlice(Uint8Array.of(boundOf$char(table, rt.rangeInclusiveStartBound(r) as rt.RangeBound), boundOf$char(table, rt.rangeInclusiveEndBound(r) as rt.RangeBound))), undefined, true); - const _98: boolean = rt.rangeInclusiveIsEmpty(r); - const _103: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.charStep); - const _100: boolean = rt.rangeEq(rt.same)(r, _103); - const _109: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.charStep); - const _106: boolean = rt.rangeEq(rt.same)(r, _109); - const _113: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.charStep); - rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_98, _100, _106, !rt.rangeEq(rt.same)(r, _113)], (a0: boolean): rt.u8 => { + const _96: rt.RangeBound = rt.rangeInclusiveStartBound(r) as rt.RangeBound; + const _99: rt.RangeBound = rt.rangeInclusiveEndBound(r) as rt.RangeBound; + const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtBound(_96, f, rt.fmtCharDebug), (f: rt.Formatter) => rt.fmtBound(_99, f, rt.fmtCharDebug)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0], " ", args4[1]])), undefined, true); + const _109: boolean = rt.rangeInclusiveIsEmpty(r); + const _114: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.charStep); + const _111: boolean = rt.rangeEq(rt.same)(r, _114); + const _120: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.charStep); + const _117: boolean = rt.rangeEq(rt.same)(r, _120); + const _124: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.charStep); + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_109, _111, _117, !rt.rangeEq(rt.same)(r, _124)], (a0: boolean): rt.u8 => { return a0 ? 1 : 0; })), undefined, true); rt.iterExtendBytes(out, rt.iterMap(rt.iterSlice(table), (x: rt.char): rt.u8 => { @@ -7012,11 +6685,11 @@ export function stepped$char(table: rt.char[], at: rt.usize[], out: rt.ByteVec): rt.rangeHash(rt.hash32)(r, h3); }; rt.iterExtendBytes(out, rt.iterSlice(_7(part3)), undefined, true); - const _129: [rt.char, rt.char] = rt.rangeInclusiveIntoInner(r); - const start2: rt.char = _129[0]; - const end2: rt.char = _129[1]; - const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtCharDebug(start2, f), (f: rt.Formatter) => rt.fmtCharDebug(end2, f)]; - rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0], " ", args4[1]])), undefined, true); + const _140: [rt.char, rt.char] = rt.rangeInclusiveIntoInner(r); + const start2: rt.char = _140[0]; + const end2: rt.char = _140[1]; + const args6: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtCharDebug(start2, f), (f: rt.Formatter) => rt.fmtCharDebug(end2, f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args6[0], " ", args6[1]])), undefined, true); } } @@ -7086,14 +6759,17 @@ export function stepped$i128(table: rt.i128[], at: rt.usize[], out: rt.ByteVec): const _77: rt.usize = rt.hashLen(rt.hashExtendKeys(rt.hashNew(rt.hashing(rt.rangeHash(rt.hash128), rt.rangeEq(rt.i128Eq))) as rt.HashSet>, rt.iterSlice(_62), undefined, undefined, 29360128)); const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtOption(read, f, rt.i128Debug), (f: rt.Formatter) => rt.fmtRangeInclusive(r, f, rt.i128Debug), (f: rt.Formatter) => rt.usizeDisplay(_77, f)]; rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args2[0], " ", args2[1], " ", args2[2]])), undefined, true); - rt.iterExtendBytes(out, rt.iterSlice(Uint8Array.of(boundOf$i128(table, rt.rangeInclusiveStartBound(r) as rt.RangeBound), boundOf$i128(table, rt.rangeInclusiveEndBound(r) as rt.RangeBound))), undefined, true); - const _98: boolean = rt.rangeInclusiveIsEmpty(r); - const _103: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.i128Step); - const _100: boolean = rt.rangeEq(rt.i128Eq)(r, _103); - const _109: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.i128Step); - const _106: boolean = rt.rangeEq(rt.i128Eq)(r, _109); - const _113: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.i128Step); - rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_98, _100, _106, !rt.rangeEq(rt.i128Eq)(r, _113)], (a0: boolean): rt.u8 => { + const _96: rt.RangeBound = rt.rangeInclusiveStartBound(r) as rt.RangeBound; + const _99: rt.RangeBound = rt.rangeInclusiveEndBound(r) as rt.RangeBound; + const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtBound(_96, f, rt.i128Debug), (f: rt.Formatter) => rt.fmtBound(_99, f, rt.i128Debug)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0], " ", args4[1]])), undefined, true); + const _109: boolean = rt.rangeInclusiveIsEmpty(r); + const _114: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.i128Step); + const _111: boolean = rt.rangeEq(rt.i128Eq)(r, _114); + const _120: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.i128Step); + const _117: boolean = rt.rangeEq(rt.i128Eq)(r, _120); + const _124: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.i128Step); + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_109, _111, _117, !rt.rangeEq(rt.i128Eq)(r, _124)], (a0: boolean): rt.u8 => { return a0 ? 1 : 0; })), undefined, true); rt.iterExtendBytes(out, rt.iterMap(rt.iterSlice(table), (x: rt.i128): rt.u8 => { @@ -7103,11 +6779,11 @@ export function stepped$i128(table: rt.i128[], at: rt.usize[], out: rt.ByteVec): rt.rangeHash(rt.hash128)(r, h3); }; rt.iterExtendBytes(out, rt.iterSlice(_7(part3)), undefined, true); - const _129: [rt.i128, rt.i128] = rt.rangeInclusiveIntoInner(r); - const start2: rt.i128 = _129[0]; - const end2: rt.i128 = _129[1]; - const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.i128Debug(start2, f), (f: rt.Formatter) => rt.i128Debug(end2, f)]; - rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0], " ", args4[1]])), undefined, true); + const _140: [rt.i128, rt.i128] = rt.rangeInclusiveIntoInner(r); + const start2: rt.i128 = _140[0]; + const end2: rt.i128 = _140[1]; + const args6: rt.Fmt[] = [(f: rt.Formatter) => rt.i128Debug(start2, f), (f: rt.Formatter) => rt.i128Debug(end2, f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args6[0], " ", args6[1]])), undefined, true); } } @@ -7177,14 +6853,17 @@ export function stepped$i16(table: rt.i16[], at: rt.usize[], out: rt.ByteVec): v const _77: rt.usize = rt.hashLen(rt.hashExtendKeys(rt.hashNew(rt.hashing(rt.rangeHash(rt.hash16), rt.rangeEq(rt.same))) as rt.HashSet>, rt.iterSlice(_62), undefined, undefined, 234881024)); const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtOption(read, f, rt.i16Debug), (f: rt.Formatter) => rt.fmtRangeInclusive(r, f, rt.i16Debug), (f: rt.Formatter) => rt.usizeDisplay(_77, f)]; rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args2[0], " ", args2[1], " ", args2[2]])), undefined, true); - rt.iterExtendBytes(out, rt.iterSlice(Uint8Array.of(boundOf$i16(table, rt.rangeInclusiveStartBound(r) as rt.RangeBound), boundOf$i16(table, rt.rangeInclusiveEndBound(r) as rt.RangeBound))), undefined, true); - const _98: boolean = rt.rangeInclusiveIsEmpty(r); - const _103: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.i16Step); - const _100: boolean = rt.rangeEq(rt.same)(r, _103); - const _109: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.i16Step); - const _106: boolean = rt.rangeEq(rt.same)(r, _109); - const _113: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.i16Step); - rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_98, _100, _106, !rt.rangeEq(rt.same)(r, _113)], (a0: boolean): rt.u8 => { + const _96: rt.RangeBound = rt.rangeInclusiveStartBound(r) as rt.RangeBound; + const _99: rt.RangeBound = rt.rangeInclusiveEndBound(r) as rt.RangeBound; + const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtBound(_96, f, rt.i16Debug), (f: rt.Formatter) => rt.fmtBound(_99, f, rt.i16Debug)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0], " ", args4[1]])), undefined, true); + const _109: boolean = rt.rangeInclusiveIsEmpty(r); + const _114: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.i16Step); + const _111: boolean = rt.rangeEq(rt.same)(r, _114); + const _120: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.i16Step); + const _117: boolean = rt.rangeEq(rt.same)(r, _120); + const _124: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.i16Step); + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_109, _111, _117, !rt.rangeEq(rt.same)(r, _124)], (a0: boolean): rt.u8 => { return a0 ? 1 : 0; })), undefined, true); rt.iterExtendBytes(out, rt.iterMap(rt.iterSlice(table), (x: rt.i16): rt.u8 => { @@ -7194,11 +6873,11 @@ export function stepped$i16(table: rt.i16[], at: rt.usize[], out: rt.ByteVec): v rt.rangeHash(rt.hash16)(r, h3); }; rt.iterExtendBytes(out, rt.iterSlice(_7(part3)), undefined, true); - const _129: [rt.i16, rt.i16] = rt.rangeInclusiveIntoInner(r); - const start2: rt.i16 = _129[0]; - const end2: rt.i16 = _129[1]; - const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.i16Debug(start2, f), (f: rt.Formatter) => rt.i16Debug(end2, f)]; - rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0], " ", args4[1]])), undefined, true); + const _140: [rt.i16, rt.i16] = rt.rangeInclusiveIntoInner(r); + const start2: rt.i16 = _140[0]; + const end2: rt.i16 = _140[1]; + const args6: rt.Fmt[] = [(f: rt.Formatter) => rt.i16Debug(start2, f), (f: rt.Formatter) => rt.i16Debug(end2, f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args6[0], " ", args6[1]])), undefined, true); } } @@ -7268,14 +6947,17 @@ export function stepped$i32(table: rt.i32[], at: rt.usize[], out: rt.ByteVec): v const _77: rt.usize = rt.hashLen(rt.hashExtendKeys(rt.hashNew(rt.hashing(rt.rangeHash(rt.hash32), rt.rangeEq(rt.same))) as rt.HashSet>, rt.iterSlice(_62), undefined, undefined, 117440512)); const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtOption(read, f, rt.i32Debug), (f: rt.Formatter) => rt.fmtRangeInclusive(r, f, rt.i32Debug), (f: rt.Formatter) => rt.usizeDisplay(_77, f)]; rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args2[0], " ", args2[1], " ", args2[2]])), undefined, true); - rt.iterExtendBytes(out, rt.iterSlice(Uint8Array.of(boundOf$i32(table, rt.rangeInclusiveStartBound(r) as rt.RangeBound), boundOf$i32(table, rt.rangeInclusiveEndBound(r) as rt.RangeBound))), undefined, true); - const _98: boolean = rt.rangeInclusiveIsEmpty(r); - const _103: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.i32Step); - const _100: boolean = rt.rangeEq(rt.same)(r, _103); - const _109: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.i32Step); - const _106: boolean = rt.rangeEq(rt.same)(r, _109); - const _113: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.i32Step); - rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_98, _100, _106, !rt.rangeEq(rt.same)(r, _113)], (a0: boolean): rt.u8 => { + const _96: rt.RangeBound = rt.rangeInclusiveStartBound(r) as rt.RangeBound; + const _99: rt.RangeBound = rt.rangeInclusiveEndBound(r) as rt.RangeBound; + const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtBound(_96, f, rt.i32Debug), (f: rt.Formatter) => rt.fmtBound(_99, f, rt.i32Debug)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0], " ", args4[1]])), undefined, true); + const _109: boolean = rt.rangeInclusiveIsEmpty(r); + const _114: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.i32Step); + const _111: boolean = rt.rangeEq(rt.same)(r, _114); + const _120: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.i32Step); + const _117: boolean = rt.rangeEq(rt.same)(r, _120); + const _124: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.i32Step); + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_109, _111, _117, !rt.rangeEq(rt.same)(r, _124)], (a0: boolean): rt.u8 => { return a0 ? 1 : 0; })), undefined, true); rt.iterExtendBytes(out, rt.iterMap(rt.iterSlice(table), (x: rt.i32): rt.u8 => { @@ -7285,11 +6967,11 @@ export function stepped$i32(table: rt.i32[], at: rt.usize[], out: rt.ByteVec): v rt.rangeHash(rt.hash32)(r, h3); }; rt.iterExtendBytes(out, rt.iterSlice(_7(part3)), undefined, true); - const _129: [rt.i32, rt.i32] = rt.rangeInclusiveIntoInner(r); - const start2: rt.i32 = _129[0]; - const end2: rt.i32 = _129[1]; - const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.i32Debug(start2, f), (f: rt.Formatter) => rt.i32Debug(end2, f)]; - rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0], " ", args4[1]])), undefined, true); + const _140: [rt.i32, rt.i32] = rt.rangeInclusiveIntoInner(r); + const start2: rt.i32 = _140[0]; + const end2: rt.i32 = _140[1]; + const args6: rt.Fmt[] = [(f: rt.Formatter) => rt.i32Debug(start2, f), (f: rt.Formatter) => rt.i32Debug(end2, f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args6[0], " ", args6[1]])), undefined, true); } } @@ -7359,14 +7041,17 @@ export function stepped$i64(table: rt.i64[], at: rt.usize[], out: rt.ByteVec): v const _77: rt.usize = rt.hashLen(rt.hashExtendKeys(rt.hashNew(rt.hashing(rt.rangeHash(rt.hash64), rt.rangeEq(rt.i64Eq))) as rt.HashSet>, rt.iterSlice(_62), undefined, undefined, 58720256)); const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtOption(read, f, rt.i64Debug), (f: rt.Formatter) => rt.fmtRangeInclusive(r, f, rt.i64Debug), (f: rt.Formatter) => rt.usizeDisplay(_77, f)]; rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args2[0], " ", args2[1], " ", args2[2]])), undefined, true); - rt.iterExtendBytes(out, rt.iterSlice(Uint8Array.of(boundOf$i64(table, rt.rangeInclusiveStartBound(r) as rt.RangeBound), boundOf$i64(table, rt.rangeInclusiveEndBound(r) as rt.RangeBound))), undefined, true); - const _98: boolean = rt.rangeInclusiveIsEmpty(r); - const _103: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.i64Step); - const _100: boolean = rt.rangeEq(rt.i64Eq)(r, _103); - const _109: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.i64Step); - const _106: boolean = rt.rangeEq(rt.i64Eq)(r, _109); - const _113: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.i64Step); - rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_98, _100, _106, !rt.rangeEq(rt.i64Eq)(r, _113)], (a0: boolean): rt.u8 => { + const _96: rt.RangeBound = rt.rangeInclusiveStartBound(r) as rt.RangeBound; + const _99: rt.RangeBound = rt.rangeInclusiveEndBound(r) as rt.RangeBound; + const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtBound(_96, f, rt.i64Debug), (f: rt.Formatter) => rt.fmtBound(_99, f, rt.i64Debug)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0], " ", args4[1]])), undefined, true); + const _109: boolean = rt.rangeInclusiveIsEmpty(r); + const _114: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.i64Step); + const _111: boolean = rt.rangeEq(rt.i64Eq)(r, _114); + const _120: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.i64Step); + const _117: boolean = rt.rangeEq(rt.i64Eq)(r, _120); + const _124: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.i64Step); + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_109, _111, _117, !rt.rangeEq(rt.i64Eq)(r, _124)], (a0: boolean): rt.u8 => { return a0 ? 1 : 0; })), undefined, true); rt.iterExtendBytes(out, rt.iterMap(rt.iterSlice(table), (x: rt.i64): rt.u8 => { @@ -7376,11 +7061,11 @@ export function stepped$i64(table: rt.i64[], at: rt.usize[], out: rt.ByteVec): v rt.rangeHash(rt.hash64)(r, h3); }; rt.iterExtendBytes(out, rt.iterSlice(_7(part3)), undefined, true); - const _129: [rt.i64, rt.i64] = rt.rangeInclusiveIntoInner(r); - const start2: rt.i64 = _129[0]; - const end2: rt.i64 = _129[1]; - const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.i64Debug(start2, f), (f: rt.Formatter) => rt.i64Debug(end2, f)]; - rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0], " ", args4[1]])), undefined, true); + const _140: [rt.i64, rt.i64] = rt.rangeInclusiveIntoInner(r); + const start2: rt.i64 = _140[0]; + const end2: rt.i64 = _140[1]; + const args6: rt.Fmt[] = [(f: rt.Formatter) => rt.i64Debug(start2, f), (f: rt.Formatter) => rt.i64Debug(end2, f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args6[0], " ", args6[1]])), undefined, true); } } @@ -7450,14 +7135,17 @@ export function stepped$i8(table: rt.i8[], at: rt.usize[], out: rt.ByteVec): voi const _77: rt.usize = rt.hashLen(rt.hashExtendKeys(rt.hashNew(rt.hashing(rt.rangeHash(rt.hash8), rt.rangeEq(rt.same))) as rt.HashSet>, rt.iterSlice(_62), undefined, undefined, 234881024)); const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtOption(read, f, rt.i8Debug), (f: rt.Formatter) => rt.fmtRangeInclusive(r, f, rt.i8Debug), (f: rt.Formatter) => rt.usizeDisplay(_77, f)]; rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args2[0], " ", args2[1], " ", args2[2]])), undefined, true); - rt.iterExtendBytes(out, rt.iterSlice(Uint8Array.of(boundOf$i8(table, rt.rangeInclusiveStartBound(r) as rt.RangeBound), boundOf$i8(table, rt.rangeInclusiveEndBound(r) as rt.RangeBound))), undefined, true); - const _98: boolean = rt.rangeInclusiveIsEmpty(r); - const _103: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.i8Step); - const _100: boolean = rt.rangeEq(rt.same)(r, _103); - const _109: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.i8Step); - const _106: boolean = rt.rangeEq(rt.same)(r, _109); - const _113: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.i8Step); - rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_98, _100, _106, !rt.rangeEq(rt.same)(r, _113)], (a0: boolean): rt.u8 => { + const _96: rt.RangeBound = rt.rangeInclusiveStartBound(r) as rt.RangeBound; + const _99: rt.RangeBound = rt.rangeInclusiveEndBound(r) as rt.RangeBound; + const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtBound(_96, f, rt.i8Debug), (f: rt.Formatter) => rt.fmtBound(_99, f, rt.i8Debug)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0], " ", args4[1]])), undefined, true); + const _109: boolean = rt.rangeInclusiveIsEmpty(r); + const _114: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.i8Step); + const _111: boolean = rt.rangeEq(rt.same)(r, _114); + const _120: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.i8Step); + const _117: boolean = rt.rangeEq(rt.same)(r, _120); + const _124: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.i8Step); + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_109, _111, _117, !rt.rangeEq(rt.same)(r, _124)], (a0: boolean): rt.u8 => { return a0 ? 1 : 0; })), undefined, true); rt.iterExtendBytes(out, rt.iterMap(rt.iterSlice(table), (x: rt.i8): rt.u8 => { @@ -7467,11 +7155,11 @@ export function stepped$i8(table: rt.i8[], at: rt.usize[], out: rt.ByteVec): voi rt.rangeHash(rt.hash8)(r, h3); }; rt.iterExtendBytes(out, rt.iterSlice(_7(part3)), undefined, true); - const _129: [rt.i8, rt.i8] = rt.rangeInclusiveIntoInner(r); - const start2: rt.i8 = _129[0]; - const end2: rt.i8 = _129[1]; - const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.i8Debug(start2, f), (f: rt.Formatter) => rt.i8Debug(end2, f)]; - rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0], " ", args4[1]])), undefined, true); + const _140: [rt.i8, rt.i8] = rt.rangeInclusiveIntoInner(r); + const start2: rt.i8 = _140[0]; + const end2: rt.i8 = _140[1]; + const args6: rt.Fmt[] = [(f: rt.Formatter) => rt.i8Debug(start2, f), (f: rt.Formatter) => rt.i8Debug(end2, f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args6[0], " ", args6[1]])), undefined, true); } } @@ -7541,14 +7229,17 @@ export function stepped$isize(table: rt.isize[], at: rt.usize[], out: rt.ByteVec const _77: rt.usize = rt.hashLen(rt.hashExtendKeys(rt.hashNew(rt.hashing(rt.rangeHash(rt.hash32), rt.rangeEq(rt.same))) as rt.HashSet>, rt.iterSlice(_62), undefined, undefined, 117440512)); const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtOption(read, f, rt.isizeDebug), (f: rt.Formatter) => rt.fmtRangeInclusive(r, f, rt.isizeDebug), (f: rt.Formatter) => rt.usizeDisplay(_77, f)]; rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args2[0], " ", args2[1], " ", args2[2]])), undefined, true); - rt.iterExtendBytes(out, rt.iterSlice(Uint8Array.of(boundOf$isize(table, rt.rangeInclusiveStartBound(r) as rt.RangeBound), boundOf$isize(table, rt.rangeInclusiveEndBound(r) as rt.RangeBound))), undefined, true); - const _98: boolean = rt.rangeInclusiveIsEmpty(r); - const _103: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.isizeStep); - const _100: boolean = rt.rangeEq(rt.same)(r, _103); - const _109: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.isizeStep); - const _106: boolean = rt.rangeEq(rt.same)(r, _109); - const _113: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.isizeStep); - rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_98, _100, _106, !rt.rangeEq(rt.same)(r, _113)], (a0: boolean): rt.u8 => { + const _96: rt.RangeBound = rt.rangeInclusiveStartBound(r) as rt.RangeBound; + const _99: rt.RangeBound = rt.rangeInclusiveEndBound(r) as rt.RangeBound; + const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtBound(_96, f, rt.isizeDebug), (f: rt.Formatter) => rt.fmtBound(_99, f, rt.isizeDebug)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0], " ", args4[1]])), undefined, true); + const _109: boolean = rt.rangeInclusiveIsEmpty(r); + const _114: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.isizeStep); + const _111: boolean = rt.rangeEq(rt.same)(r, _114); + const _120: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.isizeStep); + const _117: boolean = rt.rangeEq(rt.same)(r, _120); + const _124: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.isizeStep); + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_109, _111, _117, !rt.rangeEq(rt.same)(r, _124)], (a0: boolean): rt.u8 => { return a0 ? 1 : 0; })), undefined, true); rt.iterExtendBytes(out, rt.iterMap(rt.iterSlice(table), (x: rt.isize): rt.u8 => { @@ -7558,11 +7249,11 @@ export function stepped$isize(table: rt.isize[], at: rt.usize[], out: rt.ByteVec rt.rangeHash(rt.hash32)(r, h3); }; rt.iterExtendBytes(out, rt.iterSlice(_7(part3)), undefined, true); - const _129: [rt.isize, rt.isize] = rt.rangeInclusiveIntoInner(r); - const start2: rt.isize = _129[0]; - const end2: rt.isize = _129[1]; - const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.isizeDebug(start2, f), (f: rt.Formatter) => rt.isizeDebug(end2, f)]; - rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0], " ", args4[1]])), undefined, true); + const _140: [rt.isize, rt.isize] = rt.rangeInclusiveIntoInner(r); + const start2: rt.isize = _140[0]; + const end2: rt.isize = _140[1]; + const args6: rt.Fmt[] = [(f: rt.Formatter) => rt.isizeDebug(start2, f), (f: rt.Formatter) => rt.isizeDebug(end2, f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args6[0], " ", args6[1]])), undefined, true); } } @@ -7632,14 +7323,17 @@ export function stepped$u128(table: rt.u128[], at: rt.usize[], out: rt.ByteVec): const _77: rt.usize = rt.hashLen(rt.hashExtendKeys(rt.hashNew(rt.hashing(rt.rangeHash(rt.hash128), rt.rangeEq(rt.u128Eq))) as rt.HashSet>, rt.iterSlice(_62), undefined, undefined, 29360128)); const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtOption(read, f, rt.u128Debug), (f: rt.Formatter) => rt.fmtRangeInclusive(r, f, rt.u128Debug), (f: rt.Formatter) => rt.usizeDisplay(_77, f)]; rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args2[0], " ", args2[1], " ", args2[2]])), undefined, true); - rt.iterExtendBytes(out, rt.iterSlice(Uint8Array.of(boundOf$u128(table, rt.rangeInclusiveStartBound(r) as rt.RangeBound), boundOf$u128(table, rt.rangeInclusiveEndBound(r) as rt.RangeBound))), undefined, true); - const _98: boolean = rt.rangeInclusiveIsEmpty(r); - const _103: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.u128Step); - const _100: boolean = rt.rangeEq(rt.u128Eq)(r, _103); - const _109: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.u128Step); - const _106: boolean = rt.rangeEq(rt.u128Eq)(r, _109); - const _113: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.u128Step); - rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_98, _100, _106, !rt.rangeEq(rt.u128Eq)(r, _113)], (a0: boolean): rt.u8 => { + const _96: rt.RangeBound = rt.rangeInclusiveStartBound(r) as rt.RangeBound; + const _99: rt.RangeBound = rt.rangeInclusiveEndBound(r) as rt.RangeBound; + const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtBound(_96, f, rt.u128Debug), (f: rt.Formatter) => rt.fmtBound(_99, f, rt.u128Debug)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0], " ", args4[1]])), undefined, true); + const _109: boolean = rt.rangeInclusiveIsEmpty(r); + const _114: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.u128Step); + const _111: boolean = rt.rangeEq(rt.u128Eq)(r, _114); + const _120: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.u128Step); + const _117: boolean = rt.rangeEq(rt.u128Eq)(r, _120); + const _124: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.u128Step); + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_109, _111, _117, !rt.rangeEq(rt.u128Eq)(r, _124)], (a0: boolean): rt.u8 => { return a0 ? 1 : 0; })), undefined, true); rt.iterExtendBytes(out, rt.iterMap(rt.iterSlice(table), (x: rt.u128): rt.u8 => { @@ -7649,11 +7343,11 @@ export function stepped$u128(table: rt.u128[], at: rt.usize[], out: rt.ByteVec): rt.rangeHash(rt.hash128)(r, h3); }; rt.iterExtendBytes(out, rt.iterSlice(_7(part3)), undefined, true); - const _129: [rt.u128, rt.u128] = rt.rangeInclusiveIntoInner(r); - const start2: rt.u128 = _129[0]; - const end2: rt.u128 = _129[1]; - const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.u128Debug(start2, f), (f: rt.Formatter) => rt.u128Debug(end2, f)]; - rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0], " ", args4[1]])), undefined, true); + const _140: [rt.u128, rt.u128] = rt.rangeInclusiveIntoInner(r); + const start2: rt.u128 = _140[0]; + const end2: rt.u128 = _140[1]; + const args6: rt.Fmt[] = [(f: rt.Formatter) => rt.u128Debug(start2, f), (f: rt.Formatter) => rt.u128Debug(end2, f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args6[0], " ", args6[1]])), undefined, true); } } @@ -7723,14 +7417,17 @@ export function stepped$u16(table: rt.u16[], at: rt.usize[], out: rt.ByteVec): v const _77: rt.usize = rt.hashLen(rt.hashExtendKeys(rt.hashNew(rt.hashing(rt.rangeHash(rt.hash16), rt.rangeEq(rt.same))) as rt.HashSet>, rt.iterSlice(_62), undefined, undefined, 234881024)); const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtOption(read, f, rt.u16Debug), (f: rt.Formatter) => rt.fmtRangeInclusive(r, f, rt.u16Debug), (f: rt.Formatter) => rt.usizeDisplay(_77, f)]; rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args2[0], " ", args2[1], " ", args2[2]])), undefined, true); - rt.iterExtendBytes(out, rt.iterSlice(Uint8Array.of(boundOf$u16(table, rt.rangeInclusiveStartBound(r) as rt.RangeBound), boundOf$u16(table, rt.rangeInclusiveEndBound(r) as rt.RangeBound))), undefined, true); - const _98: boolean = rt.rangeInclusiveIsEmpty(r); - const _103: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.u16Step); - const _100: boolean = rt.rangeEq(rt.same)(r, _103); - const _109: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.u16Step); - const _106: boolean = rt.rangeEq(rt.same)(r, _109); - const _113: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.u16Step); - rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_98, _100, _106, !rt.rangeEq(rt.same)(r, _113)], (a0: boolean): rt.u8 => { + const _96: rt.RangeBound = rt.rangeInclusiveStartBound(r) as rt.RangeBound; + const _99: rt.RangeBound = rt.rangeInclusiveEndBound(r) as rt.RangeBound; + const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtBound(_96, f, rt.u16Debug), (f: rt.Formatter) => rt.fmtBound(_99, f, rt.u16Debug)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0], " ", args4[1]])), undefined, true); + const _109: boolean = rt.rangeInclusiveIsEmpty(r); + const _114: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.u16Step); + const _111: boolean = rt.rangeEq(rt.same)(r, _114); + const _120: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.u16Step); + const _117: boolean = rt.rangeEq(rt.same)(r, _120); + const _124: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.u16Step); + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_109, _111, _117, !rt.rangeEq(rt.same)(r, _124)], (a0: boolean): rt.u8 => { return a0 ? 1 : 0; })), undefined, true); rt.iterExtendBytes(out, rt.iterMap(rt.iterSlice(table), (x: rt.u16): rt.u8 => { @@ -7740,11 +7437,11 @@ export function stepped$u16(table: rt.u16[], at: rt.usize[], out: rt.ByteVec): v rt.rangeHash(rt.hash16)(r, h3); }; rt.iterExtendBytes(out, rt.iterSlice(_7(part3)), undefined, true); - const _129: [rt.u16, rt.u16] = rt.rangeInclusiveIntoInner(r); - const start2: rt.u16 = _129[0]; - const end2: rt.u16 = _129[1]; - const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.u16Debug(start2, f), (f: rt.Formatter) => rt.u16Debug(end2, f)]; - rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0], " ", args4[1]])), undefined, true); + const _140: [rt.u16, rt.u16] = rt.rangeInclusiveIntoInner(r); + const start2: rt.u16 = _140[0]; + const end2: rt.u16 = _140[1]; + const args6: rt.Fmt[] = [(f: rt.Formatter) => rt.u16Debug(start2, f), (f: rt.Formatter) => rt.u16Debug(end2, f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args6[0], " ", args6[1]])), undefined, true); } } @@ -7814,14 +7511,17 @@ export function stepped$u32(table: rt.u32[], at: rt.usize[], out: rt.ByteVec): v const _77: rt.usize = rt.hashLen(rt.hashExtendKeys(rt.hashNew(rt.hashing(rt.rangeHash(rt.hash32), rt.rangeEq(rt.same))) as rt.HashSet>, rt.iterSlice(_62), undefined, undefined, 117440512)); const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtOption(read, f, rt.u32Debug), (f: rt.Formatter) => rt.fmtRangeInclusive(r, f, rt.u32Debug), (f: rt.Formatter) => rt.usizeDisplay(_77, f)]; rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args2[0], " ", args2[1], " ", args2[2]])), undefined, true); - rt.iterExtendBytes(out, rt.iterSlice(Uint8Array.of(boundOf$u32(table, rt.rangeInclusiveStartBound(r) as rt.RangeBound), boundOf$u32(table, rt.rangeInclusiveEndBound(r) as rt.RangeBound))), undefined, true); - const _98: boolean = rt.rangeInclusiveIsEmpty(r); - const _103: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.u32Step); - const _100: boolean = rt.rangeEq(rt.same)(r, _103); - const _109: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.u32Step); - const _106: boolean = rt.rangeEq(rt.same)(r, _109); - const _113: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.u32Step); - rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_98, _100, _106, !rt.rangeEq(rt.same)(r, _113)], (a0: boolean): rt.u8 => { + const _96: rt.RangeBound = rt.rangeInclusiveStartBound(r) as rt.RangeBound; + const _99: rt.RangeBound = rt.rangeInclusiveEndBound(r) as rt.RangeBound; + const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtBound(_96, f, rt.u32Debug), (f: rt.Formatter) => rt.fmtBound(_99, f, rt.u32Debug)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0], " ", args4[1]])), undefined, true); + const _109: boolean = rt.rangeInclusiveIsEmpty(r); + const _114: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.u32Step); + const _111: boolean = rt.rangeEq(rt.same)(r, _114); + const _120: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.u32Step); + const _117: boolean = rt.rangeEq(rt.same)(r, _120); + const _124: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.u32Step); + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_109, _111, _117, !rt.rangeEq(rt.same)(r, _124)], (a0: boolean): rt.u8 => { return a0 ? 1 : 0; })), undefined, true); rt.iterExtendBytes(out, rt.iterMap(rt.iterSlice(table), (x: rt.u32): rt.u8 => { @@ -7831,11 +7531,11 @@ export function stepped$u32(table: rt.u32[], at: rt.usize[], out: rt.ByteVec): v rt.rangeHash(rt.hash32)(r, h3); }; rt.iterExtendBytes(out, rt.iterSlice(_7(part3)), undefined, true); - const _129: [rt.u32, rt.u32] = rt.rangeInclusiveIntoInner(r); - const start2: rt.u32 = _129[0]; - const end2: rt.u32 = _129[1]; - const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.u32Debug(start2, f), (f: rt.Formatter) => rt.u32Debug(end2, f)]; - rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0], " ", args4[1]])), undefined, true); + const _140: [rt.u32, rt.u32] = rt.rangeInclusiveIntoInner(r); + const start2: rt.u32 = _140[0]; + const end2: rt.u32 = _140[1]; + const args6: rt.Fmt[] = [(f: rt.Formatter) => rt.u32Debug(start2, f), (f: rt.Formatter) => rt.u32Debug(end2, f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args6[0], " ", args6[1]])), undefined, true); } } @@ -7905,14 +7605,17 @@ export function stepped$u64(table: rt.u64[], at: rt.usize[], out: rt.ByteVec): v const _77: rt.usize = rt.hashLen(rt.hashExtendKeys(rt.hashNew(rt.hashing(rt.rangeHash(rt.hash64), rt.rangeEq(rt.u64Eq))) as rt.HashSet>, rt.iterSlice(_62), undefined, undefined, 58720256)); const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtOption(read, f, rt.u64Debug), (f: rt.Formatter) => rt.fmtRangeInclusive(r, f, rt.u64Debug), (f: rt.Formatter) => rt.usizeDisplay(_77, f)]; rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args2[0], " ", args2[1], " ", args2[2]])), undefined, true); - rt.iterExtendBytes(out, rt.iterSlice(Uint8Array.of(boundOf$u64(table, rt.rangeInclusiveStartBound(r) as rt.RangeBound), boundOf$u64(table, rt.rangeInclusiveEndBound(r) as rt.RangeBound))), undefined, true); - const _98: boolean = rt.rangeInclusiveIsEmpty(r); - const _103: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.u64Step); - const _100: boolean = rt.rangeEq(rt.u64Eq)(r, _103); - const _109: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.u64Step); - const _106: boolean = rt.rangeEq(rt.u64Eq)(r, _109); - const _113: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.u64Step); - rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_98, _100, _106, !rt.rangeEq(rt.u64Eq)(r, _113)], (a0: boolean): rt.u8 => { + const _96: rt.RangeBound = rt.rangeInclusiveStartBound(r) as rt.RangeBound; + const _99: rt.RangeBound = rt.rangeInclusiveEndBound(r) as rt.RangeBound; + const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtBound(_96, f, rt.u64Debug), (f: rt.Formatter) => rt.fmtBound(_99, f, rt.u64Debug)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0], " ", args4[1]])), undefined, true); + const _109: boolean = rt.rangeInclusiveIsEmpty(r); + const _114: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.u64Step); + const _111: boolean = rt.rangeEq(rt.u64Eq)(r, _114); + const _120: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.u64Step); + const _117: boolean = rt.rangeEq(rt.u64Eq)(r, _120); + const _124: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.u64Step); + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_109, _111, _117, !rt.rangeEq(rt.u64Eq)(r, _124)], (a0: boolean): rt.u8 => { return a0 ? 1 : 0; })), undefined, true); rt.iterExtendBytes(out, rt.iterMap(rt.iterSlice(table), (x: rt.u64): rt.u8 => { @@ -7922,11 +7625,11 @@ export function stepped$u64(table: rt.u64[], at: rt.usize[], out: rt.ByteVec): v rt.rangeHash(rt.hash64)(r, h3); }; rt.iterExtendBytes(out, rt.iterSlice(_7(part3)), undefined, true); - const _129: [rt.u64, rt.u64] = rt.rangeInclusiveIntoInner(r); - const start2: rt.u64 = _129[0]; - const end2: rt.u64 = _129[1]; - const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.u64Debug(start2, f), (f: rt.Formatter) => rt.u64Debug(end2, f)]; - rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0], " ", args4[1]])), undefined, true); + const _140: [rt.u64, rt.u64] = rt.rangeInclusiveIntoInner(r); + const start2: rt.u64 = _140[0]; + const end2: rt.u64 = _140[1]; + const args6: rt.Fmt[] = [(f: rt.Formatter) => rt.u64Debug(start2, f), (f: rt.Formatter) => rt.u64Debug(end2, f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args6[0], " ", args6[1]])), undefined, true); } } @@ -7996,14 +7699,17 @@ export function stepped$u8(table: rt.ByteSlice, at: rt.usize[], out: rt.ByteVec) const _77: rt.usize = rt.hashLen(rt.hashExtendKeys(rt.hashNew(rt.hashing(rt.rangeHash(rt.hash8), rt.rangeEq(rt.same))) as rt.HashSet>, rt.iterSlice(_62), undefined, undefined, 234881024)); const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtOption(read, f, rt.u8Debug), (f: rt.Formatter) => rt.fmtRangeInclusive(r, f, rt.u8Debug), (f: rt.Formatter) => rt.usizeDisplay(_77, f)]; rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args2[0], " ", args2[1], " ", args2[2]])), undefined, true); - rt.iterExtendBytes(out, rt.iterSlice(Uint8Array.of(boundOf$u8(table, rt.rangeInclusiveStartBound(r) as rt.RangeBound), boundOf$u8(table, rt.rangeInclusiveEndBound(r) as rt.RangeBound))), undefined, true); - const _98: boolean = rt.rangeInclusiveIsEmpty(r); - const _103: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.u8Step); - const _100: boolean = rt.rangeEq(rt.same)(r, _103); - const _109: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.u8Step); - const _106: boolean = rt.rangeEq(rt.same)(r, _109); - const _113: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.u8Step); - rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_98, _100, _106, !rt.rangeEq(rt.same)(r, _113)], (a0: boolean): rt.u8 => { + const _96: rt.RangeBound = rt.rangeInclusiveStartBound(r) as rt.RangeBound; + const _99: rt.RangeBound = rt.rangeInclusiveEndBound(r) as rt.RangeBound; + const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtBound(_96, f, rt.u8Debug), (f: rt.Formatter) => rt.fmtBound(_99, f, rt.u8Debug)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0], " ", args4[1]])), undefined, true); + const _109: boolean = rt.rangeInclusiveIsEmpty(r); + const _114: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.u8Step); + const _111: boolean = rt.rangeEq(rt.same)(r, _114); + const _120: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.u8Step); + const _117: boolean = rt.rangeEq(rt.same)(r, _120); + const _124: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.u8Step); + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_109, _111, _117, !rt.rangeEq(rt.same)(r, _124)], (a0: boolean): rt.u8 => { return a0 ? 1 : 0; })), undefined, true); rt.iterExtendBytes(out, rt.iterMap(rt.iterSlice(rt.byteSliceView(table)), (x: rt.u8): rt.u8 => { @@ -8013,11 +7719,11 @@ export function stepped$u8(table: rt.ByteSlice, at: rt.usize[], out: rt.ByteVec) rt.rangeHash(rt.hash8)(r, h3); }; rt.iterExtendBytes(out, rt.iterSlice(_7(part3)), undefined, true); - const _129: [rt.u8, rt.u8] = rt.rangeInclusiveIntoInner(r); - const start2: rt.u8 = _129[0]; - const end2: rt.u8 = _129[1]; - const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.u8Debug(start2, f), (f: rt.Formatter) => rt.u8Debug(end2, f)]; - rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0], " ", args4[1]])), undefined, true); + const _140: [rt.u8, rt.u8] = rt.rangeInclusiveIntoInner(r); + const start2: rt.u8 = _140[0]; + const end2: rt.u8 = _140[1]; + const args6: rt.Fmt[] = [(f: rt.Formatter) => rt.u8Debug(start2, f), (f: rt.Formatter) => rt.u8Debug(end2, f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args6[0], " ", args6[1]])), undefined, true); } } @@ -8087,14 +7793,17 @@ export function stepped$usize(table: rt.usize[], at: rt.usize[], out: rt.ByteVec const _77: rt.usize = rt.hashLen(rt.hashExtendKeys(rt.hashNew(rt.hashing(rt.rangeHash(rt.hash32), rt.rangeEq(rt.same))) as rt.HashSet>, rt.iterSlice(_62), undefined, undefined, 117440512)); const args2: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtOption(read, f, rt.usizeDebug), (f: rt.Formatter) => rt.fmtRangeInclusive(r, f, rt.usizeDebug), (f: rt.Formatter) => rt.usizeDisplay(_77, f)]; rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args2[0], " ", args2[1], " ", args2[2]])), undefined, true); - rt.iterExtendBytes(out, rt.iterSlice(Uint8Array.of(boundOf$usize(table, rt.rangeInclusiveStartBound(r) as rt.RangeBound), boundOf$usize(table, rt.rangeInclusiveEndBound(r) as rt.RangeBound))), undefined, true); - const _98: boolean = rt.rangeInclusiveIsEmpty(r); - const _103: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.usizeStep); - const _100: boolean = rt.rangeEq(rt.same)(r, _103); - const _109: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.usizeStep); - const _106: boolean = rt.rangeEq(rt.same)(r, _109); - const _113: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.usizeStep); - rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_98, _100, _106, !rt.rangeEq(rt.same)(r, _113)], (a0: boolean): rt.u8 => { + const _96: rt.RangeBound = rt.rangeInclusiveStartBound(r) as rt.RangeBound; + const _99: rt.RangeBound = rt.rangeInclusiveEndBound(r) as rt.RangeBound; + const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.fmtBound(_96, f, rt.usizeDebug), (f: rt.Formatter) => rt.fmtBound(_99, f, rt.usizeDebug)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0], " ", args4[1]])), undefined, true); + const _109: boolean = rt.rangeInclusiveIsEmpty(r); + const _114: rt.RangeInclusive = new rt.RangeInclusive(a, b, rt.usizeStep); + const _111: boolean = rt.rangeEq(rt.same)(r, _114); + const _120: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.usizeStep); + const _117: boolean = rt.rangeEq(rt.same)(r, _120); + const _124: rt.RangeInclusive = new rt.RangeInclusive(start, end, rt.usizeStep); + rt.iterExtendBytes(out, rt.iterSlice(rt.bytesMap([_109, _111, _117, !rt.rangeEq(rt.same)(r, _124)], (a0: boolean): rt.u8 => { return a0 ? 1 : 0; })), undefined, true); rt.iterExtendBytes(out, rt.iterMap(rt.iterSlice(table), (x: rt.usize): rt.u8 => { @@ -8104,11 +7813,11 @@ export function stepped$usize(table: rt.usize[], at: rt.usize[], out: rt.ByteVec rt.rangeHash(rt.hash32)(r, h3); }; rt.iterExtendBytes(out, rt.iterSlice(_7(part3)), undefined, true); - const _129: [rt.usize, rt.usize] = rt.rangeInclusiveIntoInner(r); - const start2: rt.usize = _129[0]; - const end2: rt.usize = _129[1]; - const args4: rt.Fmt[] = [(f: rt.Formatter) => rt.usizeDebug(start2, f), (f: rt.Formatter) => rt.usizeDebug(end2, f)]; - rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args4[0], " ", args4[1]])), undefined, true); + const _140: [rt.usize, rt.usize] = rt.rangeInclusiveIntoInner(r); + const start2: rt.usize = _140[0]; + const end2: rt.usize = _140[1]; + const args6: rt.Fmt[] = [(f: rt.Formatter) => rt.usizeDebug(start2, f), (f: rt.Formatter) => rt.usizeDebug(end2, f)]; + rt.iterExtendBytes(out, rt.strBytes(rt.fmtFormat([args6[0], " ", args6[1]])), undefined, true); } } diff --git a/ts/fixtures/lang/src/fmt.rs b/ts/fixtures/lang/src/fmt.rs index fe0e29277..093ad67f0 100644 --- a/ts/fixtures/lang/src/fmt.rs +++ b/ts/fixtures/lang/src/fmt.rs @@ -724,6 +724,91 @@ pub fn collections(data: &[u8], out: &mut Vec) { put(out, &format!("{one:?}|{one:#?}|{one:>3?}|{set:?}|{set:#?}|{set:#04x?}")); } +/// `Debug` of std's enums beside its ranges and comparisons, each derived: a variant with +/// a field passes the options to it, and one without writes its name unpadded. A +/// `ControlFlow` that `?` would break with holds the `Err` or `None` it was applied to. +pub fn enums(data: &[u8], out: &mut Vec) { + use std::cmp::{Ordering, Reverse}; + use std::convert::Infallible; + use std::ops::{Bound, ControlFlow, RangeBounds}; + let at = |i: usize| data.get(i).copied().unwrap_or(0); + let w = usize::from(at(0) % 10); + fn pick(by: u8, x: T) -> Bound { + match by % 3 { + 0 => Bound::Included(x), + 1 => Bound::Excluded(x), + _ => Bound::Unbounded, + } + } + let n = pick(at(1), at(2)); + put(out, &format!("{n:?}|{n:#?}|{n:x?}|{n:#X?}|{n:>w$?}|{n:_^7?}|{n:+04?}")); + let s = pick(at(3), STRINGS[usize::from(at(4)) % STRINGS.len()]); + put(out, &format!("{s:?}|{s:#?}|{s:>9?}|{s:*4?}")); + let bytes = pick(at(10), &data[..data.len().min(3)]); + put(out, &format!("{bytes:?}|{bytes:#?}|{bytes:x?}|{bytes:3?}")); + let clip = pick(at(11), Clip(STRINGS[usize::from(at(12)) % STRINGS.len()])); + put(out, &format!("{:8.2?}|{:#?}|{:?}", clip.as_ref(), Some(clip), (n, s))); + // A range's bounds borrow its own. + let r = at(1)..=at(2); + put( + out, + &format!( + "{:?} {:?} {:?} {:x?} {:#?}", + r.start_bound(), + r.end_bound(), + (at(1)..).end_bound(), + (..at(2)).end_bound(), + RangeBounds::::start_bound(&..) + ), + ); + + let ord = at(1).cmp(&at(2)); + let all = [Ordering::Less, Ordering::Equal, Ordering::Greater]; + put(out, &format!("{ord:?}|{ord:>8?}|{ord:#?}|{all:?}|{all:#?}")); + let rev = Reverse(at(1)); + let nested = Reverse(Reverse(STRINGS[usize::from(at(4)) % STRINGS.len()])); + put( + out, + &format!("{rev:?}|{rev:#?}|{rev:x?}|{rev:>w$?}|{nested:?}|{nested:#?}"), + ); + + let text = STRINGS[usize::from(at(4)) % STRINGS.len()]; + let flow = match at(1) % 2 { + 0 => ControlFlow::Break(text), + _ => ControlFlow::Continue(u16::from(at(2)) * 300), + }; + put(out, &format!("{flow:?}|{flow:#?}|{flow:x?}|{flow:>w$?}")); + let unit: ControlFlow = match at(1) % 2 { + 0 => ControlFlow::Break(at(2)), + _ => ControlFlow::Continue(()), + }; + put(out, &format!("{unit:?}|{unit:#?}|{unit:03?}")); + let erred: ControlFlow, u16> = match at(1) % 2 { + 0 => ControlFlow::Break(Err(at(2))), + _ => ControlFlow::Continue(u16::from(at(2))), + }; + put(out, &format!("{erred:?}|{erred:#?}|{erred:>5?}")); + let none: ControlFlow, u8> = match at(1) % 2 { + 0 => ControlFlow::Break(None), + _ => ControlFlow::Continue(at(2)), + }; + // `()` is `undefined`, so its `None` is `rt.None`. + let unit_none: ControlFlow> = match at(2) % 2 { + 0 => ControlFlow::Break(None), + _ => ControlFlow::Continue(()), + }; + put( + out, + &format!("{none:?}|{none:#?}|{none:<4?}|{unit_none:?}|{unit_none:#?}"), + ); + let ok: Result = Ok(at(2)); + put(out, &format!("{ok:?}|{ok:#?}")); +} + /// std's iterators' `Debug`, each the items it has left in its own wrapper, through each /// element's `Debug` with the formatter's options: consumed from either end, empty, and /// pretty. A hash iterator holds at most one entry, since std leaves their order unspecified. diff --git a/ts/fixtures/lang/src/harness.rs b/ts/fixtures/lang/src/harness.rs index d01daaa50..1a9995ede 100644 --- a/ts/fixtures/lang/src/harness.rs +++ b/ts/fixtures/lang/src/harness.rs @@ -203,6 +203,7 @@ fn cases() -> Vec<(&'static str, Case)> { ("wraps::i64s", wraps::i64s), ("wraps::i128s", wraps::i128s), ("wraps::isizes", wraps::isizes), + ("fmt::enums", |_, data, out| fmt::enums(data, out)), ] } diff --git a/ts/fixtures/lang/src/iters.rs b/ts/fixtures/lang/src/iters.rs index 462dcbdd9..4838c5109 100644 --- a/ts/fixtures/lang/src/iters.rs +++ b/ts/fixtures/lang/src/iters.rs @@ -1495,21 +1495,10 @@ fn bounded(table: &[T], at: [usize; 2], out: to.end_bound(), through.end_bound(), ]; - out.extend(bounds.map(|bound| bound_of(table, bound))); + out.extend(format!("{bounds:?}").bytes()); (a, b) } -/// Which kind of bound `bound` is, and where its value is in `table`. -fn bound_of(table: &[T], bound: std::ops::Bound<&T>) -> u8 { - use std::ops::Bound; - let at = |x: &T| table.iter().position(|y| y == x).map_or(0x3f, |i| i as u8); - match bound { - Bound::Included(x) => 0x40 | at(x), - Bound::Excluded(x) => 0x80 | at(x), - Bound::Unbounded => 0, - } -} - /// `RangeBounds::contains`, through the trait. fn bounds_contain(r: impl std::ops::RangeBounds, x: &T) -> bool { r.contains(x) @@ -1556,7 +1545,7 @@ where let (start, end) = (*r.start(), *r.end()); let keyed = std::collections::HashSet::from([a..=b, start..=end, start..=end]); out.extend(format!("{read:?} {r:?} {}", keyed.len()).bytes()); - out.extend([bound_of(table, r.start_bound()), bound_of(table, r.end_bound())]); + out.extend(format!("{:?} {:?}", r.start_bound(), r.end_bound()).bytes()); out.extend([r.is_empty(), r == (a..=b), r == (start..=end), r != (start..=end)].map(u8::from)); out.extend(table.iter().map(|x| u8::from(r.contains(x)))); out.extend(hash(&|h| r.hash(h))); diff --git a/ts/runtime/rt.ts b/ts/runtime/rt.ts index 3e6b1e452..bdf15c194 100644 --- a/ts/runtime/rt.ts +++ b/ts/runtime/rt.ts @@ -1874,6 +1874,34 @@ export function fmtRangeFull(_: undefined, f: Formatter): FmtResult { return f.out.writeStr(".."); } +/** `Debug` of a `Bound`: its variant, around what it holds. */ +export function fmtBound(b: RangeBound, f: Formatter, debug: Debug): FmtResult { + if (b.tag === "Unbounded") return f.out.writeStr("Unbounded"); + return fmtDebugTupleFields(f, b.tag, [(f) => debug(b._0, f)]); +} + +/** `Debug` of an `Ordering`, unpadded. */ +export function fmtOrdering(o: Ordering, f: Formatter): FmtResult { + return f.out.writeStr(o < 0 ? "Less" : o > 0 ? "Greater" : "Equal"); +} + +/** `Debug` of a `ControlFlow` held as a `Result`, `Ok` to continue: `stop` writes what it breaks with, the `Err` itself with `residual`, as `?` breaks with it. */ +export function fmtControlFlow(r: Result, f: Formatter, go: Debug, stop: Debug): FmtResult; +export function fmtControlFlow(r: Result, f: Formatter, go: Debug, stop: Debug>, residual: true): FmtResult; +export function fmtControlFlow(r: Result, f: Formatter, go: Debug, stop: Debug | Debug>, residual = false): FmtResult { + if (r.ok) return fmtDebugTupleFields(f, "Continue", [(f) => go(r.value, f)]); + const held: Fmt = residual ? (f) => (stop as Debug>)(r, f) : (f) => (stop as Debug)(r.error, f); + return fmtDebugTupleFields(f, "Break", [held]); +} + +/** `Debug` of a `ControlFlow` held as the `Option` `?` was applied to, which breaks with `None`. */ +export function fmtControlFlowOption(o: C | undefined, f: Formatter, go: Debug, stop: Debug): FmtResult; +export function fmtControlFlowOption(o: C | None, f: Formatter, go: Debug, stop: Debug, none: None): FmtResult; +export function fmtControlFlowOption(o: C | undefined | None, f: Formatter, go: Debug, stop: Debug, none?: None): FmtResult { + if (o === none) return fmtDebugTupleFields(f, "Break", [(f) => stop(undefined, f)]); + return fmtDebugTupleFields(f, "Continue", [(f) => go(o as C, f)]); +} + /** `Debug` of a tuple, given each element's. */ export function fmtTuple(fields: readonly Fmt[], f: Formatter): FmtResult { const builder = fmtDebugTuple(f, ""); diff --git a/ts/src/lower/fmt.rs b/ts/src/lower/fmt.rs index 58de0b8c6..ca3b4dde8 100644 --- a/ts/src/lower/fmt.rs +++ b/ts/src/lower/fmt.rs @@ -248,6 +248,8 @@ pub fn std_impl<'tcx>( }; Expr::rt_of(float.name(), method).call(vec![value, f]) } + // `!`, and `Infallible`, which is it: never written, as none exists. + ty::Never if text => Expr::rt("unreachable", vec![value]), ty::Bool if text => rt("bool", vec![value, f]), ty::Char if tr == Trait::Display => rt("charDisplay", vec![value, f]), ty::Char if tr == Trait::Debug => rt("charDebug", vec![value, f]), @@ -320,6 +322,34 @@ pub fn std_impl<'tcx>( rt(of, vec![value, f, bound]) } (Std::RangeFull, Trait::Debug) => rt("rangeFull", vec![value, f]), + (Std::Bound, Trait::Debug) => { + let held = b.fmt_fn(tr, args.type_at(0), span); + rt("bound", vec![value, f, held]) + } + (Std::Ordering, Trait::Debug) => rt("ordering", vec![value, f]), + // Erased to what it holds. + (Std::Reverse, Trait::Debug) => { + let held = b.fmt_value(tr, args.type_at(0), value, span, out); + rt( + "debugTupleFields", + vec![f, Expr::Str("Reverse".into()), Expr::Array(vec![held])], + ) + } + (Std::ControlFlow, Trait::Debug) => { + let go = b.fmt_fn(tr, args.type_at(1), span); + let stop = b.fmt_fn(tr, args.type_at(0), span); + match library::Flow::of(tcx, args) { + library::Flow::Other => rt("controlFlow", vec![value, f, go, stop]), + library::Flow::Result => rt("controlFlow", vec![value, f, go, stop, Expr::lit("true")]), + library::Flow::Option => { + let none = b.t.none_arg(args.type_at(1)); + rt( + "controlFlowOption", + [vec![value, f, go, stop], none.into_iter().collect()].concat(), + ) + } + } + } (Std::Vec, Trait::Debug) => { let item = b.fmt_fn(tr, args.type_at(0), span); rt("list", vec![library::elements(value, ty), f, item])