Skip to content
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

Introduce a Class map #3315

Merged
merged 4 commits into from
Sep 30, 2023
Merged

Introduce a Class map #3315

merged 4 commits into from
Sep 30, 2023

Conversation

jedel1043
Copy link
Member

Related to #3314.

This change improves the ergonomics of the Class API by adding a class map that can be used to fetch the constructor and prototype of a registered class. This also slightly improves its API by implementing some missing features like using symbols as method names.

@jedel1043 jedel1043 added enhancement New feature or request API labels Sep 27, 2023
@jedel1043 jedel1043 added this to the v0.18.0 milestone Sep 27, 2023
@jedel1043 jedel1043 requested a review from a team September 27, 2023 08:38
@github-actions
Copy link

github-actions bot commented Sep 27, 2023

Test262 conformance changes

Test result main count PR count difference
Total 95,574 95,574 0
Passed 75,193 75,193 0
Ignored 19,482 19,482 0
Failed 899 899 0
Panics 0 0 0
Conformance 78.68% 78.68% 0.00%

@codecov
Copy link

codecov bot commented Sep 27, 2023

Codecov Report

Attention: 86 lines in your changes are missing coverage. Please review.

Comparison is base (70ee050) 49.72% compared to head (ddd6bad) 49.68%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3315      +/-   ##
==========================================
- Coverage   49.72%   49.68%   -0.04%     
==========================================
  Files         443      443              
  Lines       43378    43410      +32     
==========================================
  Hits        21570    21570              
- Misses      21808    21840      +32     
Files Coverage Δ
boa_engine/src/builtins/intl/segmenter/segments.rs 16.27% <100.00%> (-1.91%) ⬇️
boa_engine/src/builtins/iterable/mod.rs 70.76% <100.00%> (-0.66%) ⬇️
boa_engine/src/builtins/regexp/mod.rs 63.28% <100.00%> (-0.30%) ⬇️
boa_engine/src/builtins/string/mod.rs 57.49% <100.00%> (-0.11%) ⬇️
boa_engine/src/string/common.rs 48.48% <ø> (ø)
boa_engine/src/context/intrinsics.rs 97.28% <0.00%> (-0.30%) ⬇️
boa_engine/src/host_defined.rs 0.00% <0.00%> (ø)
boa_engine/src/object/mod.rs 30.29% <60.00%> (-0.12%) ⬇️
boa_examples/src/bin/classes.rs 0.00% <0.00%> (ø)
boa_engine/src/symbol.rs 67.36% <57.14%> (-2.91%) ⬇️
... and 4 more

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jedel1043 jedel1043 mentioned this pull request Sep 27, 2023
7 tasks
Copy link
Member

@HalidOdat HalidOdat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Just some comments, they don't block merging though :)

boa_engine/src/realm.rs Show resolved Hide resolved
boa_engine/src/realm.rs Show resolved Hide resolved
boa_engine/src/context/mod.rs Outdated Show resolved Hide resolved
@HalidOdat HalidOdat requested a review from a team September 29, 2023 19:13
Copy link
Member

@HalidOdat HalidOdat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks perfect to me! :)

@HalidOdat HalidOdat requested a review from a team September 30, 2023 11:26
@raskad raskad added this pull request to the merge queue Sep 30, 2023
Merged via the queue into main with commit b03aa36 Sep 30, 2023
10 checks passed
@raskad raskad deleted the class-ergonomics branch September 30, 2023 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants