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

Unified Diff: src/crankshaft/hydrogen.cc

Issue 2151773002: Avoid jumping to the runtime for ForInFilter (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: remove double label 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
« no previous file with comments | « src/compiler/js-typed-lowering.cc ('k') | src/full-codegen/arm/full-codegen-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/hydrogen.cc
diff --git a/src/crankshaft/hydrogen.cc b/src/crankshaft/hydrogen.cc
index 7d16c4813e0a855ed62be08e2cd143eb0b3550c2..ae68d7fb24971f872b967a14fe96090d3225e140 100644
--- a/src/crankshaft/hydrogen.cc
+++ b/src/crankshaft/hydrogen.cc
@@ -5402,10 +5402,12 @@ void HOptimizedGraphBuilder::BuildForInBody(ForInStatement* stmt,
}
set_current_block(if_slow);
{
- // Check if key is still valid for enumerable.
- Add<HPushArguments>(enumerable, key);
- Runtime::FunctionId function_id = Runtime::kForInFilter;
- Push(Add<HCallRuntime>(Runtime::FunctionForId(function_id), 2));
+ ForInFilterStub stub(isolate());
+ HValue* values[] = {context(), key, enumerable};
+ HConstant* stub_value = Add<HConstant>(stub.GetCode());
+ Push(Add<HCallWithDescriptor>(stub_value, 0,
+ stub.GetCallInterfaceDescriptor(),
+ ArrayVector(values)));
Add<HSimulate>(stmt->FilterId());
FinishCurrentBlock(New<HCompareObjectEqAndBranch>(
Top(), graph()->GetConstantUndefined(), if_slow_skip, if_slow_pass));
« no previous file with comments | « src/compiler/js-typed-lowering.cc ('k') | src/full-codegen/arm/full-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698