Chromium Code Reviews| 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 86 | 86 |
| 87 bool IsFound() const { return state_ != NOT_FOUND; } | 87 bool IsFound() const { return state_ != NOT_FOUND; } |
| 88 void Next(); | 88 void Next(); |
| 89 | 89 |
| 90 Heap* heap() const { return isolate_->heap(); } | 90 Heap* heap() const { return isolate_->heap(); } |
| 91 Factory* factory() const { return isolate_->factory(); } | 91 Factory* factory() const { return isolate_->factory(); } |
| 92 Handle<Object> GetReceiver() const { | 92 Handle<Object> GetReceiver() const { |
| 93 return Handle<Object>::cast(maybe_receiver_.ToHandleChecked()); | 93 return Handle<Object>::cast(maybe_receiver_.ToHandleChecked()); |
| 94 } | 94 } |
| 95 Handle<Map> holder_map() const { return holder_map_; } | 95 Handle<Map> holder_map() const { return holder_map_; } |
| 96 Handle<JSObject> GetHolder() const { | 96 Handle<JSReceiver> GetHolder() const { |
| 97 ASSERT(IsFound()); | |
| 98 return maybe_holder_.ToHandleChecked(); | |
| 99 } | |
| 100 Handle<JSObject> GetNonJSProxyHolder() const { | |
|
rossberg
2014/07/24 11:18:32
You should call it GetJSObjectHolder.
But I'm not
| |
| 97 ASSERT(IsFound() && state_ != JSPROXY); | 101 ASSERT(IsFound() && state_ != JSPROXY); |
| 98 return Handle<JSObject>::cast(maybe_holder_.ToHandleChecked()); | 102 return Handle<JSObject>::cast(maybe_holder_.ToHandleChecked()); |
| 99 } | 103 } |
| 100 Handle<JSReceiver> GetRoot() const; | 104 Handle<JSReceiver> GetRoot() const; |
| 101 bool HolderIsReceiver() const; | 105 bool HolderIsReceiver() const; |
| 102 | 106 |
| 103 /* Dynamically reduce the trapped types. */ | 107 /* Dynamically reduce the trapped types. */ |
| 104 void skip_interceptor() { | 108 void skip_interceptor() { |
| 105 configuration_ = static_cast<Configuration>( | 109 configuration_ = static_cast<Configuration>( |
| 106 configuration_ & ~CHECK_INTERCEPTOR); | 110 configuration_ & ~CHECK_INTERCEPTOR); |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 187 MaybeHandle<Object> maybe_receiver_; | 191 MaybeHandle<Object> maybe_receiver_; |
| 188 MaybeHandle<JSReceiver> maybe_holder_; | 192 MaybeHandle<JSReceiver> maybe_holder_; |
| 189 | 193 |
| 190 int number_; | 194 int number_; |
| 191 }; | 195 }; |
| 192 | 196 |
| 193 | 197 |
| 194 } } // namespace v8::internal | 198 } } // namespace v8::internal |
| 195 | 199 |
| 196 #endif // V8_LOOKUP_H_ | 200 #endif // V8_LOOKUP_H_ |
| OLD | NEW |