Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(678)

Unified Diff: src/compiler/js-typed-lowering.cc

Issue 2151773002: Avoid jumping to the runtime for ForInFilter (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: use the code stub in turbofan Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/compiler/js-typed-lowering.cc
diff --git a/src/compiler/js-typed-lowering.cc b/src/compiler/js-typed-lowering.cc
index 27271fcdb3fb30b716dc2ba32c4f53e9c6021a06..3950d44bbc8e65516491161a8a89a713a8d2babd 100644
--- a/src/compiler/js-typed-lowering.cc
+++ b/src/compiler/js-typed-lowering.cc
@@ -1764,9 +1764,13 @@ Reduction JSTypedLowering::ReduceJSForInNext(Node* node) {
{
// Filter the {key} to check if it's still a valid property of the
// {receiver} (does the ToName conversion implicitly).
+ Callable const callable = CodeFactory::ForInFilter(isolate());
+ CallDescriptor const* const desc = Linkage::GetStubCallDescriptor(
+ isolate(), graph()->zone(), callable.descriptor(), 0,
+ CallDescriptor::kNeedsFrameState);
vfalse0 = efalse0 = graph()->NewNode(
- javascript()->CallRuntime(Runtime::kForInFilter), receiver, key,
- context, frame_state, effect, if_false0);
+ common()->Call(desc), jsgraph()->HeapConstant(callable.code()),
+ key, receiver, context, frame_state, effect, if_false0);
if_false0 = graph()->NewNode(common()->IfSuccess(), vfalse0);
}

Powered by Google App Engine
This is Rietveld 408576698