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

Side by Side Diff: src/lookup-inl.h

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, 6 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 unified diff | Download patch
« no previous file with comments | « src/heap/heap.cc ('k') | src/objects.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_LOOKUP_INL_H_ 5 #ifndef V8_LOOKUP_INL_H_
6 #define V8_LOOKUP_INL_H_ 6 #define V8_LOOKUP_INL_H_
7 7
8 #include "src/lookup.h" 8 #include "src/lookup.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 if (number_ == kMaxUInt32) return NOT_FOUND; 65 if (number_ == kMaxUInt32) return NOT_FOUND;
66 property_details_ = accessor->GetDetails(backing_store, number_); 66 property_details_ = accessor->GetDetails(backing_store, number_);
67 } else if (holder->IsGlobalObject()) { 67 } else if (holder->IsGlobalObject()) {
68 GlobalDictionary* dict = JSObject::cast(holder)->global_dictionary(); 68 GlobalDictionary* dict = JSObject::cast(holder)->global_dictionary();
69 int number = dict->FindEntry(name_); 69 int number = dict->FindEntry(name_);
70 if (number == GlobalDictionary::kNotFound) return NOT_FOUND; 70 if (number == GlobalDictionary::kNotFound) return NOT_FOUND;
71 number_ = static_cast<uint32_t>(number); 71 number_ = static_cast<uint32_t>(number);
72 DCHECK(dict->ValueAt(number_)->IsPropertyCell()); 72 DCHECK(dict->ValueAt(number_)->IsPropertyCell());
73 PropertyCell* cell = PropertyCell::cast(dict->ValueAt(number_)); 73 PropertyCell* cell = PropertyCell::cast(dict->ValueAt(number_));
74 if (cell->value()->IsTheHole()) return NOT_FOUND; 74 if (cell->value()->IsTheHole()) return NOT_FOUND;
75 property_details_ = dict->DetailsAt(number_); 75 property_details_ = cell->property_details();
76 } else if (map->is_dictionary_map()) { 76 } else if (map->is_dictionary_map()) {
77 NameDictionary* dict = JSObject::cast(holder)->property_dictionary(); 77 NameDictionary* dict = JSObject::cast(holder)->property_dictionary();
78 int number = dict->FindEntry(name_); 78 int number = dict->FindEntry(name_);
79 if (number == NameDictionary::kNotFound) return NOT_FOUND; 79 if (number == NameDictionary::kNotFound) return NOT_FOUND;
80 number_ = static_cast<uint32_t>(number); 80 number_ = static_cast<uint32_t>(number);
81 property_details_ = dict->DetailsAt(number_); 81 property_details_ = dict->DetailsAt(number_);
82 } else { 82 } else {
83 DescriptorArray* descriptors = map->instance_descriptors(); 83 DescriptorArray* descriptors = map->instance_descriptors();
84 int number = descriptors->SearchWithCache(*name_, map); 84 int number = descriptors->SearchWithCache(*name_, map);
85 if (number == DescriptorArray::kNotFound) return NOT_FOUND; 85 if (number == DescriptorArray::kNotFound) return NOT_FOUND;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 default: 118 default:
119 return NOT_FOUND; 119 return NOT_FOUND;
120 } 120 }
121 UNREACHABLE(); 121 UNREACHABLE();
122 return state_; 122 return state_;
123 } 123 }
124 } 124 }
125 } // namespace v8::internal 125 } // namespace v8::internal
126 126
127 #endif // V8_LOOKUP_INL_H_ 127 #endif // V8_LOOKUP_INL_H_
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698