Skip to content

[vm, simarm64] Extract CalleeRegisterVerifier class#63012

Open
eseidel wants to merge 1 commit intodart-lang:mainfrom
eseidel:es/callee-register-verifier
Open

[vm, simarm64] Extract CalleeRegisterVerifier class#63012
eseidel wants to merge 1 commit intodart-lang:mainfrom
eseidel:es/callee-register-verifier

Conversation

@eseidel
Copy link
Copy Markdown
Contributor

@eseidel eseidel commented Mar 30, 2026

Extract the callee-saved register save/verify/restore logic from Simulator::Call into a RAII CalleeRegisterVerifier class.

  • On construction, saves callee-saved register values and overwrites them with a known value
  • On destruction, asserts the known value is preserved and restores originals
  • Reduces ~25 lines of inline code in Simulator::Call to 3 lines
  • No behavioral change

Extract the callee-saved register save/verify/restore logic from
Simulator::Call into a RAII CalleeRegisterVerifier class. This reduces
the inline code from ~25 lines to 3 lines and makes the pattern
reusable.

Change-Id: I0000000000000000000000000000000000000000
@eseidel
Copy link
Copy Markdown
Contributor Author

eseidel commented Mar 30, 2026

This is a small clean up that we did in our fork of Dart that I figured I should upstream.

@copybara-service
Copy link
Copy Markdown

Thank you for your contribution! This project uses Gerrit for code reviews. Your pull request has automatically been converted into a code review at:

https://dart-review.googlesource.com/c/sdk/+/491682

Please wait for a developer to review your code review at the above link; you can speed up the review if you sign into Gerrit and manually add a reviewer that has recently worked on the relevant code. See CONTRIBUTING.md to learn how to upload changes to Gerrit directly.

Additional commits pushed to this PR will update both the PR and the corresponding Gerrit CL. After the review is complete on the CL, your reviewer will merge the CL (automatically closing this PR).

@copybara-service
Copy link
Copy Markdown

https://dart-review.googlesource.com/c/sdk/+/491682 has been updated with the latest commits from this pull request.

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