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

Add receiver parameter to object internal methods #1042

Merged
merged 3 commits into from
Jan 7, 2021
Merged

Add receiver parameter to object internal methods #1042

merged 3 commits into from
Jan 7, 2021

Conversation

tofpie
Copy link
Contributor

@tofpie tofpie commented Jan 5, 2021

This Pull Request fixes #1040.

It changes the following:

  • Add the receiver parameter [[Get]] and [[Set]]
  • Make Array more compliant by using [DefineOwnProperty]] instead of [[Set]] to define new indexed properties
  • Add Array specific [[DefineOwnProperty]]
  • Add compliant [[SetPrototypeOf]] (with cycle detection)
  • Make name and length of functions writable

@codecov
Copy link

codecov bot commented Jan 5, 2021

Codecov Report

Merging #1042 (f37ed85) into master (8140b93) will decrease coverage by 0.05%.
The diff coverage is 61.26%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1042      +/-   ##
==========================================
- Coverage   58.61%   58.56%   -0.06%     
==========================================
  Files         172      172              
  Lines       11763    11920     +157     
==========================================
+ Hits         6895     6981      +86     
- Misses       4868     4939      +71     
Impacted Files Coverage Δ
boa/src/context.rs 60.61% <0.00%> (-0.96%) ⬇️
boa/src/builtins/object/mod.rs 62.50% <50.00%> (+0.20%) ⬆️
boa/src/syntax/ast/node/object/mod.rs 57.81% <50.00%> (-1.12%) ⬇️
boa/src/object/gcobject.rs 67.00% <52.94%> (-0.59%) ⬇️
boa/src/object/internal_methods.rs 56.73% <54.91%> (-6.21%) ⬇️
boa/src/builtins/string/mod.rs 62.80% <81.08%> (+1.46%) ⬆️
boa/src/builtins/array/mod.rs 76.52% <85.00%> (+0.22%) ⬆️
boa/src/builtins/function/mod.rs 75.72% <100.00%> (ø)
boa/src/builtins/json/mod.rs 84.61% <100.00%> (ø)
boa/src/object/mod.rs 51.36% <100.00%> (ø)
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8140b93...921cd64. Read the comment docs.

@RageKnify RageKnify added the builtins PRs and Issues related to builtins/intrinsics label Jan 5, 2021
@RageKnify RageKnify added this to the v0.11.0 milestone Jan 5, 2021
boa/src/value/display.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@RageKnify RageKnify left a comment

Choose a reason for hiding this comment

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

2 minor things, conformance looks good:

Test262 conformance changes:

Test result master count PR count difference
Total 78,493 78,493 0
Passed 24,005 24,308 +303
Ignored 15,585 15,585 0
Failed 38,903 38,600 -303
Panics 90 90 0
Conformance 30.58 30.97 +0.39%

@RageKnify
Copy link
Contributor

I'm confused, GH won't let me request reviews from @HalidOdat and @Razican so I'l tag you instead...

@Razican Razican requested review from HalidOdat and Razican January 6, 2021 07:16
Copy link
Member

@Razican Razican left a comment

Choose a reason for hiding this comment

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

Looking good for me! Check the review by @RageKnify. I just had a small question.

boa/src/object/internal_methods.rs Show resolved Hide resolved
@Razican Razican merged commit 1a7e832 into boa-dev:master Jan 7, 2021
@tofpie tofpie deleted the get-set-receiver branch January 7, 2021 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
builtins PRs and Issues related to builtins/intrinsics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Object internal methods don't have Receiver parameter
3 participants