Chromium Code Reviews| 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 9508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 9519 inline void set_property_attributes(PropertyAttributes attributes); | 9519 inline void set_property_attributes(PropertyAttributes attributes); |
| 9520 | 9520 |
| 9521 // Checks whether the given receiver is compatible with this accessor. | 9521 // Checks whether the given receiver is compatible with this accessor. |
| 9522 inline bool IsCompatibleReceiver(Object* receiver); | 9522 inline bool IsCompatibleReceiver(Object* receiver); |
| 9523 | 9523 |
| 9524 static inline AccessorInfo* cast(Object* obj); | 9524 static inline AccessorInfo* cast(Object* obj); |
| 9525 | 9525 |
| 9526 // Dispatched behavior. | 9526 // Dispatched behavior. |
| 9527 DECLARE_VERIFIER(AccessorInfo) | 9527 DECLARE_VERIFIER(AccessorInfo) |
| 9528 | 9528 |
| 9529 static int AppendUnique(Handle<Object> descriptors, | |
|
Michael Starzinger
2013/09/03 14:00:57
nit: Can we have a short one-liner comment describ
| |
| 9530 Handle<FixedArray> array, | |
| 9531 int valid_descriptors); | |
| 9529 | 9532 |
| 9530 static const int kNameOffset = HeapObject::kHeaderSize; | 9533 static const int kNameOffset = HeapObject::kHeaderSize; |
| 9531 static const int kFlagOffset = kNameOffset + kPointerSize; | 9534 static const int kFlagOffset = kNameOffset + kPointerSize; |
| 9532 static const int kExpectedReceiverTypeOffset = kFlagOffset + kPointerSize; | 9535 static const int kExpectedReceiverTypeOffset = kFlagOffset + kPointerSize; |
| 9533 static const int kSize = kExpectedReceiverTypeOffset + kPointerSize; | 9536 static const int kSize = kExpectedReceiverTypeOffset + kPointerSize; |
| 9534 | 9537 |
| 9535 private: | 9538 private: |
| 9536 // Bit positions in flag. | 9539 // Bit positions in flag. |
| 9537 static const int kAllCanReadBit = 0; | 9540 static const int kAllCanReadBit = 0; |
| 9538 static const int kAllCanWriteBit = 1; | 9541 static const int kAllCanWriteBit = 1; |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 9812 | 9815 |
| 9813 private: | 9816 private: |
| 9814 DISALLOW_IMPLICIT_CONSTRUCTORS(CallHandlerInfo); | 9817 DISALLOW_IMPLICIT_CONSTRUCTORS(CallHandlerInfo); |
| 9815 }; | 9818 }; |
| 9816 | 9819 |
| 9817 | 9820 |
| 9818 class TemplateInfo: public Struct { | 9821 class TemplateInfo: public Struct { |
| 9819 public: | 9822 public: |
| 9820 DECL_ACCESSORS(tag, Object) | 9823 DECL_ACCESSORS(tag, Object) |
| 9821 DECL_ACCESSORS(property_list, Object) | 9824 DECL_ACCESSORS(property_list, Object) |
| 9825 DECL_ACCESSORS(property_accessors, Object) | |
| 9822 | 9826 |
| 9823 DECLARE_VERIFIER(TemplateInfo) | 9827 DECLARE_VERIFIER(TemplateInfo) |
| 9824 | 9828 |
| 9825 static const int kTagOffset = HeapObject::kHeaderSize; | 9829 static const int kTagOffset = HeapObject::kHeaderSize; |
| 9826 static const int kPropertyListOffset = kTagOffset + kPointerSize; | 9830 static const int kPropertyListOffset = kTagOffset + kPointerSize; |
| 9827 static const int kHeaderSize = kPropertyListOffset + kPointerSize; | 9831 static const int kPropertyAccessorsOffset = |
| 9832 kPropertyListOffset + kPointerSize; | |
| 9833 static const int kHeaderSize = kPropertyAccessorsOffset + kPointerSize; | |
| 9828 | 9834 |
| 9829 private: | 9835 private: |
| 9830 DISALLOW_IMPLICIT_CONSTRUCTORS(TemplateInfo); | 9836 DISALLOW_IMPLICIT_CONSTRUCTORS(TemplateInfo); |
| 9831 }; | 9837 }; |
| 9832 | 9838 |
| 9833 | 9839 |
| 9834 class FunctionTemplateInfo: public TemplateInfo { | 9840 class FunctionTemplateInfo: public TemplateInfo { |
| 9835 public: | 9841 public: |
| 9836 DECL_ACCESSORS(serial_number, Object) | 9842 DECL_ACCESSORS(serial_number, Object) |
| 9837 DECL_ACCESSORS(call_code, Object) | 9843 DECL_ACCESSORS(call_code, Object) |
| 9838 DECL_ACCESSORS(property_accessors, Object) | |
| 9839 DECL_ACCESSORS(prototype_template, Object) | 9844 DECL_ACCESSORS(prototype_template, Object) |
| 9840 DECL_ACCESSORS(parent_template, Object) | 9845 DECL_ACCESSORS(parent_template, Object) |
| 9841 DECL_ACCESSORS(named_property_handler, Object) | 9846 DECL_ACCESSORS(named_property_handler, Object) |
| 9842 DECL_ACCESSORS(indexed_property_handler, Object) | 9847 DECL_ACCESSORS(indexed_property_handler, Object) |
| 9843 DECL_ACCESSORS(instance_template, Object) | 9848 DECL_ACCESSORS(instance_template, Object) |
| 9844 DECL_ACCESSORS(class_name, Object) | 9849 DECL_ACCESSORS(class_name, Object) |
| 9845 DECL_ACCESSORS(signature, Object) | 9850 DECL_ACCESSORS(signature, Object) |
| 9846 DECL_ACCESSORS(instance_call_handler, Object) | 9851 DECL_ACCESSORS(instance_call_handler, Object) |
| 9847 DECL_ACCESSORS(access_check_info, Object) | 9852 DECL_ACCESSORS(access_check_info, Object) |
| 9848 DECL_ACCESSORS(flag, Smi) | 9853 DECL_ACCESSORS(flag, Smi) |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 9859 DECL_BOOLEAN_ACCESSORS(read_only_prototype) | 9864 DECL_BOOLEAN_ACCESSORS(read_only_prototype) |
| 9860 | 9865 |
| 9861 static inline FunctionTemplateInfo* cast(Object* obj); | 9866 static inline FunctionTemplateInfo* cast(Object* obj); |
| 9862 | 9867 |
| 9863 // Dispatched behavior. | 9868 // Dispatched behavior. |
| 9864 DECLARE_PRINTER(FunctionTemplateInfo) | 9869 DECLARE_PRINTER(FunctionTemplateInfo) |
| 9865 DECLARE_VERIFIER(FunctionTemplateInfo) | 9870 DECLARE_VERIFIER(FunctionTemplateInfo) |
| 9866 | 9871 |
| 9867 static const int kSerialNumberOffset = TemplateInfo::kHeaderSize; | 9872 static const int kSerialNumberOffset = TemplateInfo::kHeaderSize; |
| 9868 static const int kCallCodeOffset = kSerialNumberOffset + kPointerSize; | 9873 static const int kCallCodeOffset = kSerialNumberOffset + kPointerSize; |
| 9869 static const int kPropertyAccessorsOffset = kCallCodeOffset + kPointerSize; | |
| 9870 static const int kPrototypeTemplateOffset = | 9874 static const int kPrototypeTemplateOffset = |
| 9871 kPropertyAccessorsOffset + kPointerSize; | 9875 kCallCodeOffset + kPointerSize; |
| 9872 static const int kParentTemplateOffset = | 9876 static const int kParentTemplateOffset = |
| 9873 kPrototypeTemplateOffset + kPointerSize; | 9877 kPrototypeTemplateOffset + kPointerSize; |
| 9874 static const int kNamedPropertyHandlerOffset = | 9878 static const int kNamedPropertyHandlerOffset = |
| 9875 kParentTemplateOffset + kPointerSize; | 9879 kParentTemplateOffset + kPointerSize; |
| 9876 static const int kIndexedPropertyHandlerOffset = | 9880 static const int kIndexedPropertyHandlerOffset = |
| 9877 kNamedPropertyHandlerOffset + kPointerSize; | 9881 kNamedPropertyHandlerOffset + kPointerSize; |
| 9878 static const int kInstanceTemplateOffset = | 9882 static const int kInstanceTemplateOffset = |
| 9879 kIndexedPropertyHandlerOffset + kPointerSize; | 9883 kIndexedPropertyHandlerOffset + kPointerSize; |
| 9880 static const int kClassNameOffset = kInstanceTemplateOffset + kPointerSize; | 9884 static const int kClassNameOffset = kInstanceTemplateOffset + kPointerSize; |
| 9881 static const int kSignatureOffset = kClassNameOffset + kPointerSize; | 9885 static const int kSignatureOffset = kClassNameOffset + kPointerSize; |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 10187 } else { | 10191 } else { |
| 10188 value &= ~(1 << bit_position); | 10192 value &= ~(1 << bit_position); |
| 10189 } | 10193 } |
| 10190 return value; | 10194 return value; |
| 10191 } | 10195 } |
| 10192 }; | 10196 }; |
| 10193 | 10197 |
| 10194 } } // namespace v8::internal | 10198 } } // namespace v8::internal |
| 10195 | 10199 |
| 10196 #endif // V8_OBJECTS_H_ | 10200 #endif // V8_OBJECTS_H_ |
| OLD | NEW |