Doing A + B where A and B are string types will currently always allocate a new StringImpl C with length A.length+B.length, and then blit the contents of A and B into C.
We should have a fast path for A + B where A.length == 0 || B.length == 0.
Created attachment 262899 [details]
Comment on attachment 262899 [details]
Clearing flags on attachment: 262899
Committed r190882: <http://trac.webkit.org/changeset/190882>
All reviewed patches have been landed. Closing bug.
It looks like this patch is breaking the jsc command line REPL. If you try:
>>> foo = 1
Exception: ReferenceError: Can't find variable: f
(In reply to comment #4)
> It looks like this patch is breaking the jsc command line REPL. If you try:
> >>> foo = 1
> Exception: ReferenceError: Can't find variable: f
Oh dang! I see what the bug is: StringTypeAdapter<const UChar*>::toString() always uses length=1 instead of the provided character count.
Crazy that no test caught this. Will fix shortly.