Bug 183590 - [DFG][FTL] Make ArraySlice(0) code tight
Summary: [DFG][FTL] Make ArraySlice(0) code tight
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yusuke Suzuki
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-03-12 23:24 PDT by Yusuke Suzuki
Modified: 2018-03-20 00:13 PDT (History)
6 users (show)

See Also:


Attachments
Patch (3.01 KB, patch)
2018-03-12 23:33 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (15.14 KB, patch)
2018-03-13 03:47 PDT, Yusuke Suzuki
saam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yusuke Suzuki 2018-03-12 23:24:47 PDT
[DFG][FTL] Make ArraySlice(0) code tight
Comment 1 Yusuke Suzuki 2018-03-12 23:33:19 PDT
Created attachment 335683 [details]
Patch
Comment 2 EWS Watchlist 2018-03-12 23:35:32 PDT
Attachment 335683 [details] did not pass style-queue:


ERROR: Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp:7632:  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: 1 in 3 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Yusuke Suzuki 2018-03-13 03:47:08 PDT
Created attachment 335688 [details]
Patch
Comment 4 EWS Watchlist 2018-03-13 03:49:45 PDT
Attachment 335688 [details] did not pass style-queue:


ERROR: Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp:7624:  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/DFGSpeculativeJIT.cpp:7635:  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/DFGSpeculativeJIT.cpp:7689:  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: 3 in 9 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Saam Barati 2018-03-19 22:37:23 PDT
Comment on attachment 335688 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=335688&action=review

> Source/JavaScriptCore/dfg/DFGFixupPhase.cpp:1079
> +                fixEdge<Int32Use>(m_graph.varArgChild(node, 1));

Don’t you want to do this if count >= 2?

> Source/JavaScriptCore/dfg/DFGFixupPhase.cpp:1080
> +                if (node->numChildren() == 4)

Ignore above comment (bugzilla on my phone is not allowing me to delete the above comment). I misread the code.
Comment 6 Yusuke Suzuki 2018-03-20 00:12:10 PDT
Comment on attachment 335688 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=335688&action=review

>> Source/JavaScriptCore/dfg/DFGFixupPhase.cpp:1080
>> +                if (node->numChildren() == 4)
> 
> Ignore above comment (bugzilla on my phone is not allowing me to delete the above comment). I misread the code.

OK, thanks!
Comment 7 Yusuke Suzuki 2018-03-20 00:13:01 PDT
Committed r229742: <https://trac.webkit.org/changeset/229742>
Comment 8 Radar WebKit Bug Importer 2018-03-20 00:13:16 PDT
<rdar://problem/38653765>