Bug 1041586 - Prevent jit compilation for one expression-autopsy test. r=jandem
authorTom Schuster <evilpies@gmail.com>
Wed, 20 Apr 2016 11:06:09 +0200
changeset 331882 f569192eb5e826c0bcc4787bf941df459bb484d7
parent 331881 219bb598b6ad3e3a5f0246f79ba2a2153e3f1bfb
child 331883 21fbd1600568cde426d38a5768e2eb0cc925e06f
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjandem
bugs1041586
milestone48.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1041586 - Prevent jit compilation for one expression-autopsy test. r=jandem
js/src/jit-test/tests/basic/expression-autopsy.js
--- a/js/src/jit-test/tests/basic/expression-autopsy.js
+++ b/js/src/jit-test/tests/basic/expression-autopsy.js
@@ -37,34 +37,21 @@ function check(expr, expected=expr) {
             Function("with (Object) { " + statement + " }"),
             // Closure
             Function("o", "undef", "function myfunc() { return o + undef; }\n" + statement),
             // Let definitions in a block
             Function("{ let o, undef;\n" + statement + "}"),
             // Let in a switch
             Function("var x = 4; switch (x) { case 4: let o, undef;" + statement + "\ncase 6: break;}"),
             // Try-catch blocks
-            Function("o", "undef", "try { let q = 4; try { let p = 4; } catch (e) {} } catch (e) {} { let o, undef; " + statement + " }")
+            Function("o", "undef", "try { let q = 4; try { let p = 4; } catch (e) {} } catch (e) {} { let o, undef; " + statement + " }"),
+            // Let in for-in (uses with to prevent jit compilation: bug 942804, bug 831120 and bug 1041586)
+            Function("with ({}) {} var undef, o; for (let z in [1, 2]) { " + statement + " }"),
         ];
 
-        try {
-            // Let in for-in
-            check_one(expected,
-                      Function("var undef, o; for (let z in [1, 2]) { " + statement + " }"),
-                      err);
-        } catch (ex) {
-            // Bug 831120.  See bug 942804 comment 5.
-            if (expected == 'undef' && err == ' is undefined')
-                check_one(expected + end,
-                          Function("var undef, o; for (let z in [1, 2]) { " + statement + " }"),
-                          err);
-            else
-                throw ex;
-        }
-
         for (var f of cases) {
             check_one(expected, f, err);
         }
     }
 }
 
 check("undef");
 check("o.b");