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

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

Issue 8430007: Proper reg for deoptiomization. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 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
« no previous file with comments | « runtime/vm/opt_code_generator_ia32.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/src/DeoptimizationTest.dart
diff --git a/tests/language/src/DeoptimizationTest.dart b/tests/language/src/DeoptimizationTest.dart
index 7f138f4cc61c9f5e695330b3db53bc37d406c42d..bad492eca47222f7a863c35af986f67716729c80 100644
--- a/tests/language/src/DeoptimizationTest.dart
+++ b/tests/language/src/DeoptimizationTest.dart
@@ -54,6 +54,19 @@ class SmiBinop {
// Deoptimize.
Expect.equals(2.0, subWithLiteral(3.0));
}
+
+ static mul(x) {
+ return x * 1024;
+ }
+
+ static void smiBinopOverflowTest() {
+ final int big = 536870912;
+ for (int i = 0; i < 2000; i++) {
+ Expect.equals(1024, mul(1));
+ }
+ // Deoptimize by overflow.
+ Expect.equals(1024 * big, mul(big));
+ }
}
@@ -164,6 +177,7 @@ class DeoptimizationTest {
test4();
SmiCompares.smiComparesTest();
SmiBinop.smiBinopTest();
+ SmiBinop.smiBinopOverflowTest();
ObjectsEquality.objectsEqualityTest();
}
}
« no previous file with comments | « runtime/vm/opt_code_generator_ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698