forked from wasmerio/wasmer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(parse,codegen): Pass all func ops to MiddlewareChains
Previously each Event(Operation) was passed through all MiddlewareChains one at a time. Additionally, the wasmparser library prevented cloning the Operators which prevented more than one Operator from being observed at a time. This commit loads all Operators of a function into a Vec and passes the entire Vec through the middleware chains. This design does not affect the existing MiddlewareChains but allows chains to look back at previously viewed Operators within the same function. This commit uses a forked wasmparser that adds the Clone trait to wasmparser::Operator to allow this. Looking back at previously seen Operators is necessary for allowing the metering MiddlewareChain to properly inject metering code so as to patch the flaws described in Issue wasmerio#999.
- Loading branch information
Showing
5 changed files
with
26 additions
and
33 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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 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 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 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