Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add for_each_simd_operator generator macro * define SimdOperator enum * add SimdOperator::operator_arity impl * add VisitSimdOperator trait definition * define VisitSimdOperator delegates * add benchmark NopVisit impl * add simd crate feature * add simd_visitor method to VisitOperator trait * add VisitSimdOperator impl to OperatorFactory * use VisitOperator::simd_visitor in BinaryReader::visit_operator * add lifetime to return value of simd_visitor method * add VisitSimdOperator impl for OperatorValidator * add Operator::Simd variant * remove simd operators from for_each_operator macro * adjust wasmprinter crate for simd crate feature * enable wasmparser's simd feature by default * fix trait impl signature * add docs to wasmparser's simd crate feature * feature gate simd related code in wasmparser * update docs for SimdOperator * add missing `simd` crate feature gates * move simd op validation down in file * put simd specific operator validation in separate file * add docs to for_each_simd_operator macro * move for_each_simd_operator macro into a separate file * fix docs for VisitSimdOperator * allow missing docs again for VisitSimdOperator This is just like with VisitOperator trait. * add docs and example to VisitOperator::simd_visitor * move visit_0xfd_operator into separate file We do this to further improve compile times for when the `simd` crate feature is disabled. * apply rustftm * wasmprinter: fix remaining simd feature toggles * apply rustfmt * fix wasmparser benchmarks * wasm-encoder: add simd support * apply rustfmt and avoid formatting some parts * wasm-mutate: fix compile errors * apply rustfmt * fix dev-dependencies for wasm-mutate * add simd_visitor impl to NopVisitor * add missing VisitSimdOperator impl for WasmProposalValidator * mark doc example as compile_fail * add simd support for VisitConstOperator * use wasmparser/simd in validate tool * add simd crate feature propagation to wasm-tools CLI tool * wasm-smith: use wasmparser/simd crate feature * apply rustfmt * feature gate simd_visitor impl * unconditionally enable simd for wasmprinter * unconditionally enable simd for wasm-encoder * remove wasm-tools simd feature (enable by default) * use macros generate for_each_operator macros - This does not yet provide a for_each_operator macro in for !simd mode but that should be easily added. - This is WIP in that is currently does not handle the documentation of the macros well. We might need to also generate the macro docs in the macros themselves. * remove comment out line * put docs on the exported macros * fix macro imports * fix bugs in generator macros * improve compile times for macros * group macro operators together * restructure for_each_operator macros This improves compile times performance significantly. * apply rustfmt * re-structure the new exposed macros The wasmparser crate now exposes 3 different for_each macros: - for_each_operator: Same as before the PR. Iterates over _all_ operators. This is going to be used to implement a routine for all Operator enum variants. - for_each_visit_oeprator: This is going to be used to implement the `VisitOperator` trait. - for_each_visit_simd_operator: This is going to be used to implement the `VisitSimdOperator` trait. * fix macro doc links * fix broken doc links * fix crate after making Operator enum inline * export all internal macro (debug) * wasmprinter: use for_each_[visit[_simd]]_operator * wasm-encoder: use simd feature in dependencies * fix wasm-encoder compilation * wasmparser: use macros via crate:: namespace * expose macros via use statements * use doc(inline) * use intra-doc links * wit-component: fix wasmparser usage * wasm-mutate: fix wasmparser usage This mostly reverts the changes done in past commits of the PR. * wasm-dump: fix wasmparser usage * wasmparser: fix benchmarks * fix doc tests * change doc example for for_each_operator macro * rename doc test macro * fix typo * apply rustfmt * craft new doc example for for_each_operator! macro * Minor changes * Revert `crates/wasm-encoder/src/reencode.rs` back to `main` version (no changes needed any more) * Minor whitespace/style changes * Document the macros some more in `wasmparser/src/lib.rs` * Reorganize macro-defining-macros to have more predictable names. * A few more minor adjustments --------- Co-authored-by: Alex Crichton <[email protected]>
- Loading branch information