455f9df04c
This CL changes certain frequently-called Array builtins to use CodeStubArguments rather than peek at the stack frames above array builtins to determine if options arguments have been passed into them. Previous failure likely due to unfortunate/unluckily timed GC that moved due to changed timing/allocation from this CL. Test mitigation for allocation-site-info.js included. BUG=v8:1956 LOG=N Review-Url: https://codereview.chromium.org/2829093004 Cr-Commit-Position: refs/heads/master@{#44998}
15 lines
393 B
JavaScript
15 lines
393 B
JavaScript
// Copyright 2017 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
|
|
|
|
var a = [0];
|
|
function bar(x) { return x; }
|
|
function foo() { return a.reduce(bar); }
|
|
|
|
assertEquals(0, foo());
|
|
assertEquals(0, foo());
|
|
%OptimizeFunctionOnNextCall(foo);
|
|
assertEquals(0, foo());
|