WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 194466
[JSC] String.fromCharCode's slow path always generates 16bit string
https://bugs.webkit.org/show_bug.cgi?id=194466
Summary
[JSC] String.fromCharCode's slow path always generates 16bit string
Yusuke Suzuki
Reported
2019-02-08 18:24:11 PST
[JSC] String.fromCharCode's slow path always generates 16bit string
Attachments
Patch
(4.92 KB, patch)
2019-02-08 18:33 PST
,
Yusuke Suzuki
keith_miller
: review+
ews-watchlist
: commit-queue-
Details
Formatted Diff
Diff
Archive of layout-test-results from ews121 for ios-simulator-wk2
(9.62 MB, application/zip)
2019-02-08 20:31 PST
,
EWS Watchlist
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Yusuke Suzuki
Comment 1
2019-02-08 18:33:06 PST
Created
attachment 361577
[details]
Patch
Keith Miller
Comment 2
2019-02-08 18:58:32 PST
Comment on
attachment 361577
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=361577&action=review
r=me with small fix.
> Source/JavaScriptCore/ChangeLog:10 > + and even worse, taints ropes 16bit if 16bit string is included in the given rope. We find that acorn-wtb
Typo: We find => We found. Or if you want to take more credit: I found.
> Source/JavaScriptCore/ChangeLog:12 > + 16bit string. However, only few strings are actually 16bit strings. This patch attempts to make 8bit string
Typo: only few => only a few
> Source/JavaScriptCore/runtime/StringConstructor.cpp:91 > + if (UNLIKELY(character & 0xFF00)) {
Can we use or create a named WTF function for this?
Yusuke Suzuki
Comment 3
2019-02-08 19:26:49 PST
Comment on
attachment 361577
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=361577&action=review
>> Source/JavaScriptCore/runtime/StringConstructor.cpp:91 >> + if (UNLIKELY(character & 0xFF00)) { > > Can we use or create a named WTF function for this?
Yeah, I added `is8BitCharacter(ch)`, since ASCIICType::isASCII(ch) is different from this definition. (It does not allow the upper most bit is set, since it is precisely out of ASCII range).
Yusuke Suzuki
Comment 4
2019-02-08 20:13:21 PST
Comment on
attachment 361577
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=361577&action=review
>> Source/JavaScriptCore/ChangeLog:10 >> + and even worse, taints ropes 16bit if 16bit string is included in the given rope. We find that acorn-wtb > > Typo: We find => We found. Or if you want to take more credit: I found.
Fixed.
>> Source/JavaScriptCore/ChangeLog:12 >> + 16bit string. However, only few strings are actually 16bit strings. This patch attempts to make 8bit string > > Typo: only few => only a few
Fixed.
Keith Miller
Comment 5
2019-02-08 20:15:05 PST
(In reply to Yusuke Suzuki from
comment #3
)
> Comment on
attachment 361577
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=361577&action=review
> > >> Source/JavaScriptCore/runtime/StringConstructor.cpp:91 > >> + if (UNLIKELY(character & 0xFF00)) { > > > > Can we use or create a named WTF function for this? > > Yeah, I added `is8BitCharacter(ch)`, since ASCIICType::isASCII(ch) is > different from this definition. (It does not allow the upper most bit is > set, since it is precisely out of ASCII range).
I think we should actually call it isLatin1. IIUC, that's the most precise term.
EWS Watchlist
Comment 6
2019-02-08 20:31:58 PST
Comment on
attachment 361577
[details]
Patch
Attachment 361577
[details]
did not pass ios-sim-ews (ios-simulator-wk2): Output:
https://webkit-queues.webkit.org/results/11087027
New failing tests: imported/w3c/web-platform-tests/webrtc/simplecall.https.html
EWS Watchlist
Comment 7
2019-02-08 20:31:59 PST
Created
attachment 361591
[details]
Archive of layout-test-results from ews121 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews121 Port: ios-simulator-wk2 Platform: Mac OS X 10.13.6
Yusuke Suzuki
Comment 8
2019-02-08 20:40:28 PST
Committed
r241233
: <
https://trac.webkit.org/changeset/241233
>
Radar WebKit Bug Importer
Comment 9
2019-02-08 20:41:30 PST
<
rdar://problem/47938406
>
Darin Adler
Comment 10
2019-02-09 11:37:50 PST
(In reply to Keith Miller from
comment #5
)
> I think we should actually call it isLatin1. IIUC, that's the most precise > term.
There are isLatin1 functions in Lexer.cpp already. This patch adds a new one. Could we consolidate?
Yusuke Suzuki
Comment 11
2019-02-09 14:42:39 PST
(In reply to Darin Adler from
comment #10
)
> (In reply to Keith Miller from
comment #5
) > > I think we should actually call it isLatin1. IIUC, that's the most precise > > term. > > There are isLatin1 functions in Lexer.cpp already. This patch adds a new > one. Could we consolidate?
Oh, nice! I'll land it in a follow-up patch.
Yusuke Suzuki
Comment 12
2019-02-09 15:16:08 PST
Committed
r241246
: <
https://trac.webkit.org/changeset/241246
>
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