| 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 9471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9482 inline void set_property_attributes(PropertyAttributes attributes); | 9482 inline void set_property_attributes(PropertyAttributes attributes); |
| 9483 | 9483 |
| 9484 // Checks whether the given receiver is compatible with this accessor. | 9484 // Checks whether the given receiver is compatible with this accessor. |
| 9485 inline bool IsCompatibleReceiver(Object* receiver); | 9485 inline bool IsCompatibleReceiver(Object* receiver); |
| 9486 | 9486 |
| 9487 static inline AccessorInfo* cast(Object* obj); | 9487 static inline AccessorInfo* cast(Object* obj); |
| 9488 | 9488 |
| 9489 // Dispatched behavior. | 9489 // Dispatched behavior. |
| 9490 DECLARE_VERIFIER(AccessorInfo) | 9490 DECLARE_VERIFIER(AccessorInfo) |
| 9491 | 9491 |
| 9492 // Append all descriptors to the array that are not already there. |
| 9493 // Return number added. |
| 9494 static int AppendUnique(Handle<Object> descriptors, |
| 9495 Handle<FixedArray> array, |
| 9496 int valid_descriptors); |
| 9492 | 9497 |
| 9493 static const int kNameOffset = HeapObject::kHeaderSize; | 9498 static const int kNameOffset = HeapObject::kHeaderSize; |
| 9494 static const int kFlagOffset = kNameOffset + kPointerSize; | 9499 static const int kFlagOffset = kNameOffset + kPointerSize; |
| 9495 static const int kExpectedReceiverTypeOffset = kFlagOffset + kPointerSize; | 9500 static const int kExpectedReceiverTypeOffset = kFlagOffset + kPointerSize; |
| 9496 static const int kSize = kExpectedReceiverTypeOffset + kPointerSize; | 9501 static const int kSize = kExpectedReceiverTypeOffset + kPointerSize; |
| 9497 | 9502 |
| 9498 private: | 9503 private: |
| 9499 // Bit positions in flag. | 9504 // Bit positions in flag. |
| 9500 static const int kAllCanReadBit = 0; | 9505 static const int kAllCanReadBit = 0; |
| 9501 static const int kAllCanWriteBit = 1; | 9506 static const int kAllCanWriteBit = 1; |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9788 | 9793 |
| 9789 private: | 9794 private: |
| 9790 DISALLOW_IMPLICIT_CONSTRUCTORS(CallHandlerInfo); | 9795 DISALLOW_IMPLICIT_CONSTRUCTORS(CallHandlerInfo); |
| 9791 }; | 9796 }; |
| 9792 | 9797 |
| 9793 | 9798 |
| 9794 class TemplateInfo: public Struct { | 9799 class TemplateInfo: public Struct { |
| 9795 public: | 9800 public: |
| 9796 DECL_ACCESSORS(tag, Object) | 9801 DECL_ACCESSORS(tag, Object) |
| 9797 DECL_ACCESSORS(property_list, Object) | 9802 DECL_ACCESSORS(property_list, Object) |
| 9803 DECL_ACCESSORS(property_accessors, Object) |
| 9798 | 9804 |
| 9799 DECLARE_VERIFIER(TemplateInfo) | 9805 DECLARE_VERIFIER(TemplateInfo) |
| 9800 | 9806 |
| 9801 static const int kTagOffset = HeapObject::kHeaderSize; | 9807 static const int kTagOffset = HeapObject::kHeaderSize; |
| 9802 static const int kPropertyListOffset = kTagOffset + kPointerSize; | 9808 static const int kPropertyListOffset = kTagOffset + kPointerSize; |
| 9803 static const int kHeaderSize = kPropertyListOffset + kPointerSize; | 9809 static const int kPropertyAccessorsOffset = |
| 9810 kPropertyListOffset + kPointerSize; |
| 9811 static const int kHeaderSize = kPropertyAccessorsOffset + kPointerSize; |
| 9804 | 9812 |
| 9805 private: | 9813 private: |
| 9806 DISALLOW_IMPLICIT_CONSTRUCTORS(TemplateInfo); | 9814 DISALLOW_IMPLICIT_CONSTRUCTORS(TemplateInfo); |
| 9807 }; | 9815 }; |
| 9808 | 9816 |
| 9809 | 9817 |
| 9810 class FunctionTemplateInfo: public TemplateInfo { | 9818 class FunctionTemplateInfo: public TemplateInfo { |
| 9811 public: | 9819 public: |
| 9812 DECL_ACCESSORS(serial_number, Object) | 9820 DECL_ACCESSORS(serial_number, Object) |
| 9813 DECL_ACCESSORS(call_code, Object) | 9821 DECL_ACCESSORS(call_code, Object) |
| 9814 DECL_ACCESSORS(property_accessors, Object) | |
| 9815 DECL_ACCESSORS(prototype_template, Object) | 9822 DECL_ACCESSORS(prototype_template, Object) |
| 9816 DECL_ACCESSORS(parent_template, Object) | 9823 DECL_ACCESSORS(parent_template, Object) |
| 9817 DECL_ACCESSORS(named_property_handler, Object) | 9824 DECL_ACCESSORS(named_property_handler, Object) |
| 9818 DECL_ACCESSORS(indexed_property_handler, Object) | 9825 DECL_ACCESSORS(indexed_property_handler, Object) |
| 9819 DECL_ACCESSORS(instance_template, Object) | 9826 DECL_ACCESSORS(instance_template, Object) |
| 9820 DECL_ACCESSORS(class_name, Object) | 9827 DECL_ACCESSORS(class_name, Object) |
| 9821 DECL_ACCESSORS(signature, Object) | 9828 DECL_ACCESSORS(signature, Object) |
| 9822 DECL_ACCESSORS(instance_call_handler, Object) | 9829 DECL_ACCESSORS(instance_call_handler, Object) |
| 9823 DECL_ACCESSORS(access_check_info, Object) | 9830 DECL_ACCESSORS(access_check_info, Object) |
| 9824 DECL_ACCESSORS(flag, Smi) | 9831 DECL_ACCESSORS(flag, Smi) |
| (...skipping 11 matching lines...) Expand all Loading... |
| 9836 DECL_BOOLEAN_ACCESSORS(remove_prototype) | 9843 DECL_BOOLEAN_ACCESSORS(remove_prototype) |
| 9837 | 9844 |
| 9838 static inline FunctionTemplateInfo* cast(Object* obj); | 9845 static inline FunctionTemplateInfo* cast(Object* obj); |
| 9839 | 9846 |
| 9840 // Dispatched behavior. | 9847 // Dispatched behavior. |
| 9841 DECLARE_PRINTER(FunctionTemplateInfo) | 9848 DECLARE_PRINTER(FunctionTemplateInfo) |
| 9842 DECLARE_VERIFIER(FunctionTemplateInfo) | 9849 DECLARE_VERIFIER(FunctionTemplateInfo) |
| 9843 | 9850 |
| 9844 static const int kSerialNumberOffset = TemplateInfo::kHeaderSize; | 9851 static const int kSerialNumberOffset = TemplateInfo::kHeaderSize; |
| 9845 static const int kCallCodeOffset = kSerialNumberOffset + kPointerSize; | 9852 static const int kCallCodeOffset = kSerialNumberOffset + kPointerSize; |
| 9846 static const int kPropertyAccessorsOffset = kCallCodeOffset + kPointerSize; | |
| 9847 static const int kPrototypeTemplateOffset = | 9853 static const int kPrototypeTemplateOffset = |
| 9848 kPropertyAccessorsOffset + kPointerSize; | 9854 kCallCodeOffset + kPointerSize; |
| 9849 static const int kParentTemplateOffset = | 9855 static const int kParentTemplateOffset = |
| 9850 kPrototypeTemplateOffset + kPointerSize; | 9856 kPrototypeTemplateOffset + kPointerSize; |
| 9851 static const int kNamedPropertyHandlerOffset = | 9857 static const int kNamedPropertyHandlerOffset = |
| 9852 kParentTemplateOffset + kPointerSize; | 9858 kParentTemplateOffset + kPointerSize; |
| 9853 static const int kIndexedPropertyHandlerOffset = | 9859 static const int kIndexedPropertyHandlerOffset = |
| 9854 kNamedPropertyHandlerOffset + kPointerSize; | 9860 kNamedPropertyHandlerOffset + kPointerSize; |
| 9855 static const int kInstanceTemplateOffset = | 9861 static const int kInstanceTemplateOffset = |
| 9856 kIndexedPropertyHandlerOffset + kPointerSize; | 9862 kIndexedPropertyHandlerOffset + kPointerSize; |
| 9857 static const int kClassNameOffset = kInstanceTemplateOffset + kPointerSize; | 9863 static const int kClassNameOffset = kInstanceTemplateOffset + kPointerSize; |
| 9858 static const int kSignatureOffset = kClassNameOffset + kPointerSize; | 9864 static const int kSignatureOffset = kClassNameOffset + kPointerSize; |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10165 } else { | 10171 } else { |
| 10166 value &= ~(1 << bit_position); | 10172 value &= ~(1 << bit_position); |
| 10167 } | 10173 } |
| 10168 return value; | 10174 return value; |
| 10169 } | 10175 } |
| 10170 }; | 10176 }; |
| 10171 | 10177 |
| 10172 } } // namespace v8::internal | 10178 } } // namespace v8::internal |
| 10173 | 10179 |
| 10174 #endif // V8_OBJECTS_H_ | 10180 #endif // V8_OBJECTS_H_ |
| OLD | NEW |