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

Unified Diff: src/stub-cache.cc

Issue 67613005: Move template instance check from Object to FunctionTemplateInfo::IsTemplateFor (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 1 month 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 | « src/stub-cache.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/stub-cache.cc
diff --git a/src/stub-cache.cc b/src/stub-cache.cc
index f9918ed62ef46c1286f743f37584527b3a3f7349..f8607bfe60651747cc1ca44102d18b9c70d21369 100644
--- a/src/stub-cache.cc
+++ b/src/stub-cache.cc
@@ -1785,12 +1785,12 @@ int CallOptimization::GetPrototypeDepthOfExpectedType(
if (expected_receiver_type_.is_null()) return 0;
int depth = 0;
while (!object.is_identical_to(holder)) {
- if (object->IsInstanceOf(*expected_receiver_type_)) return depth;
+ if (expected_receiver_type_->IsTemplateFor(object->map())) return depth;
object = Handle<JSObject>(JSObject::cast(object->GetPrototype()));
if (!object->map()->is_hidden_prototype()) return kInvalidProtoDepth;
++depth;
}
- if (holder->IsInstanceOf(*expected_receiver_type_)) return depth;
+ if (expected_receiver_type_->IsTemplateFor(holder->map())) return depth;
return kInvalidProtoDepth;
}
« no previous file with comments | « src/stub-cache.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698