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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 State state() const { return state_; } | 93 State state() const { return state_; } |
94 Handle<Name> name() const { return name_; } | 94 Handle<Name> name() const { return name_; } |
95 | 95 |
96 bool IsFound() const { return state_ != NOT_FOUND; } | 96 bool IsFound() const { return state_ != NOT_FOUND; } |
97 void Next(); | 97 void Next(); |
98 void NotFound() { | 98 void NotFound() { |
99 has_property_ = false; | 99 has_property_ = false; |
100 state_ = NOT_FOUND; | 100 state_ = NOT_FOUND; |
101 } | 101 } |
102 | 102 |
103 Heap* heap() const { return isolate_->heap(); } | |
104 Factory* factory() const { return isolate_->factory(); } | 103 Factory* factory() const { return isolate_->factory(); } |
105 Handle<Object> GetReceiver() const { | 104 Handle<Object> GetReceiver() const { |
106 return maybe_receiver_.ToHandleChecked(); | 105 return maybe_receiver_.ToHandleChecked(); |
107 } | 106 } |
108 Handle<JSObject> GetStoreTarget() const; | 107 Handle<JSObject> GetStoreTarget() const; |
109 Handle<Map> holder_map() const { return holder_map_; } | 108 Handle<Map> holder_map() const { return holder_map_; } |
110 Handle<Map> transition_map() const { | 109 Handle<Map> transition_map() const { |
111 DCHECK_EQ(TRANSITION, state_); | 110 DCHECK_EQ(TRANSITION, state_); |
112 return transition_map_; | 111 return transition_map_; |
113 } | 112 } |
114 template <class T> | 113 template <class T> |
115 Handle<T> GetHolder() const { | 114 Handle<T> GetHolder() const { |
116 DCHECK(IsFound()); | 115 DCHECK(IsFound()); |
117 return Handle<T>::cast(maybe_holder_.ToHandleChecked()); | 116 return Handle<T>::cast(maybe_holder_.ToHandleChecked()); |
118 } | 117 } |
119 Handle<JSReceiver> GetRoot() const; | 118 Handle<JSReceiver> GetRoot() const; |
120 bool HolderIsReceiverOrHiddenPrototype() const; | 119 bool HolderIsReceiverOrHiddenPrototype() const; |
121 bool HolderIsNonGlobalHiddenPrototype() const; | |
122 | 120 |
123 /* ACCESS_CHECK */ | 121 /* ACCESS_CHECK */ |
124 bool HasAccess(v8::AccessType access_type) const; | 122 bool HasAccess(v8::AccessType access_type) const; |
125 | 123 |
126 /* PROPERTY */ | 124 /* PROPERTY */ |
127 // HasProperty needs to be called before any of the other PROPERTY methods | 125 // HasProperty needs to be called before any of the other PROPERTY methods |
128 // below can be used. It ensures that we are able to provide a definite | 126 // below can be used. It ensures that we are able to provide a definite |
129 // answer, and loads extra information about the property. | 127 // answer, and loads extra information about the property. |
130 bool HasProperty(); | 128 bool HasProperty(); |
131 void PrepareForDataProperty(Handle<Object> value); | 129 void PrepareForDataProperty(Handle<Object> value); |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 MaybeHandle<Object> maybe_receiver_; | 236 MaybeHandle<Object> maybe_receiver_; |
239 MaybeHandle<JSReceiver> maybe_holder_; | 237 MaybeHandle<JSReceiver> maybe_holder_; |
240 | 238 |
241 int number_; | 239 int number_; |
242 }; | 240 }; |
243 | 241 |
244 | 242 |
245 } } // namespace v8::internal | 243 } } // namespace v8::internal |
246 | 244 |
247 #endif // V8_LOOKUP_H_ | 245 #endif // V8_LOOKUP_H_ |
OLD | NEW |