Skip to content

Conversation

@zhiqiangxu
Copy link
Contributor

@zhiqiangxu zhiqiangxu commented Oct 9, 2024

This PR does 2 things:

  1. Define a constant name for each register according to the spec, so that we can reference to them by name instead of magic number.
  2. Encode the calling convention below into alias constant names.

image

Gradually we should shift to these constant names and stop using magic numbers.

@zhiqiangxu zhiqiangxu requested review from a team as code owners October 9, 2024 09:35
@zhiqiangxu zhiqiangxu requested a review from ajsutton October 9, 2024 09:35
@zhiqiangxu zhiqiangxu changed the title use constant instead of magic value cannon: use constant instead of magic value Oct 9, 2024
@codecov
Copy link

codecov bot commented Oct 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 64.14%. Comparing base (fb62380) to head (00bfabf).
Report is 50 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #12386      +/-   ##
===========================================
- Coverage    64.32%   64.14%   -0.19%     
===========================================
  Files           52       52              
  Lines         4348     4348              
===========================================
- Hits          2797     2789       -8     
- Misses        1376     1385       +9     
+ Partials       175      174       -1     
Flag Coverage Δ
cannon-go-tests 64.14% <100.00%> (-0.19%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
cannon/mipsevm/exec/mips_syscalls.go 92.05% <100.00%> (ø)
cannon/mipsevm/multithreaded/mips.go 93.96% <100.00%> (ø)

... and 1 file with indirect coverage changes

@ajsutton ajsutton requested review from mbaxter and removed request for ajsutton October 11, 2024 00:27
Copy link
Contributor

@Inphi Inphi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good stuff. Thanks!

@Inphi Inphi added this pull request to the merge queue Oct 16, 2024
Merged via the queue into ethereum-optimism:develop with commit ea60a8a Oct 16, 2024
samlaf pushed a commit to samlaf/optimism that referenced this pull request Nov 10, 2024
* use constant instead of magic value

* address comments

* address comments

* add RegSyscallErrno
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.

3 participants