aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-08-06 15:25:10 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-08-06 15:29:48 -0700
commitc7df5bdeb790ec42bbd6632db5f878d65414e1fd (patch)
tree7b26dfeaa26fd4a5768e2f5754a4cee2afb51714 /tools
parent7d0af54c914da5a86446a44d8341fe1b83111094 (diff)
allow outlining of single statements
Diffstat (limited to 'tools')
-rw-r--r--tools/js-optimizer.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/js-optimizer.js b/tools/js-optimizer.js
index b948dc96..c2786acc 100644
--- a/tools/js-optimizer.js
+++ b/tools/js-optimizer.js
@@ -3520,7 +3520,7 @@ function outline(ast) {
// If this is big enough to outline, but not too big (if very close to the size of the full function,
// outlining is pointless; remove stats from the end to try to achieve the good case), then outline.
// Also, try to reduce the size if it is much larger than the hoped-for size
- while ((sizeSeen > maxSize || sizeSeen > 2*sizeToOutline) && end > i+1 && stats[end][0] !== 'begin-outline-call' && stats[end][0] !== 'end-outline-call') {
+ while ((sizeSeen > maxSize || sizeSeen > 2*sizeToOutline) && end > i && stats[end][0] !== 'begin-outline-call' && stats[end][0] !== 'end-outline-call') {
sizeSeen -= measureSize(stats[end]);
if (sizeSeen >= sizeToOutline) {
end--;