| OLD | NEW |
| 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 int GetAccessorIndex() const; | 138 int GetAccessorIndex() const; |
| 139 int GetConstantIndex() const; | 139 int GetConstantIndex() const; |
| 140 Handle<PropertyCell> GetPropertyCell() const; | 140 Handle<PropertyCell> GetPropertyCell() const; |
| 141 Handle<Object> GetAccessors() const; | 141 Handle<Object> GetAccessors() const; |
| 142 Handle<Object> GetDataValue() const; | 142 Handle<Object> GetDataValue() const; |
| 143 // Usually returns the value that was passed in, but may perform | 143 // Usually returns the value that was passed in, but may perform |
| 144 // non-observable modifications on it, such as internalize strings. | 144 // non-observable modifications on it, such as internalize strings. |
| 145 Handle<Object> WriteDataValue(Handle<Object> value); | 145 Handle<Object> WriteDataValue(Handle<Object> value); |
| 146 void InternalizeName(); | 146 void InternalizeName(); |
| 147 | 147 |
| 148 int dictionary_entry() const { | |
| 149 DCHECK(has_property_); | |
| 150 DCHECK(holder_map_->is_dictionary_map()); | |
| 151 return number_; | |
| 152 } | |
| 153 | |
| 154 private: | 148 private: |
| 155 enum class InterceptorState { | 149 enum class InterceptorState { |
| 156 kUninitialized, | 150 kUninitialized, |
| 157 kSkipNonMasking, | 151 kSkipNonMasking, |
| 158 kProcessNonMasking | 152 kProcessNonMasking |
| 159 }; | 153 }; |
| 160 | 154 |
| 161 Handle<Map> GetReceiverMap() const; | 155 Handle<Map> GetReceiverMap() const; |
| 162 | 156 |
| 163 MUST_USE_RESULT inline JSReceiver* NextHolder(Map* map); | 157 MUST_USE_RESULT inline JSReceiver* NextHolder(Map* map); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 175 return !IsBootstrapping() && (configuration_ & kInterceptor) != 0; | 169 return !IsBootstrapping() && (configuration_ & kInterceptor) != 0; |
| 176 } | 170 } |
| 177 bool check_prototype_chain() const { | 171 bool check_prototype_chain() const { |
| 178 return (configuration_ & kPrototypeChain) != 0; | 172 return (configuration_ & kPrototypeChain) != 0; |
| 179 } | 173 } |
| 180 int descriptor_number() const { | 174 int descriptor_number() const { |
| 181 DCHECK(has_property_); | 175 DCHECK(has_property_); |
| 182 DCHECK(!holder_map_->is_dictionary_map()); | 176 DCHECK(!holder_map_->is_dictionary_map()); |
| 183 return number_; | 177 return number_; |
| 184 } | 178 } |
| 179 int dictionary_entry() const { |
| 180 DCHECK(has_property_); |
| 181 DCHECK(holder_map_->is_dictionary_map()); |
| 182 return number_; |
| 183 } |
| 185 | 184 |
| 186 static Configuration ComputeConfiguration( | 185 static Configuration ComputeConfiguration( |
| 187 Configuration configuration, Handle<Name> name) { | 186 Configuration configuration, Handle<Name> name) { |
| 188 if (name->IsOwn()) { | 187 if (name->IsOwn()) { |
| 189 return static_cast<Configuration>(configuration & | 188 return static_cast<Configuration>(configuration & |
| 190 HIDDEN_SKIP_INTERCEPTOR); | 189 HIDDEN_SKIP_INTERCEPTOR); |
| 191 } else { | 190 } else { |
| 192 return configuration; | 191 return configuration; |
| 193 } | 192 } |
| 194 } | 193 } |
| (...skipping 16 matching lines...) Expand all Loading... |
| 211 Handle<JSReceiver> holder_; | 210 Handle<JSReceiver> holder_; |
| 212 Handle<Map> holder_map_; | 211 Handle<Map> holder_map_; |
| 213 const Handle<JSReceiver> initial_holder_; | 212 const Handle<JSReceiver> initial_holder_; |
| 214 int number_; | 213 int number_; |
| 215 }; | 214 }; |
| 216 | 215 |
| 217 | 216 |
| 218 } } // namespace v8::internal | 217 } } // namespace v8::internal |
| 219 | 218 |
| 220 #endif // V8_LOOKUP_H_ | 219 #endif // V8_LOOKUP_H_ |
| OLD | NEW |