Bug 1496297 - Use |jit-test| skip-if as appropriate in jit-test/tests/ion/ (r=jorendorff)
authorEric Faust <efausbmo@gmail.com>
Tue, 09 Oct 2018 15:41:50 -0700
changeset 498830 b97fa179df851228f5093a54dec49fcdcb5d0584
parent 498829 fdf9b230e27056c4a605c716fecda2b323b9837b
child 498831 1b29d20f030915e9ded7070e0d7e966f2266bfef
push id1864
push userffxbld-merge
push dateMon, 03 Dec 2018 15:51:40 +0000
treeherdermozilla-release@f040763d99ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjorendorff
bugs1496297
milestone64.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 1496297 - Use |jit-test| skip-if as appropriate in jit-test/tests/ion/ (r=jorendorff)
js/src/jit-test/tests/ion/array-push-multiple-frozen.js
js/src/jit-test/tests/ion/array-push-multiple-with-funapply.js
js/src/jit-test/tests/ion/array-push-multiple.js
js/src/jit-test/tests/ion/bug1006899.js
js/src/jit-test/tests/ion/bug1207413.js
js/src/jit-test/tests/ion/bug1216157.js
js/src/jit-test/tests/ion/bug1233331.js
js/src/jit-test/tests/ion/bug1240521.js
js/src/jit-test/tests/ion/bug1264948.js
js/src/jit-test/tests/ion/bug1269756.js
js/src/jit-test/tests/ion/bug1282944.js
js/src/jit-test/tests/ion/bug1284491.js
js/src/jit-test/tests/ion/bug1348777.js
js/src/jit-test/tests/ion/bug1394505.js
js/src/jit-test/tests/ion/bug1492574.js
js/src/jit-test/tests/ion/bug980860.js
js/src/jit-test/tests/ion/inlining/TypedObject-ObjectIsTypeDescr-multi.js
js/src/jit-test/tests/ion/inlining/TypedObject-ObjectIsTypeDescr-unknown.js
js/src/jit-test/tests/ion/inlining/TypedObject-ObjectIsTypeDescr-wrong-multi.js
js/src/jit-test/tests/ion/inlining/TypedObject-ObjectIsTypeDescr-wrong.js
js/src/jit-test/tests/ion/inlining/TypedObject-ObjectIsTypeDescr.js
js/src/jit-test/tests/ion/inlining/TypedObject-ObjectIsTypedObject-multi.js
js/src/jit-test/tests/ion/inlining/TypedObject-ObjectIsTypedObject-unknown.js
js/src/jit-test/tests/ion/inlining/TypedObject-ObjectIsTypedObject.js
js/src/jit-test/tests/ion/inlining/TypedObject-TypeDescrIsSimpleType.js
js/src/jit-test/tests/ion/scalar-replacement-bug1138693.js
js/src/jit-test/tests/ion/scalar-replacement-oom.js
--- a/js/src/jit-test/tests/ion/array-push-multiple-frozen.js
+++ b/js/src/jit-test/tests/ion/array-push-multiple-frozen.js
@@ -1,9 +1,9 @@
-// |jit-test| --no-threads
+// |jit-test| --no-threads; skip-if: !('oomAtAllocation' in this)
 
 // This test case check's Ion ability to recover from an allocation failure in
 // the inlining of Array.prototype.push, when given multiple arguments. Note,
 // that the following are not equivalent in case of failures:
 //
 //   arr = [];
 //   arr.push(1,2,3); // OOM ---> arr == []
 //
@@ -15,18 +15,16 @@
 function canIoncompile() {
   while (true) {
     var i = inIon();
     if (i)
       return i;
   }
 }
 
