Index: src/ic/call-optimization.cc |
diff --git a/src/ic/call-optimization.cc b/src/ic/call-optimization.cc |
index 94bf5eaf21dbb4d900fb98dbf6e4560f54fcdced..45717b50a7bf6af607ac25a67023c167514166e3 100644 |
--- a/src/ic/call-optimization.cc |
+++ b/src/ic/call-optimization.cc |
@@ -8,16 +8,8 @@ |
namespace v8 { |
namespace internal { |
-CallOptimization::CallOptimization(Handle<Object> function) { |
- constant_function_ = Handle<JSFunction>::null(); |
- is_simple_api_call_ = false; |
- expected_receiver_type_ = Handle<FunctionTemplateInfo>::null(); |
- api_call_info_ = Handle<CallHandlerInfo>::null(); |
- if (function->IsJSFunction()) { |
- Initialize(Handle<JSFunction>::cast(function)); |
- } else if (function->IsFunctionTemplateInfo()) { |
- Initialize(Handle<FunctionTemplateInfo>::cast(function)); |
- } |
+CallOptimization::CallOptimization(Handle<JSFunction> function) { |
+ Initialize(function); |
} |
@@ -88,20 +80,13 @@ |
return false; |
} |
-void CallOptimization::Initialize( |
- Handle<FunctionTemplateInfo> function_template_info) { |
- if (function_template_info->call_code()->IsUndefined()) return; |
- api_call_info_ = |
- handle(CallHandlerInfo::cast(function_template_info->call_code())); |
- |
- if (!function_template_info->signature()->IsUndefined()) { |
- expected_receiver_type_ = |
- handle(FunctionTemplateInfo::cast(function_template_info->signature())); |
- } |
- is_simple_api_call_ = true; |
-} |
void CallOptimization::Initialize(Handle<JSFunction> function) { |
+ constant_function_ = Handle<JSFunction>::null(); |
+ is_simple_api_call_ = false; |
+ expected_receiver_type_ = Handle<FunctionTemplateInfo>::null(); |
+ api_call_info_ = Handle<CallHandlerInfo>::null(); |
+ |
if (function.is_null() || !function->is_compiled()) return; |
constant_function_ = function; |