[JSC] Optimize number parsing and string parsing in LiteralParser
Created attachment 277021 [details] Patch
Performance measurement is included in the ChangeLog.
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
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
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
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
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
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
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
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
Created attachment 277044 [details] Patch
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?
Committed r199941: <http://trac.webkit.org/changeset/199941>