[TurboFan] Apply early lowering logic to the GetIterator bytecode
GetIterator currently acts as a property load of the iterator symbol (soon it will also call it). It makes sense to apply the same early lowering logic as we do for property loads in the bytecode graph builder. This also brings our treatment of the bytecode in-line with the way it's treated in the serializer, which already respects the early-lowering semantics. Bug: v8:7790 Change-Id: Ieadc4b307b9f6d9a5aa77ca10c7c818026776f33 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1758304 Commit-Queue: Michael Stanton <mvstanton@chromium.org> Reviewed-by: Georg Neis <neis@chromium.org> Cr-Commit-Position: refs/heads/master@{#63224}
This commit is contained in:
parent
1b7f99a0cb
commit
3815fc1953
@ -3302,6 +3302,12 @@ void BytecodeGraphBuilder::VisitGetIterator() {
|
||||
VectorSlotPair feedback =
|
||||
CreateVectorSlotPair(bytecode_iterator().GetIndexOperand(1));
|
||||
const Operator* op = javascript()->GetIterator(feedback);
|
||||
|
||||
JSTypeHintLowering::LoweringResult lowering =
|
||||
TryBuildSimplifiedLoadNamed(op, object, feedback.slot());
|
||||
if (lowering.IsExit()) return;
|
||||
|
||||
DCHECK(!lowering.Changed());
|
||||
Node* node = NewNode(op, object);
|
||||
environment()->BindAccumulator(node, Environment::kAttachFrameState);
|
||||
}
|
||||
|
@ -490,7 +490,9 @@ JSTypeHintLowering::LoweringResult JSTypeHintLowering::ReduceConstructOperation(
|
||||
JSTypeHintLowering::LoweringResult JSTypeHintLowering::ReduceLoadNamedOperation(
|
||||
const Operator* op, Node* receiver, Node* effect, Node* control,
|
||||
FeedbackSlot slot) const {
|
||||
DCHECK_EQ(IrOpcode::kJSLoadNamed, op->opcode());
|
||||
// JSGetIterator involves a named load of the Symbol.iterator property.
|
||||
DCHECK(op->opcode() == IrOpcode::kJSLoadNamed ||
|
||||
op->opcode() == IrOpcode::kJSGetIterator);
|
||||
DCHECK(!slot.IsInvalid());
|
||||
FeedbackNexus nexus(feedback_vector(), slot);
|
||||
if (Node* node = TryBuildSoftDeopt(
|
||||
|
Loading…
Reference in New Issue
Block a user