Chromium Code Reviews
DescriptionRemove trivial dead stores during dead code elimination
Occasionally this optimizes a StringBuffer into a local string variable. If we had targeted inlining to inline more methods on StringBuffer we would see more examples.
padRight: function(source, $length) {
var result, str, t1;
result = new P.StringBuffer("");
str = typeof source === "string" ? source : H.S(source);
result._contents = str;
for (t1 = str; t1.length < $length;) {
t1 += " ";
result._contents = t1;
}
return t1.charCodeAt(0) == 0 ? t1 : t1;
},
-->
padRight: function(source, $length) {
var str, t1;
str = typeof source === "string" ? source : H.S(source);
for (t1 = str; t1.length < $length;)
t1 += " ";
return t1.charCodeAt(0) == 0 ? t1 : t1;
},
R=floitsch@google.com
Committed: https://code.google.com/p/dart/source/detail?r=42302
Patch Set 1 : #
Total comments: 4
Patch Set 2 : #Messages
Total messages: 8 (3 generated)
|