Chromium Code Reviews| 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.
|
| +})(); |