-
Notifications
You must be signed in to change notification settings - Fork 122
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
Simplify get_offset_value_reference
and add unit tests
#1662
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1662 +/- ##
==========================================
- Coverage 97.12% 96.70% -0.43%
==========================================
Files 91 95 +4
Lines 37246 38166 +920
==========================================
+ Hits 36176 36907 +731
- Misses 1070 1259 +189 ☔ View full report in Codecov by Sentry. |
@@ -165,10 +165,6 @@ fn get_offset_value_reference( | |||
apply_ap_tracking_correction(vm.get_ap(), var_ap_trackig, hint_ap_tracking)? | |||
}; | |||
|
|||
if offset.is_negative() && base_addr.offset < offset.unsigned_abs() as usize { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we deleting this check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because the logical test on base_addr
and offset
to know if we should return null is implicitly already provided by the Relocatable
addition in the last step of the get_offset_value_reference
function, so that I don't think it's needed is as an overhead.
This function no longer exists in the main branch |
Simplify
get_offset_value_reference
and add unit testsDescription
base_addr
andoffset
to know if we should return null is implicitly already provided by the Relocatable addition in the last step of theget_offset_value_reference
function, so that I don't think it's needed is as an overhead.Description of the pull request changes and motivation.
Checklist