| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 // Review notes: | 5 // Review notes: |
| 6 // | 6 // |
| 7 // - The use of macros in these inline functions may seem superfluous | 7 // - The use of macros in these inline functions may seem superfluous |
| 8 // but it is absolutely needed to make sure gcc generates optimal | 8 // but it is absolutely needed to make sure gcc generates optimal |
| 9 // code. gcc is not happy when attempting to inline too deep. | 9 // code. gcc is not happy when attempting to inline too deep. |
| 10 // | 10 // |
| (...skipping 6823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6834 } | 6834 } |
| 6835 | 6835 |
| 6836 | 6836 |
| 6837 bool AccessorInfo::IsCompatibleReceiver(Object* receiver) { | 6837 bool AccessorInfo::IsCompatibleReceiver(Object* receiver) { |
| 6838 if (!HasExpectedReceiverType()) return true; | 6838 if (!HasExpectedReceiverType()) return true; |
| 6839 if (!receiver->IsJSObject()) return false; | 6839 if (!receiver->IsJSObject()) return false; |
| 6840 return FunctionTemplateInfo::cast(expected_receiver_type()) | 6840 return FunctionTemplateInfo::cast(expected_receiver_type()) |
| 6841 ->IsTemplateFor(JSObject::cast(receiver)->map()); | 6841 ->IsTemplateFor(JSObject::cast(receiver)->map()); |
| 6842 } | 6842 } |
| 6843 | 6843 |
| 6844 bool AccessorInfo::can_fast_call() { |
| 6845 int value = flag()->value(); |
| 6846 return AccessorOptimizeLevel::decode(value); |
| 6847 } |
| 6848 |
| 6849 void AccessorInfo::set_can_fast_call(bool fast_call) { |
| 6850 int value = flag()->value(); |
| 6851 set_flag( |
| 6852 Smi::FromInt(AccessorOptimizeLevel::update(value, fast_call)), |
| 6853 SKIP_WRITE_BARRIER); |
| 6854 } |
| 6844 | 6855 |
| 6845 void ExecutableAccessorInfo::clear_setter() { | 6856 void ExecutableAccessorInfo::clear_setter() { |
| 6846 set_setter(GetIsolate()->heap()->undefined_value(), SKIP_WRITE_BARRIER); | 6857 set_setter(GetIsolate()->heap()->undefined_value(), SKIP_WRITE_BARRIER); |
| 6847 } | 6858 } |
| 6848 | 6859 |
| 6849 | 6860 |
| 6850 template<typename Derived, typename Shape, typename Key> | 6861 template<typename Derived, typename Shape, typename Key> |
| 6851 void Dictionary<Derived, Shape, Key>::SetEntry(int entry, | 6862 void Dictionary<Derived, Shape, Key>::SetEntry(int entry, |
| 6852 Handle<Object> key, | 6863 Handle<Object> key, |
| 6853 Handle<Object> value) { | 6864 Handle<Object> value) { |
| (...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7288 #undef READ_SHORT_FIELD | 7299 #undef READ_SHORT_FIELD |
| 7289 #undef WRITE_SHORT_FIELD | 7300 #undef WRITE_SHORT_FIELD |
| 7290 #undef READ_BYTE_FIELD | 7301 #undef READ_BYTE_FIELD |
| 7291 #undef WRITE_BYTE_FIELD | 7302 #undef WRITE_BYTE_FIELD |
| 7292 #undef NOBARRIER_READ_BYTE_FIELD | 7303 #undef NOBARRIER_READ_BYTE_FIELD |
| 7293 #undef NOBARRIER_WRITE_BYTE_FIELD | 7304 #undef NOBARRIER_WRITE_BYTE_FIELD |
| 7294 | 7305 |
| 7295 } } // namespace v8::internal | 7306 } } // namespace v8::internal |
| 7296 | 7307 |
| 7297 #endif // V8_OBJECTS_INL_H_ | 7308 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |