Commit 4ec75d84 authored by Georg Neis's avatar Georg Neis Committed by Commit Bot

[turbofan] Fix JSStoreDataPropertyInLiteral reduction

... by making the operator have a control output, since we could deopt
after my last change.

Bug: chromium:995562, v8:7790
Change-Id: Ibc8c44708b4d43c4b2c3dfab2fd8fdf79c7ea671
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1762010
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: 's avatarMaya Lekova <mslekova@chromium.org>
Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63268}
parent 761addec
......@@ -309,6 +309,7 @@ void JSGenericLowering::LowerJSStoreGlobal(Node* node) {
void JSGenericLowering::LowerJSStoreDataPropertyInLiteral(Node* node) {
FeedbackParameter const& p = FeedbackParameterOf(node->op());
RelaxControls(node);
node->InsertInputs(zone(), 4, 2);
node->ReplaceInput(4, jsgraph()->HeapConstant(p.feedback().vector()));
node->ReplaceInput(5, jsgraph()->SmiConstant(p.feedback().index()));
......
......@@ -1836,6 +1836,7 @@ Reduction JSNativeContextSpecialization::ReducePropertyAccess(
node->opcode() == IrOpcode::kJSStoreNamed ||
node->opcode() == IrOpcode::kJSStoreNamedOwn ||
node->opcode() == IrOpcode::kJSGetIterator);
DCHECK_GE(node->op()->ControlOutputCount(), 1);
ProcessedFeedback const& feedback =
broker()->GetFeedbackForPropertyAccess(source, access_mode, static_name);
......
......@@ -802,7 +802,7 @@ const Operator* JSOperatorBuilder::StoreDataPropertyInLiteral(
IrOpcode::kJSStoreDataPropertyInLiteral,
Operator::kNoThrow, // opcode
"JSStoreDataPropertyInLiteral", // name
4, 1, 1, 0, 1, 0, // counts
4, 1, 1, 0, 1, 1, // counts
parameters); // parameter
}
......
......@@ -247,7 +247,7 @@ class FixedDoubleArray : public FixedArrayBase {
DECL_CAST(FixedDoubleArray)
// Maximally allowed length of a FixedArray.
// Maximally allowed length of a FixedDoubleArray.
static const int kMaxLength = (kMaxSize - kHeaderSize) / kDoubleSize;
static_assert(Internals::IsValidSmi(kMaxLength),
"FixedDoubleArray maxLength not a Smi");
......
// Copyright 2019 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
(function() {
function foo() {
return { [bla]() {} };
}
%PrepareFunctionForOptimization(foo);
%OptimizeFunctionOnNextCall(foo);
try { foo() } catch(_) {};
})();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment