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

Unified Diff: tests/standalone/src/DeoptimizationTest.dart

Issue 8972002: Use deopt on some instructions that have not collected type feedback when optimizing compierl kic... (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years 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/src/DeoptimizationTest.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/src/DeoptimizationTest.dart
===================================================================
--- tests/standalone/src/DeoptimizationTest.dart (revision 2475)
+++ tests/standalone/src/DeoptimizationTest.dart (working copy)
@@ -168,8 +168,20 @@
Expect.equals(true, compareDouble(1.0, 2));
}
+ static smiRightShift() {
+ int ShiftRight(int a, int b) { return a >> b; }
+
+ for (int i = 0; i < 2000; i++) {
+ var r = ShiftRight(10, 2);
+ Expect.equals(2, r);
+ }
+ // ShiftRight is optimized.
+ Expect.equals(0, ShiftRight(10, 64));
+ // Deoptimize ShiftRight because 'a' is a Mint.
+ var mint = 1 << 63;
+ Expect.equals(1 << 3, ShiftRight(mint, 60));
+ }
-
static void testMain() {
test1();
test2();
@@ -179,6 +191,7 @@
SmiBinop.smiBinopTest();
SmiBinop.smiBinopOverflowTest();
ObjectsEquality.objectsEqualityTest();
+ smiRightShift();
}
}
« no previous file with comments | « tests/language/src/DeoptimizationTest.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698