First steps towards T:Read parsing (BrTable)#22
First steps towards T:Read parsing (BrTable)#22Robbepop wants to merge 12 commits intobytecodealliance:mainfrom Robbepop:robin-refactor-br-table
Conversation
… into robin-refactor-br-table
|
Tests in other Running the |
|
@yurydelendik I'd like to experiment with some already established core functionality of some other parser crates, namely the If you like this base idea, I'd love to pioneer into this direction for the |
|
I guess we can close this since T:Read support has been introduced with another PR already. |
Update wasmparser dep
) Updates the requirements on [wasmparser](https://github.com/bytecodealliance/wasmparser.rs) to permit the latest version. - [Release notes](https://github.com/bytecodealliance/wasmparser.rs/releases) - [Commits](https://github.com/bytecodealliance/wasmparser.rs/commits) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
This patch implements WAST support for typed continuations.
Merge up to release wasm-tools-1.0.48
Moved from: bytecodealliance/wasmparser#216
First step towards implementing https://github.com/bytecodealliance/wasmparser/issues/90.
This refactoring of
BrTableis required in order to drop the explicit lifetime from theOperatorenum. We introduce theWasmBrTableandWasmBrTableBuildertraits so that we can later makeOperatorgeneric over user provided types forBrTableand maybe other custom Wasm operators and types in the future.We separated
BrTableandBrTableBuilderin order to make the more importantBrTableless constraint regarding incremental building. At the moment we do not provide users with a way to customize theOperatorenum so we might experience slight performance regressions since aBrTablenow is eagerly constructed instead of deferring its construction.In the long run this procedure should even improve performance since we no longer need to parse the
br_tabletargets twice. Also in some cases we needed to construct an internalbr_tableand users would then construct their own custombr_tableon their side. With this (and follow-up) changes we simply directly construct the user definedbr_tabledirectly.Next Steps
After merging of this PR the next steps to make the parser work on
T: Readinstead of working on a slice of[u8]are:Result<Self::BrTable>inWasmBrTableBuildertrait to allow for use cases where a user doesn't want to supportbr_tableat all.Operatorand replace it with similar technique.BrTablebut this design is scalable for future additions.T: Read.Benchmarks
Sadly I cannot test the performance implications since the benchmark harness seems to be broken on
master. At least I get the following output oncargo benchwithRUST_BACKTRACE=1:Doc Screenshots