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

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

Issue 12220150: When canonicalizing branch on StrictCompare ensure that branch gets correct environment. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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
OLDNEW
(Empty)
1 // Copyright (c) 2013, 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 that branch fusion correctly sets branch environment for comparisons
5 // that require unboxing.
6
7 barDouble(a, b) => a == b;
8 fooDouble(a, b) => barDouble(a, b) ? 1 : 0;
9
10 barMint(a, b) => a == b;
11 fooMint(a, b) => barMint(a, b) ? 1 : 0;
12
13 main () {
14 final a = 1.0;
15 final b = 1 << 62;
16 for (var i = 0; i < 10000; i++) {
17 Expect.equals(1, fooDouble(a, a));
18 Expect.equals(0, fooMint(b, 0));
Florian Schneider 2013/02/13 11:22:11 Thanks for adding the test. Do we have a test cove
19 }
20 }
21
22
23
OLDNEW
« runtime/vm/intermediate_language.cc ('K') | « runtime/vm/intermediate_language.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698