-
-
Notifications
You must be signed in to change notification settings - Fork 406
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
Implement abstract operation GetPrototypeFromConstructor
#1561
Conversation
Test262 conformance changes:
Fixed tests (13):
|
Should this be implemented as part of |
I'm not sure if the The spec defines this as an ordinary object internal method, so I think the place is good. |
I could pass a reference to |
4248dc4
to
bc5bfc9
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.
Looks good to me.
I commented on a few places where we use object_object()
while a specific StandardConstructor
exists. I'm curious if changing those would result in actual changes.
Let's see if this works |
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.
Nice work!
Good catch! |
I think it would be easier to implement it by using |
Yep, this is the best option. |
0bc722a
to
3278620
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.
Now it looks great! :) thanks!
This Pull Request reduces the repetition on constructors when obtaining the default prototype of an object.
Extracted the pattern from #1552, thanks to @Razican :)
It changes the following:
Implements the abstract operation
GetPrototypeFromConstructor
Replaces the pattern:
with
This also allows for an easy replacement of
intrinsics
with the intrinsic objects of arealm
when we eventually implement multiple realms.