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

Unified Diff: src/ic/call-optimization.cc

Issue 1679683004: Revert of Do not eagerly instantiate accessors' JSFunction. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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/ic/call-optimization.h ('k') | src/ic/ia32/handler-compiler-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « src/ic/call-optimization.h ('k') | src/ic/ia32/handler-compiler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698