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

Side by Side Diff: src/lookup.h

Issue 1159433003: Use GetProperty for getting elements. (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/json-stringifier.h ('k') | src/lookup.cc » ('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_H_ 5 #ifndef V8_LOOKUP_H_
6 #define V8_LOOKUP_H_ 6 #define V8_LOOKUP_H_
7 7
8 #include "src/factory.h" 8 #include "src/factory.h"
9 #include "src/isolate.h" 9 #include "src/isolate.h"
10 #include "src/objects.h" 10 #include "src/objects.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 holder_map_(holder_->map(), isolate_), 79 holder_map_(holder_->map(), isolate_),
80 initial_holder_(holder_), 80 initial_holder_(holder_),
81 number_(DescriptorArray::kNotFound) { 81 number_(DescriptorArray::kNotFound) {
82 Next(); 82 Next();
83 } 83 }
84 84
85 LookupIterator(Isolate* isolate, Handle<Object> receiver, uint32_t index, 85 LookupIterator(Isolate* isolate, Handle<Object> receiver, uint32_t index,
86 Configuration configuration = PROTOTYPE_CHAIN) 86 Configuration configuration = PROTOTYPE_CHAIN)
87 : configuration_(configuration), 87 : configuration_(configuration),
88 state_(NOT_FOUND), 88 state_(NOT_FOUND),
89 exotic_index_state_(ExoticIndexState::kNotExotic), 89 exotic_index_state_(ExoticIndexState::kUninitialized),
90 interceptor_state_(InterceptorState::kUninitialized), 90 interceptor_state_(InterceptorState::kUninitialized),
91 property_details_(PropertyDetails::Empty()), 91 property_details_(PropertyDetails::Empty()),
92 isolate_(isolate), 92 isolate_(isolate),
93 name_(), 93 name_(),
94 index_(index), 94 index_(index),
95 receiver_(receiver), 95 receiver_(receiver),
96 holder_(GetRoot(receiver_, isolate_)), 96 holder_(GetRoot(receiver_, isolate_)),
97 holder_map_(holder_->map(), isolate_), 97 holder_map_(holder_->map(), isolate_),
98 initial_holder_(holder_), 98 initial_holder_(holder_),
99 number_(DescriptorArray::kNotFound) { 99 number_(DescriptorArray::kNotFound) {
100 // kMaxUInt32 isn't a valid index. 100 // kMaxUInt32 isn't a valid index.
101 DCHECK_NE(kMaxUInt32, index_); 101 DCHECK_NE(kMaxUInt32, index_);
102 Next(); 102 Next();
103 } 103 }
104 104
105 LookupIterator(Isolate* isolate, Handle<Object> receiver, uint32_t index, 105 LookupIterator(Isolate* isolate, Handle<Object> receiver, uint32_t index,
106 Handle<JSReceiver> holder, 106 Handle<JSReceiver> holder,
107 Configuration configuration = PROTOTYPE_CHAIN) 107 Configuration configuration = PROTOTYPE_CHAIN)
108 : configuration_(configuration), 108 : configuration_(configuration),
109 state_(NOT_FOUND), 109 state_(NOT_FOUND),
110 exotic_index_state_(ExoticIndexState::kNotExotic), 110 exotic_index_state_(ExoticIndexState::kUninitialized),
111 interceptor_state_(InterceptorState::kUninitialized), 111 interceptor_state_(InterceptorState::kUninitialized),
112 property_details_(PropertyDetails::Empty()), 112 property_details_(PropertyDetails::Empty()),
113 isolate_(isolate), 113 isolate_(isolate),
114 name_(), 114 name_(),
115 index_(index), 115 index_(index),
116 receiver_(receiver), 116 receiver_(receiver),
117 holder_(holder), 117 holder_(holder),
118 holder_map_(holder_->map(), isolate_), 118 holder_map_(holder_->map(), isolate_),
119 initial_holder_(holder_), 119 initial_holder_(holder_),
120 number_(DescriptorArray::kNotFound) { 120 number_(DescriptorArray::kNotFound) {
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 Handle<Map> GetReceiverMap() const; 215 Handle<Map> GetReceiverMap() const;
216 216
217 MUST_USE_RESULT inline JSReceiver* NextHolder(Map* map); 217 MUST_USE_RESULT inline JSReceiver* NextHolder(Map* map);
218 inline State LookupInHolder(Map* map, JSReceiver* holder); 218 inline State LookupInHolder(Map* map, JSReceiver* holder);
219 void RestartLookupForNonMaskingInterceptors(); 219 void RestartLookupForNonMaskingInterceptors();
220 State LookupNonMaskingInterceptorInHolder(Map* map, JSReceiver* holder); 220 State LookupNonMaskingInterceptorInHolder(Map* map, JSReceiver* holder);
221 Handle<Object> FetchValue() const; 221 Handle<Object> FetchValue() const;
222 void ReloadPropertyInformation(); 222 void ReloadPropertyInformation();
223 bool SkipInterceptor(JSObject* holder); 223 bool SkipInterceptor(JSObject* holder);
224 bool HasInterceptor(Map* map) const; 224 bool HasInterceptor(Map* map) const;
225 bool InternalHolderIsReceiverOrHiddenPrototype() const;
226 InterceptorInfo* GetInterceptor(JSObject* holder) const;
225 227
226 bool IsBootstrapping() const; 228 bool IsBootstrapping() const;
227 229
228 bool check_hidden() const { return (configuration_ & kHidden) != 0; } 230 bool check_hidden() const { return (configuration_ & kHidden) != 0; }
229 bool check_interceptor() const { 231 bool check_interceptor() const {
230 return !IsBootstrapping() && (configuration_ & kInterceptor) != 0; 232 return !IsBootstrapping() && (configuration_ & kInterceptor) != 0;
231 } 233 }
232 bool check_prototype_chain() const { 234 bool check_prototype_chain() const {
233 return (configuration_ & kPrototypeChain) != 0; 235 return (configuration_ & kPrototypeChain) != 0;
234 } 236 }
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 Handle<JSReceiver> holder_; 274 Handle<JSReceiver> holder_;
273 Handle<Map> holder_map_; 275 Handle<Map> holder_map_;
274 const Handle<JSReceiver> initial_holder_; 276 const Handle<JSReceiver> initial_holder_;
275 uint32_t number_; 277 uint32_t number_;
276 }; 278 };
277 279
278 280
279 } } // namespace v8::internal 281 } } // namespace v8::internal
280 282
281 #endif // V8_LOOKUP_H_ 283 #endif // V8_LOOKUP_H_
OLDNEW
« no previous file with comments | « src/json-stringifier.h ('k') | src/lookup.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698