Skip to content
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

Refactor engine's ValueStack API #1059

Merged
merged 11 commits into from
Jun 8, 2024
Merged

Refactor engine's ValueStack API #1059

merged 11 commits into from
Jun 8, 2024

Conversation

Robbepop
Copy link
Member

@Robbepop Robbepop commented Jun 7, 2024

  • This somewhat improves the whacky ValueStack API of Wasmi's executor engine. It introduces extend_by and refactors alloc_call_frame and removes plenty of APIs that are no longer needed due to these changes.
  • The gist of this PR is that it (hopefully) needs a bit less unsafe code or that the unsafe code is isolated a bit better.
  • Another hope with this PR is that performance stays the same or at best improves, especially for call-intense workloads. However, performance improvements have not been detected locally unfortunately.

In Summary

  • Adds ValueStack::extend_by method
  • Removes ValueStack::{reserve, extend_slice, extend_zeros, fill_at, stack_ptr_last_n} methods
  • Adds FrameParams type abstraction
  • Refactors all code that is touched by the above items

Copy link

codecov bot commented Jun 7, 2024

Codecov Report

Attention: Patch coverage is 79.51807% with 17 lines in your changes missing coverage. Please review.

Project coverage is 80.68%. Comparing base (3c42a09) to head (c7f06fb).

Files Patch % Lines
crates/wasmi/src/engine/executor/instrs/call.rs 73.33% 8 Missing ⚠️
crates/wasmi/src/engine/executor/stack/values.rs 85.36% 6 Missing ⚠️
crates/wasmi/src/engine/executor/mod.rs 75.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1059      +/-   ##
==========================================
- Coverage   80.73%   80.68%   -0.05%     
==========================================
  Files         268      268              
  Lines       25028    25009      -19     
==========================================
- Hits        20206    20179      -27     
- Misses       4822     4830       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Robbepop Robbepop merged commit b863b3f into master Jun 8, 2024
17 of 18 checks passed
@Robbepop Robbepop deleted the rf-refactor-value-stack branch June 8, 2024 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant