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 7004 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7015 | 7015 |
7016 bool AccessorInfo::IsCompatibleReceiver(Object* receiver) { | 7016 bool AccessorInfo::IsCompatibleReceiver(Object* receiver) { |
7017 if (!HasExpectedReceiverType()) return true; | 7017 if (!HasExpectedReceiverType()) return true; |
7018 if (!receiver->IsJSObject()) return false; | 7018 if (!receiver->IsJSObject()) return false; |
7019 return FunctionTemplateInfo::cast(expected_receiver_type()) | 7019 return FunctionTemplateInfo::cast(expected_receiver_type()) |
7020 ->IsTemplateFor(JSObject::cast(receiver)->map()); | 7020 ->IsTemplateFor(JSObject::cast(receiver)->map()); |
7021 } | 7021 } |
7022 | 7022 |
7023 | 7023 |
7024 void ExecutableAccessorInfo::clear_setter() { | 7024 void ExecutableAccessorInfo::clear_setter() { |
7025 set_setter(*GetIsolate()->factory()->NewForeign( | 7025 auto foreign = GetIsolate()->factory()->NewForeign( |
7026 reinterpret_cast<v8::internal::Address>( | 7026 reinterpret_cast<v8::internal::Address>( |
7027 reinterpret_cast<intptr_t>(nullptr)))); | 7027 reinterpret_cast<intptr_t>(nullptr))); |
| 7028 set_setter(*foreign); |
7028 } | 7029 } |
7029 | 7030 |
7030 | 7031 |
7031 template<typename Derived, typename Shape, typename Key> | 7032 template<typename Derived, typename Shape, typename Key> |
7032 void Dictionary<Derived, Shape, Key>::SetEntry(int entry, | 7033 void Dictionary<Derived, Shape, Key>::SetEntry(int entry, |
7033 Handle<Object> key, | 7034 Handle<Object> key, |
7034 Handle<Object> value) { | 7035 Handle<Object> value) { |
7035 SetEntry(entry, key, value, PropertyDetails(Smi::FromInt(0))); | 7036 SetEntry(entry, key, value, PropertyDetails(Smi::FromInt(0))); |
7036 } | 7037 } |
7037 | 7038 |
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7505 #undef READ_SHORT_FIELD | 7506 #undef READ_SHORT_FIELD |
7506 #undef WRITE_SHORT_FIELD | 7507 #undef WRITE_SHORT_FIELD |
7507 #undef READ_BYTE_FIELD | 7508 #undef READ_BYTE_FIELD |
7508 #undef WRITE_BYTE_FIELD | 7509 #undef WRITE_BYTE_FIELD |
7509 #undef NOBARRIER_READ_BYTE_FIELD | 7510 #undef NOBARRIER_READ_BYTE_FIELD |
7510 #undef NOBARRIER_WRITE_BYTE_FIELD | 7511 #undef NOBARRIER_WRITE_BYTE_FIELD |
7511 | 7512 |
7512 } } // namespace v8::internal | 7513 } } // namespace v8::internal |
7513 | 7514 |
7514 #endif // V8_OBJECTS_INL_H_ | 7515 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |