RESOLVED FIXED 144317
DFG+FTL should generate efficient code for branching on a string's boolean value.
https://bugs.webkit.org/show_bug.cgi?id=144317
Summary DFG+FTL should generate efficient code for branching on a string's boolean va...
Andreas Kling
Reported 2015-04-28 00:09:36 PDT
We shouldn't drop out to operationConvertJSValueToBoolean if we know the value to be a string.
Attachments
Proposed patch (6.65 KB, patch)
2015-04-28 00:17 PDT, Andreas Kling
fpizlo: review+
Andreas Kling
Comment 1 2015-04-28 00:17:41 PDT
Created attachment 251830 [details] Proposed patch All right, let's see if I got this right.
Geoffrey Garen
Comment 2 2015-04-28 11:01:10 PDT
Comment on attachment 251830 [details] Proposed patch r=me Can has FTL?
Filip Pizlo
Comment 3 2015-04-28 11:02:56 PDT
Comment on attachment 251830 [details] Proposed patch This needs to have the FTL implementation as well. Otherwise you're actually reducing FTL coverage with this patch. So, please implement both DFG and FTL functionality in the same patch.
Andreas Kling
Comment 4 2015-04-28 11:14:29 PDT
(In reply to comment #3) > Comment on attachment 251830 [details] > Proposed patch > > This needs to have the FTL implementation as well. Otherwise you're > actually reducing FTL coverage with this patch. > > So, please implement both DFG and FTL functionality in the same patch. FTL already uses boolify() to implement compileBranch(). boolify() knows how to handle StringUse and generates nice code for it. Doesn't this mean that the FTL support is already in-place?
Filip Pizlo
Comment 5 2015-04-28 11:15:31 PDT
(In reply to comment #4) > (In reply to comment #3) > > Comment on attachment 251830 [details] > > Proposed patch > > > > This needs to have the FTL implementation as well. Otherwise you're > > actually reducing FTL coverage with this patch. > > > > So, please implement both DFG and FTL functionality in the same patch. > > FTL already uses boolify() to implement compileBranch(). boolify() knows how > to handle StringUse and generates nice code for it. Doesn't this mean that > the FTL support is already in-place? Oh! That's true.
Filip Pizlo
Comment 6 2015-04-28 11:16:13 PDT
Comment on attachment 251830 [details] Proposed patch View in context: https://bugs.webkit.org/attachment.cgi?id=251830&action=review > LayoutTests/ChangeLog:3 > + DFG should generate efficient code for branching on a string's boolean value. Please make sure you note that this is about both DFG and FTL. Either change the bug title, or put some blurb in the changelog.
Andreas Kling
Comment 7 2015-04-28 11:55:28 PDT
Note You need to log in before you can comment on or make changes to this bug.