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 Function.prototype.toString() #3374

Merged
merged 2 commits into from
Oct 11, 2023
Merged

Conversation

HalidOdat
Copy link
Member

The remaining failing test262 test test/built-ins/Function/prototype/toString/method-computed-property-name.js is failing due to step 2 not being implemented. We fallback to native function to string representation.

@HalidOdat HalidOdat added bug Something isn't working enhancement New feature or request labels Oct 11, 2023
@HalidOdat HalidOdat added this to the v0.18.0 milestone Oct 11, 2023
@HalidOdat HalidOdat requested a review from a team October 11, 2023 05:46
@github-actions
Copy link

Test262 conformance changes

Test result main count PR count difference
Total 95,574 95,574 0
Passed 75,276 75,340 +64
Ignored 19,482 19,482 0
Failed 816 752 -64
Panics 0 0 0
Conformance 78.76% 78.83% +0.07%
Fixed tests (64):
test/built-ins/Function/prototype/toString/async-method-class-statement.js [strict mode] (previously Failed)
test/built-ins/Function/prototype/toString/async-method-class-statement.js (previously Failed)
test/built-ins/Function/prototype/toString/async-method-object.js [strict mode] (previously Failed)
test/built-ins/Function/prototype/toString/async-method-object.js (previously Failed)
test/built-ins/Function/prototype/toString/generator-function-declaration.js [strict mode] (previously Failed)
test/built-ins/Function/prototype/toString/generator-function-declaration.js (previously Failed)
test/built-ins/Function/prototype/toString/async-generator-method-object.js [strict mode] (previously Failed)
test/built-ins/Function/prototype/toString/async-generator-method-object.js (previously Failed)
test/built-ins/Function/prototype/toString/async-method-class-statement-static.js [strict mode] (previously Failed)
test/built-ins/Function/prototype/toString/async-method-class-statement-static.js (previously Failed)
test/built-ins/Function/prototype/toString/proxy-async-method-definition.js [strict mode] (previously Failed)
test/built-ins/Function/prototype/toString/proxy-async-method-definition.js (previously Failed)
test/built-ins/Function/prototype/toString/GeneratorFunction.js [strict mode] (previously Failed)
test/built-ins/Function/prototype/toString/GeneratorFunction.js (previously Failed)
test/built-ins/Function/prototype/toString/async-generator-expression.js [strict mode] (previously Failed)
test/built-ins/Function/prototype/toString/async-generator-expression.js (previously Failed)
test/built-ins/Function/prototype/toString/proxy-bound-function.js [strict mode] (previously Failed)
test/built-ins/Function/prototype/toString/proxy-bound-function.js (previously Failed)
test/built-ins/Function/prototype/toString/proxy-generator-function.js [strict mode] (previously Failed)
test/built-ins/Function/prototype/toString/proxy-generator-function.js (previously Failed)
test/built-ins/Function/prototype/toString/async-method-class-expression.js [strict mode] (previously Failed)
test/built-ins/Function/prototype/toString/async-method-class-expression.js (previously Failed)
test/built-ins/Function/prototype/toString/proxy-method-definition.js [strict mode] (previously Failed)
test/built-ins/Function/prototype/toString/proxy-method-definition.js (previously Failed)
test/built-ins/Function/prototype/toString/async-method-class-expression-static.js [strict mode] (previously Failed)
test/built-ins/Function/prototype/toString/async-method-class-expression-static.js (previously Failed)
test/built-ins/Function/prototype/toString/async-function-declaration.js [strict mode] (previously Failed)
test/built-ins/Function/prototype/toString/async-function-declaration.js (previously Failed)
test/built-ins/Function/prototype/toString/async-generator-method-class-expression.js [strict mode] (previously Failed)
test/built-ins/Function/prototype/toString/async-generator-method-class-expression.js (previously Failed)
test/built-ins/Function/prototype/toString/proxy-arrow-function.js [strict mode] (previously Failed)
test/built-ins/Function/prototype/toString/proxy-arrow-function.js (previously Failed)
test/built-ins/Function/prototype/toString/AsyncGenerator.js [strict mode] (previously Failed)
test/built-ins/Function/prototype/toString/AsyncGenerator.js (previously Failed)
test/built-ins/Function/prototype/toString/async-function-expression.js [strict mode] (previously Failed)
test/built-ins/Function/prototype/toString/async-function-expression.js (previously Failed)
test/built-ins/Function/prototype/toString/proxy-async-generator-function.js [strict mode] (previously Failed)
test/built-ins/Function/prototype/toString/proxy-async-generator-function.js (previously Failed)
test/built-ins/Function/prototype/toString/async-generator-method-class-statement.js [strict mode] (previously Failed)
test/built-ins/Function/prototype/toString/async-generator-method-class-statement.js (previously Failed)
test/built-ins/Function/prototype/toString/proxy-async-generator-method-definition.js [strict mode] (previously Failed)
test/built-ins/Function/prototype/toString/proxy-async-generator-method-definition.js (previously Failed)
test/built-ins/Function/prototype/toString/generator-method.js [strict mode] (previously Failed)
test/built-ins/Function/prototype/toString/generator-method.js (previously Failed)
test/built-ins/Function/prototype/toString/generator-function-expression.js [strict mode] (previously Failed)
test/built-ins/Function/prototype/toString/generator-function-expression.js (previously Failed)
test/built-ins/Function/prototype/toString/async-generator-method-class-expression-static.js [strict mode] (previously Failed)
test/built-ins/Function/prototype/toString/async-generator-method-class-expression-static.js (previously Failed)
test/built-ins/Function/prototype/toString/bound-function.js [strict mode] (previously Failed)
test/built-ins/Function/prototype/toString/bound-function.js (previously Failed)
test/built-ins/Function/prototype/toString/async-generator-declaration.js [strict mode] (previously Failed)
test/built-ins/Function/prototype/toString/async-generator-declaration.js (previously Failed)
test/built-ins/Function/prototype/toString/AsyncFunction.js [strict mode] (previously Failed)
test/built-ins/Function/prototype/toString/AsyncFunction.js (previously Failed)
test/built-ins/Function/prototype/toString/async-arrow-function.js [strict mode] (previously Failed)
test/built-ins/Function/prototype/toString/async-arrow-function.js (previously Failed)
test/built-ins/Function/prototype/toString/proxy-class.js [strict mode] (previously Failed)
test/built-ins/Function/prototype/toString/proxy-class.js (previously Failed)
test/built-ins/Function/prototype/toString/async-generator-method-class-statement-static.js [strict mode] (previously Failed)
test/built-ins/Function/prototype/toString/async-generator-method-class-statement-static.js (previously Failed)
test/built-ins/Function/prototype/toString/proxy-function-expression.js [strict mode] (previously Failed)
test/built-ins/Function/prototype/toString/proxy-function-expression.js (previously Failed)
test/built-ins/Function/prototype/toString/proxy-async-function.js [strict mode] (previously Failed)
test/built-ins/Function/prototype/toString/proxy-async-function.js (previously Failed)

@codecov
Copy link

codecov bot commented Oct 11, 2023

Codecov Report

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

Comparison is base (f654ad1) 49.49% compared to head (59fd088) 49.49%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3374      +/-   ##
==========================================
- Coverage   49.49%   49.49%   -0.01%     
==========================================
  Files         446      446              
  Lines       43643    43646       +3     
==========================================
+ Hits        21602    21603       +1     
- Misses      22041    22043       +2     
Files Coverage Δ
boa_engine/src/object/mod.rs 31.57% <0.00%> (-0.08%) ⬇️
boa_engine/src/builtins/function/mod.rs 39.63% <30.00%> (+0.18%) ⬆️

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

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.

Good catch! LGTM

@jedel1043 jedel1043 added this pull request to the merge queue Oct 11, 2023
Merged via the queue into main with commit 72d2546 Oct 11, 2023
14 checks passed
@HalidOdat HalidOdat deleted the fix/function-prototype-tostring branch October 11, 2023 07:33
sam-finch-tezos pushed a commit to trilitech/boa that referenced this pull request Nov 29, 2023
* Fix `Function.prototype.toString()`

* Add doc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants