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

Unified Diff: tests/language/vm/optimized_identical_test.dart

Issue 26451006: VM: Fix bug in canonicalization of identical in the optimizing compiler. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« runtime/vm/intermediate_language.cc ('K') | « runtime/vm/intermediate_language.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/vm/optimized_identical_test.dart
===================================================================
--- tests/language/vm/optimized_identical_test.dart (revision 0)
+++ tests/language/vm/optimized_identical_test.dart (revision 0)
@@ -0,0 +1,25 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+// Test various optimizations and deoptimizations of optimizing compiler..
+// VMOptions=--optimization-counter-threshold=10 --no-constant-propagation
+
+import "package:expect/expect.dart";
+
+// Test canonicalization of identical with double input.
+// Constant propagation is disabled so that canonicalization is run
+// one time less than usual.
+
+test(a) {
+ var dbl = a + 1.0;
+ if (!identical(dbl, true)) {
+ return "ok";
+ }
+ throw "fail";
+}
+
+main() {
+ for (var i = 0; i < 20; i++) test(0);
+ Expect.equals("ok", test(0));
+}
+
« 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