-
-
Notifications
You must be signed in to change notification settings - Fork 402
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] - Fix string.prototype methods and add static string methods #1123
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1123 +/- ##
==========================================
- Coverage 55.75% 55.67% -0.08%
==========================================
Files 201 201
Lines 17273 17375 +102
==========================================
+ Hits 9631 9674 +43
- Misses 7642 7701 +59
Continue to review full report at Codecov.
|
Test262 conformance changes:
Numbers look pretty good. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
I just have some small suggestions on how to improve it. :)
Co-authored-by: Halid Odat <halidodat@gmail.com>
There was a problem hiding this 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, just requires a re-base.
Current numbers, I'll try to understand if I accidentaly introduced the 32 panics. Test262 conformance changes:
Fixed tests:
New panics:
|
I'm not getting panics locally, I'll run test262 again. Test262 conformance changes:
Fixed tests:
Broken tests:
New panics:
|
I'm able to reproduce the panics locally:
|
@jevancc It would be very nice to get this merged. Did you have the chance to review the panics & re-base it? |
Sure, I will complete it soon this week. |
@Razican This PR has been rebased to the latest main. Update notes:
Feel free to merge this PR if everything looks good to you or let me know if there are other changes required before merging. |
Test262 conformance changesVM implementation
Fixed tests (114):
Broken tests (2):
New panics (32):
|
Let's give this a look. It looks pretty good, but we must fix the panics before merging. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution!
I am missing some comments to explain where in the spec the logic is coming from. Also, those panics need further checks. I'll try to give a further look later this week.
VM implementation
Fixed tests (138):
Broken tests (2):
|
54681ca
to
f29121d
Compare
Test262 conformance changesVM implementation
Fixed tests (138):
|
The panic is triggered by surrogates as parameters to fromCodePoint. I fixed them by replacing these chars with a replacement character. This problem will not be solvable until we have the UTF-16 support. |
LGTM! Thank you for all the work :) bors r+ |
<!--- Thank you for contributing to Boa! Please fill out the template below, and remove or add any information as you feel neccesary. ---> This Pull Request fixes existing string prototype methods in #13 and adds static methods. It changes the following: - Fix bugs in existing string prototype methods and improve readability (e.g. rename variables to match the names in spec) - Add static methods `String.raw`, `String.fromCharCode`, `String.fromCodePoint` - Fix broken unit tests Co-authored-by: RageKnify <RageKnify@gmail.com>
Pull request successfully merged into main. Build succeeded: |
With the implementation of `String.fromCodePoint` in #1123 some `RegExp` tests are now running for a long time. These tests check every unicode codepoint for all regexp property escape/character classes. This not only makes the developer experience significantly worse, but also wastes cpu resources for the benefit of "completeness". I think these tests are completely useless. Ironically the unicode tables in the tests are generated - from the same data, that the unicode tables in the regex engine are also generated. 262 suite runtime: Before: ~03:30 https://github.com/boa-dev/boa/runs/5191567446?check_suite_focus=true After: ~31:00 https://github.com/boa-dev/boa/runs/5196405437?check_suite_focus=true
This Pull Request fixes existing string prototype methods in #13 and adds static methods.
It changes the following:
String.raw
,String.fromCharCode
,String.fromCodePoint