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

Unified Diff: test/mjsunit/regress/regress-347262.js

Issue 185653004: Experimental parser: merge to r19637 (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
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/regress/regress-346343.js ('k') | test/mjsunit/regress/regress-347530.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/regress/regress-347262.js
diff --git a/test/mjsunit/regress/regress-331416.js b/test/mjsunit/regress/regress-347262.js
similarity index 75%
copy from test/mjsunit/regress/regress-331416.js
copy to test/mjsunit/regress/regress-347262.js
index 0c60fced14e1c185919985fd011c9ca46d93ff3f..76bc34a2cdc068057516617671e01c1173c7b6f3 100644
--- a/test/mjsunit/regress/regress-331416.js
+++ b/test/mjsunit/regress/regress-347262.js
@@ -27,26 +27,36 @@
// Flags: --allow-natives-syntax
-function load(a, i) {
- return a[i];
-}
-load([1, 2, 3], "length");
-load(3);
-load([1, 2, 3], 3);
-load(0, 0);
-%OptimizeFunctionOnNextCall(load);
-assertEquals(2, load([1, 2, 3], 1));
-assertEquals(undefined, load(0, 0));
+(function ArgumentsObjectWithOtherArgumentsInFrame() {
+ function g() {
+ return g.arguments;
+ }
-function store(a, i, x) {
- a[i] = x;
-}
-store([1, 2, 3], "length", 3);
-store(3);
-store([1, 2, 3], 3, 3);
-store(0, 0, 1);
-%OptimizeFunctionOnNextCall(store);
-var a = [1, 2, 3];
-store(a, 1, 1);
-assertEquals(1, a[1]);
-store(0, 0, 1);
+ function f(x) {
+ g();
+ return arguments[0];
+ }
+ f();
+ f();
+ %OptimizeFunctionOnNextCall(f);
+ f();
+})();
+
+
+(function ArgumentsObjectWithOtherArgumentsDeopt() {
+ function g(y) {
+ y.o2 = 2;
+ return g.arguments;
+ }
+
+ function f(x) {
+ var o1 = { o2 : 1 };
+ var a = g(o1);
+ o1.o2 = 3;
+ return arguments[0] + a[0].o2;
+ }
+ f(0);
+ f(0);
+ %OptimizeFunctionOnNextCall(f);
+ assertEquals(3, f(0));
+})();
« no previous file with comments | « test/mjsunit/regress/regress-346343.js ('k') | test/mjsunit/regress/regress-347530.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698