[interpreter] Inline ForInFilter stub.
BUG=v8:4280 LOG=N Review-Url: https://codereview.chromium.org/2220343002 Cr-Commit-Position: refs/heads/master@{#38420}
This commit is contained in:
parent
0c699a5819
commit
2bf0b8c8ed
@ -1996,7 +1996,7 @@ void Interpreter::DoForInNext(InterpreterAssembler* assembler) {
|
|||||||
CodeStubAssembler::SMI_PARAMETERS);
|
CodeStubAssembler::SMI_PARAMETERS);
|
||||||
|
|
||||||
// Check if we can use the for-in fast path potentially using the enum cache.
|
// Check if we can use the for-in fast path potentially using the enum cache.
|
||||||
Label if_fast(assembler), if_slow(assembler, Label::kDeferred);
|
Label if_fast(assembler), if_slow(assembler);
|
||||||
Node* receiver_map = __ LoadObjectField(receiver, HeapObject::kMapOffset);
|
Node* receiver_map = __ LoadObjectField(receiver, HeapObject::kMapOffset);
|
||||||
__ BranchIfWordEqual(receiver_map, cache_type, &if_fast, &if_slow);
|
__ BranchIfWordEqual(receiver_map, cache_type, &if_fast, &if_slow);
|
||||||
__ Bind(&if_fast);
|
__ Bind(&if_fast);
|
||||||
@ -2017,8 +2017,7 @@ void Interpreter::DoForInNext(InterpreterAssembler* assembler) {
|
|||||||
|
|
||||||
// Need to filter the {key} for the {receiver}.
|
// Need to filter the {key} for the {receiver}.
|
||||||
Node* context = __ GetContext();
|
Node* context = __ GetContext();
|
||||||
Callable callable = CodeFactory::ForInFilter(assembler->isolate());
|
Node* result = ForInFilterStub::Generate(assembler, key, receiver, context);
|
||||||
Node* result = __ CallStub(callable, context, key, receiver);
|
|
||||||
__ SetAccumulator(result);
|
__ SetAccumulator(result);
|
||||||
__ Dispatch();
|
__ Dispatch();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user