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

Fix super property access #3026

Merged
merged 2 commits into from
Jun 18, 2023
Merged

Fix super property access #3026

merged 2 commits into from
Jun 18, 2023

Conversation

raskad
Copy link
Member

@raskad raskad commented Jun 11, 2023

This fixes some cases where property access via super was returning wrong values.

This Pull Request changes the following:

  • Add correct receiver values for object set and get opcodes.
  • Set the [[HomeObject]] field for methods in object literals.

@raskad raskad added bug Something isn't working execution Issues or PRs related to code execution labels Jun 11, 2023
@raskad raskad added this to the v0.17.0 milestone Jun 11, 2023
@raskad raskad requested a review from a team June 11, 2023 20:29
@github-actions
Copy link

github-actions bot commented Jun 11, 2023

Test262 conformance changes

Test result main count PR count difference
Total 94,108 94,108 0
Passed 74,670 74,689 +19
Ignored 17,740 17,740 0
Failed 1,698 1,679 -19
Panics 0 0 0
Conformance 79.35% 79.37% +0.02%
Fixed tests (19):
test/language/expressions/super/prop-expr-cls-ref-strict.js [strict mode] (previously Failed)
test/language/expressions/super/prop-expr-cls-ref-strict.js (previously Failed)
test/language/expressions/super/prop-expr-cls-ref-this.js [strict mode] (previously Failed)
test/language/expressions/super/prop-expr-cls-ref-this.js (previously Failed)
test/language/expressions/super/prop-expr-obj-ref-this.js [strict mode] (previously Failed)
test/language/expressions/super/prop-expr-obj-ref-this.js (previously Failed)
test/language/expressions/super/prop-expr-obj-ref-non-strict.js (previously Failed)
test/language/expressions/super/prop-dot-obj-val-from-eval.js [strict mode] (previously Failed)
test/language/expressions/super/prop-dot-obj-val-from-eval.js (previously Failed)
test/language/expressions/super/prop-dot-obj-ref-this.js [strict mode] (previously Failed)
test/language/expressions/super/prop-dot-obj-ref-this.js (previously Failed)
test/language/expressions/super/prop-dot-cls-ref-this.js [strict mode] (previously Failed)
test/language/expressions/super/prop-dot-cls-ref-this.js (previously Failed)
test/language/expressions/super/prop-expr-obj-ref-strict.js [strict mode] (previously Failed)
test/language/expressions/super/prop-expr-obj-val-from-eval.js [strict mode] (previously Failed)
test/language/expressions/super/prop-expr-obj-val-from-eval.js (previously Failed)
test/language/eval-code/direct/super-prop-method.js [strict mode] (previously Failed)
test/language/eval-code/direct/super-prop-method.js (previously Failed)
test/built-ins/Symbol/auto-boxing-strict.js [strict mode] (previously Failed)

@codecov
Copy link

codecov bot commented Jun 11, 2023

Codecov Report

Merging #3026 (938747f) into main (dfba57e) will increase coverage by 0.05%.
The diff coverage is 54.26%.

@@            Coverage Diff             @@
##             main    #3026      +/-   ##
==========================================
+ Coverage   50.55%   50.61%   +0.05%     
==========================================
  Files         446      446              
  Lines       45987    46050      +63     
==========================================
+ Hits        23251    23307      +56     
- Misses      22736    22743       +7     
Impacted Files Coverage Δ
boa_engine/src/bytecompiler/class.rs 15.52% <0.00%> (ø)
boa_engine/src/bytecompiler/expression/mod.rs 56.93% <0.00%> (-0.29%) ⬇️
boa_engine/src/vm/code_block.rs 61.00% <ø> (ø)
boa_engine/src/vm/flowgraph/mod.rs 0.00% <ø> (ø)
boa_engine/src/vm/opcode/mod.rs 69.23% <ø> (ø)
boa_engine/src/bytecompiler/expression/assign.rs 38.00% <10.00%> (-1.44%) ⬇️
...rc/bytecompiler/declaration/declaration_pattern.rs 28.08% <33.33%> (+0.11%) ⬆️
boa_engine/src/bytecompiler/expression/update.rs 54.20% <44.44%> (-1.35%) ⬇️
boa_engine/src/vm/opcode/set/property.rs 68.48% <50.00%> (-1.64%) ⬇️
boa_engine/src/bytecompiler/mod.rs 67.50% <55.55%> (-0.02%) ⬇️
... and 3 more

... and 2 files with indirect coverage changes

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 good to me! :)

Copy link
Member

@jedel1043 jedel1043 left a comment

Choose a reason for hiding this comment

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

Looks good!

@jedel1043 jedel1043 added this pull request to the merge queue Jun 18, 2023
Merged via the queue into main with commit 86726f1 Jun 18, 2023
@HalidOdat HalidOdat deleted the fix-super branch June 18, 2023 01:50
Razican pushed a commit that referenced this pull request Jun 26, 2023
* Fix super property access

* Add better documentation to compiler
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working execution Issues or PRs related to code execution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants