[webkit-reviews] review granted: [Bug 196351] [ESNext] Implement support for Numeric Separators : [Attachment 370383] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed May 22 10:51:04 PDT 2019
Keith Miller <keith_miller at apple.com> has granted Ross Kirsling
<ross.kirsling at sony.com>'s request for review:
Bug 196351: [ESNext] Implement support for Numeric Separators
https://bugs.webkit.org/show_bug.cgi?id=196351
Attachment 370383: Patch
https://bugs.webkit.org/attachment.cgi?id=370383&action=review
--- Comment #5 from Keith Miller <keith_miller at apple.com> ---
Comment on attachment 370383
--> https://bugs.webkit.org/attachment.cgi?id=370383
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=370383&action=review
r=me with some nits.
> Source/JavaScriptCore/parser/Lexer.cpp:1519
> // Optimization: most hexadecimal values fit into 4 bytes.
Nit: Add ASSERT(isASCIIHexDigit(m_current)) it makes it clear that the caller
is expected to do this check.
> Source/JavaScriptCore/parser/Lexer.cpp:1578
>
Ditto on ASSERT but for binary.
> Source/JavaScriptCore/parser/Lexer.cpp:1630
>
Ditto on ASSERT but for Octal.
> Source/JavaScriptCore/parser/Lexer.cpp:1686
>
Ditto on ASSERT but for Decimal.
> JSTests/stress/numeric-literal-separators.js:13
> +function shouldThrow(script, errorType) {
> + let error;
> + try {
> + eval(script);
> + } catch (e) {
> + error = e;
> + }
Can you have these tests also run through the Number constructor. Also can you
test appending a bunch of digits (maybe even all 0s) so we hit the slow path in
the lexer?
More information about the webkit-reviews
mailing list