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

Unified Diff: test/mjsunit/compiler/osr-warm.js

Issue 151603008: A64: Synchronize with r16599. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 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 | « test/mjsunit/compiler/osr-uint32.js ('k') | test/mjsunit/regress/regress-map-invalidation-2.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/compiler/osr-warm.js
diff --git a/test/mjsunit/compiler/osr-with-args.js b/test/mjsunit/compiler/osr-warm.js
similarity index 86%
copy from test/mjsunit/compiler/osr-with-args.js
copy to test/mjsunit/compiler/osr-warm.js
index 44fa1cb2cf9d0a1fcf3689b03fc01cc4e9f4eafc..65ada1e114856109ab2261d0bc670bf59daa983c 100644
--- a/test/mjsunit/compiler/osr-with-args.js
+++ b/test/mjsunit/compiler/osr-warm.js
@@ -27,18 +27,24 @@
// Flags: --use-osr
-function f() {
- var sum = 0;
- for (var i = 0; i < 1000000; i++) {
- var t = arguments[0] + 2;
- var x = arguments[1] + 2;
- var y = t + x + 5;
- var z = y + 3;
- sum += z;
+function f1(x) {
+ while (x > 0) {
+ x--;
}
- return sum;
+ return x;
}
-for (var i = 0; i < 4; i++) {
- assertEquals(17000000, f(2, 3));
+assertEquals(0, f1(1));
+assertEquals(0, f1(10000000));
+
+function f2(x) {
+ var sum = 1;
+ while (x > 0) {
+ x--;
+ sum++;
+ }
+ return sum;
}
+
+assertEquals(2, f2(1));
+assertEquals(10000001, f2(10000000));
« no previous file with comments | « test/mjsunit/compiler/osr-uint32.js ('k') | test/mjsunit/regress/regress-map-invalidation-2.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698