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

Unified Diff: test/mjsunit/compiler/regress-shared-deopt.js

Issue 22796027: Merged r16273 into trunk branch. (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 7 years, 4 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 | « src/version.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/compiler/regress-shared-deopt.js
diff --git a/test/mjsunit/regress/regress-seqstrsetchar-ex3.js b/test/mjsunit/compiler/regress-shared-deopt.js
similarity index 77%
copy from test/mjsunit/regress/regress-seqstrsetchar-ex3.js
copy to test/mjsunit/compiler/regress-shared-deopt.js
index e2592a1615aa6bcfbbaa688319b8a0f6d34aa4a7..669e0e2f1de385214c3033b01924cc55d15e55e7 100644
--- a/test/mjsunit/regress/regress-seqstrsetchar-ex3.js
+++ b/test/mjsunit/compiler/regress-shared-deopt.js
@@ -27,19 +27,39 @@
// Flags: --allow-natives-syntax
+var soft = false;
+
+// disable optimization of this global
+soft = true;
+soft = false;
+soft = true;
+soft = false;
+
function test() {
- var string = %NewString(10, true);
- for (var i = 0; i < 10; i++) {
- %_OneByteSeqStringSetChar(string, i, 65);
- %_OneByteSeqStringSetChar(string, i, 66);
- }
- for (var i = 0; i < 10; i++) {
- assertEquals("B", string[i]);
+ var f4 = makeF(4);
+ var f5 = makeF(5);
+
+ function makeF(i) {
+ return function f(x) {
+ if (x == 0) return i;
+ if (i == 4) if (soft) print("wahoo" + i);
+ return f4(x - 1);
+ }
}
+
+ f4(9);
+ f4(11);
+ %OptimizeFunctionOnNextCall(f4);
+ f4(12);
+
+ f5(9);
+ f5(11);
+ %OptimizeFunctionOnNextCall(f5);
+ f5(12);
+
+ soft = true;
+ f4(1);
+ f5(9);
}
test();
-test();
-%OptimizeFunctionOnNextCall(test);
-test();
-
« no previous file with comments | « src/version.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698