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

Unified Diff: tests/language/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
Index: tests/language/src/DeoptimizationTest.dart
===================================================================
--- tests/language/src/DeoptimizationTest.dart (revision 2475)
+++ tests/language/src/DeoptimizationTest.dart (working copy)
@@ -168,8 +168,20 @@
Expect.equals(true, compareDouble(1.0, 2));
}
+ static smiRightShift() {
regis 2011/12/15 22:18:43 How about smiLeftShift()?
srdjan 2011/12/15 22:27:16 Once I do changes to the left shift. This CL chang
+ 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();
}
}
« tests/language/src/BitOperationsTest.dart ('K') | « tests/language/src/DeoptNoFeedbackTest.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698