-
-
Notifications
You must be signed in to change notification settings - Fork 407
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: Change Realm::global_object field from Value to GcObject #1067
Conversation
916fa00
to
0abe33c
Compare
Test262 conformance changes:
|
Codecov Report
@@ Coverage Diff @@
## master #1067 +/- ##
==========================================
+ Coverage 58.69% 58.71% +0.01%
==========================================
Files 176 176
Lines 12389 12385 -4
==========================================
Hits 7272 7272
+ Misses 5117 5113 -4
Continue to review full report at Codecov.
|
Benchmark for edd499fClick to view benchmark
|
I think the clippy lint is a false positive, I tried changing the code to respect it but it results in a |
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.
Looks good to me 👍
|
||
// Allow identification of the global object easily | ||
global.set_data(crate::object::ObjectData::Global); | ||
global.data = ObjectData::Global; |
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.
You can add attribute #[allow(clippy::field_reassign_with_default)]
on the create
method to make clippy
happy.
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.
Does clippy offer a better suggestion?
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.
The code was triggering a clippy lint, but it seems to be a false positive since the code proposed by clippy wasn't valid.
Benchmark for 030a58cClick to view benchmark
|
Sorry i think i removed this branch accidently, i was doing some cleaning up. If you have a locally copy could you pus again? |
Benchmark for 06c5c2aClick to view benchmark
|
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 is good to go from my side.
This Pull Request works on #577.
It changes the following:
Value
toGcObject
make_builin_fn
'sparent
argument from&Value
to&GcObject
create_prototype
functions to returnGcObject
rather thanValue