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 8002 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 8013 | 8013 |
| 8014 class AllocationSite: public Struct { | 8014 class AllocationSite: public Struct { |
| 8015 public: | 8015 public: |
| 8016 static const uint32_t kMaximumArrayBytesToPretransition = 8 * 1024; | 8016 static const uint32_t kMaximumArrayBytesToPretransition = 8 * 1024; |
| 8017 | 8017 |
| 8018 DECL_ACCESSORS(transition_info, Object) | 8018 DECL_ACCESSORS(transition_info, Object) |
| 8019 // nested_site threads a list of sites that represent nested literals | 8019 // nested_site threads a list of sites that represent nested literals |
| 8020 // walked in a particular order. So [[1, 2], 1, 2] will have one | 8020 // walked in a particular order. So [[1, 2], 1, 2] will have one |
| 8021 // nested_site, but [[1, 2], 3, [4]] will have a list of two. | 8021 // nested_site, but [[1, 2], 3, [4]] will have a list of two. |
| 8022 DECL_ACCESSORS(nested_site, Object) | 8022 DECL_ACCESSORS(nested_site, Object) |
| 8023 DECL_ACCESSORS(memento_found_count, Smi) | |
| 8024 DECL_ACCESSORS(memento_create_count, Smi) | |
|
Hannes Payer (out of office)
2013/10/28 10:46:54
If we encounter that allocation sites are getting
mvstanton
2013/10/28 11:29:28
I actually had something like this for a while, bu
| |
| 8025 DECL_ACCESSORS(pretenure_decision, Smi) | |
|
Hannes Payer (out of office)
2013/10/28 10:46:54
Hmm, maybe this is good enough for this CL but I t
| |
| 8023 DECL_ACCESSORS(dependent_code, DependentCode) | 8026 DECL_ACCESSORS(dependent_code, DependentCode) |
| 8024 DECL_ACCESSORS(weak_next, Object) | 8027 DECL_ACCESSORS(weak_next, Object) |
| 8025 | 8028 |
| 8026 inline void Initialize(); | 8029 inline void Initialize(); |
| 8027 | 8030 |
| 8028 bool HasNestedSites() { | 8031 bool HasNestedSites() { |
| 8029 return nested_site()->IsAllocationSite(); | 8032 return nested_site()->IsAllocationSite(); |
| 8030 } | 8033 } |
| 8031 | 8034 |
| 8032 // This method is expensive, it should only be called for reporting. | 8035 // This method is expensive, it should only be called for reporting. |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 8052 DECLARE_VERIFIER(AllocationSite) | 8055 DECLARE_VERIFIER(AllocationSite) |
| 8053 | 8056 |
| 8054 static inline AllocationSite* cast(Object* obj); | 8057 static inline AllocationSite* cast(Object* obj); |
| 8055 static inline AllocationSiteMode GetMode( | 8058 static inline AllocationSiteMode GetMode( |
| 8056 ElementsKind boilerplate_elements_kind); | 8059 ElementsKind boilerplate_elements_kind); |
| 8057 static inline AllocationSiteMode GetMode(ElementsKind from, ElementsKind to); | 8060 static inline AllocationSiteMode GetMode(ElementsKind from, ElementsKind to); |
| 8058 static inline bool CanTrack(InstanceType type); | 8061 static inline bool CanTrack(InstanceType type); |
| 8059 | 8062 |
| 8060 static const int kTransitionInfoOffset = HeapObject::kHeaderSize; | 8063 static const int kTransitionInfoOffset = HeapObject::kHeaderSize; |
| 8061 static const int kNestedSiteOffset = kTransitionInfoOffset + kPointerSize; | 8064 static const int kNestedSiteOffset = kTransitionInfoOffset + kPointerSize; |
| 8062 static const int kDependentCodeOffset = kNestedSiteOffset + kPointerSize; | 8065 static const int kMementoFoundCountOffset = kNestedSiteOffset + kPointerSize; |
| 8066 static const int kMementoCreateCountOffset = | |
| 8067 kMementoFoundCountOffset + kPointerSize; | |
| 8068 static const int kPretenureDecisionOffset = | |
| 8069 kMementoCreateCountOffset + kPointerSize; | |
| 8070 static const int kDependentCodeOffset = | |
| 8071 kPretenureDecisionOffset + kPointerSize; | |
| 8063 static const int kWeakNextOffset = kDependentCodeOffset + kPointerSize; | 8072 static const int kWeakNextOffset = kDependentCodeOffset + kPointerSize; |
| 8064 static const int kSize = kWeakNextOffset + kPointerSize; | 8073 static const int kSize = kWeakNextOffset + kPointerSize; |
| 8065 | 8074 |
| 8066 typedef FixedBodyDescriptor<HeapObject::kHeaderSize, | 8075 typedef FixedBodyDescriptor<HeapObject::kHeaderSize, |
| 8067 kDependentCodeOffset + kPointerSize, | 8076 kDependentCodeOffset + kPointerSize, |
| 8068 kSize> BodyDescriptor; | 8077 kSize> BodyDescriptor; |
| 8069 | 8078 |
| 8070 private: | 8079 private: |
| 8071 DISALLOW_IMPLICIT_CONSTRUCTORS(AllocationSite); | 8080 DISALLOW_IMPLICIT_CONSTRUCTORS(AllocationSite); |
| 8072 }; | 8081 }; |
| (...skipping 2354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 10427 } else { | 10436 } else { |
| 10428 value &= ~(1 << bit_position); | 10437 value &= ~(1 << bit_position); |
| 10429 } | 10438 } |
| 10430 return value; | 10439 return value; |
| 10431 } | 10440 } |
| 10432 }; | 10441 }; |
| 10433 | 10442 |
| 10434 } } // namespace v8::internal | 10443 } } // namespace v8::internal |
| 10435 | 10444 |
| 10436 #endif // V8_OBJECTS_H_ | 10445 #endif // V8_OBJECTS_H_ |
| OLD | NEW |