Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(58)

Side by Side Diff: tests/language/vm/optimized_identical_test.dart

Issue 1759973002: Add --no-background-compilation to tests that expect to run code in optimized form (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: more Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 // Test various optimizations and deoptimizations of optimizing compiler.. 4 // Test various optimizations and deoptimizations of optimizing compiler..
5 // VMOptions=--optimization-counter-threshold=10 --no-constant-propagation 5 // VMOptions=--optimization-counter-threshold=10 --no-constant-propagation --no- background-compilation
6 6
7 import "package:expect/expect.dart"; 7 import "package:expect/expect.dart";
8 8
9 // Test canonicalization of identical with double input. 9 // Test canonicalization of identical with double input.
10 // Constant propagation is disabled so that canonicalization is run 10 // Constant propagation is disabled so that canonicalization is run
11 // one time less than usual. 11 // one time less than usual.
12 12
13 test(a) { 13 test(a) {
14 var dbl = a + 1.0; 14 var dbl = a + 1.0;
15 if (!identical(dbl, true)) { 15 if (!identical(dbl, true)) {
16 return "ok"; 16 return "ok";
17 } 17 }
18 throw "fail"; 18 throw "fail";
19 } 19 }
20 20
21 Object Y = 1.0; 21 Object Y = 1.0;
22 22
23 test_object_type(x) => identical(x, Y); 23 test_object_type(x) => identical(x, Y);
24 24
25 main() { 25 main() {
26 for (var i = 0; i < 20; i++) test(0); 26 for (var i = 0; i < 20; i++) test(0);
27 Expect.equals("ok", test(0)); 27 Expect.equals("ok", test(0));
28 28
29 var x = 0.0 + 1.0; 29 var x = 0.0 + 1.0;
30 for (var i = 0; i < 20; i++) test_object_type(x); 30 for (var i = 0; i < 20; i++) test_object_type(x);
31 Expect.equals(true, test_object_type(x)); 31 Expect.equals(true, test_object_type(x));
32 } 32 }
33 33
OLDNEW
« no previous file with comments | « tests/language/vm/optimized_guarded_field_test.dart ('k') | tests/language/vm/optimized_polymorphic_list_access_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698