Use --opt instead of --crankshaft in tests.

1. Replaces --crankshaft with --opt in tests.
2. Also fixes presubmit to check for --opt flag when
assertOptimized is used.
3. Updates testrunner/local/variants.py and 
v8_foozie.py to use --opt flag.
This would mean, nooptimize variant means there are
no optimizations. Not even with %OptimizeFunctionOnNextCall.

Bug:v8:6325

Change-Id: I638e743d0773a6729c6b9749e2ca1e2537f12ce6
Reviewed-on: https://chromium-review.googlesource.com/490206
Commit-Queue: Mythri Alle <mythria@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44985}
This commit is contained in:
Mythri 2017-04-28 14:33:43 +01:00 committed by Commit Bot
parent 7f67b98695
commit 7371c34b6b
118 changed files with 146 additions and 144 deletions

View File

@ -35,7 +35,7 @@ from testrunner.objects import testcase
class BenchmarksVariantGenerator(testsuite.VariantGenerator):
# Both --nocrankshaft and --stressopt are very slow. Add TF but without
# Both --noopt and --stressopt are very slow. Add TF but without
# always opt to match the way the benchmarks are run for performance
# testing.
def FilterVariantsByTest(self, testcase):

View File

@ -3342,7 +3342,7 @@ TEST(ReleaseOverReservedPages) {
if (FLAG_never_compact) return;
i::FLAG_trace_gc = true;
// The optimizer can allocate stuff, messing up the test.
i::FLAG_crankshaft = false;
i::FLAG_opt = false;
i::FLAG_always_opt = false;
// Parallel compaction increases fragmentation, depending on how existing
// memory is distributed. Since this is non-deterministic because of
@ -3944,7 +3944,7 @@ TEST(Regress169209) {
TEST(Regress169928) {
i::FLAG_allow_natives_syntax = true;
i::FLAG_crankshaft = false;
i::FLAG_opt = false;
CcTest::InitializeVM();
Isolate* isolate = CcTest::i_isolate();
LocalContext env;
@ -4266,7 +4266,7 @@ static int AllocationSitesCount(Heap* heap) {
TEST(EnsureAllocationSiteDependentCodesProcessed) {
if (i::FLAG_always_opt || !i::FLAG_crankshaft) return;
if (i::FLAG_always_opt || !i::FLAG_opt) return;
i::FLAG_allow_natives_syntax = true;
CcTest::InitializeVM();
Isolate* isolate = CcTest::i_isolate();
@ -4337,7 +4337,7 @@ TEST(EnsureAllocationSiteDependentCodesProcessed) {
TEST(CellsInOptimizedCodeAreWeak) {
if (i::FLAG_always_opt || !i::FLAG_crankshaft) return;
if (i::FLAG_always_opt || !i::FLAG_opt) return;
i::FLAG_allow_natives_syntax = true;
CcTest::InitializeVM();
Isolate* isolate = CcTest::i_isolate();
@ -4381,7 +4381,7 @@ TEST(CellsInOptimizedCodeAreWeak) {
TEST(ObjectsInOptimizedCodeAreWeak) {
if (i::FLAG_always_opt || !i::FLAG_crankshaft) return;
if (i::FLAG_always_opt || !i::FLAG_opt) return;
i::FLAG_allow_natives_syntax = true;
CcTest::InitializeVM();
Isolate* isolate = CcTest::i_isolate();
@ -4422,7 +4422,7 @@ TEST(ObjectsInOptimizedCodeAreWeak) {
}
TEST(NewSpaceObjectsInOptimizedCode) {
if (i::FLAG_always_opt || !i::FLAG_crankshaft || i::FLAG_turbo) return;
if (i::FLAG_always_opt || !i::FLAG_opt || i::FLAG_turbo) return;
i::FLAG_allow_natives_syntax = true;
CcTest::InitializeVM();
Isolate* isolate = CcTest::i_isolate();
@ -4483,7 +4483,7 @@ TEST(NewSpaceObjectsInOptimizedCode) {
}
TEST(NoWeakHashTableLeakWithIncrementalMarking) {
if (i::FLAG_always_opt || !i::FLAG_crankshaft) return;
if (i::FLAG_always_opt || !i::FLAG_opt) return;
if (!i::FLAG_incremental_marking) return;
i::FLAG_allow_natives_syntax = true;
i::FLAG_compilation_cache = false;

View File

@ -4191,7 +4191,7 @@ THREADED_TEST(NamedPropertyHandlerGetterAttributes) {
THREADED_TEST(Regress256330) {
if (!i::FLAG_crankshaft) return;
if (!i::FLAG_opt) return;
i::FLAG_allow_natives_syntax = true;
LocalContext context;
v8::HandleScope scope(context->GetIsolate());

View File

@ -14359,7 +14359,7 @@ void SetFunctionEntryHookTest::RunTest() {
CHECK_EQ(2, CountInvocations(NULL, "bar"));
CHECK_EQ(200, CountInvocations("bar", "foo"));
CHECK_EQ(200, CountInvocations(NULL, "foo"));
} else if (i::FLAG_crankshaft) {
} else if (i::FLAG_opt) {
// For ignition we don't see the actual functions being called, instead
// we see the InterpreterEntryTrampoline at least 102 times
// (100 unoptimized calls to foo, and 2 calls to bar).
@ -22001,7 +22001,7 @@ void TestStubCache(bool primary) {
} else {
FLAG_test_secondary_stub_cache = true;
}
FLAG_crankshaft = false;
FLAG_opt = false;
v8::Isolate::CreateParams create_params;
create_params.array_buffer_allocator = CcTest::array_buffer_allocator();
@ -22920,7 +22920,7 @@ TEST(AccessCheckInIC) {
if (FLAG_ignition || FLAG_turbo) return;
FLAG_native_code_counters = true;
FLAG_crankshaft = false;
FLAG_opt = false;
v8::Isolate::CreateParams create_params;
create_params.array_buffer_allocator = CcTest::array_buffer_allocator();

View File

@ -289,7 +289,7 @@ TEST(GetScriptLineNumber) {
TEST(FeedbackVectorPreservedAcrossRecompiles) {
if (i::FLAG_always_opt || !i::FLAG_crankshaft) return;
if (i::FLAG_always_opt || !i::FLAG_opt) return;
i::FLAG_allow_natives_syntax = true;
CcTest::InitializeVM();
if (!CcTest::i_isolate()->use_crankshaft()) return;

View File

@ -1033,7 +1033,7 @@ TEST(BoundFunctionCall) {
// This tests checks distribution of the samples through the source lines.
static void TickLines(bool optimize) {
if (!optimize) i::FLAG_crankshaft = false;
if (!optimize) i::FLAG_opt = false;
CcTest::InitializeVM();
LocalContext env;
i::FLAG_allow_natives_syntax = true;

View File

@ -252,7 +252,7 @@ TEST(FlagsRemoveIncomplete) {
// if the list of arguments ends unexpectedly.
SetFlagsToDefault();
int argc = 3;
const char* argv[] = {"", "--crankshaft", "--expose-natives-as"};
const char* argv[] = {"", "--opt", "--expose-natives-as"};
CHECK_EQ(2, FlagList::SetFlagsFromCommandLine(&argc,
const_cast<char **>(argv),
true));

View File

@ -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: --crankshaft
// Flags: --opt
Debug = debug.Debug;

View File

@ -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: --crankshaft
// Flags: --opt
Debug = debug.Debug

View File

@ -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: --crankshaft --no-always-opt
// Flags: --opt --no-always-opt
var Debug = debug.Debug;

View File

@ -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: --nocrankshaft
// Flags: --noopt
Debug = debug.Debug
var exception = null;

View File

@ -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 --crankshaft
// Flags: --noanalyze-environment-liveness --opt
// The functions used for testing backtraces. They are at the top to make the
// testing of source line/column easier.

View File

@ -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: --crankshaft --no-turbo
// Flags: --opt --no-turbo
var Debug = debug.Debug
var exception = null;

View File

@ -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 --no-always-opt --crankshaft
// Flags: --allow-natives-syntax --no-always-opt --opt
var source =
`

View File

@ -26,7 +26,7 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax --expose-gc
// Flags: --crankshaft --no-always-opt
// Flags: --opt --no-always-opt
var elements_kind = {
fast_smi_only : 'fast smi only elements',
@ -136,7 +136,7 @@ assertKind(elements_kind.fast, obj);
obj = fastliteralcase(get_standard_literal(), 3);
assertKind(elements_kind.fast, obj);
// Make sure this works in crankshafted code too.
// Make sure this works in optimized code too.
%OptimizeFunctionOnNextCall(get_standard_literal);
get_standard_literal();
obj = get_standard_literal();
@ -347,7 +347,7 @@ instanceof_check(realmBArray);
assertOptimized(instanceof_check);
// Try to optimize again, but first clear all type feedback, and allow it
// to be monomorphic on first call. Only after crankshafting do we introduce
// to be monomorphic on first call. Only after optimizing do we introduce
// realmBArray. This should deopt the method.
%DeoptimizeFunction(instanceof_check);
%ClearFunctionFeedback(instanceof_check);

View File

@ -26,7 +26,7 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax --expose-gc
// Flags: --no-always-opt --crankshaft
// Flags: --no-always-opt --opt
// Test element kind of objects.

View File

@ -26,7 +26,7 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax --expose-gc
// Flags: --crankshaft --no-always-opt
// Flags: --opt --no-always-opt
var elements_kind = {
fast_smi_only : 'fast smi only elements',

View File

@ -26,7 +26,7 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax --expose-gc
// Flags: --crankshaft --no-always-opt
// Flags: --opt --no-always-opt
var elements_kind = {
fast_smi_only : 'fast smi only elements',

View File

@ -26,7 +26,7 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax --expose-gc --ignition-osr --no-always-opt
// Flags: --crankshaft
// Flags: --opt
// IC and Crankshaft support for smi-only elements in dynamic array literals.
function get(foo) { return foo; } // Used to generate dynamic values.

View File

@ -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 --crankshaft --no-always-opt
// Flags: --allow-natives-syntax --opt --no-always-opt
var v = 0;

View File

@ -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 --crankshaft
// Flags: --allow-natives-syntax --opt
// Inlining shift with holey smi arrays shouldn't deopt just because it
// encounters the hole on the copy step.

View File

@ -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 --crankshaft --no-always-opt
// Flags: --allow-natives-syntax --opt --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

View File

@ -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 --crankshaft --no-always-opt
// Flags: --allow-natives-syntax --opt --no-always-opt
var global = this;

View File

@ -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 --crankshaft
// Flags: --allow-natives-syntax --opt
(function() {
function foo(x, y) { return x << y; }

View File

@ -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 --crankshaft --no-always-opt
// Flags: --allow-natives-syntax --opt --no-always-opt
var s = "12345";

View File

@ -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 --crankshaft
// Flags: --allow-natives-syntax --opt
function f(x) {
x++;

View File

@ -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 --crankshaft
// Flags: --allow-natives-syntax --opt
(function() {
function foo(a) { return a.pop(); }

View File

@ -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 --crankshaft
// Flags: --allow-natives-syntax --opt
var global = this;

View File

@ -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 --crankshaft
// Flags: --allow-natives-syntax --opt
(function() {
function foo(x) {

View File

@ -27,7 +27,7 @@
// Flags: --allow-natives-syntax --expose-gc
// Flags: --concurrent-recompilation --block-concurrent-recompilation
// Flags: --crankshaft --no-always-opt
// Flags: --opt --no-always-opt
if (!%IsConcurrentRecompilationSupported()) {
print("Concurrent recompilation is disabled. Skipping this test.");

View File

@ -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 --crankshaft --turbo-filter=*
// Flags: --allow-natives-syntax --opt --turbo-filter=*
function foo() {
with ({ value:"fooed" }) { return value; }

View File

@ -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 --crankshaft
// Flags: --allow-natives-syntax --opt
function foo() {
return "fooed";

View File

@ -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 --crankshaft
// Flags: --allow-natives-syntax --opt
var a = new Float32Array(1);
function len(a) { return a.length; }

View File

@ -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 --crankshaft
// Flags: --allow-natives-syntax --opt
var a = new Float64Array(1);
function len(a) { return a.length; }

View File

@ -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 --crankshaft
// Flags: --allow-natives-syntax --opt
var a = new Int32Array(1);
function len(a) { return a.length; }

View File

@ -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 --crankshaft
// Flags: --allow-natives-syntax --opt
var a = new Uint32Array(1);
function len(a) { return a.length; }

View File

@ -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 --crankshaft
// Flags: --allow-natives-syntax --opt
function OptimizeTruncatingBinaryOp(func) {
func(42, -2);

View File

@ -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 --crankshaft
// Flags: --allow-natives-syntax --turbo --opt
function CompareNegate(a,b) {
a = a|0;

View File

@ -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 --crankshaft
// Flags: --allow-natives-syntax --opt
(function() {
function foo(a, v) {

View File

@ -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 --crankshaft --no-always-opt
// Flags: --allow-natives-syntax --opt --no-always-opt
var global = this;

View File

@ -27,7 +27,7 @@
// Flags: --nodead-code-elimination --fold-constants
// Flags: --allow-natives-syntax --nostress-opt --crankshaft
// Flags: --allow-natives-syntax --nostress-opt --opt
function test(f) {
f();

View File

@ -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 --crankshaft
// Flags: --allow-natives-syntax --expose-gc --opt
function mul (a, b) {
return a * b;

View File

@ -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 --crankshaft --turbo --no-always-opt
// Flags: --allow-natives-syntax --opt --turbo --no-always-opt
function foo(i, deopt = false) {
if (i == 0) {

View File

@ -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 --crankshaft --turbo --no-always-opt
// Flags: --allow-natives-syntax --opt --turbo --no-always-opt
function foo(i, deopt = false) {
if (i == 0) {

View File

@ -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 --crankshaft --turbo --no-always-opt
// Flags: --allow-natives-syntax --opt --turbo --no-always-opt
function foo(i, deopt = false, deoptobj = null) {

View File

@ -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 --crankshaft --turbo --no-always-opt
// Flags: --allow-natives-syntax --opt --turbo --no-always-opt
function foo() {}

View File

@ -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 --crankshaft --no-always-opt
// Flags: --allow-natives-syntax --opt --no-always-opt
deopt_trigger = 0;
side_effect = 0;

View File

@ -3,7 +3,7 @@
// found in the LICENSE file.
// Flags: --allow-natives-syntax --cache=code --no-lazy --serialize-inner
// Flags: --crankshaft
// Flags: --opt
function f(x, y) { return x + y; }

View File

@ -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 --crankshaft
// Flags: --allow-natives-syntax --opt
function div(g) {
return (g/-1) ^ 1

View File

@ -26,7 +26,7 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax
// Flags: --nostress-opt --crankshaft
// Flags: --nostress-opt --opt
// Ensure that ElementsKind transitions in various situations are hoisted (or
// not hoisted) correctly, don't change the semantics programs and don't trigger

View File

@ -3,7 +3,7 @@
// found in the LICENSE file.
// Flags: --allow-natives-syntax --noverify-heap --noenable-slow-asserts
// Flags: --crankshaft --no-always-opt
// Flags: --opt --no-always-opt
// --noverify-heap and --noenable-slow-asserts are set because the test is too
// slow with it on.

View File

@ -3,7 +3,7 @@
// found in the LICENSE file.
// Flags: --turbo --turbo-escape --allow-natives-syntax --no-always-opt
// Flags: --crankshaft --turbo-filter=*
// Flags: --opt --turbo-filter=*
"use strict";

View File

@ -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 --crankshaft
// Flags: --allow-natives-syntax --opt
// Check that the following functions are optimizable.
var functions = [ f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14,

View File

@ -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 --crankshaft
// Flags: --allow-natives-syntax --opt
"use strict";

View File

@ -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 --crankshaft
// Flags: --allow-natives-syntax --opt
// Test functionality of block scopes.
// Hoisting of var declarations.

View File

@ -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 --crankshaft
// Flags: --allow-natives-syntax --opt
// Test functionality of block scopes.
"use strict";

View File

@ -3,7 +3,7 @@
// found in the LICENSE file.
// Flags: --allow-natives-syntax --nostress-opt --track-field-types
// Flags: --crankshaft --no-always-opt
// Flags: --opt --no-always-opt
(function() {
var o = { text: "Hello World!" };

View File

@ -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 --crankshaft
// Flags: --nocollect-maps --opt
// We specify max-opt-count because we opt/deopt the same function many
// times.

View File

@ -3,7 +3,7 @@
// found in the LICENSE file.
// Flags: --harmony-do-expressions --allow-natives-syntax --no-always-opt
// Flags: --crankshaft
// Flags: --opt
function returnValue(v) { return v; }
function MyError() {}

View File

@ -3,7 +3,7 @@
// found in the LICENSE file.
// Flags: --allow-natives-syntax
// Flags: --no-stress-opt --crankshaft --no-always-opt
// Flags: --no-stress-opt --opt --no-always-opt
// --nostress-opt is specified because the test corrupts the "pristine"
// array prototype chain by storing an element, and this is tracked

View File

@ -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 --crankshaft
// Flags: --allow-natives-syntax --opt
var o = {

View File

@ -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 --crankshaft --no-always-opt
// Flags: --allow-natives-syntax --opt --no-always-opt
var s = Symbol("foo");

View File

@ -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 --crankshaft
// Flags: --allow-natives-syntax --nouse-inlining --opt
// Test for negative zero that doesn't need bail out

View File

@ -134,7 +134,7 @@ var V8OptimizationStatus = {
kInterpreted: 1 << 6
};
// Returns true if --no-crankshaft mode is on.
// Returns true if --no-opt mode is on.
var isNeverOptimize;
// Returns true if --always-opt mode is on.
@ -550,10 +550,10 @@ var failWithMessage;
assertOptimized = function assertOptimized(fun, sync_opt, name_opt) {
if (sync_opt === undefined) sync_opt = "";
var opt_status = OptimizationStatus(fun, sync_opt);
// Tests that use assertOptimized() do not make sense if --no-crankshaft
// option is provided. Such tests must add --crankshaft to flags comment.
// Tests that use assertOptimized() do not make sense if --no-opt
// option is provided. Such tests must add --opt to flags comment.
assertFalse((opt_status & V8OptimizationStatus.kNeverOptimize) !== 0,
"test does not make sense with --no-crankshaft");
"test does not make sense with --no-opt");
assertTrue((opt_status & V8OptimizationStatus.kIsFunction) !== 0, name_opt);
if ((opt_status & V8OptimizationStatus.kMaybeDeopted) !== 0) {
// When --deopt-every-n-times flag is specified it's no longer guaranteed

View File

@ -394,7 +394,7 @@
# Flaky with baseline?
'regress/regress-2185-2': [SKIP],
# Slow tests with --nocrankshaft.
# Slow tests with --noopt.
'compiler/osr-one': [PASS, SLOW],
'compiler/osr-two': [PASS, SLOW],
'wasm/grow-memory': [PASS, SLOW],

View File

@ -3,7 +3,7 @@
// found in the LICENSE file.
// MODULE
// Flags: --allow-natives-syntax --turbo --crankshaft --turbo-filter=*
// Flags: --allow-natives-syntax --turbo --opt --turbo-filter=*
export let x = 0;
function foo() { x++ };

View File

@ -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 --crankshaft --no-always-opt
// Flags: --allow-natives-syntax --opt --no-always-opt
function o1() {
}

View File

@ -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 --crankshaft --noalways-opt
// Flags: --allow-natives-syntax --opt --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"));

View File

@ -116,7 +116,7 @@ function construct_doubles() {
return a;
}
// Test transition chain SMI->DOUBLE->FAST (crankshafted function will
// Test transition chain SMI->DOUBLE->FAST (optimized function will
// transition to FAST directly).
function convert_mixed(array, value, kind) {
array[1] = value;

View File

@ -83,7 +83,7 @@ function testPolymorphicLoads() {
load = make_polymorphic_load_function();
assertEquals(undefined, load(sparse_object_array, new Object()));
// Try with crankshaft.
// Try with optimizing compiler.
load = make_polymorphic_load_function();
%OptimizeFunctionOnNextCall(load);
assertEquals(1, load(object_array, 1));

View File

@ -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 --crankshaft --no-always-opt
// Flags: --allow-natives-syntax --opt --no-always-opt
function mul(x, y) {
return (x * y) | 0;

View File

@ -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 --crankshaft
// Flags: --allow-natives-syntax --opt
// 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

View File

@ -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 --crankshaft
// Flags: --allow-natives-syntax --opt
var foo = (function() {
return eval("(function bar() { return 1; })");

View File

@ -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 --crankshaft
// Flags: --allow-natives-syntax --expose-gc --opt
function simple() {
return simple_two_args(0, undefined);

View File

@ -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 --crankshaft
// Flags: --allow-natives-syntax --opt
function f() {
assertEquals(-1.0, Math.round(-1.5));

View File

@ -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 --crankshaft
// Flags: --allow-natives-syntax --opt
// The type feedback oracle had a bug when retrieving the map from an IC
// starting with a negative lookup.

View File

@ -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 --crankshaft
// Flags: --use-osr --allow-natives-syntax --ignition-osr --opt
function f() {
do {

View File

@ -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 --crankshaft
// Flags: --allow-natives-syntax --opt
function foo(a) {
var sum = 0;

View File

@ -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 --crankshaft
// Flags: --use-osr --allow-natives-syntax --opt
var o1 = {a : 10};
var o2 = { };

View File

@ -3,7 +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
// Flags: --opt --no-always-opt
// Begin stripped down and modified version of mjsunit.js for easy minimization in CF.
function MjsUnitAssertionError(message) {}

View File

@ -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 --crankshaft
// Flags: --allow-natives-syntax --opt
function foo(a) {
for (var d in a) {

View File

@ -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 --crankshaft --no-always-opt
// Flags: --allow-natives-syntax --opt --no-always-opt
function getobj() {
return { bar : function() { return 0}};

View File

@ -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 --crankshaft --no-always-opt
// Flags: --allow-natives-syntax --opt --no-always-opt
var calls = 0;

View File

@ -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 --crankshaft --no-always-opt
// Flags: --allow-natives-syntax --expose-gc --opt --no-always-opt
var assertDoesNotThrow;
var assertInstanceof;

View File

@ -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 --crankshaft
// Flags: --allow-natives-syntax --opt
function bar(a) {
var x = a[0];

View File

@ -5,7 +5,7 @@
// Crankshaft changes the stack usage and messes up the binary search for the
// stack depth that causes a stack overflow. The issue only arises without
// regexp optimization, which can happen on pages that create a lot of regexps.
// Flags: --nocrankshaft --noregexp-optimization
// Flags: --noopt --noregexp-optimization
// Should not crash with a stack overflow in the regexp compiler, even when the
// JS has used most of the stack.

View File

@ -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 --crankshaft
// Flags: --allow-natives-syntax --opt
function foo(a, b) {
return a + "0123456789012";

View File

@ -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 --crankshaft
// Flags: --allow-natives-syntax --opt
function foo(a) {
"use strict";

View File

@ -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 --crankshaft
// Flags: --allow-natives-syntax --opt
(function() {
function eq(a, b) { return a == b; }

View File

@ -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 --crankshaft --no-always-opt
// Flags: --validate-asm --allow-natives-syntax --opt --no-always-opt
// /v8/test/mjsunit/regress/regress-crbug-431602.js
// /v8/test/mjsunit/lazy-load.js

View File

@ -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: --nocrankshaft
// Flags: --noopt
var functionToCatch;
var lineNumber;

View File

@ -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 --nocrankshaft
// Flags: --allow-natives-syntax --noopt
function makeConstructor() {
return function() {

View File

@ -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: --nocrankshaft
// Flags: --noopt
(function(){
var f = function(arg) {

View File

@ -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 --crankshaft --no-always-opt
// Flags: --allow-natives-syntax --opt --no-always-opt
assertSame = function assertSame() {
if (found === expected) {

View File

@ -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 --crankshaft
// Flags: --allow-natives-syntax --opt
(function() {
var key = "s";

View File

@ -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 --crankshaft
// Flags: --allow-natives-syntax --opt
// The Crankshaft fast case for String.fromCharCode used to unconditionally
// deoptimize on non int32 indices.

View File

@ -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 --crankshaft --no-always-opt
// Flags: --allow-natives-syntax --opt --no-always-opt
var global = {}

View File

@ -28,7 +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
// Flags: --opt --no-always-opt
if (!%IsConcurrentRecompilationSupported()) {
print("Concurrent recompilation is disabled. Skipping this test.");

View File

@ -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 --crankshaft
// Flags: --allow-natives-syntax --opt
var c = { x: 2, y: 1 };

View File

@ -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 --crankshaft
// Flags: --allow-natives-syntax --opt
// Test that we do not confuse the first local and the first parameter
// when gathering type information.

Some files were not shown because too many files have changed in this diff Show More