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 3512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3523 ACCESSORS(GlobalObject, global_context, Context, kGlobalContextOffset) | 3523 ACCESSORS(GlobalObject, global_context, Context, kGlobalContextOffset) |
3524 ACCESSORS(GlobalObject, global_receiver, JSObject, kGlobalReceiverOffset) | 3524 ACCESSORS(GlobalObject, global_receiver, JSObject, kGlobalReceiverOffset) |
3525 | 3525 |
3526 ACCESSORS(JSGlobalProxy, context, Object, kContextOffset) | 3526 ACCESSORS(JSGlobalProxy, context, Object, kContextOffset) |
3527 | 3527 |
3528 ACCESSORS(AccessorInfo, getter, Object, kGetterOffset) | 3528 ACCESSORS(AccessorInfo, getter, Object, kGetterOffset) |
3529 ACCESSORS(AccessorInfo, setter, Object, kSetterOffset) | 3529 ACCESSORS(AccessorInfo, setter, Object, kSetterOffset) |
3530 ACCESSORS(AccessorInfo, data, Object, kDataOffset) | 3530 ACCESSORS(AccessorInfo, data, Object, kDataOffset) |
3531 ACCESSORS(AccessorInfo, name, Object, kNameOffset) | 3531 ACCESSORS(AccessorInfo, name, Object, kNameOffset) |
3532 ACCESSORS_TO_SMI(AccessorInfo, flag, kFlagOffset) | 3532 ACCESSORS_TO_SMI(AccessorInfo, flag, kFlagOffset) |
| 3533 ACCESSORS(AccessorInfo, compatible, Object, kCompatibleOffset) |
3533 | 3534 |
3534 ACCESSORS(AccessorPair, getter, Object, kGetterOffset) | 3535 ACCESSORS(AccessorPair, getter, Object, kGetterOffset) |
3535 ACCESSORS(AccessorPair, setter, Object, kSetterOffset) | 3536 ACCESSORS(AccessorPair, setter, Object, kSetterOffset) |
3536 | 3537 |
3537 ACCESSORS(AccessCheckInfo, named_callback, Object, kNamedCallbackOffset) | 3538 ACCESSORS(AccessCheckInfo, named_callback, Object, kNamedCallbackOffset) |
3538 ACCESSORS(AccessCheckInfo, indexed_callback, Object, kIndexedCallbackOffset) | 3539 ACCESSORS(AccessCheckInfo, indexed_callback, Object, kIndexedCallbackOffset) |
3539 ACCESSORS(AccessCheckInfo, data, Object, kDataOffset) | 3540 ACCESSORS(AccessCheckInfo, data, Object, kDataOffset) |
3540 | 3541 |
3541 ACCESSORS(InterceptorInfo, getter, Object, kGetterOffset) | 3542 ACCESSORS(InterceptorInfo, getter, Object, kGetterOffset) |
3542 ACCESSORS(InterceptorInfo, setter, Object, kSetterOffset) | 3543 ACCESSORS(InterceptorInfo, setter, Object, kSetterOffset) |
(...skipping 1191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4734 PropertyAttributes AccessorInfo::property_attributes() { | 4735 PropertyAttributes AccessorInfo::property_attributes() { |
4735 return AttributesField::decode(static_cast<uint32_t>(flag()->value())); | 4736 return AttributesField::decode(static_cast<uint32_t>(flag()->value())); |
4736 } | 4737 } |
4737 | 4738 |
4738 | 4739 |
4739 void AccessorInfo::set_property_attributes(PropertyAttributes attributes) { | 4740 void AccessorInfo::set_property_attributes(PropertyAttributes attributes) { |
4740 set_flag(Smi::FromInt(AttributesField::update(flag()->value(), attributes))); | 4741 set_flag(Smi::FromInt(AttributesField::update(flag()->value(), attributes))); |
4741 } | 4742 } |
4742 | 4743 |
4743 | 4744 |
| 4745 bool AccessorInfo::IsCompatibleReceiver(Object* receiver) { |
| 4746 Object* function_template = compatible(); |
| 4747 if (!function_template->IsFunctionTemplateInfo()) return true; |
| 4748 return receiver->IsInstanceOf(FunctionTemplateInfo::cast(function_template)); |
| 4749 } |
| 4750 |
| 4751 |
4744 template<typename Shape, typename Key> | 4752 template<typename Shape, typename Key> |
4745 void Dictionary<Shape, Key>::SetEntry(int entry, | 4753 void Dictionary<Shape, Key>::SetEntry(int entry, |
4746 Object* key, | 4754 Object* key, |
4747 Object* value) { | 4755 Object* value) { |
4748 SetEntry(entry, key, value, PropertyDetails(Smi::FromInt(0))); | 4756 SetEntry(entry, key, value, PropertyDetails(Smi::FromInt(0))); |
4749 } | 4757 } |
4750 | 4758 |
4751 | 4759 |
4752 template<typename Shape, typename Key> | 4760 template<typename Shape, typename Key> |
4753 void Dictionary<Shape, Key>::SetEntry(int entry, | 4761 void Dictionary<Shape, Key>::SetEntry(int entry, |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5066 #undef WRITE_UINT32_FIELD | 5074 #undef WRITE_UINT32_FIELD |
5067 #undef READ_SHORT_FIELD | 5075 #undef READ_SHORT_FIELD |
5068 #undef WRITE_SHORT_FIELD | 5076 #undef WRITE_SHORT_FIELD |
5069 #undef READ_BYTE_FIELD | 5077 #undef READ_BYTE_FIELD |
5070 #undef WRITE_BYTE_FIELD | 5078 #undef WRITE_BYTE_FIELD |
5071 | 5079 |
5072 | 5080 |
5073 } } // namespace v8::internal | 5081 } } // namespace v8::internal |
5074 | 5082 |
5075 #endif // V8_OBJECTS_INL_H_ | 5083 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |