Handle<JSFunction> accessor = handle(JSFunction::cast(raw_accessor));
if (accessor->shared()->IsApiFunction()) {
CallOptimization call_optimization(accessor);
- if (!call_optimization.is_simple_api_call()) return false;
- CallOptimization::HolderLookup holder_lookup;
- api_holder_ = call_optimization.LookupHolderOfExpectedType(
- map, &holder_lookup);
- switch (holder_lookup) {
- case CallOptimization::kHolderNotFound:
- return false;
- case CallOptimization::kHolderIsReceiver:
- case CallOptimization::kHolderFound:
- break;
+ if (call_optimization.is_simple_api_call()) {
+ CallOptimization::HolderLookup holder_lookup;
+ Handle<Map> receiver_map = this->map();
+ api_holder_ = call_optimization.LookupHolderOfExpectedType(
+ receiver_map, &holder_lookup);
}
}
accessor_ = accessor;
return target_shared->inline_builtin() ? 0 : kNotInlinable;
}
+ if (target_shared->IsApiFunction()) {
+ TraceInline(target, caller, "target is api function");
+ return kNotInlinable;
+ }
+
// Do a quick check on source code length to avoid parsing large
// inlining candidates.
if (target_shared->SourceSize() >