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

Side by Side Diff: src/ic/call-optimization.cc

Issue 855903002: remove SignatureInfo class (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix Created 5 years, 11 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 unified diff | Download patch
« no previous file with comments | « src/builtins.cc ('k') | src/objects.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/ic/call-optimization.h" 7 #include "src/ic/call-optimization.h"
8 8
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 AnalyzePossibleApiFunction(function); 85 AnalyzePossibleApiFunction(function);
86 } 86 }
87 87
88 88
89 void CallOptimization::AnalyzePossibleApiFunction(Handle<JSFunction> function) { 89 void CallOptimization::AnalyzePossibleApiFunction(Handle<JSFunction> function) {
90 if (!function->shared()->IsApiFunction()) return; 90 if (!function->shared()->IsApiFunction()) return;
91 Handle<FunctionTemplateInfo> info(function->shared()->get_api_func_data()); 91 Handle<FunctionTemplateInfo> info(function->shared()->get_api_func_data());
92 92
93 // Require a C++ callback. 93 // Require a C++ callback.
94 if (info->call_code()->IsUndefined()) return; 94 if (info->call_code()->IsUndefined()) return;
95 api_call_info_ = 95 api_call_info_ = handle(CallHandlerInfo::cast(info->call_code()));
96 Handle<CallHandlerInfo>(CallHandlerInfo::cast(info->call_code()));
97 96
98 // Accept signatures that either have no restrictions at all or
99 // only have restrictions on the receiver.
100 if (!info->signature()->IsUndefined()) { 97 if (!info->signature()->IsUndefined()) {
101 Handle<SignatureInfo> signature = 98 expected_receiver_type_ =
102 Handle<SignatureInfo>(SignatureInfo::cast(info->signature())); 99 handle(FunctionTemplateInfo::cast(info->signature()));
103 if (!signature->args()->IsUndefined()) return;
104 if (!signature->receiver()->IsUndefined()) {
105 expected_receiver_type_ = Handle<FunctionTemplateInfo>(
106 FunctionTemplateInfo::cast(signature->receiver()));
107 }
108 } 100 }
109 101
110 is_simple_api_call_ = true; 102 is_simple_api_call_ = true;
111 } 103 }
112 } 104 }
113 } // namespace v8::internal 105 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/builtins.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698