aboutsummaryrefslogtreecommitdiff
path: root/tools/test-js-optimizer.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-01-06 13:19:48 -0800
committerAlon Zakai <alonzakai@gmail.com>2012-01-06 13:19:48 -0800
commit36d076140f80d9ba8e3010955fb2144a8c619663 (patch)
tree3de9064c5cf7fd3570f9bfe9ceccf29dcc8c9532 /tools/test-js-optimizer.js
parentb97c0cc2585a6617b8f170c2d8583e4c69f3f50d (diff)
also hoist loops in inner functions
Diffstat (limited to 'tools/test-js-optimizer.js')
-rw-r--r--tools/test-js-optimizer.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/test-js-optimizer.js b/tools/test-js-optimizer.js
index 155aa647..f9c499f4 100644
--- a/tools/test-js-optimizer.js
+++ b/tools/test-js-optimizer.js
@@ -217,6 +217,16 @@ function hoisting() {
}
} while (0);
}
+function innerShouldAlsoBeHoisted() {
+ function hoisting() {
+ if ($i < $N) {
+ __label__ = 2;
+ }
+ if (__label__ == 2) {
+ callOther();
+ }
+ }
+}
var FS = {
absolutePath: function(relative, base) { // Don't touch this!
if (typeof relative !== 'string') return null;