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

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

Issue 177293009: Handle arguments objects in frame when materializing arguments (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
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
« src/deoptimizer.cc ('K') | « src/deoptimizer.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-347262.js
diff --git a/test/mjsunit/compiler/alloc-number-debug.js b/test/mjsunit/regress/regress-347262.js
similarity index 75%
copy from test/mjsunit/compiler/alloc-number-debug.js
copy to test/mjsunit/regress/regress-347262.js
index ccfcc0c185a6d29c0acfc3c217276434b71f130a..17c2c88870141e2203c442c9f0080843b157483e 100644
--- a/test/mjsunit/compiler/alloc-number-debug.js
+++ b/test/mjsunit/regress/regress-347262.js
@@ -27,18 +27,36 @@
// Flags: --allow-natives-syntax
-// Try to get a GC because of a heap number allocation while we
-// have live values (o) in a register.
-function f(o) {
- var x = 1.5;
- var y = 2.5;
- for (var i = 1; i < 3; i += 1) {
- %SetAllocationTimeout(1, 0, false);
- o.val = x + y + i;
- %SetAllocationTimeout(-1, -1, true);
+(function ArgumentsObjectWithOtherArgumentsInFrame() {
+ function g() {
+ return g.arguments;
}
- return o;
-}
-var o = { val: 0 };
-f(o);
+ 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)));
Michael Starzinger 2014/02/27 14:37:40 nit: Obsolete parens around f(0) here.
+})();
« src/deoptimizer.cc ('K') | « src/deoptimizer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698