-
Notifications
You must be signed in to change notification settings - Fork 3.8k
[vm] Removing IntegerValue
and Value wrapper
#17693
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
base: jun/sint-compiler
Are you sure you want to change the base?
Conversation
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
82a3415
to
9647ebd
Compare
|
||
/// Perform a binary operation to two values at the top of the stack. | ||
fn binop<F, T>(&mut self, f: F) -> PartialVMResult<()> | ||
#[inline(always)] |
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.
Later we'll need to run this through the profiler and see if the Rust compiler actually performs the inlining or not. FYI with the current impl, it's not inlining F
.
432eb78
to
86f6df1
Compare
9647ebd
to
36cc47f
Compare
36cc47f
to
b539694
Compare
86f6df1
to
1dc20f4
Compare
} | ||
|
||
fn compare( | ||
pub fn compare_with_depth( |
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.
This and equals_with_depth can be private or pub(crate)?
b539694
to
0ab338a
Compare
b6b60fd
to
a71a230
Compare
0ab338a
to
2980225
Compare
2980225
to
df83d80
Compare
a71a230
to
f65de35
Compare
f65de35
to
c186797
Compare
df83d80
to
5aa57e1
Compare
c186797
to
4ae9850
Compare
fbbd9fa
to
bd22709
Compare
901ac24
to
f4a07b3
Compare
38fe6d3
to
37febd6
Compare
f4a07b3
to
a8aff80
Compare
a8aff80
to
9e39a96
Compare
37febd6
to
281400b
Compare
9e39a96
to
4cf379f
Compare
4cf379f
to
9e39a96
Compare
93d20aa
to
281400b
Compare
9e39a96
to
a561800
Compare
281400b
to
2bb080b
Compare
a561800
to
a464842
Compare
The `values_impl::IntegerValue` type introduced a rather unnecessary wrapper for integer values, creating to conversions back and force to `Value`. Moreover, the newtype wrapper `Value` for `ValueImpl` was unnecessary as well and created overhead because it cannot be eliminated by the compiler when applied in iterators (as in `values.into_iter().map(Value).collect()`). Both have been removed.
a464842
to
753b223
Compare
Description
The
values_impl::IntegerValue
type introduced a rather unnecessary wrapper for integer values, creating to conversions back and force toValue
. Moreover, the newtype wrapperValue
forValueImpl
was unnecessary as well and createdoverhead because it cannot be eliminated by the compiler when applied in iterators (as in
values.into_iter().map(Value).collect()
). Both have been removed.How Has This Been Tested?
Existing tests