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

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: 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') | src/ic.cc » ('J')
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..200ae571aca1cf8eb5c51c1cabeb73f9256b290b 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::GetBuiltinConstructor(
Toon Verwaest 2014/07/18 13:12:23 Can you rename this to GetRootConstructor?
Jakob Kummerow 2014/07/18 13:47:52 Done.
+ 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') | src/ic.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698