aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtests/runner.py2
-rw-r--r--tools/js-optimizer.js2
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/runner.py b/tests/runner.py
index 04e15d7f..b81ddc61 100755
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -11249,7 +11249,7 @@ f.close()
open(path_from_root('tests', 'zlib', 'ref.txt'), 'r').read(),
{
100: (190, 250),
- 250: (300, 330),
+ 250: (200, 330),
500: (250, 310),
1000: (230, 300),
2000: (380, 450),
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--;