OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 // This test runs invokes getField and setField enough times to get cached | 5 // This test runs invokes getField and setField enough times to get cached |
6 // closures generated and with enough different field names to trip the path | 6 // closures generated and with enough different field names to trip the path |
7 // that flushes the closure cache. | 7 // that flushes the closure cache. |
8 | 8 |
9 library test.hot_get_field; | 9 library test.hot_get_field; |
10 | 10 |
| 11 @MirrorsUsed(targets: "test.hot_get_field") |
11 import 'dart:mirrors'; | 12 import 'dart:mirrors'; |
12 import 'package:expect/expect.dart'; | 13 import 'package:expect/expect.dart'; |
13 | 14 |
14 const int optimizationThreshold = 20; | 15 const int optimizationThreshold = 20; |
15 | 16 |
16 main() { | 17 main() { |
17 var digits = | 18 var digits = |
18 ['0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F']; | 19 ['0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F']; |
19 var symbols = new List(); | 20 var symbols = new List(); |
20 for (var high in digits) { | 21 for (var high in digits) { |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 var vF7; | 284 var vF7; |
284 var vF8; | 285 var vF8; |
285 var vF9; | 286 var vF9; |
286 var vFA; | 287 var vFA; |
287 var vFB; | 288 var vFB; |
288 var vFC; | 289 var vFC; |
289 var vFD; | 290 var vFD; |
290 var vFE; | 291 var vFE; |
291 var vFF; | 292 var vFF; |
292 } | 293 } |
OLD | NEW |