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

Side by Side Diff: test/mjsunit/regress/regress-crbug-614727.js

Issue 2054853002: Fix arguments object stubs for large arrays. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Port to most architectures. Created 4 years, 6 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 unified diff | Download patch
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 "use strict";
6
7 function f(a, b, c) { return arguments }
8 function g(...args) { return args }
9
10 // On 64-bit machine this produces a 768K array which is sufficiently small to
11 // not cause a stack overflow, but big enough to move the allocated arguments
12 // object into large object space (kMaxRegularHeapObjectSize == 600K).
13 var length = Math.pow(2, 15) * 3;
14 var args = new Array(length);
15 assertEquals(length, f.apply(null, args).length);
16 assertEquals(length, g.apply(null, args).length);
17
18 // On 32-bit machines this produces an equally sized array, however it might in
19 // turn trigger a stack overflow on 64-bit machines, which we need to catch.
20 var length = Math.pow(2, 16) * 3;
21 var args = new Array(length);
22 try { f.apply(null, args) } catch(e) {}
23 try { g.apply(null, args) } catch(e) {}
OLDNEW
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698