-
Notifications
You must be signed in to change notification settings - Fork 286
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve lazy fuel consumption (#877)
* add FuelTap abstraction and use it * extend Fuel with enabled flag and fuel costs This allows to efficiently use this type for fuel consumption in the executor. * apply rustfmt * cleanup code * remove FuelTap abstraction Replaced by a simpler Option<&mut Fuel> type. * add improved fuel metering to MemoryEntity::grow This new functionality is unused by the engine executor as for now. * put let inside if * improve fuel metering for TableEntity::grow As with MemoryEntity::grow this new functionality is unused as of now in the Wasmi engine executor. * make executor use new fuel for memory.grow * make memory.copy execution use new fuel charging * improve docs of Fuel impls * make Fuel::consume_fuel_unchecked pub(crate) * fix minor docs issue * add Fuel::consume_fuel_if method and use it * make memory.fill execution use new fuel charging * use new fuel charging for memory.init execution * make table.copy execution use new fuel charging * make table.init execution use new fuel charging * make table.fill execution use new fuel charging * make table.grow execution use new fuel charging * remove all no longer needed fuel methods * remove FuelConsumptionMode config
- Loading branch information
Showing
16 changed files
with
389 additions
and
488 deletions.
There are no files selected for viewing
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
Oops, something went wrong.