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

Side by Side Diff: tests/language/vm/regress_14903_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 // VMOptions=--optimization-counter-threshold=10 4 // VMOptions=--optimization-counter-threshold=10 --no-background-compilation
5 5
6 import "package:expect/expect.dart"; 6 import "package:expect/expect.dart";
7 7
8 // Test identical comparisons in optimized code. Registers must be preserved 8 // Test identical comparisons in optimized code. Registers must be preserved
9 // when calling the runtime. 9 // when calling the runtime.
10 10
11 cmp(a, b, c) { 11 cmp(a, b, c) {
12 var v = c + 1; 12 var v = c + 1;
13 var w = v + 1; 13 var w = v + 1;
14 var x = w + 1; 14 var x = w + 1;
15 var y = x + 1; 15 var y = x + 1;
16 var z = y + 1; 16 var z = y + 1;
17 if (identical(a, b)) { 17 if (identical(a, b)) {
18 c++; 18 c++;
19 } 19 }
20 return c + v + w + x + y + z; 20 return c + v + w + x + y + z;
21 } 21 }
22 22
23 23
24 main() { 24 main() {
25 var big = 100000000000000000000000000000000000; 25 var big = 100000000000000000000000000000000000;
26 var before = cmp(big, big, 0); 26 var before = cmp(big, big, 0);
27 Expect.equals(16, before); 27 Expect.equals(16, before);
28 for (var i = 0; i < 20; i++) cmp(big, big + 1, 0); 28 for (var i = 0; i < 20; i++) cmp(big, big + 1, 0);
29 Expect.equals(before, cmp(big, big, 0)); 29 Expect.equals(before, cmp(big, big, 0));
30 } 30 }
31 31
OLDNEW
« no previous file with comments | « tests/language/vm/optimized_testsmi_test.dart ('k') | tests/language/vm/regress_21245_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698