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

Side by Side Diff: tests/language/bit_shift_test.dart

Issue 1377113004: VM: Support phis with pair representations. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: rebased Created 5 years, 2 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
« no previous file with comments | « runtime/vm/intermediate_language_mips.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // VMOptions=--optimization-counter-threshold=10
4 5
5 import "package:expect/expect.dart"; 6 import "package:expect/expect.dart";
6 7
7 constants() { 8 constants() {
8 Expect.equals(0, 499 >> 33); 9 Expect.equals(0, 499 >> 33);
9 Expect.equals(0, (499 << 33) & 0xFFFFFFFF); 10 Expect.equals(0, (499 << 33) & 0xFFFFFFFF);
10 Expect.equals(0, (499 << 32) >> 65); 11 Expect.equals(0, (499 << 32) >> 65);
11 Expect.equals(0, ((499 << 32) << 65) & 0xFFFFFFFFFFFFFFFF); 12 Expect.equals(0, ((499 << 32) << 65) & 0xFFFFFFFFFFFFFFFF);
12 } 13 }
13 14
(...skipping 28 matching lines...) Expand all
42 Expect.equals(0, a >> 33); 43 Expect.equals(0, a >> 33);
43 Expect.equals(0, (a << 33) & 0xFFFFFFFF); 44 Expect.equals(0, (a << 33) & 0xFFFFFFFF);
44 Expect.equals(0, b >> 65); 45 Expect.equals(0, b >> 65);
45 Expect.equals(0, (b << 65) & 0xFFFFFFFFFFFFFFFF); 46 Expect.equals(0, (b << 65) & 0xFFFFFFFFFFFFFFFF);
46 } 47 }
47 } 48 }
48 49
49 // JavaScript shifts by the amount modulo 32. That is x << y is equivalent to 50 // JavaScript shifts by the amount modulo 32. That is x << y is equivalent to
50 // x << (y & 0x1F). Dart does not. 51 // x << (y & 0x1F). Dart does not.
51 main() { 52 main() {
52 constants(); 53 for (var i = 0; i < 10; ++i) {
53 interceptors(); 54 constants();
54 speculative(); 55 interceptors();
56 speculative();
57 }
55 } 58 }
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698