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

Unified Diff: test/mjsunit/regress/regress-crbug-150545.js

Issue 10938016: Fix lost arguments dropping in HLeaveInlined. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments by Jakob Kummerow. Created 8 years, 3 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/x64/lithium-x64.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/regress/regress-crbug-150545.js
diff --git a/test/mjsunit/compiler/optimized-closures.js b/test/mjsunit/regress/regress-crbug-150545.js
similarity index 75%
copy from test/mjsunit/compiler/optimized-closures.js
copy to test/mjsunit/regress/regress-crbug-150545.js
index eaf75f8d00ccd9123ed0f5232a91137845fc3973..68efdbf2d7ea4d5be3152cb14a8825fc46ae6409 100644
--- a/test/mjsunit/compiler/optimized-closures.js
+++ b/test/mjsunit/regress/regress-crbug-150545.js
@@ -27,31 +27,27 @@
// Flags: --allow-natives-syntax
-// Test optimized closures.
-
-var a = new Array(100);
-
-function f() {
- var x=0;
- for (var i=0; i<100; i++) {
- var g = function goo(y) {
- function h() {
- if (goo.arguments[0] == 23) return -42;
- return 42;
- }
- return x + y + h(y);
- }
- g(0);
- %OptimizeFunctionOnNextCall(g);
- a[i] = g(i);
+// Test that we do not generate OSR entry points that have an arguments
+// stack height different from zero. The OSR machinery cannot generate
+// frames for that.
+
+(function() {
+ "use strict";
+
+ var instantReturn = false;
+ function inner() {
+ if (instantReturn) return;
+ assertSame(3, arguments.length);
+ assertSame(1, arguments[0]);
+ assertSame(2, arguments[1]);
+ assertSame(3, arguments[2]);
}
-}
-
-f();
-assertEquals(42, a[0]);
-assertEquals(49, a[7]);
-assertEquals(-19, a[23]);
-
-
+ function outer() {
+ inner(1,2,3);
+ // Trigger OSR.
+ while (%GetOptimizationStatus(outer) == 2) {}
+ }
+ outer();
+})();
« no previous file with comments | « src/x64/lithium-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698