RESOLVED FIXED 112599
DFG should inline binary string concatenations (i.e. ValueAdd with string children)
https://bugs.webkit.org/show_bug.cgi?id=112599
Summary DFG should inline binary string concatenations (i.e. ValueAdd with string chi...
Filip Pizlo
Reported 2013-03-18 11:21:05 PDT
And it should do so even if the children are StringObjects, or possibly StringObjects. This should also lay the groundwork for making this fast: "foo" + x where x is an int.
Attachments
the patch (16.51 KB, patch)
2013-03-18 11:24 PDT, Filip Pizlo
oliver: review+
webkit-ews: commit-queue-
Filip Pizlo
Comment 1 2013-03-18 11:24:16 PDT
Created attachment 193612 [details] the patch
Early Warning System Bot
Comment 2 2013-03-18 11:36:25 PDT
Early Warning System Bot
Comment 3 2013-03-18 11:42:49 PDT
Oliver Hunt
Comment 4 2013-03-18 12:54:49 PDT
Comment on attachment 193612 [details] the patch r=me. I've found myself pondering making us plant calls to the valueOf functions in the DFG, that way the function calls are cacheable and we could add intrinsics for the more common implementations, and custom calls would "just work" That said i'm not sure how much of a win that would be for concat, etc now that the common case of String objects is handled. But I do recall toString being sufficiently common on generic objects to be something we might consider investigating in future. Other than that, make the qt bots non-red (!PLATFORM(QT) ?) and r=me
EFL EWS Bot
Comment 5 2013-03-18 13:28:04 PDT
Build Bot
Comment 6 2013-03-18 14:12:13 PDT
Filip Pizlo
Comment 7 2013-03-18 17:46:35 PDT
(In reply to comment #4) > (From update of attachment 193612 [details]) > r=me. > > I've found myself pondering making us plant calls to the valueOf functions in the DFG, that way the function calls are cacheable and we could add intrinsics for the more common implementations, and custom calls would "just work" Can't do that. Because you have to do the weirdo thing where you either look up valueOf, or toString if the former finds nothing. And then convert the result to a string. Or not a string. And then either do a numeric addition or a string concatenation. So, I mean, you could plant all of that. But you'll be planting a national forest. > > That said i'm not sure how much of a win that would be for concat, etc now that the common case of String objects is handled. But I do recall toString being sufficiently common on generic objects to be something we might consider investigating in future. > > Other than that, make the qt bots non-red (!PLATFORM(QT) ?) and r=me
Filip Pizlo
Comment 8 2013-03-18 17:47:30 PDT
Landed with 32-bit fixes in http://trac.webkit.org/changeset/146164
Csaba Osztrogonác
Comment 9 2013-03-19 10:05:27 PDT
(In reply to comment #8) > Landed with 32-bit fixes in http://trac.webkit.org/changeset/146164 It made all inspector tests timeout on ARM traditional platform: https://bugs.webkit.org/show_bug.cgi?id=112697
Note You need to log in before you can comment on or make changes to this bug.