-
Notifications
You must be signed in to change notification settings - Fork 294
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
Implement fuel metering for the register-machine wasmi
engine backend
#810
Merged
Conversation
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
- Remove fields and fields accesses by methods. - Add new methods that make more sense for the new register-machine wasmi engine backend. - Adjusted both stack-machine and register-machine to the new model. - Reinvent register-machine translation API for fuel metering.
BENCHMARKS
|
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #810 +/- ##
==========================================
+ Coverage 80.92% 81.47% +0.54%
==========================================
Files 274 274
Lines 25366 25381 +15
==========================================
+ Hits 20528 20678 +150
+ Misses 4838 4703 -135 ☔ View full report in Codecov by Sentry. |
local.set also depends on fuel metering for copy instructions which is not yet implemented.
Additionally refactored encode_copies to reuse encode_copy for single value copies. Also refactor implementation of encode_copy a bit.
- Rename consume_fuel to fuel_instr. - Use fuel_instr helper method where possible.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
wasmi
IR instruction of the new register-machine.global
instructionscall
instructionstable
instructionsmemory
instructionsselect
instructionslocal.{set, tee}
instructionsload
instructionsstore
instructionscopy
instructionsreturn
instructionsblock
.TODO
Makefuel_per_copy
(et.al.) useusize
forlen
parameter instead ofu64
.wasmi
translator for the gained effect.FuelInfo
enum type instead of rawOption<(FuelCost, Instr)>
.