OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 // | 4 // |
5 // We are using --complete-timeline below to ensure that we get timeline events | 5 // We are using --complete-timeline below to ensure that we get timeline events |
6 // generated during all phases of compilation and deoptimization. | 6 // generated during all phases of compilation and deoptimization. |
7 // VMOptions=--optimization_counter_threshold=10 --no-use-osr --complete-timelin
e | 7 // VMOptions=--optimization_counter_threshold=10 --no-use-osr --complete-timelin
e --no-background_compilation |
8 | 8 |
9 import "package:expect/expect.dart"; | 9 import "package:expect/expect.dart"; |
10 | 10 |
11 test1(a, start, step, N) { | 11 test1(a, start, step, N) { |
12 var e; | 12 var e; |
13 for (var i = 0; i < N; i++) { | 13 for (var i = 0; i < N; i++) { |
14 e = a[start + i * step]; | 14 e = a[start + i * step]; |
15 } | 15 } |
16 return e; | 16 return e; |
17 } | 17 } |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 Expect.equals(a[a.length - 2], test4(a, b)); | 80 Expect.equals(a[a.length - 2], test4(a, b)); |
81 Expect.equals(a[a.length - 2], test5(a, b, 0)); | 81 Expect.equals(a[a.length - 2], test5(a, b, 0)); |
82 Expect.equals(6 , test6(a, 2, 2)); | 82 Expect.equals(6 , test6(a, 2, 2)); |
83 } | 83 } |
84 | 84 |
85 test1(a, 0, 2, a.length ~/ 2); | 85 test1(a, 0, 2, a.length ~/ 2); |
86 Expect.throws(() => test1(a, 1, 1, a.length)); | 86 Expect.throws(() => test1(a, 1, 1, a.length)); |
87 Expect.throws(() => test2(a, new List(a.length - 1))); | 87 Expect.throws(() => test2(a, new List(a.length - 1))); |
88 Expect.throws(() => test6(a, 4, 3)); | 88 Expect.throws(() => test6(a, 4, 3)); |
89 } | 89 } |
OLD | NEW |