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 6981 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6992 | 6992 |
6993 | 6993 |
6994 bool AccessorInfo::IsCompatibleReceiver(Object* receiver) { | 6994 bool AccessorInfo::IsCompatibleReceiver(Object* receiver) { |
6995 if (!HasExpectedReceiverType()) return true; | 6995 if (!HasExpectedReceiverType()) return true; |
6996 if (!receiver->IsJSObject()) return false; | 6996 if (!receiver->IsJSObject()) return false; |
6997 return FunctionTemplateInfo::cast(expected_receiver_type()) | 6997 return FunctionTemplateInfo::cast(expected_receiver_type()) |
6998 ->IsTemplateFor(JSObject::cast(receiver)->map()); | 6998 ->IsTemplateFor(JSObject::cast(receiver)->map()); |
6999 } | 6999 } |
7000 | 7000 |
7001 | 7001 |
7002 void ExecutableAccessorInfo::clear_setter() { | 7002 // static |
7003 auto foreign = GetIsolate()->factory()->NewForeign( | 7003 void ExecutableAccessorInfo::ClearSetter(Handle<ExecutableAccessorInfo> info) { |
| 7004 auto foreign = info->GetIsolate()->factory()->NewForeign( |
7004 reinterpret_cast<v8::internal::Address>( | 7005 reinterpret_cast<v8::internal::Address>( |
7005 reinterpret_cast<intptr_t>(nullptr))); | 7006 reinterpret_cast<intptr_t>(nullptr))); |
7006 set_setter(*foreign); | 7007 info->set_setter(*foreign); |
7007 } | 7008 } |
7008 | 7009 |
7009 | 7010 |
7010 template<typename Derived, typename Shape, typename Key> | 7011 template<typename Derived, typename Shape, typename Key> |
7011 void Dictionary<Derived, Shape, Key>::SetEntry(int entry, | 7012 void Dictionary<Derived, Shape, Key>::SetEntry(int entry, |
7012 Handle<Object> key, | 7013 Handle<Object> key, |
7013 Handle<Object> value) { | 7014 Handle<Object> value) { |
7014 SetEntry(entry, key, value, PropertyDetails(Smi::FromInt(0))); | 7015 SetEntry(entry, key, value, PropertyDetails(Smi::FromInt(0))); |
7015 } | 7016 } |
7016 | 7017 |
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7542 #undef READ_SHORT_FIELD | 7543 #undef READ_SHORT_FIELD |
7543 #undef WRITE_SHORT_FIELD | 7544 #undef WRITE_SHORT_FIELD |
7544 #undef READ_BYTE_FIELD | 7545 #undef READ_BYTE_FIELD |
7545 #undef WRITE_BYTE_FIELD | 7546 #undef WRITE_BYTE_FIELD |
7546 #undef NOBARRIER_READ_BYTE_FIELD | 7547 #undef NOBARRIER_READ_BYTE_FIELD |
7547 #undef NOBARRIER_WRITE_BYTE_FIELD | 7548 #undef NOBARRIER_WRITE_BYTE_FIELD |
7548 | 7549 |
7549 } } // namespace v8::internal | 7550 } } // namespace v8::internal |
7550 | 7551 |
7551 #endif // V8_OBJECTS_INL_H_ | 7552 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |