14template <
class IsolateT>
16 if (IsJSFunction(*function)) {
18 }
else if (IsFunctionTemplateInfo(*function)) {
35 holder_map->map()->native_context_or_null();
36 if (
IsNull(maybe_native_context)) {
40 DCHECK(IsNativeContext(maybe_native_context));
48 std::optional<Tagged<NativeContext>> maybe_context =
50 if (!maybe_context.has_value()) {
57template <
class IsolateT>
62 if (!IsJSObjectMap(*object_map)) {
71 if (IsJSGlobalProxyMap(*object_map) && !
IsNull(object_map->prototype())) {
87 HolderLookup* holder_lookup)
const;
90 HolderLookup* holder_lookup)
const;
96 switch (holder_lookup) {
108 if (!IsJSObject(prototype))
return false;
109 if (prototype == *holder)
return true;
117template <
class IsolateT>
120 if (!function_template_info->has_callback(isolate))
return;
124 if (!IsUndefined(signature, isolate)) {
132template <
class IsolateT>
135 if (function.is_null() || !function->is_compiled(isolate))
return;
141template <
class IsolateT>
144 if (!function->shared()->IsApiFunction())
return;
146 function->shared()->api_func_data(), isolate);
bool is_constant_call() const
bool accept_any_receiver_
Handle< FunctionTemplateInfo > api_call_info_
bool is_simple_api_call() const
std::optional< Tagged< NativeContext > > GetAccessorContext(Tagged< Map > holder_map) const
void Initialize(IsolateT *isolate, Handle< JSFunction > function)
Handle< FunctionTemplateInfo > expected_receiver_type_
bool IsCrossContextLazyAccessorPair(Tagged< NativeContext > native_context, Tagged< Map > holder_map) const
CallOptimization(IsolateT *isolate, Handle< Object > function)
bool IsCompatibleReceiverMap(DirectHandle< JSObject > api_holder, Handle< JSObject > holder, HolderLookup) const
Handle< JSFunction > constant_function_
Handle< JSObject > LookupHolderOfExpectedType(IsolateT *isolate, DirectHandle< Map > receiver_map, HolderLookup *holder_lookup) const
void AnalyzePossibleApiFunction(IsolateT *isolate, DirectHandle< JSFunction > function)
V8_INLINE bool is_identical_to(Handle< S > other) const
V8_INLINE IndirectHandle< T > handle(Tagged< T > object, Isolate *isolate)
V8_INLINE DirectHandle< T > direct_handle(Tagged< T > object, Isolate *isolate)
kInstanceDescriptorsOffset kTransitionsOrPrototypeInfoOffset IsNull(value)||IsJSProxy(value)||IsWasmObject(value)||(IsJSObject(value) &&(HeapLayout
kInstanceDescriptorsOffset kTransitionsOrPrototypeInfoOffset prototype
!IsContextMap !IsContextMap native_context
Tagged< To > Cast(Tagged< From > value, const v8::SourceLocation &loc=INIT_SOURCE_LOCATION_IN_DEBUG)
#define DCHECK(condition)