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 3161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3172 Descriptor* desc, | 3172 Descriptor* desc, |
3173 const WhitenessWitness&); | 3173 const WhitenessWitness&); |
3174 inline void Set(int descriptor_number, Descriptor* desc); | 3174 inline void Set(int descriptor_number, Descriptor* desc); |
3175 | 3175 |
3176 // Append automatically sets the enumeration index. This should only be used | 3176 // Append automatically sets the enumeration index. This should only be used |
3177 // to add descriptors in bulk at the end, followed by sorting the descriptor | 3177 // to add descriptors in bulk at the end, followed by sorting the descriptor |
3178 // array. | 3178 // array. |
3179 inline void Append(Descriptor* desc, const WhitenessWitness&); | 3179 inline void Append(Descriptor* desc, const WhitenessWitness&); |
3180 inline void Append(Descriptor* desc); | 3180 inline void Append(Descriptor* desc); |
3181 | 3181 |
| 3182 // Append a NeaderArray of descriptor. |
| 3183 // Returns the new value of valid_descriptors. |
| 3184 static int AppendDescriptors(Handle<DescriptorArray> array, |
| 3185 int valid_descriptors, |
| 3186 Handle<Object> descriptors); |
| 3187 |
3182 // Transfer a complete descriptor from the src descriptor array to this | 3188 // Transfer a complete descriptor from the src descriptor array to this |
3183 // descriptor array. | 3189 // descriptor array. |
3184 void CopyFrom(int dst_index, | 3190 void CopyFrom(int dst_index, |
3185 DescriptorArray* src, | 3191 DescriptorArray* src, |
3186 int src_index, | 3192 int src_index, |
3187 const WhitenessWitness&); | 3193 const WhitenessWitness&); |
3188 MUST_USE_RESULT MaybeObject* Merge(int verbatim, | 3194 MUST_USE_RESULT MaybeObject* Merge(int verbatim, |
3189 int valid, | 3195 int valid, |
3190 int new_size, | 3196 int new_size, |
3191 DescriptorArray* other); | 3197 DescriptorArray* other); |
(...skipping 6604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9796 | 9802 |
9797 private: | 9803 private: |
9798 DISALLOW_IMPLICIT_CONSTRUCTORS(CallHandlerInfo); | 9804 DISALLOW_IMPLICIT_CONSTRUCTORS(CallHandlerInfo); |
9799 }; | 9805 }; |
9800 | 9806 |
9801 | 9807 |
9802 class TemplateInfo: public Struct { | 9808 class TemplateInfo: public Struct { |
9803 public: | 9809 public: |
9804 DECL_ACCESSORS(tag, Object) | 9810 DECL_ACCESSORS(tag, Object) |
9805 DECL_ACCESSORS(property_list, Object) | 9811 DECL_ACCESSORS(property_list, Object) |
| 9812 DECL_ACCESSORS(property_accessors, Object) |
9806 | 9813 |
9807 DECLARE_VERIFIER(TemplateInfo) | 9814 DECLARE_VERIFIER(TemplateInfo) |
9808 | 9815 |
9809 static const int kTagOffset = HeapObject::kHeaderSize; | 9816 static const int kTagOffset = HeapObject::kHeaderSize; |
9810 static const int kPropertyListOffset = kTagOffset + kPointerSize; | 9817 static const int kPropertyListOffset = kTagOffset + kPointerSize; |
9811 static const int kHeaderSize = kPropertyListOffset + kPointerSize; | 9818 static const int kPropertyAccessorsOffset = |
| 9819 kPropertyListOffset + kPointerSize; |
| 9820 static const int kHeaderSize = kPropertyAccessorsOffset + kPointerSize; |
9812 | 9821 |
9813 private: | 9822 private: |
9814 DISALLOW_IMPLICIT_CONSTRUCTORS(TemplateInfo); | 9823 DISALLOW_IMPLICIT_CONSTRUCTORS(TemplateInfo); |
9815 }; | 9824 }; |
9816 | 9825 |
9817 | 9826 |
9818 class FunctionTemplateInfo: public TemplateInfo { | 9827 class FunctionTemplateInfo: public TemplateInfo { |
9819 public: | 9828 public: |
9820 DECL_ACCESSORS(serial_number, Object) | 9829 DECL_ACCESSORS(serial_number, Object) |
9821 DECL_ACCESSORS(call_code, Object) | 9830 DECL_ACCESSORS(call_code, Object) |
9822 DECL_ACCESSORS(property_accessors, Object) | |
9823 DECL_ACCESSORS(prototype_template, Object) | 9831 DECL_ACCESSORS(prototype_template, Object) |
9824 DECL_ACCESSORS(parent_template, Object) | 9832 DECL_ACCESSORS(parent_template, Object) |
9825 DECL_ACCESSORS(named_property_handler, Object) | 9833 DECL_ACCESSORS(named_property_handler, Object) |
9826 DECL_ACCESSORS(indexed_property_handler, Object) | 9834 DECL_ACCESSORS(indexed_property_handler, Object) |
9827 DECL_ACCESSORS(instance_template, Object) | 9835 DECL_ACCESSORS(instance_template, Object) |
9828 DECL_ACCESSORS(class_name, Object) | 9836 DECL_ACCESSORS(class_name, Object) |
9829 DECL_ACCESSORS(signature, Object) | 9837 DECL_ACCESSORS(signature, Object) |
9830 DECL_ACCESSORS(instance_call_handler, Object) | 9838 DECL_ACCESSORS(instance_call_handler, Object) |
9831 DECL_ACCESSORS(access_check_info, Object) | 9839 DECL_ACCESSORS(access_check_info, Object) |
9832 DECL_ACCESSORS(flag, Smi) | 9840 DECL_ACCESSORS(flag, Smi) |
(...skipping 10 matching lines...) Expand all Loading... |
9843 DECL_BOOLEAN_ACCESSORS(read_only_prototype) | 9851 DECL_BOOLEAN_ACCESSORS(read_only_prototype) |
9844 | 9852 |
9845 static inline FunctionTemplateInfo* cast(Object* obj); | 9853 static inline FunctionTemplateInfo* cast(Object* obj); |
9846 | 9854 |
9847 // Dispatched behavior. | 9855 // Dispatched behavior. |
9848 DECLARE_PRINTER(FunctionTemplateInfo) | 9856 DECLARE_PRINTER(FunctionTemplateInfo) |
9849 DECLARE_VERIFIER(FunctionTemplateInfo) | 9857 DECLARE_VERIFIER(FunctionTemplateInfo) |
9850 | 9858 |
9851 static const int kSerialNumberOffset = TemplateInfo::kHeaderSize; | 9859 static const int kSerialNumberOffset = TemplateInfo::kHeaderSize; |
9852 static const int kCallCodeOffset = kSerialNumberOffset + kPointerSize; | 9860 static const int kCallCodeOffset = kSerialNumberOffset + kPointerSize; |
9853 static const int kPropertyAccessorsOffset = kCallCodeOffset + kPointerSize; | |
9854 static const int kPrototypeTemplateOffset = | 9861 static const int kPrototypeTemplateOffset = |
9855 kPropertyAccessorsOffset + kPointerSize; | 9862 kCallCodeOffset + kPointerSize; |
9856 static const int kParentTemplateOffset = | 9863 static const int kParentTemplateOffset = |
9857 kPrototypeTemplateOffset + kPointerSize; | 9864 kPrototypeTemplateOffset + kPointerSize; |
9858 static const int kNamedPropertyHandlerOffset = | 9865 static const int kNamedPropertyHandlerOffset = |
9859 kParentTemplateOffset + kPointerSize; | 9866 kParentTemplateOffset + kPointerSize; |
9860 static const int kIndexedPropertyHandlerOffset = | 9867 static const int kIndexedPropertyHandlerOffset = |
9861 kNamedPropertyHandlerOffset + kPointerSize; | 9868 kNamedPropertyHandlerOffset + kPointerSize; |
9862 static const int kInstanceTemplateOffset = | 9869 static const int kInstanceTemplateOffset = |
9863 kIndexedPropertyHandlerOffset + kPointerSize; | 9870 kIndexedPropertyHandlerOffset + kPointerSize; |
9864 static const int kClassNameOffset = kInstanceTemplateOffset + kPointerSize; | 9871 static const int kClassNameOffset = kInstanceTemplateOffset + kPointerSize; |
9865 static const int kSignatureOffset = kClassNameOffset + kPointerSize; | 9872 static const int kSignatureOffset = kClassNameOffset + kPointerSize; |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10171 } else { | 10178 } else { |
10172 value &= ~(1 << bit_position); | 10179 value &= ~(1 << bit_position); |
10173 } | 10180 } |
10174 return value; | 10181 return value; |
10175 } | 10182 } |
10176 }; | 10183 }; |
10177 | 10184 |
10178 } } // namespace v8::internal | 10185 } } // namespace v8::internal |
10179 | 10186 |
10180 #endif // V8_OBJECTS_H_ | 10187 #endif // V8_OBJECTS_H_ |
OLD | NEW |