Commit 8f0d170c authored by dcarney@chromium.org's avatar dcarney@chromium.org

always lookup api holder from receiver

R=verwaest@chromium.org

BUG=

Review URL: https://codereview.chromium.org/219723002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20392 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 660bfe17
...@@ -5488,16 +5488,11 @@ bool HOptimizedGraphBuilder::PropertyAccessInfo::LoadResult(Handle<Map> map) { ...@@ -5488,16 +5488,11 @@ bool HOptimizedGraphBuilder::PropertyAccessInfo::LoadResult(Handle<Map> map) {
Handle<JSFunction> accessor = handle(JSFunction::cast(raw_accessor)); Handle<JSFunction> accessor = handle(JSFunction::cast(raw_accessor));
if (accessor->shared()->IsApiFunction()) { if (accessor->shared()->IsApiFunction()) {
CallOptimization call_optimization(accessor); CallOptimization call_optimization(accessor);
if (!call_optimization.is_simple_api_call()) return false; if (call_optimization.is_simple_api_call()) {
CallOptimization::HolderLookup holder_lookup; CallOptimization::HolderLookup holder_lookup;
api_holder_ = call_optimization.LookupHolderOfExpectedType( Handle<Map> receiver_map = this->map();
map, &holder_lookup); api_holder_ = call_optimization.LookupHolderOfExpectedType(
switch (holder_lookup) { receiver_map, &holder_lookup);
case CallOptimization::kHolderNotFound:
return false;
case CallOptimization::kHolderIsReceiver:
case CallOptimization::kHolderFound:
break;
} }
} }
accessor_ = accessor; accessor_ = accessor;
...@@ -7071,6 +7066,11 @@ int HOptimizedGraphBuilder::InliningAstSize(Handle<JSFunction> target) { ...@@ -7071,6 +7066,11 @@ int HOptimizedGraphBuilder::InliningAstSize(Handle<JSFunction> target) {
return target_shared->inline_builtin() ? 0 : kNotInlinable; 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 // Do a quick check on source code length to avoid parsing large
// inlining candidates. // inlining candidates.
if (target_shared->SourceSize() > if (target_shared->SourceSize() >
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment