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

Unified Diff: src/hydrogen.cc

Issue 17155010: Use type feedback for Array (non-constructor) call sites. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Nit fixin' Created 7 years, 6 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/bootstrapper.cc ('k') | src/ia32/stub-cache-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index f9adf49b8ff2920b22553400f554f963d39fa6ab..aaef0a5f79510d67a3936826b6fedcb37dddc3a2 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -8748,8 +8748,16 @@ void HOptimizedGraphBuilder::VisitCall(Call* expr) {
graph()->MarkRecursive();
}
- call = PreProcessCall(new(zone()) HCallKnownGlobal(expr->target(),
+ if (CallStubCompiler::HasCustomCallGenerator(expr->target())) {
+ // When the target has a custom call IC generator, use the IC,
+ // because it is likely to generate better code.
+ HValue* context = environment()->LookupContext();
+ call = PreProcessCall(
+ new(zone()) HCallNamed(context, var->name(), argument_count));
+ } else {
+ call = PreProcessCall(new(zone()) HCallKnownGlobal(expr->target(),
argument_count));
+ }
} else {
HValue* context = environment()->LookupContext();
HGlobalObject* receiver = new(zone()) HGlobalObject(context);
« no previous file with comments | « src/bootstrapper.cc ('k') | src/ia32/stub-cache-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698