Commit 4eefb396 authored by Marja Hölttä's avatar Marja Hölttä Committed by Commit Bot

[in-place weak refs] Cleanup: remove BodyDescriptorWeak typedefs

BodyDescriptorWeak is not needed for all classes. For the classes it's needed
it's referred to explicitly (Foo::BodyDescriptorWeak::IterateBody()).

BUG=v8:7308

Change-Id: If8591929cd588575e88f3d6f116ec2cac4941e8f
Reviewed-on: https://chromium-review.googlesource.com/1226649Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55941}
parent a4105a43
...@@ -293,8 +293,6 @@ class FeedbackVector : public HeapObject, public NeverReadOnlySpaceObject { ...@@ -293,8 +293,6 @@ class FeedbackVector : public HeapObject, public NeverReadOnlySpaceObject {
static const int kFeedbackSlotsOffset = kHeaderSize; static const int kFeedbackSlotsOffset = kHeaderSize;
class BodyDescriptor; class BodyDescriptor;
// No weak fields.
typedef BodyDescriptor BodyDescriptorWeak;
// Garbage collection support. // Garbage collection support.
static constexpr int SizeFor(int length) { static constexpr int SizeFor(int length) {
...@@ -492,8 +490,6 @@ class FeedbackMetadata : public HeapObject { ...@@ -492,8 +490,6 @@ class FeedbackMetadata : public HeapObject {
static const int kHeaderSize = kSlotCountOffset + kInt32Size; static const int kHeaderSize = kSlotCountOffset + kInt32Size;
class BodyDescriptor; class BodyDescriptor;
// No weak fields.
typedef BodyDescriptor BodyDescriptorWeak;
private: private:
friend class AccessorAssembler; friend class AccessorAssembler;
......
...@@ -1980,8 +1980,6 @@ class PropertyArray : public HeapObject { ...@@ -1980,8 +1980,6 @@ class PropertyArray : public HeapObject {
// Garbage collection support. // Garbage collection support.
typedef FlexibleBodyDescriptor<kHeaderSize> BodyDescriptor; typedef FlexibleBodyDescriptor<kHeaderSize> BodyDescriptor;
// No weak fields.
typedef BodyDescriptor BodyDescriptorWeak;
static const int kLengthFieldSize = 10; static const int kLengthFieldSize = 10;
class LengthField : public BitField<int, 0, kLengthFieldSize> {}; class LengthField : public BitField<int, 0, kLengthFieldSize> {};
...@@ -2732,12 +2730,8 @@ class JSObject: public JSReceiver { ...@@ -2732,12 +2730,8 @@ class JSObject: public JSReceiver {
STATIC_ASSERT(kMaxEmbedderFields <= kMaxInObjectProperties); STATIC_ASSERT(kMaxEmbedderFields <= kMaxInObjectProperties);
class BodyDescriptor; class BodyDescriptor;
// No weak fields.
typedef BodyDescriptor BodyDescriptorWeak;
class FastBodyDescriptor; class FastBodyDescriptor;
// No weak fields.
typedef FastBodyDescriptor FastBodyDescriptorWeak;
// Gets the number of currently used elements. // Gets the number of currently used elements.
int GetFastElementsUsage(); int GetFastElementsUsage();
...@@ -3653,8 +3647,6 @@ class JSMessageObject: public JSObject { ...@@ -3653,8 +3647,6 @@ class JSMessageObject: public JSObject {
typedef FixedBodyDescriptor<HeapObject::kMapOffset, typedef FixedBodyDescriptor<HeapObject::kMapOffset,
kStackFramesOffset + kPointerSize, kStackFramesOffset + kPointerSize,
kSize> BodyDescriptor; kSize> BodyDescriptor;
// No weak fields.
typedef BodyDescriptor BodyDescriptorWeak;
}; };
// Utility superclass for stack-allocated objects that must be updated // Utility superclass for stack-allocated objects that must be updated
...@@ -3739,8 +3731,6 @@ class Oddball: public HeapObject { ...@@ -3739,8 +3731,6 @@ class Oddball: public HeapObject {
typedef FixedBodyDescriptor<kToStringOffset, kTypeOfOffset + kPointerSize, typedef FixedBodyDescriptor<kToStringOffset, kTypeOfOffset + kPointerSize,
kSize> BodyDescriptor; kSize> BodyDescriptor;
// No weak fields.
typedef BodyDescriptor BodyDescriptorWeak;
STATIC_ASSERT(kToNumberRawOffset == HeapNumber::kValueOffset); STATIC_ASSERT(kToNumberRawOffset == HeapNumber::kValueOffset);
STATIC_ASSERT(kKindOffset == Internals::kOddballKindOffset); STATIC_ASSERT(kKindOffset == Internals::kOddballKindOffset);
...@@ -3779,8 +3769,6 @@ class Cell: public HeapObject { ...@@ -3779,8 +3769,6 @@ class Cell: public HeapObject {
typedef FixedBodyDescriptor<kValueOffset, typedef FixedBodyDescriptor<kValueOffset,
kValueOffset + kPointerSize, kValueOffset + kPointerSize,
kSize> BodyDescriptor; kSize> BodyDescriptor;
// No weak fields.
typedef BodyDescriptor BodyDescriptorWeak;
private: private:
DISALLOW_IMPLICIT_CONSTRUCTORS(Cell); DISALLOW_IMPLICIT_CONSTRUCTORS(Cell);
...@@ -3807,8 +3795,6 @@ class FeedbackCell : public Struct { ...@@ -3807,8 +3795,6 @@ class FeedbackCell : public Struct {
typedef FixedBodyDescriptor<kValueOffset, kValueOffset + kPointerSize, kSize> typedef FixedBodyDescriptor<kValueOffset, kValueOffset + kPointerSize, kSize>
BodyDescriptor; BodyDescriptor;
// No weak fields.
typedef BodyDescriptor BodyDescriptorWeak;
private: private:
DISALLOW_IMPLICIT_CONSTRUCTORS(FeedbackCell); DISALLOW_IMPLICIT_CONSTRUCTORS(FeedbackCell);
...@@ -3865,8 +3851,6 @@ class PropertyCell : public HeapObject { ...@@ -3865,8 +3851,6 @@ class PropertyCell : public HeapObject {
static const int kSize = kDependentCodeOffset + kPointerSize; static const int kSize = kDependentCodeOffset + kPointerSize;
typedef FixedBodyDescriptor<kNameOffset, kSize, kSize> BodyDescriptor; typedef FixedBodyDescriptor<kNameOffset, kSize, kSize> BodyDescriptor;
// No weak fields.
typedef BodyDescriptor BodyDescriptorWeak;
private: private:
DISALLOW_IMPLICIT_CONSTRUCTORS(PropertyCell); DISALLOW_IMPLICIT_CONSTRUCTORS(PropertyCell);
...@@ -3948,8 +3932,6 @@ class Foreign: public HeapObject { ...@@ -3948,8 +3932,6 @@ class Foreign: public HeapObject {
STATIC_ASSERT(kForeignAddressOffset == Internals::kForeignAddressOffset); STATIC_ASSERT(kForeignAddressOffset == Internals::kForeignAddressOffset);
class BodyDescriptor; class BodyDescriptor;
// No weak fields.
typedef BodyDescriptor BodyDescriptorWeak;
private: private:
friend class Factory; friend class Factory;
......
...@@ -188,8 +188,6 @@ class FixedArray : public FixedArrayBase { ...@@ -188,8 +188,6 @@ class FixedArray : public FixedArrayBase {
#endif #endif
typedef FlexibleBodyDescriptor<kHeaderSize> BodyDescriptor; typedef FlexibleBodyDescriptor<kHeaderSize> BodyDescriptor;
// No weak fields.
typedef BodyDescriptor BodyDescriptorWeak;
protected: protected:
// Set operation on FixedArray without using write barriers. Can // Set operation on FixedArray without using write barriers. Can
...@@ -256,8 +254,6 @@ class FixedDoubleArray : public FixedArrayBase { ...@@ -256,8 +254,6 @@ class FixedDoubleArray : public FixedArrayBase {
DECL_VERIFIER(FixedDoubleArray) DECL_VERIFIER(FixedDoubleArray)
class BodyDescriptor; class BodyDescriptor;
// No weak fields.
typedef BodyDescriptor BodyDescriptorWeak;
private: private:
DISALLOW_IMPLICIT_CONSTRUCTORS(FixedDoubleArray); DISALLOW_IMPLICIT_CONSTRUCTORS(FixedDoubleArray);
...@@ -298,7 +294,6 @@ class WeakFixedArray : public HeapObject { ...@@ -298,7 +294,6 @@ class WeakFixedArray : public HeapObject {
DECL_VERIFIER(WeakFixedArray) DECL_VERIFIER(WeakFixedArray)
typedef WeakArrayBodyDescriptor BodyDescriptor; typedef WeakArrayBodyDescriptor BodyDescriptor;
typedef BodyDescriptor BodyDescriptorWeak;
static const int kLengthOffset = HeapObject::kHeaderSize; static const int kLengthOffset = HeapObject::kHeaderSize;
static const int kHeaderSize = kLengthOffset + kPointerSize; static const int kHeaderSize = kLengthOffset + kPointerSize;
...@@ -361,7 +356,6 @@ class WeakArrayList : public HeapObject { ...@@ -361,7 +356,6 @@ class WeakArrayList : public HeapObject {
inline void synchronized_set_capacity(int value); inline void synchronized_set_capacity(int value);
typedef WeakArrayBodyDescriptor BodyDescriptor; typedef WeakArrayBodyDescriptor BodyDescriptor;
typedef BodyDescriptor BodyDescriptorWeak;
static const int kCapacityOffset = HeapObject::kHeaderSize; static const int kCapacityOffset = HeapObject::kHeaderSize;
static const int kLengthOffset = kCapacityOffset + kPointerSize; static const int kLengthOffset = kCapacityOffset + kPointerSize;
...@@ -520,8 +514,6 @@ class ByteArray : public FixedArrayBase { ...@@ -520,8 +514,6 @@ class ByteArray : public FixedArrayBase {
"ByteArray maxLength not a Smi"); "ByteArray maxLength not a Smi");
class BodyDescriptor; class BodyDescriptor;
// No weak fields.
typedef BodyDescriptor BodyDescriptorWeak;
private: private:
DISALLOW_IMPLICIT_CONSTRUCTORS(ByteArray); DISALLOW_IMPLICIT_CONSTRUCTORS(ByteArray);
...@@ -586,8 +578,6 @@ class FixedTypedArrayBase : public FixedArrayBase { ...@@ -586,8 +578,6 @@ class FixedTypedArrayBase : public FixedArrayBase {
static const size_t kMaxLength = Smi::kMaxValue; static const size_t kMaxLength = Smi::kMaxValue;
class BodyDescriptor; class BodyDescriptor;
// No weak fields.
typedef BodyDescriptor BodyDescriptorWeak;
inline int size() const; inline int size() const;
......
...@@ -112,8 +112,6 @@ class JSArrayBuffer : public JSObject { ...@@ -112,8 +112,6 @@ class JSArrayBuffer : public JSObject {
// Iterates all fields in the object including internal ones except // Iterates all fields in the object including internal ones except
// kBackingStoreOffset and kBitFieldSlot. // kBackingStoreOffset and kBitFieldSlot.
class BodyDescriptor; class BodyDescriptor;
// No weak fields.
typedef BodyDescriptor BodyDescriptorWeak;
class IsExternal : public BitField<bool, 1, 1> {}; class IsExternal : public BitField<bool, 1, 1> {};
class IsNeuterable : public BitField<bool, 2, 1> {}; class IsNeuterable : public BitField<bool, 2, 1> {};
......
...@@ -113,9 +113,6 @@ class JSWeakCollection : public JSObject { ...@@ -113,9 +113,6 @@ class JSWeakCollection : public JSObject {
// Visit the whole object. // Visit the whole object.
typedef BodyDescriptorImpl BodyDescriptor; typedef BodyDescriptorImpl BodyDescriptor;
// No weak fields.
typedef BodyDescriptor BodyDescriptorWeak;
private: private:
DISALLOW_IMPLICIT_CONSTRUCTORS(JSWeakCollection); DISALLOW_IMPLICIT_CONSTRUCTORS(JSWeakCollection);
}; };
......
...@@ -118,8 +118,6 @@ class JSProxy : public JSReceiver { ...@@ -118,8 +118,6 @@ class JSProxy : public JSReceiver {
typedef FixedBodyDescriptor<JSReceiver::kPropertiesOrHashOffset, kSize, kSize> typedef FixedBodyDescriptor<JSReceiver::kPropertiesOrHashOffset, kSize, kSize>
BodyDescriptor; BodyDescriptor;
// No weak fields.
typedef BodyDescriptor BodyDescriptorWeak;
static Maybe<bool> SetPrivateSymbol(Isolate* isolate, Handle<JSProxy> proxy, static Maybe<bool> SetPrivateSymbol(Isolate* isolate, Handle<JSProxy> proxy,
Handle<Symbol> private_name, Handle<Symbol> private_name,
......
...@@ -192,8 +192,6 @@ class Symbol : public Name { ...@@ -192,8 +192,6 @@ class Symbol : public Name {
#undef FLAGS_BIT_FIELDS #undef FLAGS_BIT_FIELDS
typedef FixedBodyDescriptor<kNameOffset, kSize, kSize> BodyDescriptor; typedef FixedBodyDescriptor<kNameOffset, kSize, kSize> BodyDescriptor;
// No weak fields.
typedef BodyDescriptor BodyDescriptorWeak;
void SymbolShortPrint(std::ostream& os); void SymbolShortPrint(std::ostream& os);
......
...@@ -326,9 +326,6 @@ class SmallOrderedHashTable : public HeapObject { ...@@ -326,9 +326,6 @@ class SmallOrderedHashTable : public HeapObject {
// Iterates only fields in the DataTable. // Iterates only fields in the DataTable.
class BodyDescriptor; class BodyDescriptor;
// No weak fields.
typedef BodyDescriptor BodyDescriptorWeak;
// Returns total size in bytes required for a table of given // Returns total size in bytes required for a table of given
// capacity. // capacity.
static int SizeFor(int capacity) { static int SizeFor(int capacity) {
......
...@@ -53,8 +53,6 @@ class PreParsedScopeData : public HeapObject { ...@@ -53,8 +53,6 @@ class PreParsedScopeData : public HeapObject {
POINTER_SIZE_ALIGN(kUnalignedChildDataStartOffset); POINTER_SIZE_ALIGN(kUnalignedChildDataStartOffset);
class BodyDescriptor; class BodyDescriptor;
// No weak fields.
typedef BodyDescriptor BodyDescriptorWeak;
static constexpr int SizeFor(int length) { static constexpr int SizeFor(int length) {
return kChildDataStartOffset + length * kPointerSize; return kChildDataStartOffset + length * kPointerSize;
...@@ -114,8 +112,6 @@ class UncompiledDataWithoutPreParsedScope : public UncompiledData { ...@@ -114,8 +112,6 @@ class UncompiledDataWithoutPreParsedScope : public UncompiledData {
// No extra fields compared to UncompiledData. // No extra fields compared to UncompiledData.
typedef UncompiledData::BodyDescriptor BodyDescriptor; typedef UncompiledData::BodyDescriptor BodyDescriptor;
// No weak fields.
typedef BodyDescriptor BodyDescriptorWeak;
private: private:
DISALLOW_IMPLICIT_CONSTRUCTORS(UncompiledDataWithoutPreParsedScope); DISALLOW_IMPLICIT_CONSTRUCTORS(UncompiledDataWithoutPreParsedScope);
...@@ -150,8 +146,6 @@ class UncompiledDataWithPreParsedScope : public UncompiledData { ...@@ -150,8 +146,6 @@ class UncompiledDataWithPreParsedScope : public UncompiledData {
FixedBodyDescriptor<kStartOfPointerFieldsOffset, FixedBodyDescriptor<kStartOfPointerFieldsOffset,
kEndOfPointerFieldsOffset, kSize>> kEndOfPointerFieldsOffset, kSize>>
BodyDescriptor; BodyDescriptor;
// No weak fields.
typedef BodyDescriptor BodyDescriptorWeak;
private: private:
DISALLOW_IMPLICIT_CONSTRUCTORS(UncompiledDataWithPreParsedScope); DISALLOW_IMPLICIT_CONSTRUCTORS(UncompiledDataWithPreParsedScope);
...@@ -622,8 +616,6 @@ class SharedFunctionInfo : public HeapObject, public NeverReadOnlySpaceObject { ...@@ -622,8 +616,6 @@ class SharedFunctionInfo : public HeapObject, public NeverReadOnlySpaceObject {
typedef FixedBodyDescriptor<kStartOfPointerFieldsOffset, typedef FixedBodyDescriptor<kStartOfPointerFieldsOffset,
kEndOfPointerFieldsOffset, kAlignedSize> kEndOfPointerFieldsOffset, kAlignedSize>
BodyDescriptor; BodyDescriptor;
// No weak fields.
typedef BodyDescriptor BodyDescriptorWeak;
// Bit positions in |flags|. // Bit positions in |flags|.
#define FLAGS_BIT_FIELDS(V, _) \ #define FLAGS_BIT_FIELDS(V, _) \
......
...@@ -527,8 +527,6 @@ class SeqOneByteString : public SeqString { ...@@ -527,8 +527,6 @@ class SeqOneByteString : public SeqString {
STATIC_ASSERT((kMaxSize - kHeaderSize) >= String::kMaxLength); STATIC_ASSERT((kMaxSize - kHeaderSize) >= String::kMaxLength);
class BodyDescriptor; class BodyDescriptor;
// No weak fields.
typedef BodyDescriptor BodyDescriptorWeak;
private: private:
DISALLOW_IMPLICIT_CONSTRUCTORS(SeqOneByteString); DISALLOW_IMPLICIT_CONSTRUCTORS(SeqOneByteString);
...@@ -572,8 +570,6 @@ class SeqTwoByteString : public SeqString { ...@@ -572,8 +570,6 @@ class SeqTwoByteString : public SeqString {
String::kMaxLength); String::kMaxLength);
class BodyDescriptor; class BodyDescriptor;
// No weak fields.
typedef BodyDescriptor BodyDescriptorWeak;
private: private:
DISALLOW_IMPLICIT_CONSTRUCTORS(SeqTwoByteString); DISALLOW_IMPLICIT_CONSTRUCTORS(SeqTwoByteString);
...@@ -620,8 +616,6 @@ class ConsString : public String { ...@@ -620,8 +616,6 @@ class ConsString : public String {
typedef FixedBodyDescriptor<kFirstOffset, kSecondOffset + kPointerSize, kSize> typedef FixedBodyDescriptor<kFirstOffset, kSecondOffset + kPointerSize, kSize>
BodyDescriptor; BodyDescriptor;
// No weak fields.
typedef BodyDescriptor BodyDescriptorWeak;
DECL_VERIFIER(ConsString) DECL_VERIFIER(ConsString)
...@@ -654,8 +648,6 @@ class ThinString : public String { ...@@ -654,8 +648,6 @@ class ThinString : public String {
static const int kSize = kActualOffset + kPointerSize; static const int kSize = kActualOffset + kPointerSize;
typedef FixedBodyDescriptor<kActualOffset, kSize, kSize> BodyDescriptor; typedef FixedBodyDescriptor<kActualOffset, kSize, kSize> BodyDescriptor;
// No weak fields.
typedef BodyDescriptor BodyDescriptorWeak;
private: private:
DISALLOW_COPY_AND_ASSIGN(ThinString); DISALLOW_COPY_AND_ASSIGN(ThinString);
...@@ -697,8 +689,6 @@ class SlicedString : public String { ...@@ -697,8 +689,6 @@ class SlicedString : public String {
typedef FixedBodyDescriptor<kParentOffset, kOffsetOffset + kPointerSize, typedef FixedBodyDescriptor<kParentOffset, kOffsetOffset + kPointerSize,
kSize> kSize>
BodyDescriptor; BodyDescriptor;
// No weak fields.
typedef BodyDescriptor BodyDescriptorWeak;
DECL_VERIFIER(SlicedString) DECL_VERIFIER(SlicedString)
...@@ -773,8 +763,6 @@ class ExternalOneByteString : public ExternalString { ...@@ -773,8 +763,6 @@ class ExternalOneByteString : public ExternalString {
DECL_CAST(ExternalOneByteString) DECL_CAST(ExternalOneByteString)
class BodyDescriptor; class BodyDescriptor;
// No weak fields.
typedef BodyDescriptor BodyDescriptorWeak;
private: private:
DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalOneByteString); DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalOneByteString);
...@@ -814,8 +802,6 @@ class ExternalTwoByteString : public ExternalString { ...@@ -814,8 +802,6 @@ class ExternalTwoByteString : public ExternalString {
DECL_CAST(ExternalTwoByteString) DECL_CAST(ExternalTwoByteString)
class BodyDescriptor; class BodyDescriptor;
// No weak fields.
typedef BodyDescriptor BodyDescriptorWeak;
private: private:
DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalTwoByteString); DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalTwoByteString);
......
...@@ -467,8 +467,6 @@ class WasmInstanceObject : public JSObject { ...@@ -467,8 +467,6 @@ class WasmInstanceObject : public JSObject {
// Iterates all fields in the object except the untagged fields. // Iterates all fields in the object except the untagged fields.
class BodyDescriptor; class BodyDescriptor;
// No weak fields.
typedef BodyDescriptor BodyDescriptorWeak;
}; };
// Representation of WebAssembly.Exception JavaScript-level object. // Representation of WebAssembly.Exception JavaScript-level object.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment