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

Implement findLast and findLastIndex on TypedArray #3135

Merged
merged 2 commits into from
Jul 13, 2023

Conversation

dirkdev98
Copy link
Contributor

This Pull Request closes #3100

Depends on #3134 (iirc putting my fork as the base would not automatically switch the base of this PR to main once the other one is merged..)

It changes the following:

@dirkdev98
Copy link
Contributor Author

Test262 conformance changes

Test result main count PR count difference
Total 94,858 94,858 0
Passed 74,724 74,820 +96
Ignored 18,828 18,828 0
Failed 1,306 1,210 -96
Panics 0 0 0
Conformance 78.77% 78.88% +0.10%
Fixed tests (96):
test/built-ins/TypedArray/prototype/findLast/return-found-value-predicate-result-is-true.js [strict mode] (previously Failed)
test/built-ins/TypedArray/prototype/findLast/return-found-value-predicate-result-is-true.js (previously Failed)
test/built-ins/TypedArray/prototype/findLast/not-a-constructor.js [strict mode] (previously Failed)
test/built-ins/TypedArray/prototype/findLast/not-a-constructor.js (previously Failed)
test/built-ins/TypedArray/prototype/findLast/predicate-call-changes-value.js [strict mode] (previously Failed)
test/built-ins/TypedArray/prototype/findLast/predicate-call-changes-value.js (previously Failed)
test/built-ins/TypedArray/prototype/findLast/predicate-not-called-on-empty-array.js [strict mode] (previously Failed)
test/built-ins/TypedArray/prototype/findLast/predicate-not-called-on-empty-array.js (previously Failed)
test/built-ins/TypedArray/prototype/findLast/length.js [strict mode] (previously Failed)
test/built-ins/TypedArray/prototype/findLast/length.js (previously Failed)
test/built-ins/TypedArray/prototype/findLast/predicate-may-detach-buffer.js [strict mode] (previously Failed)
test/built-ins/TypedArray/prototype/findLast/predicate-may-detach-buffer.js (previously Failed)
test/built-ins/TypedArray/prototype/findLast/invoked-as-func.js [strict mode] (previously Failed)
test/built-ins/TypedArray/prototype/findLast/invoked-as-func.js (previously Failed)
test/built-ins/TypedArray/prototype/findLast/predicate-call-parameters.js [strict mode] (previously Failed)
test/built-ins/TypedArray/prototype/findLast/predicate-call-parameters.js (previously Failed)
test/built-ins/TypedArray/prototype/findLast/return-abrupt-from-predicate-call.js [strict mode] (previously Failed)
test/built-ins/TypedArray/prototype/findLast/return-abrupt-from-predicate-call.js (previously Failed)
test/built-ins/TypedArray/prototype/findLast/predicate-call-this-strict.js [strict mode] (previously Failed)
test/built-ins/TypedArray/prototype/findLast/predicate-call-this-non-strict.js (previously Failed)
test/built-ins/TypedArray/prototype/findLast/name.js [strict mode] (previously Failed)
test/built-ins/TypedArray/prototype/findLast/name.js (previously Failed)
test/built-ins/TypedArray/prototype/findLast/invoked-as-method.js [strict mode] (previously Failed)
test/built-ins/TypedArray/prototype/findLast/invoked-as-method.js (previously Failed)
test/built-ins/TypedArray/prototype/findLast/get-length-ignores-length-prop.js [strict mode] (previously Failed)
test/built-ins/TypedArray/prototype/findLast/get-length-ignores-length-prop.js (previously Failed)
test/built-ins/TypedArray/prototype/findLast/prop-desc.js [strict mode] (previously Failed)
test/built-ins/TypedArray/prototype/findLast/prop-desc.js (previously Failed)
test/built-ins/TypedArray/prototype/findLast/return-undefined-if-predicate-returns-false-value.js [strict mode] (previously Failed)
test/built-ins/TypedArray/prototype/findLast/return-undefined-if-predicate-returns-false-value.js (previously Failed)
test/built-ins/TypedArray/prototype/findLast/BigInt/return-found-value-predicate-result-is-true.js [strict mode] (previously Failed)
test/built-ins/TypedArray/prototype/findLast/BigInt/return-found-value-predicate-result-is-true.js (previously Failed)
test/built-ins/TypedArray/prototype/findLast/BigInt/predicate-call-changes-value.js [strict mode] (previously Failed)
test/built-ins/TypedArray/prototype/findLast/BigInt/predicate-call-changes-value.js (previously Failed)
test/built-ins/TypedArray/prototype/findLast/BigInt/predicate-not-called-on-empty-array.js [strict mode] (previously Failed)
test/built-ins/TypedArray/prototype/findLast/BigInt/predicate-not-called-on-empty-array.js (previously Failed)
test/built-ins/TypedArray/prototype/findLast/BigInt/predicate-may-detach-buffer.js [strict mode] (previously Failed)
test/built-ins/TypedArray/prototype/findLast/BigInt/predicate-may-detach-buffer.js (previously Failed)
test/built-ins/TypedArray/prototype/findLast/BigInt/predicate-call-parameters.js [strict mode] (previously Failed)
test/built-ins/TypedArray/prototype/findLast/BigInt/predicate-call-parameters.js (previously Failed)
test/built-ins/TypedArray/prototype/findLast/BigInt/return-abrupt-from-predicate-call.js [strict mode] (previously Failed)
test/built-ins/TypedArray/prototype/findLast/BigInt/return-abrupt-from-predicate-call.js (previously Failed)
test/built-ins/TypedArray/prototype/findLast/BigInt/predicate-call-this-strict.js [strict mode] (previously Failed)
test/built-ins/TypedArray/prototype/findLast/BigInt/predicate-call-this-non-strict.js (previously Failed)
test/built-ins/TypedArray/prototype/findLast/BigInt/get-length-ignores-length-prop.js [strict mode] (previously Failed)
test/built-ins/TypedArray/prototype/findLast/BigInt/get-length-ignores-length-prop.js (previously Failed)
test/built-ins/TypedArray/prototype/findLast/BigInt/return-undefined-if-predicate-returns-false-value.js [strict mode] (previously Failed)
test/built-ins/TypedArray/prototype/findLast/BigInt/return-undefined-if-predicate-returns-false-value.js (previously Failed)
test/built-ins/TypedArray/prototype/findLastIndex/return-index-predicate-result-is-true.js [strict mode] (previously Failed)
test/built-ins/TypedArray/prototype/findLastIndex/return-index-predicate-result-is-true.js (previously Failed)
test/built-ins/TypedArray/prototype/findLastIndex/not-a-constructor.js [strict mode] (previously Failed)
test/built-ins/TypedArray/prototype/findLastIndex/not-a-constructor.js (previously Failed)
test/built-ins/TypedArray/prototype/findLastIndex/predicate-call-changes-value.js [strict mode] (previously Failed)
test/built-ins/TypedArray/prototype/findLastIndex/predicate-call-changes-value.js (previously Failed)
test/built-ins/TypedArray/prototype/findLastIndex/predicate-not-called-on-empty-array.js [strict mode] (previously Failed)
test/built-ins/TypedArray/prototype/findLastIndex/predicate-not-called-on-empty-array.js (previously Failed)
test/built-ins/TypedArray/prototype/findLastIndex/length.js [strict mode] (previously Failed)
test/built-ins/TypedArray/prototype/findLastIndex/length.js (previously Failed)
test/built-ins/TypedArray/prototype/findLastIndex/predicate-may-detach-buffer.js [strict mode] (previously Failed)
test/built-ins/TypedArray/prototype/findLastIndex/predicate-may-detach-buffer.js (previously Failed)
test/built-ins/TypedArray/prototype/findLastIndex/invoked-as-func.js [strict mode] (previously Failed)
test/built-ins/TypedArray/prototype/findLastIndex/invoked-as-func.js (previously Failed)
test/built-ins/TypedArray/prototype/findLastIndex/predicate-call-parameters.js [strict mode] (previously Failed)
test/built-ins/TypedArray/prototype/findLastIndex/predicate-call-parameters.js (previously Failed)
test/built-ins/TypedArray/prototype/findLastIndex/return-abrupt-from-predicate-call.js [strict mode] (previously Failed)
test/built-ins/TypedArray/prototype/findLastIndex/return-abrupt-from-predicate-call.js (previously Failed)
test/built-ins/TypedArray/prototype/findLastIndex/predicate-call-this-strict.js [strict mode] (previously Failed)
test/built-ins/TypedArray/prototype/findLastIndex/predicate-call-this-non-strict.js (previously Failed)
test/built-ins/TypedArray/prototype/findLastIndex/name.js [strict mode] (previously Failed)
test/built-ins/TypedArray/prototype/findLastIndex/name.js (previously Failed)
test/built-ins/TypedArray/prototype/findLastIndex/invoked-as-method.js [strict mode] (previously Failed)
test/built-ins/TypedArray/prototype/findLastIndex/invoked-as-method.js (previously Failed)
test/built-ins/TypedArray/prototype/findLastIndex/get-length-ignores-length-prop.js [strict mode] (previously Failed)
test/built-ins/TypedArray/prototype/findLastIndex/get-length-ignores-length-prop.js (previously Failed)
test/built-ins/TypedArray/prototype/findLastIndex/return-negative-one-if-predicate-returns-false-value.js [strict mode] (previously Failed)
test/built-ins/TypedArray/prototype/findLastIndex/return-negative-one-if-predicate-returns-false-value.js (previously Failed)
test/built-ins/TypedArray/prototype/findLastIndex/prop-desc.js [strict mode] (previously Failed)
test/built-ins/TypedArray/prototype/findLastIndex/prop-desc.js (previously Failed)
test/built-ins/TypedArray/prototype/findLastIndex/BigInt/return-index-predicate-result-is-true.js [strict mode] (previously Failed)
test/built-ins/TypedArray/prototype/findLastIndex/BigInt/return-index-predicate-result-is-true.js (previously Failed)
test/built-ins/TypedArray/prototype/findLastIndex/BigInt/predicate-call-changes-value.js [strict mode] (previously Failed)
test/built-ins/TypedArray/prototype/findLastIndex/BigInt/predicate-call-changes-value.js (previously Failed)
test/built-ins/TypedArray/prototype/findLastIndex/BigInt/predicate-not-called-on-empty-array.js [strict mode] (previously Failed)
test/built-ins/TypedArray/prototype/findLastIndex/BigInt/predicate-not-called-on-empty-array.js (previously Failed)
test/built-ins/TypedArray/prototype/findLastIndex/BigInt/predicate-may-detach-buffer.js [strict mode] (previously Failed)
test/built-ins/TypedArray/prototype/findLastIndex/BigInt/predicate-may-detach-buffer.js (previously Failed)
test/built-ins/TypedArray/prototype/findLastIndex/BigInt/predicate-call-parameters.js [strict mode] (previously Failed)
test/built-ins/TypedArray/prototype/findLastIndex/BigInt/predicate-call-parameters.js (previously Failed)
test/built-ins/TypedArray/prototype/findLastIndex/BigInt/return-abrupt-from-predicate-call.js [strict mode] (previously Failed)
test/built-ins/TypedArray/prototype/findLastIndex/BigInt/return-abrupt-from-predicate-call.js (previously Failed)
test/built-ins/TypedArray/prototype/findLastIndex/BigInt/predicate-call-this-strict.js [strict mode] (previously Failed)
test/built-ins/TypedArray/prototype/findLastIndex/BigInt/predicate-call-this-non-strict.js (previously Failed)
test/built-ins/TypedArray/prototype/findLastIndex/BigInt/get-length-ignores-length-prop.js [strict mode] (previously Failed)
test/built-ins/TypedArray/prototype/findLastIndex/BigInt/get-length-ignores-length-prop.js (previously Failed)
test/built-ins/TypedArray/prototype/findLastIndex/BigInt/return-negative-one-if-predicate-returns-false-value.js [strict mode] (previously Failed)
test/built-ins/TypedArray/prototype/findLastIndex/BigInt/return-negative-one-if-predicate-returns-false-value.js (previously Failed)

