Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(275)

Side by Side Diff: src/objects.h

Issue 1571673002: [not for landing] Re-shuffle AllocationSite members (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@rebased-scratchpad
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/crankshaft/hydrogen-instructions.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_OBJECTS_H_ 5 #ifndef V8_OBJECTS_H_
6 #define V8_OBJECTS_H_ 6 #define V8_OBJECTS_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 9
10 #include "src/allocation.h" 10 #include "src/allocation.h"
(...skipping 8089 matching lines...) Expand 10 before | Expand all | Expand 10 after
8100 }; 8100 };
8101 8101
8102 const char* PretenureDecisionName(PretenureDecision decision); 8102 const char* PretenureDecisionName(PretenureDecision decision);
8103 8103
8104 DECL_ACCESSORS(transition_info, Object) 8104 DECL_ACCESSORS(transition_info, Object)
8105 // nested_site threads a list of sites that represent nested literals 8105 // nested_site threads a list of sites that represent nested literals
8106 // walked in a particular order. So [[1, 2], 1, 2] will have one 8106 // walked in a particular order. So [[1, 2], 1, 2] will have one
8107 // nested_site, but [[1, 2], 3, [4]] will have a list of two. 8107 // nested_site, but [[1, 2], 3, [4]] will have a list of two.
8108 DECL_ACCESSORS(nested_site, Object) 8108 DECL_ACCESSORS(nested_site, Object)
8109 DECL_INT_ACCESSORS(pretenure_data) 8109 DECL_INT_ACCESSORS(pretenure_data)
8110 DECL_INT_ACCESSORS(pretenure_create_count)
8111 DECL_ACCESSORS(dependent_code, DependentCode) 8110 DECL_ACCESSORS(dependent_code, DependentCode)
8112 DECL_ACCESSORS(weak_next, Object) 8111 DECL_ACCESSORS(weak_next, Object)
8113 8112
8114 inline void Initialize(); 8113 inline void Initialize();
8115 8114
8116 // This method is expensive, it should only be called for reporting. 8115 // This method is expensive, it should only be called for reporting.
8117 bool IsNestedSite(); 8116 bool IsNestedSite();
8118 8117
8119 // transition_info bitfields, for constructed array transition info. 8118 // transition_info bitfields, for constructed array transition info.
8120 class ElementsKindBits: public BitField<ElementsKind, 0, 15> {}; 8119 class ElementsKindBits: public BitField<ElementsKind, 0, 15> {};
8121 class UnusedBits: public BitField<int, 15, 14> {}; 8120 class UnusedBits: public BitField<int, 15, 14> {};
8122 class DoNotInlineBit: public BitField<bool, 29, 1> {}; 8121 class DoNotInlineBit: public BitField<bool, 29, 1> {};
8123 8122
8124 // Bitfields for pretenure_data 8123 // Bitfields for pretenure_data
8124 class MementoCreatedCountBits:public BitField<int, 0, 26> {};
8125 class PretenureDecisionBits: public BitField<PretenureDecision, 26, 3> {}; 8125 class PretenureDecisionBits: public BitField<PretenureDecision, 26, 3> {};
8126 class DeoptDependentCodeBit: public BitField<bool, 29, 1> {}; 8126 class DeoptDependentCodeBit: public BitField<bool, 29, 1> {};
8127 STATIC_ASSERT(PretenureDecisionBits::kMax >= kLastPretenureDecisionValue); 8127 STATIC_ASSERT(PretenureDecisionBits::kMax >= kLastPretenureDecisionValue);
8128 8128
8129 inline void IncrementMementoCreateCount(); 8129 inline void IncrementMementoCreateCount();
8130 8130
8131 PretenureFlag GetPretenureMode(); 8131 PretenureFlag GetPretenureMode();
8132 8132
8133 void ResetPretenureDecision(); 8133 void ResetPretenureDecision();
8134 8134
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
8174 8174
8175 DECLARE_CAST(AllocationSite) 8175 DECLARE_CAST(AllocationSite)
8176 static inline AllocationSiteMode GetMode( 8176 static inline AllocationSiteMode GetMode(
8177 ElementsKind boilerplate_elements_kind); 8177 ElementsKind boilerplate_elements_kind);
8178 static inline AllocationSiteMode GetMode(ElementsKind from, ElementsKind to); 8178 static inline AllocationSiteMode GetMode(ElementsKind from, ElementsKind to);
8179 static inline bool CanTrack(InstanceType type); 8179 static inline bool CanTrack(InstanceType type);
8180 8180
8181 static const int kTransitionInfoOffset = HeapObject::kHeaderSize; 8181 static const int kTransitionInfoOffset = HeapObject::kHeaderSize;
8182 static const int kNestedSiteOffset = kTransitionInfoOffset + kPointerSize; 8182 static const int kNestedSiteOffset = kTransitionInfoOffset + kPointerSize;
8183 static const int kPretenureDataOffset = kNestedSiteOffset + kPointerSize; 8183 static const int kPretenureDataOffset = kNestedSiteOffset + kPointerSize;
8184 static const int kPretenureCreateCountOffset = 8184 static const int kDependentCodeOffset = kPretenureDataOffset + kPointerSize;
8185 kPretenureDataOffset + kPointerSize;
8186 static const int kDependentCodeOffset =
8187 kPretenureCreateCountOffset + kPointerSize;
8188 static const int kWeakNextOffset = kDependentCodeOffset + kPointerSize; 8185 static const int kWeakNextOffset = kDependentCodeOffset + kPointerSize;
8189 static const int kSize = kWeakNextOffset + kPointerSize; 8186 static const int kSize = kWeakNextOffset + kPointerSize;
8190 8187
8191 // During mark compact we need to take special care for the dependent code 8188 // During mark compact we need to take special care for the dependent code
8192 // field. 8189 // field.
8193 static const int kPointerFieldsBeginOffset = kTransitionInfoOffset; 8190 static const int kPointerFieldsBeginOffset = kTransitionInfoOffset;
8194 static const int kPointerFieldsEndOffset = kWeakNextOffset; 8191 static const int kPointerFieldsEndOffset = kWeakNextOffset;
8195 8192
8196 // For other visitors, use the fixed body descriptor below. 8193 // For other visitors, use the fixed body descriptor below.
8197 typedef FixedBodyDescriptor<HeapObject::kHeaderSize, 8194 typedef FixedBodyDescriptor<HeapObject::kHeaderSize,
(...skipping 2514 matching lines...) Expand 10 before | Expand all | Expand 10 after
10712 } 10709 }
10713 return value; 10710 return value;
10714 } 10711 }
10715 }; 10712 };
10716 10713
10717 10714
10718 } // NOLINT, false-positive due to second-order macros. 10715 } // NOLINT, false-positive due to second-order macros.
10719 } // NOLINT, false-positive due to second-order macros. 10716 } // NOLINT, false-positive due to second-order macros.
10720 10717
10721 #endif // V8_OBJECTS_H_ 10718 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/crankshaft/hydrogen-instructions.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698