| 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   template <class T> | 
|   97     ASSERT(IsFound() && state_ != JSPROXY); |   97   Handle<T> GetHolder() const { | 
|   98     return Handle<JSObject>::cast(maybe_holder_.ToHandleChecked()); |   98     ASSERT(IsFound()); | 
 |   99     return Handle<T>::cast(maybe_holder_.ToHandleChecked()); | 
|   99   } |  100   } | 
|  100   Handle<JSReceiver> GetRoot() const; |  101   Handle<JSReceiver> GetRoot() const; | 
|  101   bool HolderIsReceiver() const; |  102   bool HolderIsReceiver() const; | 
|  102  |  103  | 
|  103   /* Dynamically reduce the trapped types. */ |  104   /* Dynamically reduce the trapped types. */ | 
|  104   void skip_interceptor() { |  105   void skip_interceptor() { | 
|  105     configuration_ = static_cast<Configuration>( |  106     configuration_ = static_cast<Configuration>( | 
|  106         configuration_ & ~CHECK_INTERCEPTOR); |  107         configuration_ & ~CHECK_INTERCEPTOR); | 
|  107   } |  108   } | 
|  108   void skip_access_check() { |  109   void skip_access_check() { | 
| (...skipping 25 matching lines...) Expand all  Loading... | 
|  134     ASSERT(has_property_); |  135     ASSERT(has_property_); | 
|  135     ASSERT_EQ(DESCRIPTOR, property_encoding_); |  136     ASSERT_EQ(DESCRIPTOR, property_encoding_); | 
|  136     return number_; |  137     return number_; | 
|  137   } |  138   } | 
|  138   Handle<Object> GetAccessors() const; |  139   Handle<Object> GetAccessors() const; | 
|  139   Handle<Object> GetDataValue() const; |  140   Handle<Object> GetDataValue() const; | 
|  140   void WriteDataValue(Handle<Object> value); |  141   void WriteDataValue(Handle<Object> value); | 
|  141  |  142  | 
|  142   void InternalizeName(); |  143   void InternalizeName(); | 
|  143  |  144  | 
|  144   /* JSPROXY */ |  | 
|  145   Handle<JSProxy> GetJSProxy() const { |  | 
|  146     return Handle<JSProxy>::cast(maybe_holder_.ToHandleChecked()); |  | 
|  147   } |  | 
|  148  |  | 
|  149  private: |  145  private: | 
|  150   Handle<Map> GetReceiverMap() const; |  146   Handle<Map> GetReceiverMap() const; | 
|  151  |  147  | 
|  152   MUST_USE_RESULT bool NextHolder(); |  148   MUST_USE_RESULT bool NextHolder(); | 
|  153   State LookupInHolder(); |  149   State LookupInHolder(); | 
|  154   Handle<Object> FetchValue() const; |  150   Handle<Object> FetchValue() const; | 
|  155  |  151  | 
|  156   bool IsBootstrapping() const; |  152   bool IsBootstrapping() const; | 
|  157  |  153  | 
|  158   // Methods that fetch data from the holder ensure they always have a holder. |  154   // Methods that fetch data from the holder ensure they always have a holder. | 
| (...skipping 28 matching lines...) Expand all  Loading... | 
|  187   MaybeHandle<Object> maybe_receiver_; |  183   MaybeHandle<Object> maybe_receiver_; | 
|  188   MaybeHandle<JSReceiver> maybe_holder_; |  184   MaybeHandle<JSReceiver> maybe_holder_; | 
|  189  |  185  | 
|  190   int number_; |  186   int number_; | 
|  191 }; |  187 }; | 
|  192  |  188  | 
|  193  |  189  | 
|  194 } }  // namespace v8::internal |  190 } }  // namespace v8::internal | 
|  195  |  191  | 
|  196 #endif  // V8_LOOKUP_H_ |  192 #endif  // V8_LOOKUP_H_ | 
| OLD | NEW |