@codecov
Copy link

codecov bot commented Jul 11, 2023

Codecov Report

Merging #3135 (ae28781) into main (93d05bd) will decrease coverage by 0.05%.
The diff coverage is 4.76%.

@@            Coverage Diff             @@
##             main    #3135      +/-   ##
==========================================
- Coverage   50.66%   50.62%   -0.05%     
==========================================
  Files         444      444              
  Lines       42650    42692      +42     
==========================================
+ Hits        21610    21612       +2     
- Misses      21040    21080      +40     
Impacted Files Coverage Δ
boa_engine/src/builtins/typed_array/mod.rs 7.45% <4.76%> (-0.09%) ⬇️

@dirkdev98 dirkdev98 force-pushed the typed-array-find-last branch from 802536a to b11c949 Compare July 12, 2023 20:19
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, just needs a rebase once #3134 is merged :)

@HalidOdat HalidOdat added enhancement New feature or request builtins PRs and Issues related to builtins/intrinsics labels Jul 13, 2023
@HalidOdat HalidOdat added this to the v0.18.0 milestone Jul 13, 2023
@HalidOdat HalidOdat requested a review from a team July 13, 2023 18:48
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 great!

@dirkdev98 dirkdev98 force-pushed the typed-array-find-last branch from b11c949 to ae28781 Compare July 13, 2023 20:18
@dirkdev98
Copy link
Contributor Author

Rebased, thanks for the reviews!

@jedel1043 jedel1043 added this pull request to the merge queue Jul 13, 2023
Merged via the queue into boa-dev:main with commit b51e7cf Jul 13, 2023
@dirkdev98 dirkdev98 deleted the typed-array-find-last branch July 13, 2023 22:46
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 enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement findLast & findLastIndex on TypedArray's
3 participants