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

Unified Diff: src/hydrogen.cc

Issue 12051058: Allow monomorphic loads when static type is known. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 11 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 | src/hydrogen-instructions.h » ('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 8de8e52c6b069d09941b3606cc9eb172fd611d94..019f39a20f96050f55cbab1d67390afbcf1b8707 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -6796,12 +6796,16 @@ void HOptimizedGraphBuilder::VisitProperty(Property* expr) {
} else if (expr->key()->IsPropertyName()) {
Handle<String> name = expr->key()->AsLiteral()->AsPropertyName();
SmallMapList* types = expr->GetReceiverTypes();
+ HValue* object = Top();
- bool monomorphic = expr->IsMonomorphic();
Handle<Map> map;
+ bool monomorphic = false;
if (expr->IsMonomorphic()) {
map = types->first();
- if (map->is_dictionary_map()) monomorphic = false;
+ monomorphic = !map->is_dictionary_map();
+ } else if (object->HasMonomorphicJSObjectType()) {
+ map = object->GetMonomorphicJSObjectMap();
+ monomorphic = !map->is_dictionary_map();
}
if (monomorphic) {
Handle<JSFunction> getter;
« no previous file with comments | « no previous file | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698