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

Unified Diff: src/runtime/runtime-object.cc

Issue 1156993018: GlobalDictionary now stores PropertyDetails in PropertyCells. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments Created 5 years, 7 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/objects-inl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-object.cc
diff --git a/src/runtime/runtime-object.cc b/src/runtime/runtime-object.cc
index c8c379dc258124939e90863c52e50558861567d3..e37807e2ae2bdb3fa080930982ed97ce2510ef62 100644
--- a/src/runtime/runtime-object.cc
+++ b/src/runtime/runtime-object.cc
@@ -596,13 +596,14 @@ RUNTIME_FUNCTION(Runtime_KeyedGetProperty) {
// Attempt dictionary lookup.
GlobalDictionary* dictionary = receiver->global_dictionary();
int entry = dictionary->FindEntry(key);
- if ((entry != GlobalDictionary::kNotFound) &&
- (dictionary->DetailsAt(entry).type() == DATA)) {
- Object* value = dictionary->ValueAt(entry);
- DCHECK(value->IsPropertyCell());
- value = PropertyCell::cast(value)->value();
- if (!value->IsTheHole()) return value;
- // If value is the hole (meaning, absent) do the general lookup.
+ if (entry != GlobalDictionary::kNotFound) {
+ DCHECK(dictionary->ValueAt(entry)->IsPropertyCell());
+ PropertyCell* cell = PropertyCell::cast(dictionary->ValueAt(entry));
+ if (cell->property_details().type() == DATA) {
+ Object* value = cell->value();
+ if (!value->IsTheHole()) return value;
+ // If value is the hole (meaning, absent) do the general lookup.
+ }
}
} else if (!receiver->HasFastProperties()) {
// Attempt dictionary lookup.
« no previous file with comments | « src/objects-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698