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 8092 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8103 | 8103 |
8104 class AllocationSite: public Struct { | 8104 class AllocationSite: public Struct { |
8105 public: | 8105 public: |
8106 static const uint32_t kMaximumArrayBytesToPretransition = 8 * 1024; | 8106 static const uint32_t kMaximumArrayBytesToPretransition = 8 * 1024; |
8107 | 8107 |
8108 DECL_ACCESSORS(transition_info, Object) | 8108 DECL_ACCESSORS(transition_info, Object) |
8109 // nested_site threads a list of sites that represent nested literals | 8109 // nested_site threads a list of sites that represent nested literals |
8110 // walked in a particular order. So [[1, 2], 1, 2] will have one | 8110 // walked in a particular order. So [[1, 2], 1, 2] will have one |
8111 // nested_site, but [[1, 2], 3, [4]] will have a list of two. | 8111 // nested_site, but [[1, 2], 3, [4]] will have a list of two. |
8112 DECL_ACCESSORS(nested_site, Object) | 8112 DECL_ACCESSORS(nested_site, Object) |
| 8113 DECL_ACCESSORS(memento_found_count, Smi) |
| 8114 DECL_ACCESSORS(memento_create_count, Smi) |
| 8115 DECL_ACCESSORS(pretenure_decision, Smi) |
8113 DECL_ACCESSORS(dependent_code, DependentCode) | 8116 DECL_ACCESSORS(dependent_code, DependentCode) |
8114 DECL_ACCESSORS(weak_next, Object) | 8117 DECL_ACCESSORS(weak_next, Object) |
8115 | 8118 |
8116 inline void Initialize(); | 8119 inline void Initialize(); |
8117 | 8120 |
8118 bool HasNestedSites() { | 8121 bool HasNestedSites() { |
8119 return nested_site()->IsAllocationSite(); | 8122 return nested_site()->IsAllocationSite(); |
8120 } | 8123 } |
8121 | 8124 |
8122 // This method is expensive, it should only be called for reporting. | 8125 // This method is expensive, it should only be called for reporting. |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8170 DECLARE_VERIFIER(AllocationSite) | 8173 DECLARE_VERIFIER(AllocationSite) |
8171 | 8174 |
8172 static inline AllocationSite* cast(Object* obj); | 8175 static inline AllocationSite* cast(Object* obj); |
8173 static inline AllocationSiteMode GetMode( | 8176 static inline AllocationSiteMode GetMode( |
8174 ElementsKind boilerplate_elements_kind); | 8177 ElementsKind boilerplate_elements_kind); |
8175 static inline AllocationSiteMode GetMode(ElementsKind from, ElementsKind to); | 8178 static inline AllocationSiteMode GetMode(ElementsKind from, ElementsKind to); |
8176 static inline bool CanTrack(InstanceType type); | 8179 static inline bool CanTrack(InstanceType type); |
8177 | 8180 |
8178 static const int kTransitionInfoOffset = HeapObject::kHeaderSize; | 8181 static const int kTransitionInfoOffset = HeapObject::kHeaderSize; |
8179 static const int kNestedSiteOffset = kTransitionInfoOffset + kPointerSize; | 8182 static const int kNestedSiteOffset = kTransitionInfoOffset + kPointerSize; |
8180 static const int kDependentCodeOffset = kNestedSiteOffset + kPointerSize; | 8183 static const int kMementoFoundCountOffset = kNestedSiteOffset + kPointerSize; |
| 8184 static const int kMementoCreateCountOffset = |
| 8185 kMementoFoundCountOffset + kPointerSize; |
| 8186 static const int kPretenureDecisionOffset = |
| 8187 kMementoCreateCountOffset + kPointerSize; |
| 8188 static const int kDependentCodeOffset = |
| 8189 kPretenureDecisionOffset + kPointerSize; |
8181 static const int kWeakNextOffset = kDependentCodeOffset + kPointerSize; | 8190 static const int kWeakNextOffset = kDependentCodeOffset + kPointerSize; |
8182 static const int kSize = kWeakNextOffset + kPointerSize; | 8191 static const int kSize = kWeakNextOffset + kPointerSize; |
8183 | 8192 |
8184 // During mark compact we need to take special care for the dependent code | 8193 // During mark compact we need to take special care for the dependent code |
8185 // field. | 8194 // field. |
8186 static const int kPointerFieldsBeginOffset = kTransitionInfoOffset; | 8195 static const int kPointerFieldsBeginOffset = kTransitionInfoOffset; |
8187 static const int kPointerFieldsEndOffset = kDependentCodeOffset; | 8196 static const int kPointerFieldsEndOffset = kDependentCodeOffset; |
8188 | 8197 |
8189 // For other visitors, use the fixed body descriptor below. | 8198 // For other visitors, use the fixed body descriptor below. |
8190 typedef FixedBodyDescriptor<HeapObject::kHeaderSize, | 8199 typedef FixedBodyDescriptor<HeapObject::kHeaderSize, |
(...skipping 2375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10566 } else { | 10575 } else { |
10567 value &= ~(1 << bit_position); | 10576 value &= ~(1 << bit_position); |
10568 } | 10577 } |
10569 return value; | 10578 return value; |
10570 } | 10579 } |
10571 }; | 10580 }; |
10572 | 10581 |
10573 } } // namespace v8::internal | 10582 } } // namespace v8::internal |
10574 | 10583 |
10575 #endif // V8_OBJECTS_H_ | 10584 #endif // V8_OBJECTS_H_ |
OLD | NEW |