OLD | NEW |
---|---|
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 4422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4433 kDescriptorOffset) | 4433 kDescriptorOffset) |
4434 | 4434 |
4435 ACCESSORS(ExecutableAccessorInfo, getter, Object, kGetterOffset) | 4435 ACCESSORS(ExecutableAccessorInfo, getter, Object, kGetterOffset) |
4436 ACCESSORS(ExecutableAccessorInfo, setter, Object, kSetterOffset) | 4436 ACCESSORS(ExecutableAccessorInfo, setter, Object, kSetterOffset) |
4437 ACCESSORS(ExecutableAccessorInfo, data, Object, kDataOffset) | 4437 ACCESSORS(ExecutableAccessorInfo, data, Object, kDataOffset) |
4438 | 4438 |
4439 ACCESSORS(Box, value, Object, kValueOffset) | 4439 ACCESSORS(Box, value, Object, kValueOffset) |
4440 | 4440 |
4441 ACCESSORS(AccessorPair, getter, Object, kGetterOffset) | 4441 ACCESSORS(AccessorPair, getter, Object, kGetterOffset) |
4442 ACCESSORS(AccessorPair, setter, Object, kSetterOffset) | 4442 ACCESSORS(AccessorPair, setter, Object, kSetterOffset) |
4443 ACCESSORS_TO_SMI(AccessorPair, flag, kFlagOffset) | |
Sven Panne
2013/08/21 10:46:25
Can we rename this from plain "flag" to something
dcarney
2013/08/21 10:59:33
okay, but all the flag fields everywhere else are
| |
4443 | 4444 |
4444 ACCESSORS(AccessCheckInfo, named_callback, Object, kNamedCallbackOffset) | 4445 ACCESSORS(AccessCheckInfo, named_callback, Object, kNamedCallbackOffset) |
4445 ACCESSORS(AccessCheckInfo, indexed_callback, Object, kIndexedCallbackOffset) | 4446 ACCESSORS(AccessCheckInfo, indexed_callback, Object, kIndexedCallbackOffset) |
4446 ACCESSORS(AccessCheckInfo, data, Object, kDataOffset) | 4447 ACCESSORS(AccessCheckInfo, data, Object, kDataOffset) |
4447 | 4448 |
4448 ACCESSORS(InterceptorInfo, getter, Object, kGetterOffset) | 4449 ACCESSORS(InterceptorInfo, getter, Object, kGetterOffset) |
4449 ACCESSORS(InterceptorInfo, setter, Object, kSetterOffset) | 4450 ACCESSORS(InterceptorInfo, setter, Object, kSetterOffset) |
4450 ACCESSORS(InterceptorInfo, query, Object, kQueryOffset) | 4451 ACCESSORS(InterceptorInfo, query, Object, kQueryOffset) |
4451 ACCESSORS(InterceptorInfo, deleter, Object, kDeleterOffset) | 4452 ACCESSORS(InterceptorInfo, deleter, Object, kDeleterOffset) |
4452 ACCESSORS(InterceptorInfo, enumerator, Object, kEnumeratorOffset) | 4453 ACCESSORS(InterceptorInfo, enumerator, Object, kEnumeratorOffset) |
(...skipping 1376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5829 } | 5830 } |
5830 | 5831 |
5831 | 5832 |
5832 bool AccessorInfo::IsCompatibleReceiver(Object* receiver) { | 5833 bool AccessorInfo::IsCompatibleReceiver(Object* receiver) { |
5833 Object* function_template = expected_receiver_type(); | 5834 Object* function_template = expected_receiver_type(); |
5834 if (!function_template->IsFunctionTemplateInfo()) return true; | 5835 if (!function_template->IsFunctionTemplateInfo()) return true; |
5835 return receiver->IsInstanceOf(FunctionTemplateInfo::cast(function_template)); | 5836 return receiver->IsInstanceOf(FunctionTemplateInfo::cast(function_template)); |
5836 } | 5837 } |
5837 | 5838 |
5838 | 5839 |
5840 void AccessorPair::set_access_flags(v8::AccessControl access_control) { | |
5841 int current = flag()->value(); | |
5842 current = BooleanBit::set(current, | |
5843 kProhibitsOverwritingBit, | |
5844 access_control & PROHIBITS_OVERWRITING); | |
5845 current = BooleanBit::set(current, | |
5846 kAllCanReadBit, | |
5847 access_control & ALL_CAN_READ); | |
5848 current = BooleanBit::set(current, | |
5849 kAllCanWriteBit, | |
5850 access_control & ALL_CAN_WRITE); | |
5851 set_flag(Smi::FromInt(current)); | |
5852 } | |
5853 | |
5854 | |
5855 bool AccessorPair::all_can_read() { | |
5856 return BooleanBit::get(flag(), kAllCanReadBit); | |
5857 } | |
5858 | |
5859 | |
5860 bool AccessorPair::all_can_write() { | |
5861 return BooleanBit::get(flag(), kAllCanWriteBit); | |
5862 } | |
5863 | |
5864 | |
5865 bool AccessorPair::prohibits_overwriting() { | |
5866 return BooleanBit::get(flag(), kProhibitsOverwritingBit); | |
5867 } | |
5868 | |
5869 | |
5839 template<typename Shape, typename Key> | 5870 template<typename Shape, typename Key> |
5840 void Dictionary<Shape, Key>::SetEntry(int entry, | 5871 void Dictionary<Shape, Key>::SetEntry(int entry, |
5841 Object* key, | 5872 Object* key, |
5842 Object* value) { | 5873 Object* value) { |
5843 SetEntry(entry, key, value, PropertyDetails(Smi::FromInt(0))); | 5874 SetEntry(entry, key, value, PropertyDetails(Smi::FromInt(0))); |
5844 } | 5875 } |
5845 | 5876 |
5846 | 5877 |
5847 template<typename Shape, typename Key> | 5878 template<typename Shape, typename Key> |
5848 void Dictionary<Shape, Key>::SetEntry(int entry, | 5879 void Dictionary<Shape, Key>::SetEntry(int entry, |
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6244 #undef WRITE_UINT32_FIELD | 6275 #undef WRITE_UINT32_FIELD |
6245 #undef READ_SHORT_FIELD | 6276 #undef READ_SHORT_FIELD |
6246 #undef WRITE_SHORT_FIELD | 6277 #undef WRITE_SHORT_FIELD |
6247 #undef READ_BYTE_FIELD | 6278 #undef READ_BYTE_FIELD |
6248 #undef WRITE_BYTE_FIELD | 6279 #undef WRITE_BYTE_FIELD |
6249 | 6280 |
6250 | 6281 |
6251 } } // namespace v8::internal | 6282 } } // namespace v8::internal |
6252 | 6283 |
6253 #endif // V8_OBJECTS_INL_H_ | 6284 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |