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 7809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7820 TRACK_ALLOCATION_SITE, | 7820 TRACK_ALLOCATION_SITE, |
7821 LAST_ALLOCATION_SITE_MODE = TRACK_ALLOCATION_SITE | 7821 LAST_ALLOCATION_SITE_MODE = TRACK_ALLOCATION_SITE |
7822 }; | 7822 }; |
7823 | 7823 |
7824 | 7824 |
7825 class AllocationSite: public Struct { | 7825 class AllocationSite: public Struct { |
7826 public: | 7826 public: |
7827 static const uint32_t kMaximumArrayBytesToPretransition = 8 * 1024; | 7827 static const uint32_t kMaximumArrayBytesToPretransition = 8 * 1024; |
7828 | 7828 |
7829 DECL_ACCESSORS(transition_info, Object) | 7829 DECL_ACCESSORS(transition_info, Object) |
| 7830 // nested_site threads a list of sites that represent nested literals |
| 7831 // walked in a particular order. So [[1, 2], 1, 2] will have one |
| 7832 // nested_site, but [[1, 2], 3, [4]] will have a list of two. |
| 7833 DECL_ACCESSORS(nested_site, Object) |
7830 DECL_ACCESSORS(dependent_code, DependentCode) | 7834 DECL_ACCESSORS(dependent_code, DependentCode) |
7831 DECL_ACCESSORS(weak_next, Object) | 7835 DECL_ACCESSORS(weak_next, Object) |
7832 | 7836 |
7833 inline void Initialize(); | 7837 inline void Initialize(); |
7834 | 7838 |
7835 ElementsKind GetElementsKind() { | 7839 ElementsKind GetElementsKind() { |
7836 ASSERT(!IsLiteralSite()); | 7840 ASSERT(!IsLiteralSite()); |
7837 return static_cast<ElementsKind>(Smi::cast(transition_info())->value()); | 7841 return static_cast<ElementsKind>(Smi::cast(transition_info())->value()); |
7838 } | 7842 } |
7839 | 7843 |
(...skipping 11 matching lines...) Expand all Loading... |
7851 DECLARE_PRINTER(AllocationSite) | 7855 DECLARE_PRINTER(AllocationSite) |
7852 DECLARE_VERIFIER(AllocationSite) | 7856 DECLARE_VERIFIER(AllocationSite) |
7853 | 7857 |
7854 static inline AllocationSite* cast(Object* obj); | 7858 static inline AllocationSite* cast(Object* obj); |
7855 static inline AllocationSiteMode GetMode( | 7859 static inline AllocationSiteMode GetMode( |
7856 ElementsKind boilerplate_elements_kind); | 7860 ElementsKind boilerplate_elements_kind); |
7857 static inline AllocationSiteMode GetMode(ElementsKind from, ElementsKind to); | 7861 static inline AllocationSiteMode GetMode(ElementsKind from, ElementsKind to); |
7858 static inline bool CanTrack(InstanceType type); | 7862 static inline bool CanTrack(InstanceType type); |
7859 | 7863 |
7860 static const int kTransitionInfoOffset = HeapObject::kHeaderSize; | 7864 static const int kTransitionInfoOffset = HeapObject::kHeaderSize; |
7861 static const int kDependentCodeOffset = kTransitionInfoOffset + kPointerSize; | 7865 static const int kNestedSiteOffset = kTransitionInfoOffset + kPointerSize; |
| 7866 static const int kDependentCodeOffset = kNestedSiteOffset + kPointerSize; |
7862 static const int kWeakNextOffset = kDependentCodeOffset + kPointerSize; | 7867 static const int kWeakNextOffset = kDependentCodeOffset + kPointerSize; |
7863 static const int kSize = kWeakNextOffset + kPointerSize; | 7868 static const int kSize = kWeakNextOffset + kPointerSize; |
7864 | 7869 |
7865 typedef FixedBodyDescriptor<HeapObject::kHeaderSize, | 7870 typedef FixedBodyDescriptor<HeapObject::kHeaderSize, |
7866 kDependentCodeOffset + kPointerSize, | 7871 kDependentCodeOffset + kPointerSize, |
7867 kSize> BodyDescriptor; | 7872 kSize> BodyDescriptor; |
7868 | 7873 |
7869 private: | 7874 private: |
7870 DISALLOW_IMPLICIT_CONSTRUCTORS(AllocationSite); | 7875 DISALLOW_IMPLICIT_CONSTRUCTORS(AllocationSite); |
7871 }; | 7876 }; |
(...skipping 2360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10232 } else { | 10237 } else { |
10233 value &= ~(1 << bit_position); | 10238 value &= ~(1 << bit_position); |
10234 } | 10239 } |
10235 return value; | 10240 return value; |
10236 } | 10241 } |
10237 }; | 10242 }; |
10238 | 10243 |
10239 } } // namespace v8::internal | 10244 } } // namespace v8::internal |
10240 | 10245 |
10241 #endif // V8_OBJECTS_H_ | 10246 #endif // V8_OBJECTS_H_ |
OLD | NEW |