381b5437b2
CL https://codereview.chromium.org/2177273002 changed FastNewFunctionContextStub to take a number of slots parameter and in-doing so removed the maximum slot count for FastNewFunctionContextStub. This made it possible to create a closure which is larger than kMaxRegularHeapObjectSize and so can't be allocated by FastNewFunctionContextStub. Reintroduce FastNewFunctionContextStub::kMaxSlots (but make the limit much larger) to ensure we call the runtime for contexts which need to be allocated in the LO space. BUG=chromium:655573 Review-Url: https://codereview.chromium.org/2445703002 Cr-Commit-Position: refs/heads/master@{#40541}
17 lines
461 B
JavaScript
17 lines
461 B
JavaScript
// Copyright 2016 the V8 project authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
// Generate a function with a very large closure.
|
|
source = "(function() {\n"
|
|
for (var i = 0; i < 65000; i++) {
|
|
source += " var a_" + i + " = 0;\n";
|
|
}
|
|
source += " return function() {\n"
|
|
for (var i = 0; i < 65000; i++) {
|
|
source += "a_" + i + "++;\n";
|
|
}
|
|
source += "}})();\n"
|
|
|
|
eval(source);
|