Index: test/mjsunit/json-recursive.js |
diff --git a/test/mjsunit/regress/regress-2045.js b/test/mjsunit/json-recursive.js |
similarity index 84% |
copy from test/mjsunit/regress/regress-2045.js |
copy to test/mjsunit/json-recursive.js |
index 822ee1fa4641b4a0ba15eee2c2a2e59411db7d4d..f28cce8139f917aec17e54dc62916274b08ed3f6 100644 |
--- a/test/mjsunit/regress/regress-2045.js |
+++ b/test/mjsunit/json-recursive.js |
@@ -25,25 +25,20 @@ |
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
-// Flags: --allow-natives-syntax |
-function foo() { |
- assertEquals(2, arguments.length); |
+var a = {}; |
+for (i = 0; i < 10000; i++) { |
+ var current = {}; |
+ current.a = a; |
+ a = current; |
} |
-function bar() { |
- G.x; |
- return foo.apply(this, arguments); |
+function rec(a,b,c,d,e,f,g,h,i,j,k,l,m,n) { |
+ JSON.stringify(a); |
+ rec(a,b,c,d,e,f,g,h,i,j,k,l,m,n); |
} |
-function baz() { |
- return bar(1, 2); |
-} |
+assertThrows( |
+ function() { rec(1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4) }, |
+ RangeError); |
-G = {x: 0}; |
-baz(); |
-baz(); |
-%OptimizeFunctionOnNextCall(baz); |
-baz(); |
-delete G.x; |
-baz(); |