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