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

Side by Side Diff: frog/tests/leg_only/nan_negate_test.dart

Issue 10332088: Undo optimization in cases where NaN might be involved. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Now with test. Created 8 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | lib/compiler/implementation/ssa/codegen.dart » ('j') | 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 // Don't convert !(a op b) til (a neg-op b) when a or b might be NaN.
6 main() {
7 Expect.isFalse(double.NAN >= 0);
8 Expect.isTrue(!(double.NAN < 0));
9
10 Expect.isFalse(double.NAN <= 0);
11 Expect.isTrue(!(double.NAN > 0));
12
13 Expect.isFalse(double.NAN < 0);
14 Expect.isTrue(!(double.NAN >= 0));
15
16 Expect.isFalse(double.NAN > 0);
17 Expect.isTrue(!(double.NAN <= 0));
18
19 Expect.isFalse(double.NAN == 0);
20 Expect.isTrue(!(double.NAN != 0));
21
22 Expect.isFalse(double.NAN != 0);
23 Expect.isTrue(!(double.NAN == 0));
24
25 Expect.isFalse(double.NAN === 0);
26 Expect.isFalse(!(double.NAN !== 0));
27
28 Expect.isFalse(double.NAN !== 0);
29 Expect.isFalse(!(double.NAN === 0));
30
31 Expect.isFalse(0 >= double.NAN);
32 Expect.isTrue(!(0 < double.NAN));
33
34 Expect.isFalse(0 <= double.NAN);
35 Expect.isTrue(!(0 > double.NAN));
36
37 Expect.isFalse(0 < double.NAN);
38 Expect.isTrue(!(0 >= double.NAN));
39
40 Expect.isFalse(0 > double.NAN);
41 Expect.isTrue(!(0 <= double.NAN));
42
43 Expect.isFalse(0 == double.NAN);
44 Expect.isTrue(!(0 != double.NAN));
45
46 Expect.isFalse(0 != double.NAN);
47 Expect.isTrue(!(0 == double.NAN));
48
49 Expect.isFalse(0 === double.NAN);
50 Expect.isFalse(!(0 !== double.NAN));
51
52 Expect.isFalse(0 !== double.NAN);
53 Expect.isFalse(!(0 === double.NAN));
54 }
OLDNEW
« no previous file with comments | « no previous file | lib/compiler/implementation/ssa/codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698