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 2555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2566 inline String* GetSortedKey(int descriptor_number); | 2566 inline String* GetSortedKey(int descriptor_number); |
2567 inline int GetSortedKeyIndex(int descriptor_number); | 2567 inline int GetSortedKeyIndex(int descriptor_number); |
2568 inline void SetSortedKey(int pointer, int descriptor_number); | 2568 inline void SetSortedKey(int pointer, int descriptor_number); |
2569 | 2569 |
2570 // Accessor for complete descriptor. | 2570 // Accessor for complete descriptor. |
2571 inline void Get(int descriptor_number, Descriptor* desc); | 2571 inline void Get(int descriptor_number, Descriptor* desc); |
2572 inline void Set(int descriptor_number, | 2572 inline void Set(int descriptor_number, |
2573 Descriptor* desc, | 2573 Descriptor* desc, |
2574 const WhitenessWitness&); | 2574 const WhitenessWitness&); |
2575 inline void Set(int descriptor_number, Descriptor* desc); | 2575 inline void Set(int descriptor_number, Descriptor* desc); |
2576 inline void EraseDescriptor(Heap* heap, int descriptor_number); | |
2577 | 2576 |
2578 // Append automatically sets the enumeration index. This should only be used | 2577 // Append automatically sets the enumeration index. This should only be used |
2579 // to add descriptors in bulk at the end, followed by sorting the descriptor | 2578 // to add descriptors in bulk at the end, followed by sorting the descriptor |
2580 // array. | 2579 // array. |
2581 inline void Append(Descriptor* desc, const WhitenessWitness&); | 2580 inline void Append(Descriptor* desc, const WhitenessWitness&); |
2582 inline void Append(Descriptor* desc); | 2581 inline void Append(Descriptor* desc); |
2583 | 2582 |
2584 // Transfer a complete descriptor from the src descriptor array to this | 2583 // Transfer a complete descriptor from the src descriptor array to this |
2585 // descriptor array. | 2584 // descriptor array. |
2586 void CopyFrom(int dst_index, | 2585 void CopyFrom(int dst_index, |
(...skipping 2296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4883 // [prototype]: implicit prototype object. | 4882 // [prototype]: implicit prototype object. |
4884 DECL_ACCESSORS(prototype, Object) | 4883 DECL_ACCESSORS(prototype, Object) |
4885 | 4884 |
4886 // [constructor]: points back to the function responsible for this map. | 4885 // [constructor]: points back to the function responsible for this map. |
4887 DECL_ACCESSORS(constructor, Object) | 4886 DECL_ACCESSORS(constructor, Object) |
4888 | 4887 |
4889 inline JSFunction* unchecked_constructor(); | 4888 inline JSFunction* unchecked_constructor(); |
4890 | 4889 |
4891 // [instance descriptors]: describes the object. | 4890 // [instance descriptors]: describes the object. |
4892 inline DescriptorArray* instance_descriptors(); | 4891 inline DescriptorArray* instance_descriptors(); |
4893 inline JSGlobalPropertyCell* descriptors_pointer(); | |
4894 MUST_USE_RESULT inline MaybeObject* SetDescriptors( | 4892 MUST_USE_RESULT inline MaybeObject* SetDescriptors( |
4895 DescriptorArray* descriptors); | 4893 DescriptorArray* descriptors); |
4896 static void SetDescriptors(Handle<Map> map, | 4894 static void SetDescriptors(Handle<Map> map, |
4897 Handle<DescriptorArray> descriptors); | 4895 Handle<DescriptorArray> descriptors); |
4898 MUST_USE_RESULT inline MaybeObject* InitializeDescriptors( | 4896 MUST_USE_RESULT inline MaybeObject* InitializeDescriptors( |
4899 DescriptorArray* descriptors); | 4897 DescriptorArray* descriptors); |
4900 | 4898 |
4901 // [stub cache]: contains stubs compiled for this map. | 4899 // [stub cache]: contains stubs compiled for this map. |
4902 DECL_ACCESSORS(code_cache, Object) | 4900 DECL_ACCESSORS(code_cache, Object) |
4903 | 4901 |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4997 inline void set_owns_descriptors(bool is_shared); | 4995 inline void set_owns_descriptors(bool is_shared); |
4998 | 4996 |
4999 MUST_USE_RESULT MaybeObject* RawCopy(int instance_size); | 4997 MUST_USE_RESULT MaybeObject* RawCopy(int instance_size); |
5000 MUST_USE_RESULT MaybeObject* CopyWithPreallocatedFieldDescriptors(); | 4998 MUST_USE_RESULT MaybeObject* CopyWithPreallocatedFieldDescriptors(); |
5001 MUST_USE_RESULT MaybeObject* CopyDropDescriptors(); | 4999 MUST_USE_RESULT MaybeObject* CopyDropDescriptors(); |
5002 MUST_USE_RESULT MaybeObject* CopyReplaceDescriptors( | 5000 MUST_USE_RESULT MaybeObject* CopyReplaceDescriptors( |
5003 DescriptorArray* descriptors, | 5001 DescriptorArray* descriptors, |
5004 String* name, | 5002 String* name, |
5005 TransitionFlag flag, | 5003 TransitionFlag flag, |
5006 int descriptor_index); | 5004 int descriptor_index); |
5007 MUST_USE_RESULT MaybeObject* ShareDescriptor(Descriptor* descriptor); | 5005 MUST_USE_RESULT MaybeObject* ShareDescriptor(DescriptorArray* descriptors, |
| 5006 Descriptor* descriptor); |
5008 MUST_USE_RESULT MaybeObject* CopyAddDescriptor(Descriptor* descriptor, | 5007 MUST_USE_RESULT MaybeObject* CopyAddDescriptor(Descriptor* descriptor, |
5009 TransitionFlag flag); | 5008 TransitionFlag flag); |
5010 MUST_USE_RESULT MaybeObject* CopyInsertDescriptor(Descriptor* descriptor, | 5009 MUST_USE_RESULT MaybeObject* CopyInsertDescriptor(Descriptor* descriptor, |
5011 TransitionFlag flag); | 5010 TransitionFlag flag); |
5012 MUST_USE_RESULT MaybeObject* CopyReplaceDescriptor(Descriptor* descriptor, | 5011 MUST_USE_RESULT MaybeObject* CopyReplaceDescriptor( |
5013 int index, | 5012 DescriptorArray* descriptors, |
5014 TransitionFlag flag); | 5013 Descriptor* descriptor, |
| 5014 int index, |
| 5015 TransitionFlag flag); |
5015 MUST_USE_RESULT MaybeObject* CopyAsElementsKind(ElementsKind kind, | 5016 MUST_USE_RESULT MaybeObject* CopyAsElementsKind(ElementsKind kind, |
5016 TransitionFlag flag); | 5017 TransitionFlag flag); |
5017 | 5018 |
5018 MUST_USE_RESULT MaybeObject* CopyNormalized(PropertyNormalizationMode mode, | 5019 MUST_USE_RESULT MaybeObject* CopyNormalized(PropertyNormalizationMode mode, |
5019 NormalizedMapSharingMode sharing); | 5020 NormalizedMapSharingMode sharing); |
5020 | 5021 |
5021 inline void AppendDescriptor(Descriptor* desc, | 5022 inline void AppendDescriptor(Descriptor* desc, |
5022 const DescriptorArray::WhitenessWitness&); | 5023 const DescriptorArray::WhitenessWitness&); |
5023 | 5024 |
5024 // Returns a copy of the map, with all transitions dropped from the | 5025 // Returns a copy of the map, with all transitions dropped from the |
(...skipping 4013 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9038 } else { | 9039 } else { |
9039 value &= ~(1 << bit_position); | 9040 value &= ~(1 << bit_position); |
9040 } | 9041 } |
9041 return value; | 9042 return value; |
9042 } | 9043 } |
9043 }; | 9044 }; |
9044 | 9045 |
9045 } } // namespace v8::internal | 9046 } } // namespace v8::internal |
9046 | 9047 |
9047 #endif // V8_OBJECTS_H_ | 9048 #endif // V8_OBJECTS_H_ |
OLD | NEW |