c5b52e798a
The builtin inlining for FunctionPrototypeCall has to consider the case where there is no new receiver to the call. It now does this by considering the new call args to be kNullOrUndefined instead of kAny. Drive-by cleanup of CallArguments to always consider the register count and not the argument count, unifying the with/without receiver correction for the list-of-regs and RegList cases. Bug: v8:7700 Change-Id: I7e8cb7e9d654fdfcbb8add80e7a0a01a39d36504 Fixed: chromium:1381663, chromium:1381665 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4008638 Commit-Queue: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Toon Verwaest <verwaest@chromium.org> Auto-Submit: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/main@{#84092}
17 lines
381 B
JavaScript
17 lines
381 B
JavaScript
// Copyright 2022 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: --maglev --allow-natives-syntax
|
|
|
|
function foo() {
|
|
try {
|
|
Map.prototype.delete.call();
|
|
} catch (e) {}
|
|
}
|
|
%PrepareFunctionForOptimization(foo);
|
|
foo();
|
|
foo();
|
|
%OptimizeMaglevOnNextCall(foo);
|
|
foo();
|