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

[Merged by Bors] - Implement new.target expression #2299

Closed
wants to merge 1 commit into from
Closed

Conversation

raskad
Copy link
Member

@raskad raskad commented Sep 23, 2022

This Pull Request changes the following:

  • Implement new.target expression

@raskad raskad added enhancement New feature or request parser Issues surrounding the parser execution Issues or PRs related to code execution ast Issue surrounding the abstract syntax tree labels Sep 23, 2022
@raskad raskad added this to the v0.17.0 milestone Sep 23, 2022
@github-actions
Copy link

Test262 conformance changes

VM implementation

Test result main count PR count difference
Total 92,057 92,057 0
Passed 68,612 68,694 +82
Ignored 16,832 16,832 0
Failed 6,613 6,531 -82
Panics 0 0 0
Conformance 74.53% 74.62% +0.09%
Fixed tests (84):
test/built-ins/Array/prototype/flatMap/this-value-ctor-object-species-custom-ctor-poisoned-throws.js [strict mode] (previously Failed)
test/built-ins/Array/prototype/flatMap/this-value-ctor-object-species-custom-ctor-poisoned-throws.js (previously Failed)
test/built-ins/Array/prototype/flatMap/this-value-ctor-object-species-custom-ctor.js [strict mode] (previously Failed)
test/built-ins/Array/prototype/flatMap/this-value-ctor-object-species-custom-ctor.js (previously Failed)
test/built-ins/Function/prototype/bind/instance-construct-newtarget-self-new.js [strict mode] (previously Failed)
test/built-ins/Function/prototype/bind/instance-construct-newtarget-self-new.js (previously Failed)
test/built-ins/Function/prototype/bind/instance-construct-newtarget-boundtarget-bound.js [strict mode] (previously Failed)
test/built-ins/Function/prototype/bind/instance-construct-newtarget-boundtarget-bound.js (previously Failed)
test/built-ins/Function/prototype/bind/instance-construct-newtarget-self-reflect.js [strict mode] (previously Failed)
test/built-ins/Function/prototype/bind/instance-construct-newtarget-self-reflect.js (previously Failed)
test/built-ins/Function/prototype/bind/instance-construct-newtarget-boundtarget.js [strict mode] (previously Failed)
test/built-ins/Function/prototype/bind/instance-construct-newtarget-boundtarget.js (previously Failed)
test/language/eval-code/direct/new.target-fn.js [strict mode] (previously Failed)
test/language/eval-code/direct/new.target-fn.js (previously Failed)
test/language/statements/class/static-init-expr-new-target.js [strict mode] (previously Failed)
test/language/statements/class/static-init-expr-new-target.js (previously Failed)
test/language/statements/class/async-method/returns-async-function-returns-newtarget.js [strict mode] (previously Failed)
test/language/statements/class/async-method/returns-async-function-returns-newtarget.js (previously Failed)
test/language/statements/class/async-method-static/returns-async-function-returns-newtarget.js [strict mode] (previously Failed)
test/language/statements/class/async-method-static/returns-async-function-returns-newtarget.js (previously Failed)
test/language/statements/class/elements/nested-private-direct-eval-err-contains-newtarget.js [strict mode] (previously Failed)
test/language/statements/class/elements/nested-private-direct-eval-err-contains-newtarget.js (previously Failed)
test/language/statements/class/elements/private-direct-eval-err-contains-newtarget.js [strict mode] (previously Failed)
test/language/statements/class/elements/private-direct-eval-err-contains-newtarget.js (previously Failed)
test/language/statements/class/elements/direct-eval-err-contains-newtarget.js [strict mode] (previously Failed)
test/language/statements/class/elements/direct-eval-err-contains-newtarget.js (previously Failed)
test/language/statements/class/elements/nested-direct-eval-err-contains-newtarget.js [strict mode] (previously Failed)
test/language/statements/class/elements/nested-direct-eval-err-contains-newtarget.js (previously Failed)
test/language/statements/class/elements/arrow-body-direct-eval-err-contains-newtarget.js [strict mode] (previously Failed)
test/language/statements/class/elements/arrow-body-direct-eval-err-contains-newtarget.js (previously Failed)
test/language/statements/class/elements/arrow-body-private-direct-eval-err-contains-newtarget.js [strict mode] (previously Failed)
test/language/statements/class/elements/arrow-body-private-direct-eval-err-contains-newtarget.js (previously Failed)
test/language/statements/async-function/returns-async-function-returns-newtarget.js [strict mode] (previously Failed)
test/language/statements/async-function/returns-async-function-returns-newtarget.js (previously Failed)
test/language/expressions/class/async-method/returns-async-function-returns-newtarget.js [strict mode] (previously Failed)
test/language/expressions/class/async-method/returns-async-function-returns-newtarget.js (previously Failed)
test/language/expressions/class/async-method-static/returns-async-function-returns-newtarget.js [strict mode] (previously Failed)
test/language/expressions/class/async-method-static/returns-async-function-returns-newtarget.js (previously Failed)
test/language/expressions/class/elements/nested-private-direct-eval-err-contains-newtarget.js [strict mode] (previously Failed)
test/language/expressions/class/elements/nested-private-direct-eval-err-contains-newtarget.js (previously Failed)
test/language/expressions/class/elements/private-direct-eval-err-contains-newtarget.js [strict mode] (previously Failed)
test/language/expressions/class/elements/private-direct-eval-err-contains-newtarget.js (previously Failed)
test/language/expressions/class/elements/direct-eval-err-contains-newtarget.js [strict mode] (previously Failed)
test/language/expressions/class/elements/direct-eval-err-contains-newtarget.js (previously Failed)
test/language/expressions/class/elements/nested-direct-eval-err-contains-newtarget.js [strict mode] (previously Failed)
test/language/expressions/class/elements/nested-direct-eval-err-contains-newtarget.js (previously Failed)
test/language/expressions/class/elements/arrow-body-direct-eval-err-contains-newtarget.js [strict mode] (previously Failed)
test/language/expressions/class/elements/arrow-body-direct-eval-err-contains-newtarget.js (previously Failed)
test/language/expressions/class/elements/arrow-body-private-direct-eval-err-contains-newtarget.js [strict mode] (previously Failed)
test/language/expressions/class/elements/arrow-body-private-direct-eval-err-contains-newtarget.js (previously Failed)
test/language/expressions/arrow-function/lexical-new.target.js [strict mode] (previously Failed)
test/language/expressions/arrow-function/lexical-new.target.js (previously Failed)
test/language/expressions/arrow-function/lexical-new.target-closure-returned.js [strict mode] (previously Failed)
test/language/expressions/arrow-function/lexical-new.target-closure-returned.js (previously Failed)
test/language/expressions/super/call-construct-invocation.js [strict mode] (previously Failed)
test/language/expressions/super/call-construct-invocation.js (previously Failed)
test/language/expressions/async-function/named-returns-async-function-returns-newtarget.js [strict mode] (previously Failed)
test/language/expressions/async-function/named-returns-async-function-returns-newtarget.js (previously Failed)
test/language/expressions/new.target/value-via-call.js [strict mode] (previously Failed)
test/language/expressions/new.target/value-via-call.js (previously Failed)
test/language/expressions/new.target/asi.js [strict mode] (previously Failed)
test/language/expressions/new.target/asi.js (previously Failed)
test/language/expressions/new.target/value-via-fpapply.js [strict mode] (previously Failed)
test/language/expressions/new.target/value-via-fpapply.js (previously Failed)
test/language/expressions/new.target/value-via-member.js [strict mode] (previously Failed)
test/language/expressions/new.target/value-via-member.js (previously Failed)
test/language/expressions/new.target/value-via-reflect-construct.js [strict mode] (previously Failed)
test/language/expressions/new.target/value-via-reflect-construct.js (previously Failed)
test/language/expressions/new.target/unary-expr.js [strict mode] (previously Failed)
test/language/expressions/new.target/unary-expr.js (previously Failed)
test/language/expressions/new.target/value-via-tagged-template.js [strict mode] (previously Failed)
test/language/expressions/new.target/value-via-tagged-template.js (previously Failed)
test/language/expressions/new.target/value-via-reflect-apply.js [strict mode] (previously Failed)
test/language/expressions/new.target/value-via-reflect-apply.js (previously Failed)
test/language/expressions/new.target/value-via-super-property.js [strict mode] (previously Failed)
test/language/expressions/new.target/value-via-super-property.js (previously Failed)
test/language/expressions/new.target/value-via-fpcall.js [strict mode] (previously Failed)
test/language/expressions/new.target/value-via-fpcall.js (previously Failed)
test/language/expressions/new.target/value-via-new.js [strict mode] (previously Failed)
test/language/expressions/new.target/value-via-new.js (previously Failed)
test/language/expressions/new.target/value-via-super-call.js [strict mode] (previously Failed)
test/language/expressions/new.target/value-via-super-call.js (previously Failed)
test/language/expressions/object/method-definition/async-returns-async-function-returns-newtarget.js [strict mode] (previously Failed)
test/language/expressions/object/method-definition/async-returns-async-function-returns-newtarget.js (previously Failed)
Broken tests (2):
test/language/expressions/new.target/escaped-target.js [strict mode] (previously Passed)
test/language/expressions/new.target/escaped-target.js (previously Passed)

