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

Unified Diff: src/hydrogen.cc

Issue 219723002: always lookup api holder from receiver (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index 80eff3b552f86cfdaeb9eec6ee3e44320a135b81..24c2ab40b64445905df381b9213a3e8695b97b36 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -5488,16 +5488,11 @@ bool HOptimizedGraphBuilder::PropertyAccessInfo::LoadResult(Handle<Map> map) {
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;
@@ -7071,6 +7066,11 @@ int HOptimizedGraphBuilder::InliningAstSize(Handle<JSFunction> target) {
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() >
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698