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 GetSubstitution #2933

Merged
merged 1 commit into from
May 17, 2023
Merged

Fix GetSubstitution #2933

merged 1 commit into from
May 17, 2023

Conversation

HalidOdat
Copy link
Member

@HalidOdat HalidOdat commented May 16, 2023

Fixes GetSubstitution which is used in by RegExp.prototype[@@replace] and String.prototype.replace() calls RegExp.prototype[@@replace].

Fixes the remaining ES5 tests on buil-ins/String test suite.

Because of the bug in the spec about GetSubstitution. I had to deviate from the spec, added a comment clarifying the deviation.

@HalidOdat HalidOdat added bug Something isn't working builtins PRs and Issues related to builtins/intrinsics labels May 16, 2023
@HalidOdat HalidOdat force-pushed the fix/string-get-substitutions branch from 74d9f4f to 47b8d38 Compare May 16, 2023 07:03
@github-actions
Copy link

github-actions bot commented May 16, 2023

Test262 conformance changes

Test result main count PR count difference
Total 94,657 94,657 0
Passed 73,901 73,913 +12
Ignored 17,505 17,505 0
Failed 3,251 3,239 -12
Panics 0 0 0
Conformance 78.07% 78.09% +0.01%
Fixed tests (12):
test/built-ins/String/prototype/replace/S15.5.4.11_A3_T2.js [strict mode] (previously Failed)
test/built-ins/String/prototype/replace/S15.5.4.11_A3_T2.js (previously Failed)
test/built-ins/String/prototype/replace/S15.5.4.11_A3_T1.js [strict mode] (previously Failed)
test/built-ins/String/prototype/replace/S15.5.4.11_A3_T1.js (previously Failed)
test/built-ins/String/prototype/replace/S15.5.4.11_A3_T3.js [strict mode] (previously Failed)
test/built-ins/String/prototype/replace/S15.5.4.11_A3_T3.js (previously Failed)
test/built-ins/RegExp/prototype/Symbol.replace/flags-tostring-error.js [strict mode] (previously Failed)
test/built-ins/RegExp/prototype/Symbol.replace/flags-tostring-error.js (previously Failed)
test/built-ins/RegExp/prototype/Symbol.replace/get-unicode-error.js [strict mode] (previously Failed)
test/built-ins/RegExp/prototype/Symbol.replace/get-unicode-error.js (previously Failed)
test/built-ins/RegExp/prototype/Symbol.replace/get-flags-err.js [strict mode] (previously Failed)
test/built-ins/RegExp/prototype/Symbol.replace/get-flags-err.js (previously Failed)

@HalidOdat HalidOdat force-pushed the fix/string-get-substitutions branch from 47b8d38 to 682eba7 Compare May 16, 2023 07:20
@codecov
Copy link

codecov bot commented May 16, 2023

Codecov Report

Merging #2933 (682eba7) into main (d13979d) will decrease coverage by 0.03%.
The diff coverage is 86.48%.

@@            Coverage Diff             @@
##             main    #2933      +/-   ##
==========================================
- Coverage   52.09%   52.06%   -0.03%     
==========================================
  Files         435      435              
  Lines       43713    43696      -17     
==========================================
- Hits        22771    22750      -21     
- Misses      20942    20946       +4     
Impacted Files Coverage Δ
boa_engine/src/builtins/regexp/mod.rs 63.48% <81.63%> (-0.21%) ⬇️
boa_engine/src/builtins/string/mod.rs 57.11% <96.00%> (-0.71%) ⬇️

... and 1 file with indirect coverage changes

@HalidOdat HalidOdat marked this pull request as ready for review May 16, 2023 07:32
@HalidOdat HalidOdat requested a review from a team May 16, 2023 07:33
@HalidOdat HalidOdat added this to the v0.17.0 milestone May 16, 2023
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.

Nice work! Really like the additional notes to clarify spec deviations :)

Copy link
Member

@nekevss nekevss 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! Seconding that the notes updates were nice.

@nekevss nekevss added this pull request to the merge queue May 17, 2023
Merged via the queue into main with commit 190eeb3 May 17, 2023
@Razican Razican deleted the fix/string-get-substitutions branch May 17, 2023 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working builtins PRs and Issues related to builtins/intrinsics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants