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

Unified Diff: src/crankshaft/hydrogen.cc

Issue 1894953004: Add HasProperty code stub that tries simple lookups or jumps to runtime otherwise. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressing comments, tweak linear search limit based on local measurements Created 4 years, 8 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/crankshaft/hydrogen.cc
diff --git a/src/crankshaft/hydrogen.cc b/src/crankshaft/hydrogen.cc
index 6bc9ff4a19b0a5193685061fc2ffcca42dc1be00..75b155e1296c429951a953b969b71922260855da 100644
--- a/src/crankshaft/hydrogen.cc
+++ b/src/crankshaft/hydrogen.cc
@@ -11704,9 +11704,12 @@ void HOptimizedGraphBuilder::VisitCompareOperation(CompareOperation* expr) {
return ast_context()->ReturnInstruction(result, expr->id());
} else if (op == Token::IN) {
- Add<HPushArguments>(left, right);
+ Callable callable = CodeFactory::HasProperty(isolate());
+ HValue* stub = Add<HConstant>(callable.code());
+ HValue* values[] = {context(), left, right};
HInstruction* result =
- New<HCallRuntime>(Runtime::FunctionForId(Runtime::kHasProperty), 2);
+ New<HCallWithDescriptor>(stub, 0, callable.descriptor(),
+ Vector<HValue*>(values, arraysize(values)));
return ast_context()->ReturnInstruction(result, expr->id());
}

Powered by Google App Engine
This is Rietveld 408576698