-if (!("oomAtAllocation" in this))
-  quit();
 if (canIoncompile() != true)
   quit();
 if ("gczeal" in this)
   gczeal(0);
 
 function pushLimits(limit, offset, arr, freeze) {
   arr = arr || [];
   arr.push(0,1,2,3,4,5,6,7,8,9);
--- a/js/src/jit-test/tests/ion/array-push-multiple-with-funapply.js
+++ b/js/src/jit-test/tests/ion/array-push-multiple-with-funapply.js
@@ -1,9 +1,9 @@
-// |jit-test| --no-threads
+// |jit-test| --no-threads; skip-if: !('oomAtAllocation' in this)
 
 // This test case check's Ion ability to inline Array.prototype.push, when
 // fun.apply is used and inlined with the set of arguments of the current
 // function. Note, that the following are not equivalent in case of failures:
 //
 //   arr = [];
 //   arr.push(1,2,3); // OOM ---> arr == []
 //
@@ -15,18 +15,16 @@
 function canIoncompile() {
   while (true) {
     var i = inIon();
     if (i)
       return i;
   }
 }
 
-if (!("oomAtAllocation" in this))
-  quit();
 if (canIoncompile() != true)
   quit();
 if ("gczeal" in this)
   gczeal(0);
 
 function pushLimits(limit, offset) {
   function pusher() {
     Array.prototype.push.apply(arr, arguments)
--- a/js/src/jit-test/tests/ion/array-push-multiple.js
+++ b/js/src/jit-test/tests/ion/array-push-multiple.js
@@ -1,9 +1,9 @@
-// |jit-test| --no-threads
+// |jit-test| --no-threads; skip-if: !('oomAtAllocation' in this)
 
 // This test case check's Ion ability to recover from an allocation failure in
 // the inlining of Array.prototype.push, when given multiple arguments. Note,
 // that the following are not equivalent in case of failures:
 //
 //   arr = [];
 //   arr.push(1,2,3); // OOM ---> arr == []
 //
@@ -15,18 +15,16 @@
 function canIoncompile() {
   while (true) {
     var i = inIon();
     if (i)
       return i;
   }
 }
 
-if (!("oomAtAllocation" in this))
-  quit();
 if (canIoncompile() != true)
   quit();
 if ("gczeal" in this)
   gczeal(0);
 
 function pushLimits(limit, offset) {
   var arr = [0,1,2,3,4,5,6,7,8,9];
   arr.length = offset;
--- a/js/src/jit-test/tests/ion/bug1006899.js
+++ b/js/src/jit-test/tests/ion/bug1006899.js
@@ -1,10 +1,9 @@
-if (!this.hasOwnProperty("TypedObject"))
-  quit();
+// |jit-test| skip-if: !this.hasOwnProperty("TypedObject")
 
 this.__defineGetter__("x",
   function() {
     return this;
   }
 );
 function callback(obj) {}
 enableShellAllocationMetadataBuilder();
--- a/js/src/jit-test/tests/ion/bug1207413.js
+++ b/js/src/jit-test/tests/ion/bug1207413.js
@@ -1,10 +1,9 @@
-if (typeof oomAfterAllocations !== 'function')
-    quit();
+// |jit-test| skip-if: !('oomAfterAllocations' in this)
 
 function first(a) {
     return a[0];
 }
 
 try {
     first([function() {}]);
     first([function() {}]);
--- a/js/src/jit-test/tests/ion/bug1216157.js
+++ b/js/src/jit-test/tests/ion/bug1216157.js
@@ -1,10 +1,10 @@
-if (!('oomAfterAllocations' in this))
-    quit();
+// |jit-test| skip-if: !('oomAfterAllocations' in this)
+
 gcslice(0); // Start IGC, but don't mark anything.
 function f(str) {
     for (var i = 0; i < 10; i++) {
         arr = /foo(ba(r))?/.exec(str);
         var x = arr[oomAfterAllocations(100)] + " " + arr[1] + " " + 1899;
     }
 }
 try {
--- a/js/src/jit-test/tests/ion/bug1233331.js
+++ b/js/src/jit-test/tests/ion/bug1233331.js
@@ -1,10 +1,9 @@
-if (typeof oomTest !== 'function')
-    quit();
+// |jit-test| skip-if: !('oomTest' in this)
 
 x = 0;
 try {
     a;
     b;
 } catch (e) {}
 var g = newGlobal();
 oomTest(function() {
--- a/js/src/jit-test/tests/ion/bug1240521.js
+++ b/js/src/jit-test/tests/ion/bug1240521.js
@@ -1,12 +1,9 @@
-// |jit-test| allow-oom
-
-if (!('oomAfterAllocations' in this))
-    quit();
+// |jit-test| allow-oom; skip-if: !('oomAfterAllocations' in this)
 
 var egc = 138;
 function SwitchTest(value) {
     switch (value) {
         case 0:
             break
         case new Number:
             result = 8
--- a/js/src/jit-test/tests/ion/bug1264948.js
+++ b/js/src/jit-test/tests/ion/bug1264948.js
@@ -1,10 +1,9 @@
-if (!('oomTest' in this))
-    quit();
+// |jit-test| skip-if: !('oomTest' in this)
 
 loadFile(`
   T = TypedObject
   ObjectStruct = new T.StructType({f: T.Object})
   var o = new ObjectStruct
   function testGC(p) {
     for (; i < 5; i++)
         whatever.push;
--- a/js/src/jit-test/tests/ion/bug1269756.js
+++ b/js/src/jit-test/tests/ion/bug1269756.js
@@ -1,8 +1,7 @@
-if (!('oomTest' in this))
-    quit();
+// |jit-test| skip-if: !('oomTest' in this)
 
 oomTest(function() {
     m = parseModule(`while (x && NaN) prototype; let x`);
     m.declarationInstantiation();
     m.evaluation();
 })
--- a/js/src/jit-test/tests/ion/bug1282944.js
+++ b/js/src/jit-test/tests/ion/bug1282944.js
@@ -1,12 +1,9 @@
-// |jit-test| --ion-eager
-
-if (helperThreadCount() === 0)
-  quit(0);
+// |jit-test| --ion-eager; skip-if: helperThreadCount() === 0
 
 // (1) Poison an element in the ionLazyLinkList with a builder whose
 //     script is in a different compartment.
 evaluate('offThreadCompileScript("var x = -1"); runOffThreadScript()',
          { global: newGlobal() });
 
 // (2) Spam the ionLazyLinkList with pending builders until it pops off the one
 //     for the other compartment's script.
--- a/js/src/jit-test/tests/ion/bug1284491.js
+++ b/js/src/jit-test/tests/ion/bug1284491.js
@@ -1,10 +1,9 @@
-if (!('oomTest' in this))
-    quit();
+// |jit-test| skip-if: !('oomTest' in this)
 
 loadFile(`
   function SwitchTest(){
     switch(value) {
       case 0:break
       case isNaN: break
     }
   }
--- a/js/src/jit-test/tests/ion/bug1348777.js
+++ b/js/src/jit-test/tests/ion/bug1348777.js
@@ -1,11 +1,9 @@
-
-if (typeof TypedObject === 'undefined')
-    quit();
+// |jit-test| skip-if: !this.hasOwnProperty("TypedObject")
 
 var uint8 = TypedObject.uint8;
 function check(v) {
     return v.toSource();
 }
 function test() {
     var fake1 = {};
     var fake2 = [];
--- a/js/src/jit-test/tests/ion/bug1394505.js
+++ b/js/src/jit-test/tests/ion/bug1394505.js
@@ -1,12 +1,9 @@
-if (helperThreadCount() === 0)
-    quit();
-if (!('oomTest' in this))
-    quit();
+// |jit-test| skip-if: helperThreadCount() === 0 || !('oomTest' in this)
 
 for (let j = 0; j < 50; j++) {
     if (j === 1)
         oomTest(function() {});
     evalInWorker(`
         for (let i = 0; i < 30; i++)
             relazifyFunctions();
     `);
--- a/js/src/jit-test/tests/ion/bug1492574.js
+++ b/js/src/jit-test/tests/ion/bug1492574.js
@@ -1,11 +1,9 @@
-if (!('oomTest' in this)) {
-    quit();
-}
+// |jit-test| skip-if: !('oomTest' in this)
 
 function foo() {}
 function foooooooooooooooooooooooooooooooo() {}
 function fn(s) {
     var o = {a:1}
     eval(("f" + s) + "()");
     if (!('a' in o)) {
         print("unreachable");
--- a/js/src/jit-test/tests/ion/bug980860.js
+++ b/js/src/jit-test/tests/ion/bug980860.js
@@ -1,10 +1,9 @@
-if (typeof TypedObject === 'undefined')
-    quit();
+// |jit-test| skip-if: !this.hasOwnProperty("TypedObject")
 
 var StructType = TypedObject.StructType;
 var uint8 = TypedObject.uint8;
 
 function check(c) {
   assertEq(c.r, 129);
 }
 
--- a/js/src/jit-test/tests/ion/inlining/TypedObject-ObjectIsTypeDescr-multi.js
+++ b/js/src/jit-test/tests/ion/inlining/TypedObject-ObjectIsTypeDescr-multi.js
@@ -1,8 +1,10 @@
+// |jit-test| skip-if: !this.TypedObject
+
 /* -*- tab-width: 8; indent-tabs-mode: nil; js-indent-level: 2 -*-
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* Used to verify that the JIT resolves the ObjectIsTypeDescr tests
  * internal to Type.toSource().
  *
@@ -13,19 +15,16 @@
  * Load this into the js shell with IONFLAGS=logs, then exit and run
  * iongraph.  You're looking for a smallish function within the
  * "self-hosted" domain.  Look for a call to ObjectIsTypeDescr far
  * down in the graph for pass00, with a call to DescrToSource in a
  * subsequent block (all of this is at the mercy of the way the code
  * is currently written).
  */
 
-if (!this.TypedObject)
-  quit();
-
 var T = TypedObject;
 var ST1 = new T.StructType({x:T.int32});
 var ST2 = new T.StructType({x:T.float64});
 
 function check(v) {
     return v.toSource();
 }
 
--- a/js/src/jit-test/tests/ion/inlining/TypedObject-ObjectIsTypeDescr-unknown.js
+++ b/js/src/jit-test/tests/ion/inlining/TypedObject-ObjectIsTypeDescr-unknown.js
@@ -1,8 +1,10 @@
+// |jit-test| skip-if: !this.TypedObject
+
 /* -*- tab-width: 8; indent-tabs-mode: nil; js-indent-level: 2 -*-
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* Used to verify that the JIT resolves the ObjectIsTypeDescr tests
  * internal to Type.toSource().
  *
@@ -13,19 +15,16 @@
  * Load this into the js shell with IONFLAGS=logs, then exit and run
  * iongraph.  You're looking for a smallish function within the
  * "self-hosted" domain.  Look for a call to ObjectIsTypeDescr far
  * down in the graph for pass00, with a call to DescrToSource in a
  * subsequent block (all of this is at the mercy of the way the code
  * is currently written).
  */
 
-if (!this.TypedObject)
-  quit();
-
 var T = TypedObject;
 var ST = new T.StructType({x:T.int32});
 
 function check(v) {
     return v.toSource();
 }
 
 function test() {
--- a/js/src/jit-test/tests/ion/inlining/TypedObject-ObjectIsTypeDescr-wrong-multi.js
+++ b/js/src/jit-test/tests/ion/inlining/TypedObject-ObjectIsTypeDescr-wrong-multi.js
@@ -1,8 +1,10 @@
+// |jit-test| skip-if: !this.TypedObject
+
 /* -*- tab-width: 8; indent-tabs-mode: nil; js-indent-level: 2 -*-
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* Used to verify that the JIT resolves the ObjectIsTypeDescr tests
  * internal to Type.toSource().
  *
@@ -13,19 +15,16 @@
  * Load this into the js shell with IONFLAGS=logs, then exit and run
  * iongraph.  You're looking for a smallish function within the
  * "self-hosted" domain.  Look for a call to ObjectIsTypeDescr far
  * down in the graph for pass00, with a call to DescrToSource in a
  * subsequent block (all of this is at the mercy of the way the code
  * is currently written).
  */
 
-if (!this.TypedObject)
-  quit();
-
 var T = TypedObject;
 var ST = new T.StructType({x:T.int32});
 
 function check(v) {
     return v.toSource();
 }
 
 function test() {
--- a/js/src/jit-test/tests/ion/inlining/TypedObject-ObjectIsTypeDescr-wrong.js
+++ b/js/src/jit-test/tests/ion/inlining/TypedObject-ObjectIsTypeDescr-wrong.js
@@ -1,8 +1,10 @@
+// |jit-test| skip-if: !this.TypedObject
+
 /* -*- tab-width: 8; indent-tabs-mode: nil; js-indent-level: 2 -*-
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* Used to verify that the JIT resolves the ObjectIsTypeDescr tests
  * internal to Type.toSource().
  *
@@ -13,19 +15,16 @@
  * Load this into the js shell with IONFLAGS=logs, then exit and run
  * iongraph.  You're looking for a smallish function within the
  * "self-hosted" domain.  Look for a call to ObjectIsTypeDescr far
  * down in the graph for pass00, with a call to DescrToSource in a
  * subsequent block (all of this is at the mercy of the way the code
  * is currently written).
  */
 
-if (!this.TypedObject)
-  quit();
-
 var T = TypedObject;
 var ST = new T.StructType({x:T.int32});
 
 function check(v) {
     return v.toSource();
 }
 
 function test() {
--- a/js/src/jit-test/tests/ion/inlining/TypedObject-ObjectIsTypeDescr.js
+++ b/js/src/jit-test/tests/ion/inlining/TypedObject-ObjectIsTypeDescr.js
@@ -1,8 +1,10 @@
+// |jit-test| skip-if: !this.TypedObject
+
 /* -*- tab-width: 8; indent-tabs-mode: nil; js-indent-level: 2 -*-
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* Used to verify that the JIT resolves the ObjectIsTypeDescr tests
  * internal to Type.toSource().
  *
@@ -13,19 +15,16 @@
  * Load this into the js shell with IONFLAGS=logs, then exit and run
  * iongraph.  You're looking for a smallish function within the
  * "self-hosted" domain.  Look for a call to ObjectIsTypeDescr far
  * down in the graph for pass00, with a call to DescrToSource in a
  * subsequent block (all of this is at the mercy of the way the code
  * is currently written).
  */
 
-if (!this.TypedObject)
-  quit();
-
 var T = TypedObject;
 var ST = new T.StructType({x:T.int32});
 
 function check(v) {
     return v.toSource();
 }
 
 function test() {
--- a/js/src/jit-test/tests/ion/inlining/TypedObject-ObjectIsTypedObject-multi.js
+++ b/js/src/jit-test/tests/ion/inlining/TypedObject-ObjectIsTypedObject-multi.js
@@ -1,8 +1,10 @@
+// |jit-test| skip-if: !this.TypedObject
+
 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* Used to verify that the JIT resolves the ObjectIsTypedObject tests
  * used in the TO.objectType() method, among other places.
  *
@@ -14,21 +16,16 @@
  * iongraph.  You're looking for a smallish function within the
  * "self-hosted" domain.  Look for a call to ObjectIsTypedObject far
  * down in the graph for pass00, with a subgraph before it that looks
  * like it's comparing something to a string and to null (this is the
  * inlining of IsObject).  (All of this is at the mercy of the way the
  * code is currently written.)
  */
 
-if (!this.TypedObject) {
-    print("No TypedObject, skipping");
-    quit();
-}
-
 var T = TypedObject;
 var ST1 = new T.StructType({x:T.int32});
 var ST2 = new T.StructType({f:T.float64});
 var v1 = new ST1({x:10});
 var v2 = new ST2({f:3.14159});
 
 function check(v) {
   return T.objectType(v);
--- a/js/src/jit-test/tests/ion/inlining/TypedObject-ObjectIsTypedObject-unknown.js
+++ b/js/src/jit-test/tests/ion/inlining/TypedObject-ObjectIsTypedObject-unknown.js
@@ -1,8 +1,10 @@
+// |jit-test| skip-if: !this.TypedObject
+
 /* -*- tab-width: 8; indent-tabs-mode: nil; js-indent-level: 2 -*-
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* Used to verify that the JIT resolves the ObjectIsTypedObject tests
  * used in the TO.objectType() method, among other places.
  *
@@ -16,21 +18,16 @@
  * iongraph.  You're looking for a smallish function within the
  * "self-hosted" domain.  Look for a call to ObjectIsTypedObject far
  * down in the graph for pass00, with a subgraph before it that looks
  * like it's comparing something to a string and to null (this is the
  * inlining of IsObject).  (All of this is at the mercy of the way the
  * code is currently written.)
  */
 
-if (!this.TypedObject) {
-    print("No TypedObject, skipping");
-    quit();
-}
-
 var T = TypedObject;
 var ST1 = new T.StructType({x:T.int32});
 var v1 = new ST1({x:10});
 
 function check(v) {
     return T.objectType(v);
 }
 
--- a/js/src/jit-test/tests/ion/inlining/TypedObject-ObjectIsTypedObject.js
+++ b/js/src/jit-test/tests/ion/inlining/TypedObject-ObjectIsTypedObject.js
@@ -1,8 +1,10 @@
+// |jit-test| skip-if: !this.TypedObject
+
 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* Used to verify that the JIT resolves the ObjectIsTypedObject tests
  * used in the TO.objectType() method, among other places.
  *
@@ -14,21 +16,16 @@
  * iongraph.  You're looking for a smallish function within the
  * "self-hosted" domain.  Look for a call to ObjectIsTypedObject far
  * down in the graph for pass00, with a subgraph before it that looks
  * like it's comparing something to a string and to null (this is the
  * inlining of IsObject).  (All of this is at the mercy of the way the
  * code is currently written.)
  */
 
-if (!this.TypedObject) {
-    print("No TypedObject, skipping");
-    quit();
-}
-
 var T = TypedObject;
 var ST = new T.StructType({x:T.int32});
 var v = new ST({x:10});
 
 function check(v) {
   return T.objectType(v);
 }
 
--- a/js/src/jit-test/tests/ion/inlining/TypedObject-TypeDescrIsSimpleType.js
+++ b/js/src/jit-test/tests/ion/inlining/TypedObject-TypeDescrIsSimpleType.js
@@ -1,8 +1,10 @@
+// |jit-test| skip-if: !this.TypedObject
+
 /* -*- tab-width: 8; indent-tabs-mode: nil; js-indent-level: 2 -*-
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* Testing TypeDescrIsSimpleType() is tricky because it's not exposed.
  * However, the implementation of <typed-object>.build() must use it.
  *
@@ -12,21 +14,16 @@
  * To verify that inlining happens:
  *
  * Run this with IONFLAGS=logs, generate pdfs with iongraph, and then
  * try running "pdfgrep TypeDescrIsSimpleType func*pass00*.pdf", this
  * might net a couple of functions that are likely candidates for
  * manual inspection.
  */
 
-if (!this.TypedObject) {
-    print("No TypedObject, skipping");
-    quit();
-}
-
 var T = TypedObject;
 var AT = new T.ArrayType(T.uint32, 100);
 
 function check() {
     return AT.build(x => x+1);
 }
 
 function test() {
--- a/js/src/jit-test/tests/ion/scalar-replacement-bug1138693.js
+++ b/js/src/jit-test/tests/ion/scalar-replacement-bug1138693.js
@@ -1,10 +1,9 @@
-if (!this.hasOwnProperty("TypedObject"))
-  quit();
+// |jit-test| skip-if: !this.hasOwnProperty("TypedObject")
 
 var T = TypedObject;
 var ST = new T.StructType({x:T.int32});
 function check(v) {
     return v.toSource();
 }
 function test() {
     var fake = { toSource: ST.toSource };
--- a/js/src/jit-test/tests/ion/scalar-replacement-oom.js
+++ b/js/src/jit-test/tests/ion/scalar-replacement-oom.js
@@ -1,10 +1,9 @@
-if (typeof oomAtAllocation !== 'function')
-    quit();
+// |jit-test| skip-if: !('oomAtAllocation' in this)
 
 var lfcode = new Array();
 function k(a, f_arg, b, c) {
     for (var i = 0; i < 5; ++i) {
         f_arg(i + a);
     }
 }
 function t() {