Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Reflect and Proxy implementation #1660

Merged
merged 1 commit into from
Dec 17, 2024
Merged

Conversation

rbri
Copy link
Collaborator

@rbri rbri commented Sep 29, 2024

this is an recreation of #1637 from scratch

Closes #268

@rbri rbri changed the title base implementation of proxy and reflect support Reflect and Proxy implementation Sep 29, 2024
@gbrail
Copy link
Collaborator

gbrail commented Oct 7, 2024

Once again, how do we move forward on this? I don't want to let it just sit. I think that we have two options:

  1. Agree that this is in good enough shape and merge it into the codebase, possibly with a few new issues so that we can track additional work.
  2. Create a new feature flag on Context, perhaps something like "ENABLE_EXPERIMENTAL_FEATURES" that guards this implementation until we all agree it's feature-complete.

@rbri , @p-bakker , what do you think?

@rbri rbri force-pushed the Reflect_and_Proxy branch 2 times, most recently from 8ca0db7 to a490650 Compare October 11, 2024 07:47
@rbri
Copy link
Collaborator Author

rbri commented Oct 12, 2024

I do not like the idea of a feature flag because it is sooo demotivating.
With this pr

  • Proxy is at 76/311 (24.44%)
  • Reflect is at 13/153 (8.5%)

In the past we let things in

  • Promise 392/631 (62.12%)
  • BigInt 13/75 (17.33%) just reaching this level at the last week with a bunch of commits
  • rest-parameters 5/11 (45.45%)

And also some old stuff like

  • language/statements/let 91/145 (62.76%)
  • language/expressions/arrow-function 167/343 (48.69%)
  • ....
    is far away from that.

I have the feeling doing all this discussion about the this PR is not really fair compared to the stuff we already have.

This is just the personal point of view, but i guess that most of the work is done based on a strong motivation by the peoples that doing this work. And together with all the technical things we have to have the motivation of the people in mind to go forward here (like we did in the last months).


But i will try to handle this serious - i will try to spend some time to document the problems in separate issues (but my time is really limited for the next months) and also i will rebase this like i did in the last weeks.

@rbri rbri force-pushed the Reflect_and_Proxy branch from a490650 to 4a1e572 Compare October 30, 2024 06:57
@rbri
Copy link
Collaborator Author

rbri commented Oct 30, 2024

Current stats

head Reflect & Proxy # solved
built-ins/Array 380/3074 (12.36%) 362/3074 (11.78%) 18
built-ins/ArrayBuffer 126/191 (65.97%) 121/191 (63.35%) 5
built-ins/BigInt 14/75 (18.67%) 13/75 (17.33%) 1
built-ins/Boolean 4/51 (7.84%) 3/51 (5.88%) 1
built-ins/DataView 241/550 (43.82%) 222/550 (40.36%) 19
built-ins/Date 68/770 (8.83%) 65/770 (8.44%) 3
built-ins/Error 6/41 (14.63%) 5/41 (12.2%) 1
built-ins/Function 186/508 (36.61%) 184/508 (36.22%) 2
built-ins/JSON 36/144 (25.69%) 26/144 (18.06%) 10
built-ins/Map 13/171 (7.6%) 12/171 (7.02%) 1
built-ins/Math 51/327 (15.6%) 16/327 (4.89%) 35
built-ins/NativeErrors 29/123 (23.58%) 21/123 (17.07%) 8
built-ins/Number 24/335 (7.16%) 23/335 (6.87%) 1
built-ins/Object 216/3408 (6.34%) 179/3408 (5.25%) 37
built-ins/Promise 406/631 (64.34%) 392/631 (62.12%) 14
built-ins/Proxy 76/311 (25.4%) 235
built-ins/Reflect 13/153 (8.5%) 140
built-ins/RegExp 1169/1854 (63.05%) 1168/1854 (63.0%) 1
built-ins/Set 167/381 (43.83%) 166/381 (43.57%) 1
built-ins/String 116/1182 (9.81%) 115/1182 (9.73%) 1
built-ins/Symbol 26/94 (27.66%) 20/94 (21.28%) 6
built-ins/TypedArray 1091/1422 (76.72%) 1084/1422 (76.23%) 7
built-ins/TypedArrayConstructors 586/735 (79.73%) 559/735 (76.05%) 27
built-ins/WeakMap 15/102 (14.71%) 14/102 (13.73%) 1
built-ins/WeakSet 12/85 (14.12%) 11/85 (12.94%) 1
language/expressions/typeof 2/16 (12.5%) 0/16 (0.0%) 2
language/statements/for-of 434/741 (58.57%) 433/741 (58.43%) 1
578

@rbri rbri force-pushed the Reflect_and_Proxy branch from 4a1e572 to ad27703 Compare December 2, 2024 06:32
@gbrail
Copy link
Collaborator

gbrail commented Dec 11, 2024

So far, this has come down to a conflict between contributors, as to whether or not we merge this. I think that this PR adds an important set of new capability to Rhino and that we should have it.

Unless someone has a strong objection, I'm asking @rbri to do one more conflict resolution, and then we should take it.

And after that, I'm going to propose that we call it a day and ship Rhino 1.8.0!

@rbri
Copy link
Collaborator Author

rbri commented Dec 11, 2024

@gbrail will do the rebase after all the fantastic stuff from @andreabergia and friends is merged

@rbri rbri force-pushed the Reflect_and_Proxy branch from ad27703 to 7a58552 Compare December 15, 2024 17:10
@rbri rbri force-pushed the Reflect_and_Proxy branch from 7a58552 to 90e77b8 Compare December 15, 2024 17:35
@rbri
Copy link
Collaborator Author

rbri commented Dec 15, 2024

@gbrail rebase is done

@gbrail
Copy link
Collaborator

gbrail commented Dec 17, 2024

Thanks for all your work on this!

@gbrail gbrail merged commit ebfedb3 into mozilla:master Dec 17, 2024
3 checks passed
@rbri rbri deleted the Reflect_and_Proxy branch December 21, 2024 14:03
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support ES2015 Proxies & Reflect API
2 participants