WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
191439
[JSC] isStrWhiteSpace seems redundant with Lexer<UChar>::isWhiteSpace
https://bugs.webkit.org/show_bug.cgi?id=191439
Summary
[JSC] isStrWhiteSpace seems redundant with Lexer<UChar>::isWhiteSpace
Ross Kirsling
Reported
2018-11-08 15:14:15 PST
isStrWhiteSpace in ParseInt.h seems redundant with Lexer<UChar>::isWhiteSpace and could probably be done away with. Note that while Lexer<UChar>::isWhiteSpace matches the current ES spec (
https://tc39.github.io/ecma262/#sec-white-space
), isStrWhiteSpace additionally looks for 0x000A, 0x000D, 0x2028, and 0x2029. Not sure whether it's supposed to be doing so or not though.
Attachments
Patch
(1.80 KB, patch)
2018-11-08 17:13 PST
,
Ross Kirsling
no flags
Details
Formatted Diff
Diff
Patch for landing
(2.33 KB, patch)
2018-11-08 20:16 PST
,
Ross Kirsling
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Ross Kirsling
Comment 1
2018-11-08 16:48:29 PST
(In reply to Ross Kirsling from
comment #0
)
> Note that while Lexer<UChar>::isWhiteSpace matches the current ES spec > (
https://tc39.github.io/ecma262/#sec-white-space
), isStrWhiteSpace > additionally looks for 0x000A, 0x000D, 0x2028, and 0x2029. Not sure whether > it's supposed to be doing so or not though.
Oops, apparently those four are covered in the very next section (
https://tc39.github.io/ecma262/#sec-line-terminators
). So isStrWhiteSpace (whose name originates here:
https://tc39.github.io/ecma262/#prod-StrWhiteSpace
) includes line terminators and isWhiteSpace does not. I guess we still need two functions, but we can at least have one depend on the other.
Ross Kirsling
Comment 2
2018-11-08 17:13:39 PST
Created
attachment 354294
[details]
Patch
Ross Kirsling
Comment 3
2018-11-08 17:16:11 PST
(In reply to Ross Kirsling from
comment #2
)
> Created
attachment 354294
[details]
> Patch
I thought about making isStrWhiteSpace a static Lexer method, but since the spec uses it exclusively for numeric parsing, it's probably best left where it is.
Saam Barati
Comment 4
2018-11-08 17:17:36 PST
Comment on
attachment 354294
[details]
Patch nice. r=me
Ross Kirsling
Comment 5
2018-11-08 20:16:37 PST
Created
attachment 354307
[details]
Patch for landing
WebKit Commit Bot
Comment 6
2018-11-08 21:30:56 PST
Comment on
attachment 354307
[details]
Patch for landing Clearing flags on attachment: 354307 Committed
r238016
: <
https://trac.webkit.org/changeset/238016
>
WebKit Commit Bot
Comment 7
2018-11-08 21:30:57 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 8
2018-11-08 21:31:28 PST
<
rdar://problem/45934608
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug