WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
156896
[JSC] Optimize number parsing and string parsing in LiteralParser
https://bugs.webkit.org/show_bug.cgi?id=156896
Summary
[JSC] Optimize number parsing and string parsing in LiteralParser
Yusuke Suzuki
Reported
2016-04-22 01:02:36 PDT
[JSC] Optimize number parsing and string parsing in LiteralParser
Attachments
Patch
(6.31 KB, patch)
2016-04-22 01:14 PDT
,
Yusuke Suzuki
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews102 for mac-yosemite
(929.75 KB, application/zip)
2016-04-22 01:38 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews106 for mac-yosemite-wk2
(1.16 MB, application/zip)
2016-04-22 01:44 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews116 for mac-yosemite
(946.24 KB, application/zip)
2016-04-22 02:02 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews122 for ios-simulator-wk2
(599.09 KB, application/zip)
2016-04-22 02:19 PDT
,
Build Bot
no flags
Details
Patch
(6.48 KB, patch)
2016-04-22 04:54 PDT
,
Yusuke Suzuki
mark.lam
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Yusuke Suzuki
Comment 1
2016-04-22 01:14:11 PDT
Created
attachment 277021
[details]
Patch
Yusuke Suzuki
Comment 2
2016-04-22 01:16:20 PDT
Performance measurement is included in the ChangeLog.
Build Bot
Comment 3
2016-04-22 01:38:40 PDT
Comment on
attachment 277021
[details]
Patch
Attachment 277021
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.webkit.org/results/1200807
New failing tests: js/regress/JSONP-negative-0.html
Build Bot
Comment 4
2016-04-22 01:38:44 PDT
Created
attachment 277023
[details]
Archive of layout-test-results from ews102 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews102 Port: mac-yosemite Platform: Mac OS X 10.10.5
Build Bot
Comment 5
2016-04-22 01:44:54 PDT
Comment on
attachment 277021
[details]
Patch
Attachment 277021
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.webkit.org/results/1200815
New failing tests: js/regress/JSONP-negative-0.html
Build Bot
Comment 6
2016-04-22 01:44:58 PDT
Created
attachment 277024
[details]
Archive of layout-test-results from ews106 for mac-yosemite-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews106 Port: mac-yosemite-wk2 Platform: Mac OS X 10.10.5
Build Bot
Comment 7
2016-04-22 02:02:05 PDT
Comment on
attachment 277021
[details]
Patch
Attachment 277021
[details]
did not pass mac-debug-ews (mac): Output:
http://webkit-queues.webkit.org/results/1200837
New failing tests: js/regress/JSONP-negative-0.html
Build Bot
Comment 8
2016-04-22 02:02:09 PDT
Created
attachment 277025
[details]
Archive of layout-test-results from ews116 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews116 Port: mac-yosemite Platform: Mac OS X 10.10.5
Build Bot
Comment 9
2016-04-22 02:19:31 PDT
Comment on
attachment 277021
[details]
Patch
Attachment 277021
[details]
did not pass ios-sim-ews (ios-simulator-wk2): Output:
http://webkit-queues.webkit.org/results/1200895
New failing tests: js/regress/JSONP-negative-0.html
Build Bot
Comment 10
2016-04-22 02:19:34 PDT
Created
attachment 277027
[details]
Archive of layout-test-results from ews122 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews122 Port: ios-simulator-wk2 Platform: Mac OS X 10.11.4
Yusuke Suzuki
Comment 11
2016-04-22 04:54:51 PDT
Created
attachment 277044
[details]
Patch
Mark Lam
Comment 12
2016-04-22 09:45:14 PDT
Comment on
attachment 277044
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=277044&action=review
r=me
> Source/JavaScriptCore/runtime/LiteralParser.cpp:531 > } else if (m_ptr < m_end && (*m_ptr != 'e' && *m_ptr != 'E') && (m_ptr - token.start) < 10) { > - double result = 0; > + int32_t result = 0; > token.type = TokNumber; > token.end = m_ptr; > const CharType* digit = token.start; > - int negative = 1; > + bool negative = false; > if (*digit == '-') { > - negative = -1; > + negative = true; > digit++; > } > > while (digit < m_ptr) > result = result * 10 + (*digit++) - '0';
The correctness of this implementations relies on us never changing the max chars parsed to another value from 10. Is there a way we can assert this in case someone makes the mistake of changing it in the future?
Yusuke Suzuki
Comment 13
2016-04-22 17:45:13 PDT
Committed
r199941
: <
http://trac.webkit.org/changeset/199941
>
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