Index: src/hydrogen.cc |
diff --git a/src/hydrogen.cc b/src/hydrogen.cc |
index 513d4a8501b9210ab23ae2edd4b377cc1fcb8188..a4736e82b37e8921b04946068661e2a353454bb6 100644 |
--- a/src/hydrogen.cc |
+++ b/src/hydrogen.cc |
@@ -4241,13 +4241,6 @@ bool HGraphBuilder::TryCallApply(Call* expr) { |
} |
-static bool HasCustomCallGenerator(Handle<JSFunction> function) { |
- SharedFunctionInfo* info = function->shared(); |
- return info->HasBuiltinFunctionId() && |
- CallStubCompiler::HasCustomCallGenerator(info->builtin_function_id()); |
-} |
- |
- |
void HGraphBuilder::VisitCall(Call* expr) { |
Expression* callee = expr->expression(); |
int argument_count = expr->arguments()->length() + 1; // Plus receiver. |
@@ -4305,13 +4298,11 @@ void HGraphBuilder::VisitCall(Call* expr) { |
return; |
} |
- if (HasCustomCallGenerator(expr->target()) || |
- CallOptimization(*expr->target()).is_simple_api_call() || |
+ if (CallStubCompiler::HasCustomCallGenerator(*expr->target()) || |
expr->check_type() != RECEIVER_MAP_CHECK) { |
// When the target has a custom call IC generator, use the IC, |
- // because it is likely to generate better code. Similarly, we |
- // generate better call stubs for some API functions. |
- // Also use the IC when a primitive receiver check is required. |
+ // because it is likely to generate better code. Also use the IC |
+ // when a primitive receiver check is required. |
HContext* context = new HContext; |
AddInstruction(context); |
call = PreProcessCall(new HCallNamed(context, name, argument_count)); |