@codecov
Copy link

codecov bot commented Sep 23, 2022

Codecov Report

Merging #2299 (fd0e23d) into main (77e739c) will decrease coverage by 0.01%.
The diff coverage is 10.00%.

@@            Coverage Diff             @@
##             main    #2299      +/-   ##
==========================================
- Coverage   41.23%   41.21%   -0.02%     
==========================================
  Files         237      237              
  Lines       22342    22373      +31     
==========================================
+ Hits         9212     9221       +9     
- Misses      13130    13152      +22     
Impacted Files Coverage Δ
boa_engine/src/bytecompiler/mod.rs 29.28% <0.00%> (-0.05%) ⬇️
boa_engine/src/syntax/ast/node/mod.rs 62.45% <ø> (+0.14%) ⬆️
boa_engine/src/vm/code_block.rs 32.63% <ø> (ø)
boa_engine/src/vm/mod.rs 45.78% <0.00%> (-0.11%) ⬇️
boa_engine/src/vm/opcode.rs 50.00% <ø> (ø)
boa_interner/src/sym.rs 0.00% <ø> (ø)
boa_engine/src/syntax/parser/mod.rs 24.19% <7.14%> (-2.60%) ⬇️
.../syntax/parser/expression/left_hand_side/member.rs 35.23% <22.22%> (-2.91%) ⬇️
boa_engine/src/syntax/ast/node/spread/mod.rs 57.14% <0.00%> (-14.29%) ⬇️
boa_engine/src/syntax/parser/expression/unary.rs 47.16% <0.00%> (-1.89%) ⬇️
... and 25 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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! Should be good to have a test for this though.

@jedel1043
Copy link
Member

bors r+

bors bot pushed a commit that referenced this pull request Sep 25, 2022
This Pull Request changes the following:

- Implement `new.target` expression
@bors
Copy link

bors bot commented Sep 25, 2022

Pull request successfully merged into main.

Build succeeded:

@bors bors bot changed the title Implement new.target expression [Merged by Bors] - Implement new.target expression Sep 25, 2022
@bors bors bot closed this Sep 25, 2022
@bors bors bot deleted the new-target branch September 25, 2022 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ast Issue surrounding the abstract syntax tree enhancement New feature or request execution Issues or PRs related to code execution parser Issues surrounding the parser
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants