Commit a8a43270 authored by ishell's avatar ishell Committed by Commit bot

[tests] Cleanup tests that use assertOptimized()/assertUnoptimized().

This CL adds --crankshaft and --no-always-opt flags to the tests that use
assertOptimized() and assertUnoptimized() respectively.

This CL also adds presubmit checks that ensure that tests have the proper
flags set.

BUG=v8:5890

Review-Url: https://codereview.chromium.org/2653753007
Cr-Commit-Position: refs/heads/master@{#42709}
parent cc075f0e
......@@ -2429,7 +2429,8 @@ bool Shell::SetOptions(int argc, char* argv[]) {
if (strcmp(argv[i], "--stress-opt") == 0) {
options.stress_opt = true;
argv[i] = NULL;
} else if (strcmp(argv[i], "--nostress-opt") == 0) {
} else if (strcmp(argv[i], "--nostress-opt") == 0 ||
strcmp(argv[i], "--no-stress-opt") == 0) {
options.stress_opt = false;
argv[i] = NULL;
} else if (strcmp(argv[i], "--stress-deopt") == 0) {
......@@ -2438,7 +2439,8 @@ bool Shell::SetOptions(int argc, char* argv[]) {
} else if (strcmp(argv[i], "--mock-arraybuffer-allocator") == 0) {
options.mock_arraybuffer_allocator = true;
argv[i] = NULL;
} else if (strcmp(argv[i], "--noalways-opt") == 0) {
} else if (strcmp(argv[i], "--noalways-opt") == 0 ||
strcmp(argv[i], "--no-always-opt") == 0) {
// No support for stressing if we can't use --always-opt.
options.stress_opt = false;
options.stress_deopt = false;
......
......@@ -488,6 +488,8 @@ DEFINE_BOOL(turbo_store_elimination, true,
"enable store-store elimination in TurboFan")
DEFINE_BOOL(turbo_lower_create_closure, false,
"enable inline allocation for closure instantiation")
// TODO(turbofan): Rename --crankshaft to --optimize eventually.
DEFINE_IMPLICATION(turbo, crankshaft)
// Flags to help platform porters
DEFINE_BOOL(minimal, false,
......
......@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --crankshaft
Debug = debug.Debug;
......
......@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --crankshaft
Debug = debug.Debug
......
......@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --crankshaft --no-always-opt
var Debug = debug.Debug;
......
......@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --noanalyze-environment-liveness
// Flags: --noanalyze-environment-liveness --crankshaft
// The functions used for testing backtraces. They are at the top to make the
// testing of source line/column easier.
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --noturbo
// Flags: --crankshaft --no-turbo
var Debug = debug.Debug
var exception = null;
......
......@@ -26,6 +26,7 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --concurrent-recompilation --block-concurrent-recompilation
// Flags: --no-always-opt
if (!%IsConcurrentRecompilationSupported()) {
print("Concurrent recompilation is disabled. Skipping this test.");
......
......@@ -26,6 +26,7 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --concurrent-recompilation --block-concurrent-recompilation
// Flags: --no-always-opt
if (!%IsConcurrentRecompilationSupported()) {
print("Concurrent recompilation is disabled. Skipping this test.");
......
// Copyright 2017 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --max_old_space_size=4
// Flags: --max-old-space-size=4
print('Check pause on OOM');
......
......@@ -26,7 +26,7 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax --expose-gc
// Flags: --noalways-opt
// Flags: --crankshaft --no-always-opt
var elements_kind = {
fast_smi_only : 'fast smi only elements',
......
......@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax --expose-gc
// Flags: --allow-natives-syntax --expose-gc --no-always-opt
var a = new Int32Array(1024);
......
......@@ -26,7 +26,7 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax --expose-gc
// Flags: --noalways-opt
// Flags: --no-always-opt --crankshaft
// Test element kind of objects.
......@@ -72,7 +72,7 @@ function assertKind(expected, obj, name_opt) {
a[0] = 3.5;
b = bar0(Array);
assertKind(elements_kind.fast_double, b);
%OptimizeFunctionOnNextCall(bar0);
%OptimizeFunctionOnNextCall(bar0);
b = bar0(Array);
assertKind(elements_kind.fast_double, b);
assertOptimized(bar0);
......@@ -81,18 +81,15 @@ function assertKind(expected, obj, name_opt) {
assertUnoptimized(bar0)
// When it's re-optimized, we should call through the full stub
bar0(Array);
%OptimizeFunctionOnNextCall(bar0);
%OptimizeFunctionOnNextCall(bar0);
b = bar0(Array);
// This only makes sense to test if we allow crankshafting
if (4 != %GetOptimizationStatus(bar0)) {
// We also lost our ability to record kind feedback, as the site
// is megamorphic now.
assertKind(elements_kind.fast_smi_only, b);
assertOptimized(bar0);
b[0] = 3.5;
c = bar0(Array);
assertKind(elements_kind.fast_smi_only, c);
}
// We also lost our ability to record kind feedback, as the site
// is megamorphic now.
assertKind(elements_kind.fast_smi_only, b);
assertOptimized(bar0);
b[0] = 3.5;
c = bar0(Array);
assertKind(elements_kind.fast_smi_only, c);
})();
......@@ -106,7 +103,7 @@ function assertKind(expected, obj, name_opt) {
a[0] = "a string";
a = bar(10);
assertKind(elements_kind.fast, a);
%OptimizeFunctionOnNextCall(bar);
%OptimizeFunctionOnNextCall(bar);
a = bar(10);
assertKind(elements_kind.fast, a);
assertOptimized(bar);
......@@ -124,7 +121,7 @@ function assertKind(expected, obj, name_opt) {
barn(1, 2, 3);
barn(1, 2, 3);
%OptimizeFunctionOnNextCall(barn);
%OptimizeFunctionOnNextCall(barn);
barn(1, 2, 3);
assertOptimized(barn);
a = barn(1, "oops", 3);
......@@ -141,17 +138,14 @@ function assertKind(expected, obj, name_opt) {
}
a = bar();
bar();
%OptimizeFunctionOnNextCall(bar);
%OptimizeFunctionOnNextCall(bar);
b = bar();
// This only makes sense to test if we allow crankshafting
if (4 != %GetOptimizationStatus(bar)) {
assertOptimized(bar);
%DebugPrint(3);
b[0] = 3.5;
c = bar();
assertKind(elements_kind.fast_smi_only, c);
assertOptimized(bar);
}
assertOptimized(bar);
%DebugPrint(3);
b[0] = 3.5;
c = bar();
assertKind(elements_kind.fast_smi_only, c);
assertOptimized(bar);
})();
......@@ -161,7 +155,7 @@ function assertKind(expected, obj, name_opt) {
function bar() { return new Array(); }
bar();
bar();
%OptimizeFunctionOnNextCall(bar);
%OptimizeFunctionOnNextCall(bar);
a = bar();
assertTrue(a instanceof Array);
......@@ -180,7 +174,7 @@ function assertKind(expected, obj, name_opt) {
function bar(len) { return new Array(len); }
bar(0);
bar(0);
%OptimizeFunctionOnNextCall(bar);
%OptimizeFunctionOnNextCall(bar);
a = bar(0);
assertOptimized(bar);
assertFalse(isHoley(a));
......@@ -192,10 +186,8 @@ function assertKind(expected, obj, name_opt) {
a = bar(0);
assertOptimized(bar);
// Crankshafted functions don't use mementos, so feedback still
// indicates a packed array is desired. (unless --nocrankshaft is in use).
if (4 != %GetOptimizationStatus(bar)) {
assertFalse(isHoley(a));
}
// indicates a packed array is desired.
assertFalse(isHoley(a));
})();
// Test: Make sure that crankshaft continues with feedback for large arrays.
......
......@@ -26,7 +26,7 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax --expose-gc
// Flags: --noalways-opt
// Flags: --crankshaft --no-always-opt
var elements_kind = {
fast_smi_only : 'fast smi only elements',
......
......@@ -26,7 +26,7 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax --expose-gc
// Flags: --noalways-opt
// Flags: --crankshaft --no-always-opt
var elements_kind = {
fast_smi_only : 'fast smi only elements',
......
......@@ -25,7 +25,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax --expose-gc --ignition-osr
// Flags: --allow-natives-syntax --expose-gc --ignition-osr --no-always-opt
// Flags: --crankshaft
// IC and Crankshaft support for smi-only elements in dynamic array literals.
function get(foo) { return foo; } // Used to generate dynamic values.
......@@ -188,9 +189,7 @@ assertEquals(foo, array[2]);
(function literals_after_osr() {
var color = [0];
// Trigger OSR, if optimization is not disabled.
if (%GetOptimizationStatus(literals_after_osr) != 4) {
while (%GetOptimizationCount(literals_after_osr) == 0) {}
}
// Trigger OSR.
while (%GetOptimizationCount(literals_after_osr) == 0) {}
return [color[0]];
})();
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax
// Flags: --allow-natives-syntax --crankshaft --no-always-opt
var v = 0;
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax
// Flags: --allow-natives-syntax --crankshaft
// Inlining shift with holey smi arrays shouldn't deopt just because it
// encounters the hole on the copy step.
......
......@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax
// Flags: --allow-natives-syntax --crankshaft --no-always-opt
// Verifies that the KeyedStoreIC correctly handles out-of-bounds stores
// to an array that grow it by a single element. Test functions are
......
......@@ -27,6 +27,7 @@
// Flags: --track-fields --track-double-fields --allow-natives-syntax
// Flags: --concurrent-recompilation --block-concurrent-recompilation
// Flags: --no-always-opt
if (!%IsConcurrentRecompilationSupported()) {
print("Concurrent recompilation is disabled. Skipping this test.");
......
......@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax
// Flags: --allow-natives-syntax --no-always-opt
// Flags: --concurrent-recompilation --block-concurrent-recompilation
if (!%IsConcurrentRecompilationSupported()) {
......
......@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax --noalways-opt
// Flags: --allow-natives-syntax --crankshaft --no-always-opt
var global = this;
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax
// Flags: --allow-natives-syntax --crankshaft
(function() {
function foo(x, y) { return x << y; }
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax
// Flags: --allow-natives-syntax --crankshaft --no-always-opt
var s = "12345";
......
......@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax
// Flags: --allow-natives-syntax --crankshaft
function f(x) {
x++;
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax
// Flags: --allow-natives-syntax --crankshaft
(function() {
function foo(a) { return a.pop(); }
......
......@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax
// Flags: --allow-natives-syntax --crankshaft
var global = this;
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax
// Flags: --allow-natives-syntax --crankshaft
(function() {
function foo(x) {
......
......@@ -27,6 +27,7 @@
// Flags: --allow-natives-syntax --expose-gc
// Flags: --concurrent-recompilation --block-concurrent-recompilation
// Flags: --crankshaft --no-always-opt
if (!%IsConcurrentRecompilationSupported()) {
print("Concurrent recompilation is disabled. Skipping this test.");
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax --turbo-filter=*
// Flags: --allow-natives-syntax --crankshaft --turbo-filter=*
function foo() {
with ({ value:"fooed" }) { return value; }
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax
// Flags: --allow-natives-syntax --crankshaft
function foo() {
return "fooed";
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax
// Flags: --allow-natives-syntax --crankshaft
var a = new Float32Array(1);
function len(a) { return a.length; }
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax
// Flags: --allow-natives-syntax --crankshaft
var a = new Float64Array(1);
function len(a) { return a.length; }
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax
// Flags: --allow-natives-syntax --crankshaft
var a = new Int32Array(1);
function len(a) { return a.length; }
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax
// Flags: --allow-natives-syntax --crankshaft
var a = new Uint32Array(1);
function len(a) { return a.length; }
......
......@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax
// Flags: --allow-natives-syntax --crankshaft
function OptimizeTruncatingBinaryOp(func) {
func(42, -2);
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax
// Flags: --allow-natives-syntax --crankshaft
function bar(x, y) {
return x === y;
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax
// Flags: --allow-natives-syntax --crankshaft
(function() {
function foo(a, v) {
......
......@@ -27,7 +27,7 @@
// Flags: --allow-natives-syntax
// Flags: --concurrent-recompilation --block-concurrent-recompilation
// Flags: --nostress-opt
// Flags: --nostress-opt --no-always-opt
// --nostress-opt is in place because this particular optimization
// (guaranteeing that the Array prototype chain has no elements) is
......
......@@ -26,7 +26,8 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --nodead-code-elimination --fold-constants --allow-natives-syntax --nostress-opt
// Flags: --nodead-code-elimination --fold-constants
// Flags: --allow-natives-syntax --nostress-opt --crankshaft
function test(f) {
f();
......
......@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax --expose-gc
// Flags: --allow-natives-syntax --expose-gc --crankshaft
function mul (a, b) {
return a * b;
......
......@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax
// Flags: --allow-natives-syntax --crankshaft --no-always-opt
deopt_trigger = 0;
side_effect = 0;
......@@ -81,10 +81,10 @@ test(10.0, 20.0, 30.0, 40.0, 50.0, 1.5);
test(10.0, 20.0, 30.0, 40.0, 50.0, 1.5);
%OptimizeFunctionOnNextCall(test);
test(10.0, 20.0, 30.0, 40.0, 50.0, 1.5);
assertTrue(2 != %GetOptimizationStatus(test));
assertOptimized(test);
// By deleting the field we are forcing the code to deopt when the field is
// read on next execution.
delete deopt_trigger;
test(10.0, 20.0, 30.0, 40.0, 50.0, 1.5);
assertTrue(1 != %GetOptimizationStatus(test));
assertUnoptimized(test);
......@@ -3,6 +3,7 @@
// found in the LICENSE file.
// Flags: --allow-natives-syntax --cache=code --no-lazy --serialize-inner
// Flags: --crankshaft
function f(x, y) { return x + y; }
......
......@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax
// Flags: --allow-natives-syntax --crankshaft
function div(g) {
return (g/-1) ^ 1
......
......@@ -26,7 +26,7 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax
// Flags: --nostress-opt
// Flags: --nostress-opt --crankshaft
// Ensure that ElementsKind transitions in various situations are hoisted (or
// not hoisted) correctly, don't change the semantics programs and don't trigger
......
......@@ -2,14 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax --noverify-heap --noenable-slow-asserts
// Flags: --allow-natives-syntax --noverify-heap --noenable-slow-asserts
// Flags: --crankshaft --no-always-opt
// --noverify-heap and --noenable-slow-asserts are set because the test is too
// slow with it on.
// --noverify-heap and --noenable-slow-asserts are set because the test is too
// slow with it on.
// Ensure that keyed stores work, and optimized functions learn if the
// store required change to dictionary mode. Verify that stores that grow
// the array into large object space don't cause a deopt.
// Ensure that keyed stores work, and optimized functions learn if the
// store required change to dictionary mode. Verify that stores that grow
// the array into large object space don't cause a deopt.
(function() {
var a = [];
......@@ -60,27 +61,24 @@
%OptimizeFunctionOnNextCall(foo2);
foo2(a, 40);
// This test is way too slow without crankshaft.
if (4 != %GetOptimizationStatus(foo2)) {
assertOptimized(foo2);
assertTrue(%HasFastSmiElements(a));
assertOptimized(foo2);
assertTrue(%HasFastSmiElements(a));
// Grow a large array into large object space through the keyed store
// without deoptimizing. Grow by 10s. If we set elements too sparsely, the
// array will convert to dictionary mode.
a = new Array(99999);
assertTrue(%HasFastSmiElements(a));
for (var i = 0; i < 263000; i += 10) {
foo2(a, i);
}
// Verify that we are over 1 page in size, and foo2 remains optimized.
// This means we've smoothly transitioned to allocating in large object
// space.
assertTrue(%HasFastSmiElements(a));
assertTrue(a.length * 4 > (1024 * 1024));
assertOptimized(foo2);
// Grow a large array into large object space through the keyed store
// without deoptimizing. Grow by 10s. If we set elements too sparsely, the
// array will convert to dictionary mode.
a = new Array(99999);
assertTrue(%HasFastSmiElements(a));
for (var i = 0; i < 263000; i += 10) {
foo2(a, i);
}
// Verify that we are over 1 page in size, and foo2 remains optimized.
// This means we've smoothly transitioned to allocating in large object
// space.
assertTrue(%HasFastSmiElements(a));
assertTrue(a.length * 4 > (1024 * 1024));
assertOptimized(foo2);
%ClearFunctionTypeFeedback(foo2);
})();
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --turbo --turbo-escape --allow-natives-syntax
// Flags: --turbo --turbo-escape --allow-natives-syntax --no-always-opt
"use strict";
......
......@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax
// Flags: --allow-natives-syntax --crankshaft
// Check that the following functions are optimizable.
var functions = [ f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14,
......@@ -478,5 +478,5 @@ for (var i=0; i<10; i++) {
f(12);
g(12);
assertTrue(%GetOptimizationStatus(f) != 2);
assertTrue(%GetOptimizationStatus(g) != 2);
assertOptimized(f);
assertOptimized(g);
......@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax
// Flags: --allow-natives-syntax --crankshaft
"use strict";
......@@ -480,5 +480,5 @@ for (var i=0; i<10; i++) {
f(12);
g(12);
assertTrue(%GetOptimizationStatus(f) != 2);
assertTrue(%GetOptimizationStatus(g) != 2);
assertOptimized(f);
assertOptimized(g);
......@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax
// Flags: --allow-natives-syntax --crankshaft
// Test functionality of block scopes.
// Hoisting of var declarations.
......@@ -40,7 +40,7 @@ function f1() {
for (var j = 0; j < 5; ++j) f1();
%OptimizeFunctionOnNextCall(f1);
f1();
assertTrue(%GetOptimizationStatus(f1) != 2);
assertOptimized(f1);
// Dynamic lookup in and through block contexts.
function f2(one) {
......
......@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax
// Flags: --allow-natives-syntax --crankshaft
// Test functionality of block scopes.
"use strict";
......@@ -42,7 +42,7 @@ function f1() {
for (var j = 0; j < 5; ++j) f1();
%OptimizeFunctionOnNextCall(f1);
f1();
assertTrue(%GetOptimizationStatus(f1) != 2);
assertOptimized(f1);
// Dynamic lookup in and through block contexts.
function f2(one) {
......
......@@ -3,6 +3,7 @@
// found in the LICENSE file.
// Flags: --allow-natives-syntax --nostress-opt --track-field-types
// Flags: --crankshaft --no-always-opt
(function() {
var o = { text: "Hello World!" };
......
......@@ -26,7 +26,7 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax --max-opt-count=100 --noalways-opt
// Flags: --nocollect-maps
// Flags: --nocollect-maps --crankshaft
// We specify max-opt-count because we opt/deopt the same function many
// times.
......
......@@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony-do-expressions --allow-natives-syntax
// Flags: --harmony-do-expressions --allow-natives-syntax --no-always-opt
// Flags: --crankshaft
function returnValue(v) { return v; }
function MyError() {}
......
......@@ -3,7 +3,7 @@
// found in the LICENSE file.
// Flags: --allow-natives-syntax
// Flags: --nostress-opt
// Flags: --no-stress-opt --crankshaft --no-always-opt
// --nostress-opt is specified because the test corrupts the "pristine"
// array prototype chain by storing an element, and this is tracked
......
......@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax
// Flags: --allow-natives-syntax --crankshaft
var o = {
......
......@@ -25,7 +25,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax
// Flags: --allow-natives-syntax --crankshaft --no-always-opt
var s = Symbol("foo");
var o = {
......
......@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax --nouse-inlining
// Flags: --allow-natives-syntax --nouse-inlining --crankshaft
// Test for negative zero that doesn't need bail out
......
......@@ -3,7 +3,7 @@
// found in the LICENSE file.
// MODULE
// Flags: --allow-natives-syntax
// Flags: --allow-natives-syntax --crankshaft
export let x = 0;
function foo() { x++ };
......
......@@ -25,39 +25,35 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax
// Flags: --allow-natives-syntax --crankshaft --no-always-opt
function o1() {
}
if (%GetOptimizationStatus(o1) != 4) {
// 4 == optimization disabled.
o1(); o1();
%OptimizeFunctionOnNextCall(o1);
o1();
o1(); o1();
%OptimizeFunctionOnNextCall(o1);
o1();
// Check that the given function was optimized.
assertOptimized(o1);
// Check that the given function was optimized.
assertOptimized(o1);
// Test the %NeverOptimizeFunction runtime call.
%NeverOptimizeFunction(u1);
function u1() {
}
// Test the %NeverOptimizeFunction runtime call.
%NeverOptimizeFunction(u1);
function u1() {
}
function u2() {
u1();
}
function u2() {
u1();
}
u1(); u1();
u2(); u2();
u1(); u1();
u2(); u2();
%OptimizeFunctionOnNextCall(u1);
%OptimizeFunctionOnNextCall(u2);
%OptimizeFunctionOnNextCall(u1);
%OptimizeFunctionOnNextCall(u2);
u1(); u1();
u2(); u2();
u1(); u1();
u2(); u2();
// 2 => not optimized.
assertUnoptimized(u1);
assertOptimized(u2);
}
assertUnoptimized(u1);
assertOptimized(u2);
......@@ -28,7 +28,7 @@
// Tests the Object.seal and Object.isSealed methods - ES 19.1.2.17 and
// ES 19.1.2.13
// Flags: --allow-natives-syntax --noalways-opt
// Flags: --allow-natives-syntax --crankshaft --noalways-opt
// Test that we return obj if non-object is passed as argument
var non_objects = new Array(undefined, null, 1, -1, 0, 42.43, Symbol("test"));
......
......@@ -26,7 +26,7 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --nodead-code-elimination --concurrent-recompilation
// Flags: --allow-natives-syntax
// Flags: --allow-natives-syntax --no-always-opt
if (!%IsConcurrentRecompilationSupported()) {
print("Concurrent recompilation is disabled. Skipping this test.");
......
......@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax
// Flags: --allow-natives-syntax --crankshaft
function mul(x, y) {
return (x * y) | 0;
......
......@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax
// Flags: --allow-natives-syntax --crankshaft
// The original problem from the bug: In the example below SMI check for b
// generated for inlining of equals invocation (marked with (*)) will be hoisted
......
......@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax
// Flags: --allow-natives-syntax --crankshaft
var foo = (function() {
return eval("(function bar() { return 1; })");
......
......@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax --expose-gc
// Flags: --allow-natives-syntax --expose-gc --crankshaft
function simple() {
return simple_two_args(0, undefined);
......
......@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax
// Flags: --allow-natives-syntax --crankshaft
function f() {
assertEquals(-1.0, Math.round(-1.5));
......
......@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax
// Flags: --allow-natives-syntax --crankshaft
// The type feedback oracle had a bug when retrieving the map from an IC
// starting with a negative lookup.
......
......@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --use-osr --allow-natives-syntax --ignition-osr
// Flags: --use-osr --allow-natives-syntax --ignition-osr --crankshaft
function f() {
do {
......@@ -36,7 +36,7 @@ function f() {
}
f();
assertTrue(%GetOptimizationCount(f) > 0 || %GetOptimizationStatus(f) == 4);
assertTrue(%GetOptimizationCount(f) > 0);
function g() {
for (var i = 0; i < 1; i++) { }
......@@ -67,4 +67,4 @@ function g() {
}
g();
assertTrue(%GetOptimizationCount(g) > 0 || %GetOptimizationStatus(g) == 4);
assertTrue(%GetOptimizationCount(g) > 0);
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax
// Flags: --allow-natives-syntax --crankshaft
function foo(a) {
var sum = 0;
......
......@@ -3,6 +3,7 @@
// found in the LICENSE file.
// Flags: --allow-natives-syntax --debug-code --gc-interval=201 --verify-heap --max-inlined-source-size=999999 --max-inlined-nodes=999999 --max-inlined-nodes-cumulative=999999
// Flags: --crankshaft --no-always-opt
// Begin stripped down and modified version of mjsunit.js for easy minimization in CF.
function MjsUnitAssertionError(message) {}
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax
// Flags: --allow-natives-syntax --crankshaft
function foo(a) {
for (var d in a) {
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax
// Flags: --allow-natives-syntax --crankshaft --no-always-opt
function getobj() {
return { bar : function() { return 0}};
......
......@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax
// Flags: --allow-natives-syntax --crankshaft --no-always-opt
var calls = 0;
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax --expose-gc
// Flags: --allow-natives-syntax --expose-gc --crankshaft --no-always-opt
var assertDoesNotThrow;
var assertInstanceof;
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax
// Flags: --allow-natives-syntax --no-always-opt
function literals_sharing_test(warmup, optimize) {
function closure() {
......@@ -39,10 +39,4 @@ function test() {
literals_sharing_test(warmup, true);
}
function stress_opt_test() {}
stress_opt_test();
if (%GetOptimizationStatus(stress_opt_test) == 2) {
// This test is not suitable for --always-opt mode.
test();
}
test();
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax
// Flags: --allow-natives-syntax --crankshaft
function bar(a) {
var x = a[0];
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax
// Flags: --allow-natives-syntax --crankshaft
function foo(a, b) {
return a + "0123456789012";
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax
// Flags: --allow-natives-syntax --crankshaft
function foo(a) {
"use strict";
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax
// Flags: --allow-natives-syntax --crankshaft
(function() {
function eq(a, b) { return a == b; }
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --validate-asm --allow-natives-syntax
// Flags: --validate-asm --allow-natives-syntax --crankshaft --no-always-opt
// /v8/test/mjsunit/regress/regress-crbug-431602.js
// /v8/test/mjsunit/lazy-load.js
......
......@@ -4,7 +4,7 @@
// New space must be at max capacity to trigger pretenuring decision.
// Flags: --allow-natives-syntax --verify-heap --max-semi-space-size=1
// Flags: --expose-gc
// Flags: --expose-gc --no-always-opt
var global = []; // Used to keep some objects alive.
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax
// Flags: --allow-natives-syntax --crankshaft --no-always-opt
assertSame = function assertSame() {
if (found === expected) {
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax
// Flags: --allow-natives-syntax --crankshaft
(function() {
var key = "s";
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax
// Flags: --allow-natives-syntax --crankshaft
// The Crankshaft fast case for String.fromCharCode used to unconditionally
// deoptimize on non int32 indices.
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax
// Flags: --allow-natives-syntax --crankshaft --no-always-opt
var global = {}
......
......@@ -28,6 +28,7 @@
// Flags: --fold-constants --nodead-code-elimination
// Flags: --expose-gc --allow-natives-syntax
// Flags: --concurrent-recompilation --block-concurrent-recompilation
// Flags: --crankshaft --no-always-opt
if (!%IsConcurrentRecompilationSupported()) {
print("Concurrent recompilation is disabled. Skipping this test.");
......
......@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax
// Flags: --allow-natives-syntax --crankshaft
var c = { x: 2, y: 1 };
......
......@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax
// Flags: --allow-natives-syntax --crankshaft
// Test that we do not confuse the first local and the first parameter
// when gathering type information.
......
......@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax
// Flags: --allow-natives-syntax --crankshaft
function f() {
var o = {};
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax
// Flags: --allow-natives-syntax --crankshaft
function load(o) { return o.x; }
......
......@@ -4,6 +4,7 @@
//
// Flags: --random-seed=891196975 --expose-gc --allow-natives-syntax
// Flags: --gc-interval=207 --stress-compaction --validate-asm
// Flags: --crankshaft --no-always-opt
//
// /v8/test/mjsunit/wasm/grow-memory.js
// /v8/test/mjsunit/regress/regress-540.js
......
......@@ -4,6 +4,7 @@
//
// Flags: --random-seed=891196975 --expose-gc --allow-natives-syntax
// Flags: --gc-interval=207 --stress-compaction --validate-asm
// Flags: --crankshaft --no-always-opt
//
// /v8/test/mjsunit/wasm/grow-memory.js
// /v8/test/mjsunit/regress/regress-540.js
......
......@@ -26,6 +26,7 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax --max-opt-count=100 --noalways-opt
// Flags: --crankshaft
// We specify max-opt-count because we opt/deopt the same function many
// times.
......
......@@ -2,7 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// Flags: --mark-shared-functions-for-tier-up --allow-natives-syntax --no-ignition --no-ignition-staging --no-turbo
// Flags: --mark-shared-functions-for-tier-up --allow-natives-syntax
// Flags: --no-ignition --no-ignition-staging --no-turbo
// Flags: --crankshaft --no-always-opt
(function() {
var sum = 0;
......
......@@ -2,7 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// Flags: --mark-shared-functions-for-tier-up --allow-natives-syntax --ignition-staging --no-turbo
// Flags: --mark-shared-functions-for-tier-up --allow-natives-syntax
// Flags: --ignition-staging --no-turbo
// Flags: --crankshaft --no-always-opt
(function() {
var sum = 0;
......
......@@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// Flags: --mark-shared-functions-for-tier-up --allow-natives-syntax --ignition-staging --turbo
// Flags: --mark-shared-functions-for-tier-up --allow-natives-syntax
// Flags: --ignition-staging --turbo --no-always-opt
(function() {
var sum = 0;
......
......@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax
// Flags: --allow-natives-syntax --crankshaft
function divp4(x) {
return x / 4;
......
......@@ -27,7 +27,7 @@
// Test Math.sin and Math.cos.
// Flags: --allow-natives-syntax
// Flags: --allow-natives-syntax --crankshaft
assertEquals("-Infinity", String(1/Math.sin(-0)));
assertEquals(1, Math.cos(-0));
......
......@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax --noalways-opt
// Flags: --allow-natives-syntax --crankshaft --noalways-opt
function check(func, input, expected) {
func(-1);
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment