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] Patch
Comment on attachment 262899 [details] Patch 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: DYLD_FRAMEWORK_PATH=Safari-Gala-Production-SafariTen-190882-76008.app/Contents/Frameworks ./Safari-Gala-Production-SafariTen-190882-76008.app/Contents/Resources/jsc >>> 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: > > DYLD_FRAMEWORK_PATH=Safari-Gala-Production-SafariTen-190882-76008.app/ > Contents/Frameworks > ./Safari-Gala-Production-SafariTen-190882-76008.app/Contents/Resources/jsc > >>> 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.