2ba80497a7
We cannot allocate large arrays exceeding the size of kMaxRegularHeapObjectSize in young space. Bailout of optimization in such cases. Bug: chromium:1105746 Change-Id: I4f7357c2dd7b3e70d747f9067660725ecf6ae768 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2300481 Reviewed-by: Nico Hartmann <nicohartmann@chromium.org> Commit-Queue: Mythri Alle <mythria@chromium.org> Cr-Commit-Position: refs/heads/master@{#68889}
25 lines
514 B
JavaScript
25 lines
514 B
JavaScript
// Copyright 2020 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.
|
|
|
|
// Flags: --allow-natives-syntax
|
|
'use strict'
|
|
|
|
function f() {
|
|
return arguments;
|
|
}
|
|
|
|
var arr = [];
|
|
arr.length=0x8000;
|
|
var g = f.bind(null,...arr);
|
|
|
|
function test() {
|
|
return g();
|
|
}
|
|
|
|
%PrepareFunctionForOptimization(f);
|
|
%PrepareFunctionForOptimization(test);
|
|
test();
|
|
%OptimizeFunctionOnNextCall(test);
|
|
assertEquals(test().length, arr.length);
|