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 import "package:expect/expect.dart"; |
| 6 |
5 constants() { | 7 constants() { |
6 Expect.equals(0, 499 >> 33); | 8 Expect.equals(0, 499 >> 33); |
7 Expect.equals(0, (499 << 33) & 0xFFFFFFFF); | 9 Expect.equals(0, (499 << 33) & 0xFFFFFFFF); |
8 } | 10 } |
9 | 11 |
10 foo(i) { | 12 foo(i) { |
11 if (i != 0) { | 13 if (i != 0) { |
12 y--; | 14 y--; |
13 foo(i - 1); | 15 foo(i - 1); |
14 y++; | 16 y++; |
(...skipping 22 matching lines...) Expand all Loading... |
37 } | 39 } |
38 } | 40 } |
39 | 41 |
40 // JavaScript shifts by the amount modulo 32. That is x << y is equivalent to | 42 // JavaScript shifts by the amount modulo 32. That is x << y is equivalent to |
41 // x << (y & 0x1F). Dart does not. | 43 // x << (y & 0x1F). Dart does not. |
42 main() { | 44 main() { |
43 constants(); | 45 constants(); |
44 interceptors(); | 46 interceptors(); |
45 speculative(); | 47 speculative(); |
46 } | 48 } |
OLD | NEW |