diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-07-19 18:50:00 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-07-19 18:50:00 -0700 |
commit | ba6b57fda2fb243abfd20db0fac238a1d22a009d (patch) | |
tree | 98ddfdcb998ab1b9aee8446d6520a05ee394392f /tools/js-optimizer.js | |
parent | a7b87c478b5b41c95697dfbb2745be74d80e909c (diff) |
attempt a final outline from the start after any outlining, not just a recursive one
Diffstat (limited to 'tools/js-optimizer.js')
-rw-r--r-- | tools/js-optimizer.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/js-optimizer.js b/tools/js-optimizer.js index d611f8fd..022d7891 100644 --- a/tools/js-optimizer.js +++ b/tools/js-optimizer.js @@ -3315,7 +3315,7 @@ function outline(ast) { while (1) { i--; if (i < minIndex) { - // we might be done. but, if we have just recursively outlined, do a further attempt from the beginning. + // we might be done. but, if we have just outlined, do a further attempt from the beginning. // we compare total code size (current remaining size and outlined size) versus the original size, and do not restart if // we are adding too much overhead. var currSize = measureSize(stats); @@ -3373,6 +3373,8 @@ function outline(ast) { ret.push.apply(ret, doOutline(func, asmData, stats, i, end)); // outline [i, .. ,end] inclusive sizeSeen = 0; end = i-1; + canRestart = true; + continue; } } level--; |