Repository navigation
fix(ts): erase a called function's late-bound regions before asking what its inputs hold #545
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
a45cc59
fix(ts): erase a called function's late-bound regions before asking w…
kixelated fd59d61
test(ts): snapshot the stock fixture's dyns doc
kixelated 59216f8
Merge remote-tracking branch 'origin/main' into ts-moq-dyn-panic
kixelated 5c90d3f
chore(quest): finish the moq-net dyn Buf panic
kixelated 9e20c40
Merge remote-tracking branch 'origin/main' into ts-moq-dyn-panic
kixelated e294523
Merge remote-tracking branch 'origin/main' into ts-moq-dyn-panic
kixelated b9cfe51
Merge remote-tracking branch 'origin/main' into ts-moq-dyn-panic
kixelated File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| # [S] Gate moq-net's translation | ||
|
|
||
| ## Goal | ||
|
|
||
| A change that breaks moq-net's translation fails in the merge queue, not the next nightly: | ||
| `just ci` for a `ts` change translates moq-net at the pin and type-checks it, as | ||
| `just ts moq` does. Today only `nightly.yml` runs `just ts moq`, so | ||
| [moq-dev/rust2#519](https://github.com/moq-dev/rust2/pull/519) landed a panic on moq-net | ||
| that a bench run found hours later. | ||
|
|
||
| ## Plan | ||
|
|
||
| `just ts check` already checks out the pin for the bench's type-check, so what this adds is | ||
| building moq-net's dependencies through the driver and translating it. Measure that in CPU, | ||
| cold and warm, against [the checks budget](/quest/m0/checks/README.md) before adding it; | ||
| if it costs too much, consider running it only for changes under `ts/src` or `ts/runtime`. | ||
|
|
||
| Public API: none. | ||
|
|
||
| ## Related | ||
|
|
||
| - [Checks at moq's cost](/quest/m0/checks/README.md) - the gate's CPU budget this spends from |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,11 @@ | ||
| // Generated by rust2-ts. Do not edit. | ||
|
|
||
| import * as rt from "./rt.ts"; | ||
| import type * as Buf from "./bytes/buf/buf_impl.Buf.ts"; | ||
| import type * as TryGetError from "./bytes.TryGetError.ts"; | ||
|
|
||
| /** A buffer of the crate's own over `Buf`, as moq's transports lend a stream's chunks. */ | ||
| export type Leased = | ||
| | { pieces$Leased: () => rt.usize; remaining$Buf: () => rt.usize; chunk$Buf: () => rt.ByteSlice; advance$Buf: (a0: rt.usize) => void; hasRemaining$Buf: () => boolean; copyToSlice$Buf: (a0: rt.ByteSlice) => void; getU8$Buf: () => rt.u8; getI8$Buf: () => rt.i8; getU16$Buf: () => rt.u16; getU16Le$Buf: () => rt.u16; getU16Ne$Buf: () => rt.u16; getI16$Buf: () => rt.i16; getI16Le$Buf: () => rt.i16; getI16Ne$Buf: () => rt.i16; getU32$Buf: () => rt.u32; getU32Le$Buf: () => rt.u32; getU32Ne$Buf: () => rt.u32; getI32$Buf: () => rt.i32; getI32Le$Buf: () => rt.i32; getI32Ne$Buf: () => rt.i32; getU64$Buf: () => rt.u64; getU64Le$Buf: () => rt.u64; getU64Ne$Buf: () => rt.u64; getI64$Buf: () => rt.i64; getI64Le$Buf: () => rt.i64; getI64Ne$Buf: () => rt.i64; getU128$Buf: () => rt.u128; getU128Le$Buf: () => rt.u128; getU128Ne$Buf: () => rt.u128; getI128$Buf: () => rt.i128; getI128Le$Buf: () => rt.i128; getI128Ne$Buf: () => rt.i128; getUint$Buf: (a0: rt.usize) => rt.u64; getUintLe$Buf: (a0: rt.usize) => rt.u64; getUintNe$Buf: (a0: rt.usize) => rt.u64; getInt$Buf: (a0: rt.usize) => rt.i64; getIntLe$Buf: (a0: rt.usize) => rt.i64; getIntNe$Buf: (a0: rt.usize) => rt.i64; getF32$Buf: () => rt.f32; getF32Le$Buf: () => rt.f32; getF32Ne$Buf: () => rt.f32; getF64$Buf: () => rt.f64; getF64Le$Buf: () => rt.f64; getF64Ne$Buf: () => rt.f64; tryCopyToSlice$Buf: (a0: rt.ByteSlice) => rt.Result<undefined, TryGetError.TryGetError>; tryGetU8$Buf: () => rt.Result<rt.u8, TryGetError.TryGetError>; tryGetI8$Buf: () => rt.Result<rt.i8, TryGetError.TryGetError>; tryGetU16$Buf: () => rt.Result<rt.u16, TryGetError.TryGetError>; tryGetU16Le$Buf: () => rt.Result<rt.u16, TryGetError.TryGetError>; tryGetU16Ne$Buf: () => rt.Result<rt.u16, TryGetError.TryGetError>; tryGetI16$Buf: () => rt.Result<rt.i16, TryGetError.TryGetError>; tryGetI16Le$Buf: () => rt.Result<rt.i16, TryGetError.TryGetError>; tryGetI16Ne$Buf: () => rt.Result<rt.i16, TryGetError.TryGetError>; tryGetU32$Buf: () => rt.Result<rt.u32, TryGetError.TryGetError>; tryGetU32Le$Buf: () => rt.Result<rt.u32, TryGetError.TryGetError>; tryGetU32Ne$Buf: () => rt.Result<rt.u32, TryGetError.TryGetError>; tryGetI32$Buf: () => rt.Result<rt.i32, TryGetError.TryGetError>; tryGetI32Le$Buf: () => rt.Result<rt.i32, TryGetError.TryGetError>; tryGetI32Ne$Buf: () => rt.Result<rt.i32, TryGetError.TryGetError>; tryGetU64$Buf: () => rt.Result<rt.u64, TryGetError.TryGetError>; tryGetU64Le$Buf: () => rt.Result<rt.u64, TryGetError.TryGetError>; tryGetU64Ne$Buf: () => rt.Result<rt.u64, TryGetError.TryGetError>; tryGetI64$Buf: () => rt.Result<rt.i64, TryGetError.TryGetError>; tryGetI64Le$Buf: () => rt.Result<rt.i64, TryGetError.TryGetError>; tryGetI64Ne$Buf: () => rt.Result<rt.i64, TryGetError.TryGetError>; tryGetU128$Buf: () => rt.Result<rt.u128, TryGetError.TryGetError>; tryGetU128Le$Buf: () => rt.Result<rt.u128, TryGetError.TryGetError>; tryGetU128Ne$Buf: () => rt.Result<rt.u128, TryGetError.TryGetError>; tryGetI128$Buf: () => rt.Result<rt.i128, TryGetError.TryGetError>; tryGetI128Le$Buf: () => rt.Result<rt.i128, TryGetError.TryGetError>; tryGetI128Ne$Buf: () => rt.Result<rt.i128, TryGetError.TryGetError>; tryGetUint$Buf: (a0: rt.usize) => rt.Result<rt.u64, TryGetError.TryGetError>; tryGetUintLe$Buf: (a0: rt.usize) => rt.Result<rt.u64, TryGetError.TryGetError>; tryGetUintNe$Buf: (a0: rt.usize) => rt.Result<rt.u64, TryGetError.TryGetError>; tryGetInt$Buf: (a0: rt.usize) => rt.Result<rt.i64, TryGetError.TryGetError>; tryGetIntLe$Buf: (a0: rt.usize) => rt.Result<rt.i64, TryGetError.TryGetError>; tryGetIntNe$Buf: (a0: rt.usize) => rt.Result<rt.i64, TryGetError.TryGetError>; tryGetF32$Buf: () => rt.Result<rt.f32, TryGetError.TryGetError>; tryGetF32Le$Buf: () => rt.Result<rt.f32, TryGetError.TryGetError>; tryGetF32Ne$Buf: () => rt.Result<rt.f32, TryGetError.TryGetError>; tryGetF64$Buf: () => rt.Result<rt.f64, TryGetError.TryGetError>; tryGetF64Le$Buf: () => rt.Result<rt.f64, TryGetError.TryGetError>; tryGetF64Ne$Buf: () => rt.Result<rt.f64, TryGetError.TryGetError>; copyToBytes$Buf: (a0: rt.usize) => rt.ByteSlice }; | ||
| | { pieces$Leased: () => rt.usize; skip$Leased: (a0: Buf.Buf) => void; remaining$Buf: () => rt.usize; chunk$Buf: () => rt.ByteSlice; advance$Buf: (a0: rt.usize) => void; hasRemaining$Buf: () => boolean; copyToSlice$Buf: (a0: rt.ByteSlice) => void; getU8$Buf: () => rt.u8; getI8$Buf: () => rt.i8; getU16$Buf: () => rt.u16; getU16Le$Buf: () => rt.u16; getU16Ne$Buf: () => rt.u16; getI16$Buf: () => rt.i16; getI16Le$Buf: () => rt.i16; getI16Ne$Buf: () => rt.i16; getU32$Buf: () => rt.u32; getU32Le$Buf: () => rt.u32; getU32Ne$Buf: () => rt.u32; getI32$Buf: () => rt.i32; getI32Le$Buf: () => rt.i32; getI32Ne$Buf: () => rt.i32; getU64$Buf: () => rt.u64; getU64Le$Buf: () => rt.u64; getU64Ne$Buf: () => rt.u64; getI64$Buf: () => rt.i64; getI64Le$Buf: () => rt.i64; getI64Ne$Buf: () => rt.i64; getU128$Buf: () => rt.u128; getU128Le$Buf: () => rt.u128; getU128Ne$Buf: () => rt.u128; getI128$Buf: () => rt.i128; getI128Le$Buf: () => rt.i128; getI128Ne$Buf: () => rt.i128; getUint$Buf: (a0: rt.usize) => rt.u64; getUintLe$Buf: (a0: rt.usize) => rt.u64; getUintNe$Buf: (a0: rt.usize) => rt.u64; getInt$Buf: (a0: rt.usize) => rt.i64; getIntLe$Buf: (a0: rt.usize) => rt.i64; getIntNe$Buf: (a0: rt.usize) => rt.i64; getF32$Buf: () => rt.f32; getF32Le$Buf: () => rt.f32; getF32Ne$Buf: () => rt.f32; getF64$Buf: () => rt.f64; getF64Le$Buf: () => rt.f64; getF64Ne$Buf: () => rt.f64; tryCopyToSlice$Buf: (a0: rt.ByteSlice) => rt.Result<undefined, TryGetError.TryGetError>; tryGetU8$Buf: () => rt.Result<rt.u8, TryGetError.TryGetError>; tryGetI8$Buf: () => rt.Result<rt.i8, TryGetError.TryGetError>; tryGetU16$Buf: () => rt.Result<rt.u16, TryGetError.TryGetError>; tryGetU16Le$Buf: () => rt.Result<rt.u16, TryGetError.TryGetError>; tryGetU16Ne$Buf: () => rt.Result<rt.u16, TryGetError.TryGetError>; tryGetI16$Buf: () => rt.Result<rt.i16, TryGetError.TryGetError>; tryGetI16Le$Buf: () => rt.Result<rt.i16, TryGetError.TryGetError>; tryGetI16Ne$Buf: () => rt.Result<rt.i16, TryGetError.TryGetError>; tryGetU32$Buf: () => rt.Result<rt.u32, TryGetError.TryGetError>; tryGetU32Le$Buf: () => rt.Result<rt.u32, TryGetError.TryGetError>; tryGetU32Ne$Buf: () => rt.Result<rt.u32, TryGetError.TryGetError>; tryGetI32$Buf: () => rt.Result<rt.i32, TryGetError.TryGetError>; tryGetI32Le$Buf: () => rt.Result<rt.i32, TryGetError.TryGetError>; tryGetI32Ne$Buf: () => rt.Result<rt.i32, TryGetError.TryGetError>; tryGetU64$Buf: () => rt.Result<rt.u64, TryGetError.TryGetError>; tryGetU64Le$Buf: () => rt.Result<rt.u64, TryGetError.TryGetError>; tryGetU64Ne$Buf: () => rt.Result<rt.u64, TryGetError.TryGetError>; tryGetI64$Buf: () => rt.Result<rt.i64, TryGetError.TryGetError>; tryGetI64Le$Buf: () => rt.Result<rt.i64, TryGetError.TryGetError>; tryGetI64Ne$Buf: () => rt.Result<rt.i64, TryGetError.TryGetError>; tryGetU128$Buf: () => rt.Result<rt.u128, TryGetError.TryGetError>; tryGetU128Le$Buf: () => rt.Result<rt.u128, TryGetError.TryGetError>; tryGetU128Ne$Buf: () => rt.Result<rt.u128, TryGetError.TryGetError>; tryGetI128$Buf: () => rt.Result<rt.i128, TryGetError.TryGetError>; tryGetI128Le$Buf: () => rt.Result<rt.i128, TryGetError.TryGetError>; tryGetI128Ne$Buf: () => rt.Result<rt.i128, TryGetError.TryGetError>; tryGetUint$Buf: (a0: rt.usize) => rt.Result<rt.u64, TryGetError.TryGetError>; tryGetUintLe$Buf: (a0: rt.usize) => rt.Result<rt.u64, TryGetError.TryGetError>; tryGetUintNe$Buf: (a0: rt.usize) => rt.Result<rt.u64, TryGetError.TryGetError>; tryGetInt$Buf: (a0: rt.usize) => rt.Result<rt.i64, TryGetError.TryGetError>; tryGetIntLe$Buf: (a0: rt.usize) => rt.Result<rt.i64, TryGetError.TryGetError>; tryGetIntNe$Buf: (a0: rt.usize) => rt.Result<rt.i64, TryGetError.TryGetError>; tryGetF32$Buf: () => rt.Result<rt.f32, TryGetError.TryGetError>; tryGetF32Le$Buf: () => rt.Result<rt.f32, TryGetError.TryGetError>; tryGetF32Ne$Buf: () => rt.Result<rt.f32, TryGetError.TryGetError>; tryGetF64$Buf: () => rt.Result<rt.f64, TryGetError.TryGetError>; tryGetF64Le$Buf: () => rt.Result<rt.f64, TryGetError.TryGetError>; tryGetF64Ne$Buf: () => rt.Result<rt.f64, TryGetError.TryGetError>; copyToBytes$Buf: (a0: rt.usize) => rt.ByteSlice }; | ||
|
|
||
| //# sourceMappingURL=buf.Leased.ts.map |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
itmost naturally binds toother, which reads as "skip discards everythingotherstill holds", but the body advancesselfbymin(other.remaining(), self.remaining()). "then skips as many bytes as the two have left" would say that.