-
Notifications
You must be signed in to change notification settings - Fork 323
Integrate Wasmi IR 3.0 into wasmi
#1655
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
Draft
Robbepop
wants to merge
400
commits into
main
Choose a base branch
from
rf-integrate-wasmi-ir-3.0
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
+8,393
−13,306
Conversation
This file contains hidden or 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
Merged
41aad7c to
bb8b966
Compare
12a19d4 to
64f420e
Compare
48242ca to
4d2d316
Compare
7bfb899 to
c32c7c7
Compare
d9ec934 to
c68956c
Compare
Robbepop
added a commit
that referenced
this pull request
Nov 8, 2025
* improve debug_assert failure message
* fix field ordering of TableSet operations
* add #[inline(always)] to decode impl
Benchmarks show significant performance improvements.
* add #[inline(always)] to TryFrom<u16> for OpCode
* improve code formatting in match
* add trivial {Read,Write}As impls for UntypedVal
* add From<Memory> for u32 impl
* apply rustfmt
12257b9 to
7a87159
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1655 +/- ##
==========================================
- Coverage 70.60% 62.81% -7.80%
==========================================
Files 180 161 -19
Lines 15339 13698 -1641
==========================================
- Hits 10830 8604 -2226
- Misses 4509 5094 +585 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This now subsumes all non-resumable error reasons.
There even is a test for this to keep this exact behavior.
This roughly shrinks initial allocation size under default config by 8.
yet unused
Those are more stable under debug conditions and also add more checks for improved debugging.
This is incorrect as demonstrated by the following example: - `(1 & 2) == 0` - `(1 != 0) && (2 != 0) == 1`
d206f23 to
ffbd7c8
Compare
- compact -> indirect-dispatch - trampolines -> portable-dispatch
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 3.0 definitions: #1650
Closed Issues
Closes #1598
Closes #1632
Closes #1639
Closes #1516
Closes #1485
Closes #1433
Closes #1324
Potential optimizations:
ipin execution handlers as in op-decode. (🟢 -11%fibonacci/iter)CallStackintoframes. (easy)TrapCode::OutOfSystemMemoryinStackoperations where necessary.portable-dispatchto avoid state copy and improve performance. (medium)extra-checksfor technically-infallible conditional panics. (easy)Slottype to avoid mul-by-8 during execution. (easy)extern "sysv64"ABI for execution handlers on Windows. (medium)Instancerelated instead ofModulereleated. (follow-up PR)Development Notes
panic-free for tail calls to be properly generated without thebecomekeyword.::core::panic::catch_unwindand convert potential panics into flags signalling bad state to the interpreter.ToDo
Fix known bugs:
copy_spanvalues in translator.reverse_complementresult.regex_reduxresult.Implement Functionality
call_importedcall_indirectreturn_call_importedreturn_call_indirectbr_tableoperatorsreturn_call*operatorsmemoryoperatorstableoperatorssimdoperatorsrelaxed-simdoperatorswide-arithmeticoperatorsPreliminary Benchmarks
Preliminary benchmarks of this WIP state pre-optimization shows interesting results:
execute/fibonacci/itermaincompacttrampolinescompact+trampolinesexecute/fibonacci/recmaincompacttrampolinescompact+trampolinesexecute/fibonacci/tailmaincompacttrampolinescompact+trampolinesexecute/tiny_keccakmaincompacttrampolinescompact+trampolinesBenchmarks Conclusion
tail-call-based direct-dispatch outperformsmainsignificantly.tail-call-based indirect-dispatch is somewhat on par withmain.main.