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

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

Issue 11262019: Intrinsify Mint/Smi combined comparisons by extending a Smi to a 64 bit integer and doing a 64-bit … (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/intrinsifier_ia32.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
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 // Test compares on 64-bit integers.
6
7
8 compareTest() {
9 Expect.isFalse(4294967296 < 6);
10 Expect.isFalse(4294967296 < 4294967296);
11 Expect.isFalse(4294967296 <= 6);
12 Expect.isTrue(4294967296 <= 4294967296);
13 Expect.isFalse(4294967296 < 4294967295);
14
15 Expect.isTrue(-4294967296 < 6);
16 Expect.isTrue(-4294967296 < 4294967296);
17 Expect.isTrue(-4294967296 <= 6);
18 Expect.isTrue(-4294967296 <= 4294967296);
19 Expect.isTrue(-4294967296 < 4294967295);
20
21 Expect.isFalse(4294967296 < -6);
22 Expect.isFalse(4294967296 <= -6);
23 Expect.isFalse(4294967296 < -4294967295);
24
25 Expect.isTrue(-4294967296 < -6);
26 Expect.isTrue(-4294967296 <= -6);
27 Expect.isTrue(-4294967296 < -4294967295);
28
29 Expect.isTrue(4294967296 > 6);
30 Expect.isFalse(4294967296 > 4294967296);
31 Expect.isTrue(4294967296 >= 6);
32 Expect.isTrue(4294967296 >= 4294967296);
33 Expect.isTrue(4294967296 > 4294967295);
34
35 Expect.isFalse(-4294967296 > 6);
36 Expect.isFalse(-4294967296 > 4294967296);
37 Expect.isFalse(-4294967296 >= 6);
38 Expect.isFalse(-4294967296 >= 4294967296);
39 Expect.isFalse(-4294967296 > 4294967295);
40
41 Expect.isTrue(4294967296 > -6);
42 Expect.isTrue(4294967296 >= -6);
43 Expect.isTrue(4294967296 > -4294967295);
44
45 Expect.isFalse(-4294967296 > -6);
46 Expect.isFalse(-4294967296 >= -6);
47 Expect.isFalse(-4294967296 > -4294967295);
48
49 Expect.isTrue(4294967296 < 184467440737095516150);
50 Expect.isTrue(-4294967296 < 184467440737095516150);
51 Expect.isFalse(4294967296 < -184467440737095516150);
52 Expect.isFalse(-4294967296 < -184467440737095516150);
53 }
54
55
56 main() {
57 for (var i = 0; i < 100; i++) {
58 compareTest();
59 }
60 }
OLDNEW
« no previous file with comments | « runtime/vm/intrinsifier_ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698