-
-
Notifications
You must be signed in to change notification settings - Fork 408
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
Proposal of new Object
design
#1354
Conversation
37203b7
to
ccde6ff
Compare
c465122
to
a336961
Compare
Test262 conformance changes:
|
291a960
to
dcb6ad0
Compare
dcb6ad0
to
8ada622
Compare
4671305
to
4114e39
Compare
Not gonna lie, I expected a lot worse benckmarks with this new design, but there are some small gains and moderate losses. Maybe I overlooked some optimization so I'm still going to try to lower the perf diff. |
886febe
to
cb9d93d
Compare
Ok, I made some optimizations and now the benchmarks have very few moderate regressions and some small to moderate improvements, so maybe we don't need to sacrifice performance with this design. |
8b533d8
to
3294139
Compare
@HalidOdat Rebased 😁 |
3294139
to
0f276d8
Compare
Test262 conformance changes:
Fixed tests (12):
|
Ok, this should be good now |
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.
Wow impressive work. I'll continue the review later, as this is a huge diff!
0f276d8
to
8bddb2f
Compare
ae5984f
to
ec43006
Compare
@Razican Ok, did a big documentation cleanup. Now every internal method and exotic internal method is documented. Also did a cleanup of some todos. Let me know it there's something else missing 😃 |
ec43006
to
7d8ef0e
Compare
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.
Looking good! I noticed there is this file that should probably not be committed: boa/my_trace.mm_profdata
. Maybe we could add the extension to the gitignore?
I was also missing a link to the spec, but for the rest, it's ready to be merged :)
Oops, let me add it to the .gitignore. |
7d8ef0e
to
494ad35
Compare
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.
Everything looks great now!
This PR closes #591.
Currently some tests fail because we aren't considering the many overrides of
Object
internal functions thatExoticObjects
do.The discussion of this issue is in #591, and the proposed solution is to implement every override that the spec requires directly inside
Object
, considering every exotic and special object implementation. This works, but it's a little detrimental for the modularity of the design.This PR is an alternative design based on dynamic function pointers that solves the same problem.
The rationale on why I used function pointers is in this line:
boa/boa/src/object/internal_methods/mod.rs
Lines 599 to 600 in 4114e39
the spec states: "If p.[[GetPrototypeOf]] is not the ordinary object internal method defined in 10.1.1, set done to true.", and I couldn't find a way to express this check without using function pointers.
Please let me know what you think can be improved.