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

Unified Diff: src/hydrogen.cc

Issue 400523007: Cache IC handlers on the prototype's map if possible (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comment Created 6 years, 5 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 | « src/hydrogen.h ('k') | src/ia32/ic-ia32.cc » ('j') | 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 0e9b95e690b8fcc2d72757452c50d490467e3bc4..c48de4c435beac8ecc5ccac5a31b05216174e0e6 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -6124,6 +6124,14 @@ bool HOptimizedGraphBuilder::PropertyAccessInfo::CanAccessAsMonomorphic(
}
+Handle<Map> HOptimizedGraphBuilder::PropertyAccessInfo::map() {
+ JSFunction* ctor = IC::GetRootConstructor(
+ type_, current_info()->closure()->context()->native_context());
+ if (ctor != NULL) return handle(ctor->initial_map());
+ return type_->AsClass()->Map();
+}
+
+
static bool NeedsWrappingFor(Type* type, Handle<JSFunction> target) {
return type->Is(Type::NumberOrString()) &&
target->shared()->strict_mode() == SLOPPY &&
« no previous file with comments | « src/hydrogen.h ('k') | src/ia32/ic-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698