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

Unified Diff: tests/language/mint_arithmetic_test.dart

Issue 18563006: More tests updated to optimize code (Part 2). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 5 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/megamorphic_no_such_method_test.dart ('k') | tests/language/mint_compares_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/mint_arithmetic_test.dart
===================================================================
--- tests/language/mint_arithmetic_test.dart (revision 24922)
+++ tests/language/mint_arithmetic_test.dart (working copy)
@@ -1,6 +1,7 @@
// Copyright (c) 2012, 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.
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr
import "package:expect/expect.dart";
@@ -14,7 +15,7 @@
return t == b;
}
var x = 0xffffffff;
- for (var i = 0; i < 10000; i++) f(x, 0);
+ for (var i = 0; i < 20; i++) f(x, 0);
Expect.equals(true, f(x, 0));
Expect.equals(false, f(x, -1)); // Triggers deoptimization.
} finally { }
@@ -26,7 +27,7 @@
return a & b;
}
var x = 0xffffffff;
- for (var i = 0; i < 10000; i++) f(x, x);
+ for (var i = 0; i < 20; i++) f(x, x);
Expect.equals(x, f(x, x));
Expect.equals(1234, f(0xffffffff, 1234));
Expect.equals(0x100000001, f(0x100000001,-1));
@@ -44,7 +45,7 @@
return t;
}
var x = 0xffffffff;
- for (var i = 0; i < 10000; i++) f(x, x);
+ for (var i = 0; i < 20; i++) f(x, x);
Expect.equals(0, f(x, x));
Expect.equals(-x - 1, f(x, -1));
var y = 0xffffffffffffffff;
@@ -60,7 +61,7 @@
return t;
}
var x = 0xffffffff;
- for (var i = 0; i < 10000; i++) f(x, x);
+ for (var i = 0; i < 20; i++) f(x, x);
Expect.equals(x, f(x, x));
Expect.equals(-1, f(x, -1));
var y = 0xffffffffffffffff;
@@ -71,7 +72,7 @@
test_func(x, y) => (x & y) + 1.0;
test_mint_double_op() {
- for (var i=0; i<10000; i++) test_func(4294967295, 1);
+ for (var i = 0; i < 20; i++) test_func(4294967295, 1);
Expect.equals(2.0, test_func(4294967295, 1));
}
« no previous file with comments | « tests/language/megamorphic_no_such_method_test.dart ('k') | tests/language/mint_compares_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698