WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
168627
Intrinsicify parseInt
https://bugs.webkit.org/show_bug.cgi?id=168627
Summary
Intrinsicify parseInt
Saam Barati
Reported
2017-02-20 18:44:22 PST
...
Attachments
WIP
(260.00 KB, patch)
2017-02-21 11:20 PST
,
Saam Barati
no flags
Details
Formatted Diff
Diff
WIP
(38.62 KB, patch)
2017-02-23 13:01 PST
,
Saam Barati
buildbot
: commit-queue-
Details
Formatted Diff
Diff
Archive of layout-test-results from ews117 for mac-elcapitan
(1.95 MB, application/zip)
2017-02-23 14:34 PST
,
Build Bot
no flags
Details
patch
(47.80 KB, patch)
2017-02-23 15:55 PST
,
Saam Barati
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Saam Barati
Comment 1
2017-02-20 20:13:28 PST
box2D calls parseInt quite often with a single integer argument. We should be good at emitting good code here. We could also be good about removing various type checks for strings, and determining if the radix is a constant. Implementing a dumbed down parseInt Intrinsic is a 5-6% progression on box2d.
Saam Barati
Comment 2
2017-02-21 11:20:59 PST
Created
attachment 302289
[details]
WIP Note: the patch currently has some register allocation bits in it from a different bug I'm working on.
Saam Barati
Comment 3
2017-02-23 13:01:55 PST
Created
attachment 302565
[details]
WIP Might be the patch. Still need to write tests and a changelog.
WebKit Commit Bot
Comment 4
2017-02-23 13:03:07 PST
Attachment 302565
[details]
did not pass style-queue: ERROR: Source/JavaScriptCore/runtime/ParseInt.h:161: Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5] ERROR: Source/JavaScriptCore/runtime/ParseInt.h:164: Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5] ERROR: Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:2942: Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5] ERROR: Source/JavaScriptCore/dfg/DFGConstantFoldingPhase.cpp:619: Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5] Total errors found: 4 in 25 files If any of these errors are false positives, please file a bug against check-webkit-style.
Build Bot
Comment 5
2017-02-23 14:34:46 PST
Comment on
attachment 302565
[details]
WIP
Attachment 302565
[details]
did not pass mac-debug-ews (mac): Output:
http://webkit-queues.webkit.org/results/3181060
New failing tests: media/modern-media-controls/volume-down-support/volume-down-support.html
Build Bot
Comment 6
2017-02-23 14:34:49 PST
Created
attachment 302579
[details]
Archive of layout-test-results from ews117 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews117 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Saam Barati
Comment 7
2017-02-23 15:55:39 PST
Created
attachment 302598
[details]
patch
WebKit Commit Bot
Comment 8
2017-02-23 15:58:15 PST
Attachment 302598
[details]
did not pass style-queue: ERROR: Source/JavaScriptCore/runtime/ParseInt.h:161: Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5] ERROR: Source/JavaScriptCore/runtime/ParseInt.h:164: Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5] ERROR: Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:2941: Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5] ERROR: Source/JavaScriptCore/dfg/DFGConstantFoldingPhase.cpp:619: Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5] Total errors found: 4 in 29 files If any of these errors are false positives, please file a bug against check-webkit-style.
WebKit Commit Bot
Comment 9
2017-02-23 20:09:19 PST
Comment on
attachment 302598
[details]
patch Clearing flags on attachment: 302598 Committed
r212939
: <
http://trac.webkit.org/changeset/212939
>
WebKit Commit Bot
Comment 10
2017-02-23 20:09:23 PST
All reviewed patches have been landed. Closing bug.
Darin Adler
Comment 11
2017-02-23 20:55:53 PST
Comment on
attachment 302598
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=302598&action=review
> Source/JavaScriptCore/dfg/DFGOperations.cpp:895 > + // This version is as if radix was undefined. Hence, undefined.toNumber() === 0. > + return parseIntResult(parseInt(viewWithString.view, radix));
The comment here seems wrong.
Saam Barati
Comment 12
2017-02-23 21:15:03 PST
Comment on
attachment 302598
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=302598&action=review
>> Source/JavaScriptCore/dfg/DFGOperations.cpp:895 >> + return parseIntResult(parseInt(viewWithString.view, radix)); > > The comment here seems wrong.
Oops. Thanks for pointing this out. (I actually spotted this locally after I uploaded the patch but forgot to upload a new patch before landing. Will fix when I'm back in front of my computer.)
Saam Barati
Comment 13
2017-02-24 11:38:48 PST
Removed comment in:
https://trac.webkit.org/changeset/212962
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