Test fix - array-feedback.js has a test that only make sense when
authormvstanton@chromium.org <mvstanton@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 1 Jul 2013 09:00:14 +0000 (09:00 +0000)
committermvstanton@chromium.org <mvstanton@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 1 Jul 2013 09:00:14 +0000 (09:00 +0000)
running crankshaft. Allow the test to tolerate --nocrankshaft.

BUG=
R=hpayer@chromium.org

Review URL: https://codereview.chromium.org/18328002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15403 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

test/mjsunit/array-feedback.js

index c602018..d1b3062 100644 (file)
@@ -179,13 +179,16 @@ if (support_smi_only_arrays) {
     a[0] = 3.5;
     %OptimizeFunctionOnNextCall(create0);
     create0();
-    create0();
-    b = create0();
-    assertKind(elements_kind.fast_smi_only, b);
-    b[0] = 3.5;
-    c = create0();
-    assertKind(elements_kind.fast_double, c);
-    assertTrue(2 != %GetOptimizationStatus(create0));
+    // This test only makes sense if crankshaft is allowed
+    if (4 != %GetOptimizationStatus(create0)) {
+      create0();
+      b = create0();
+      assertKind(elements_kind.fast_smi_only, b);
+      b[0] = 3.5;
+      c = create0();
+      assertKind(elements_kind.fast_double, c);
+      assertTrue(2 != %GetOptimizationStatus(create0));
+    }
   })();