Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | |
| 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. | |
| 4 // Test deoptimization on an optimistically hoisted smi check. | |
|
Florian Schneider
2016/12/20 00:01:08
Comment not matching here.
| |
| 5 // VMOptions=--deoptimize_every=10 --optimization-counter-threshold=10 --no-bac kground-compilation --enable-inlining-annotations | |
|
Florian Schneider
2016/12/20 00:01:08
Left-over flag? I don't see inlining annotations h
| |
| 6 | |
| 7 // Test that lazy deoptimization on stack checks does not damage unoptimized | |
| 8 // frame. | |
| 9 | |
| 10 import 'package:expect/expect.dart'; | |
| 11 | |
| 12 | |
| 13 foo() { | |
| 14 var a = 0; | |
| 15 var b = 1; | |
| 16 var c = 2; | |
| 17 var d = 3; | |
| 18 var e = 4; | |
| 19 for (var i = 0; i < 10; i++) { | |
| 20 a++; | |
| 21 b++; | |
| 22 c++; | |
| 23 d++; | |
| 24 e++; | |
| 25 } | |
| 26 Expect.equals(10, a); | |
| 27 Expect.equals(11, b); | |
| 28 Expect.equals(12, c); | |
| 29 Expect.equals(13, d); | |
| 30 Expect.equals(14, e); | |
| 31 } | |
| 32 | |
| 33 main() { | |
| 34 for (var i = 0; i < 10; ++i) { | |
| 35 foo(); | |
| 36 } | |
| 37 } | |
| 38 | |
| 39 | |
| OLD | NEW |