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

Unified Diff: tests/language/deopt_hoisted_smi_check_vm_test.dart

Issue 12690004: Run type propagation after LICM to ensure correct reaching types for hoisted values. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: remove test file Created 7 years, 9 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
« no previous file with comments | « tests/language/deopt_hoisted_smi_check_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/deopt_hoisted_smi_check_vm_test.dart
diff --git a/tests/language/deopt_hoisted_smi_check_test.dart b/tests/language/deopt_hoisted_smi_check_vm_test.dart
similarity index 57%
rename from tests/language/deopt_hoisted_smi_check_test.dart
rename to tests/language/deopt_hoisted_smi_check_vm_test.dart
index 5ed53374c15eaa54512c87b62008ba1d19ec0854..6fab79ca99d3dc081b4248f14fe6dd4dbe103826 100644
--- a/tests/language/deopt_hoisted_smi_check_test.dart
+++ b/tests/language/deopt_hoisted_smi_check_vm_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
+// 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 deoptimization on an optimistically hoisted smi check.
@@ -13,7 +13,20 @@ sum(a, b) {
return sum;
}
+mask(x) {
+ for (var i = 0; i < 10; i++) {
+ if (i == 1) {
+ return x;
+ }
+ x = x & 0xFF;
+ }
+}
+
main() {
- for (var i = 0; i < 2000; i++) Expect.equals(9, sum(1, 2));
+ for (var i = 0; i < 2000; i++) {
+ Expect.equals(9, sum(1, 2));
+ Expect.equals(0xAB, mask(0xAB));
+ }
Expect.equals(9, sum(1.0, 2.0)); // Passing double causes deoptimization.
+ Expect.equals(0xAB, mask(0x1000000AB));
}
« no previous file with comments | « tests/language/deopt_hoisted_smi_check_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698