Commit d0565a9b authored by titzer's avatar titzer Committed by Commit Bot

[objects] Rename macros from DECLARE_ to DECL_ for consistency.

R=marja@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2961253002
Cr-Commit-Position: refs/heads/master@{#46321}
parent 5157325b
...@@ -177,7 +177,7 @@ class FeedbackVectorSpecBase { ...@@ -177,7 +177,7 @@ class FeedbackVectorSpecBase {
void Print(); void Print();
#endif // OBJECT_PRINT #endif // OBJECT_PRINT
DECLARE_PRINTER(FeedbackVectorSpec) DECL_PRINTER(FeedbackVectorSpec)
private: private:
inline FeedbackSlot AddSlot(FeedbackSlotKind kind); inline FeedbackSlot AddSlot(FeedbackSlotKind kind);
...@@ -275,7 +275,7 @@ class FeedbackMetadata : public FixedArray { ...@@ -275,7 +275,7 @@ class FeedbackMetadata : public FixedArray {
void Print(); void Print();
#endif // OBJECT_PRINT #endif // OBJECT_PRINT
DECLARE_PRINTER(FeedbackMetadata) DECL_PRINTER(FeedbackMetadata)
static const char* Kind2String(FeedbackSlotKind kind); static const char* Kind2String(FeedbackSlotKind kind);
bool HasTypeProfileSlot() const; bool HasTypeProfileSlot() const;
...@@ -387,7 +387,7 @@ class FeedbackVector : public FixedArray { ...@@ -387,7 +387,7 @@ class FeedbackVector : public FixedArray {
void Print(); void Print();
#endif // OBJECT_PRINT #endif // OBJECT_PRINT
DECLARE_PRINTER(FeedbackVector) DECL_PRINTER(FeedbackVector)
// Clears the vector slots. // Clears the vector slots.
void ClearSlots(JSFunction* host_function); void ClearSlots(JSFunction* host_function);
......
...@@ -966,9 +966,9 @@ class ZoneForwardList; ...@@ -966,9 +966,9 @@ class ZoneForwardList;
template <class C> inline bool Is(Object* obj); template <class C> inline bool Is(Object* obj);
#ifdef OBJECT_PRINT #ifdef OBJECT_PRINT
#define DECLARE_PRINTER(Name) void Name##Print(std::ostream& os); // NOLINT #define DECL_PRINTER(Name) void Name##Print(std::ostream& os); // NOLINT
#else #else
#define DECLARE_PRINTER(Name) #define DECL_PRINTER(Name)
#endif #endif
#define OBJECT_TYPE_LIST(V) \ #define OBJECT_TYPE_LIST(V) \
...@@ -1172,10 +1172,9 @@ class Object { ...@@ -1172,10 +1172,9 @@ class Object {
#define MAYBE_RETURN_NULL(call) MAYBE_RETURN(call, MaybeHandle<Object>()) #define MAYBE_RETURN_NULL(call) MAYBE_RETURN(call, MaybeHandle<Object>())
#define DECLARE_STRUCT_PREDICATE(NAME, Name, name) \ #define DECL_STRUCT_PREDICATE(NAME, Name, name) INLINE(bool Is##Name() const);
INLINE(bool Is##Name() const); STRUCT_LIST(DECL_STRUCT_PREDICATE)
STRUCT_LIST(DECLARE_STRUCT_PREDICATE) #undef DECL_STRUCT_PREDICATE
#undef DECLARE_STRUCT_PREDICATE
// ES6, #sec-isarray. NOT to be confused with %_IsArray. // ES6, #sec-isarray. NOT to be confused with %_IsArray.
INLINE(MUST_USE_RESULT static Maybe<bool> IsArray(Handle<Object> object)); INLINE(MUST_USE_RESULT static Maybe<bool> IsArray(Handle<Object> object));
...@@ -1483,7 +1482,7 @@ class Object { ...@@ -1483,7 +1482,7 @@ class Object {
// and length. // and length.
bool IterationHasObservableEffects(); bool IterationHasObservableEffects();
DECLARE_VERIFIER(Object) DECL_VERIFIER(Object)
#ifdef VERIFY_HEAP #ifdef VERIFY_HEAP
// Verify a pointer is a valid object pointer. // Verify a pointer is a valid object pointer.
static void VerifyPointer(Object* p); static void VerifyPointer(Object* p);
...@@ -1499,7 +1498,7 @@ class Object { ...@@ -1499,7 +1498,7 @@ class Object {
void ShortPrint(std::ostream& os); // NOLINT void ShortPrint(std::ostream& os); // NOLINT
DECLARE_CAST(Object) DECL_CAST(Object)
// Layout description. // Layout description.
static const int kHeaderSize = 0; // Object does not take up any space. static const int kHeaderSize = 0; // Object does not take up any space.
...@@ -1607,11 +1606,11 @@ class Smi: public Object { ...@@ -1607,11 +1606,11 @@ class Smi: public Object {
return result; return result;
} }
DECLARE_CAST(Smi) DECL_CAST(Smi)
// Dispatched behavior. // Dispatched behavior.
V8_EXPORT_PRIVATE void SmiPrint(std::ostream& os) const; // NOLINT V8_EXPORT_PRIVATE void SmiPrint(std::ostream& os) const; // NOLINT
DECLARE_VERIFIER(Smi) DECL_VERIFIER(Smi)
static constexpr Smi* const kZero = nullptr; static constexpr Smi* const kZero = nullptr;
static const int kMinValue = static const int kMinValue =
...@@ -1721,10 +1720,9 @@ class HeapObject: public Object { ...@@ -1721,10 +1720,9 @@ class HeapObject: public Object {
INLINE(bool IsNullOrUndefined(Isolate* isolate) const); INLINE(bool IsNullOrUndefined(Isolate* isolate) const);
#define DECLARE_STRUCT_PREDICATE(NAME, Name, name) \ #define DECL_STRUCT_PREDICATE(NAME, Name, name) INLINE(bool Is##Name() const);
INLINE(bool Is##Name() const); STRUCT_LIST(DECL_STRUCT_PREDICATE)
STRUCT_LIST(DECLARE_STRUCT_PREDICATE) #undef DECL_STRUCT_PREDICATE
#undef DECLARE_STRUCT_PREDICATE
// Converts an address to a HeapObject pointer. // Converts an address to a HeapObject pointer.
static inline HeapObject* FromAddress(Address address) { static inline HeapObject* FromAddress(Address address) {
...@@ -1787,7 +1785,7 @@ class HeapObject: public Object { ...@@ -1787,7 +1785,7 @@ class HeapObject: public Object {
Handle<Name> name, Handle<Name> name,
Handle<Code> code); Handle<Code> code);
DECLARE_CAST(HeapObject) DECL_CAST(HeapObject)
// Return the write barrier mode for this. Callers of this function // Return the write barrier mode for this. Callers of this function
// must be able to present a reference to an DisallowHeapAllocation // must be able to present a reference to an DisallowHeapAllocation
...@@ -1802,8 +1800,8 @@ class HeapObject: public Object { ...@@ -1802,8 +1800,8 @@ class HeapObject: public Object {
#ifdef OBJECT_PRINT #ifdef OBJECT_PRINT
void PrintHeader(std::ostream& os, const char* id); // NOLINT void PrintHeader(std::ostream& os, const char* id); // NOLINT
#endif #endif
DECLARE_PRINTER(HeapObject) DECL_PRINTER(HeapObject)
DECLARE_VERIFIER(HeapObject) DECL_VERIFIER(HeapObject)
#ifdef VERIFY_HEAP #ifdef VERIFY_HEAP
inline void VerifyObjectField(int offset); inline void VerifyObjectField(int offset);
inline void VerifySmiField(int offset); inline void VerifySmiField(int offset);
...@@ -1846,13 +1844,13 @@ class HeapNumber: public HeapObject { ...@@ -1846,13 +1844,13 @@ class HeapNumber: public HeapObject {
inline uint64_t value_as_bits() const; inline uint64_t value_as_bits() const;
inline void set_value_as_bits(uint64_t bits); inline void set_value_as_bits(uint64_t bits);
DECLARE_CAST(HeapNumber) DECL_CAST(HeapNumber)
// Dispatched behavior. // Dispatched behavior.
bool HeapNumberBooleanValue(); bool HeapNumberBooleanValue();
V8_EXPORT_PRIVATE void HeapNumberPrint(std::ostream& os); // NOLINT V8_EXPORT_PRIVATE void HeapNumberPrint(std::ostream& os); // NOLINT
DECLARE_VERIFIER(HeapNumber) DECL_VERIFIER(HeapNumber)
inline int get_exponent(); inline int get_exponent();
inline int get_sign(); inline int get_sign();
...@@ -1929,7 +1927,7 @@ class JSReceiver: public HeapObject { ...@@ -1929,7 +1927,7 @@ class JSReceiver: public HeapObject {
// Deletes an existing named property in a normalized object. // Deletes an existing named property in a normalized object.
static void DeleteNormalizedProperty(Handle<JSReceiver> object, int entry); static void DeleteNormalizedProperty(Handle<JSReceiver> object, int entry);
DECLARE_CAST(JSReceiver) DECL_CAST(JSReceiver)
// ES6 section 7.1.1 ToPrimitive // ES6 section 7.1.1 ToPrimitive
MUST_USE_RESULT static MaybeHandle<Object> ToPrimitive( MUST_USE_RESULT static MaybeHandle<Object> ToPrimitive(
...@@ -2499,12 +2497,12 @@ class JSObject: public JSReceiver { ...@@ -2499,12 +2497,12 @@ class JSObject: public JSReceiver {
static bool IsExtensible(Handle<JSObject> object); static bool IsExtensible(Handle<JSObject> object);
DECLARE_CAST(JSObject) DECL_CAST(JSObject)
// Dispatched behavior. // Dispatched behavior.
void JSObjectShortPrint(StringStream* accumulator); void JSObjectShortPrint(StringStream* accumulator);
DECLARE_PRINTER(JSObject) DECL_PRINTER(JSObject)
DECLARE_VERIFIER(JSObject) DECL_VERIFIER(JSObject)
#ifdef OBJECT_PRINT #ifdef OBJECT_PRINT
bool PrintProperties(std::ostream& os); // NOLINT bool PrintProperties(std::ostream& os); // NOLINT
void PrintElements(std::ostream& os); // NOLINT void PrintElements(std::ostream& os); // NOLINT
...@@ -2716,7 +2714,7 @@ class FixedArrayBase: public HeapObject { ...@@ -2716,7 +2714,7 @@ class FixedArrayBase: public HeapObject {
inline int synchronized_length() const; inline int synchronized_length() const;
inline void synchronized_set_length(int value); inline void synchronized_set_length(int value);
DECLARE_CAST(FixedArrayBase) DECL_CAST(FixedArrayBase)
static int GetMaxLengthForNewSpaceAllocation(ElementsKind kind); static int GetMaxLengthForNewSpaceAllocation(ElementsKind kind);
...@@ -2792,7 +2790,7 @@ class FixedArray: public FixedArrayBase { ...@@ -2792,7 +2790,7 @@ class FixedArray: public FixedArrayBase {
// Garbage collection support. // Garbage collection support.
inline Object** RawFieldOfElementAt(int index); inline Object** RawFieldOfElementAt(int index);
DECLARE_CAST(FixedArray) DECL_CAST(FixedArray)
// Maximal allowed size, in bytes, of a single FixedArray. // Maximal allowed size, in bytes, of a single FixedArray.
// Prevents overflowing size computations, as well as extreme memory // Prevents overflowing size computations, as well as extreme memory
...@@ -2806,8 +2804,8 @@ class FixedArray: public FixedArrayBase { ...@@ -2806,8 +2804,8 @@ class FixedArray: public FixedArrayBase {
(kMaxRegularHeapObjectSize - kHeaderSize) / kPointerSize; (kMaxRegularHeapObjectSize - kHeaderSize) / kPointerSize;
// Dispatched behavior. // Dispatched behavior.
DECLARE_PRINTER(FixedArray) DECL_PRINTER(FixedArray)
DECLARE_VERIFIER(FixedArray) DECL_VERIFIER(FixedArray)
#ifdef DEBUG #ifdef DEBUG
// Checks if two FixedArrays have identical contents. // Checks if two FixedArrays have identical contents.
bool IsEqualTo(FixedArray* other); bool IsEqualTo(FixedArray* other);
...@@ -2859,7 +2857,7 @@ class FixedDoubleArray: public FixedArrayBase { ...@@ -2859,7 +2857,7 @@ class FixedDoubleArray: public FixedArrayBase {
// Code Generation support. // Code Generation support.
static int OffsetOfElementAt(int index) { return SizeFor(index); } static int OffsetOfElementAt(int index) { return SizeFor(index); }
DECLARE_CAST(FixedDoubleArray) DECL_CAST(FixedDoubleArray)
// Maximal allowed size, in bytes, of a single FixedDoubleArray. // Maximal allowed size, in bytes, of a single FixedDoubleArray.
// Prevents overflowing size computations, as well as extreme memory // Prevents overflowing size computations, as well as extreme memory
...@@ -2869,8 +2867,8 @@ class FixedDoubleArray: public FixedArrayBase { ...@@ -2869,8 +2867,8 @@ class FixedDoubleArray: public FixedArrayBase {
static const int kMaxLength = (kMaxSize - kHeaderSize) / kDoubleSize; static const int kMaxLength = (kMaxSize - kHeaderSize) / kDoubleSize;
// Dispatched behavior. // Dispatched behavior.
DECLARE_PRINTER(FixedDoubleArray) DECL_PRINTER(FixedDoubleArray)
DECLARE_VERIFIER(FixedDoubleArray) DECL_VERIFIER(FixedDoubleArray)
class BodyDescriptor; class BodyDescriptor;
// No weak fields. // No weak fields.
...@@ -2925,7 +2923,7 @@ class WeakFixedArray : public FixedArray { ...@@ -2925,7 +2923,7 @@ class WeakFixedArray : public FixedArray {
DISALLOW_COPY_AND_ASSIGN(Iterator); DISALLOW_COPY_AND_ASSIGN(Iterator);
}; };
DECLARE_CAST(WeakFixedArray) DECL_CAST(WeakFixedArray)
private: private:
static const int kLastUsedIndexIndex = 0; static const int kLastUsedIndexIndex = 0;
...@@ -2990,7 +2988,7 @@ class ArrayList : public FixedArray { ...@@ -2990,7 +2988,7 @@ class ArrayList : public FixedArray {
// number returned by Length() is stored in the first entry. // number returned by Length() is stored in the first entry.
Handle<FixedArray> Elements() const; Handle<FixedArray> Elements() const;
bool IsFull(); bool IsFull();
DECLARE_CAST(ArrayList) DECL_CAST(ArrayList)
private: private:
static Handle<ArrayList> EnsureSpace(Handle<ArrayList> array, int length); static Handle<ArrayList> EnsureSpace(Handle<ArrayList> array, int length);
...@@ -3063,7 +3061,7 @@ class HandlerTable : public FixedArray { ...@@ -3063,7 +3061,7 @@ class HandlerTable : public FixedArray {
static int LengthForRange(int entries) { return entries * kRangeEntrySize; } static int LengthForRange(int entries) { return entries * kRangeEntrySize; }
static int LengthForReturn(int entries) { return entries * kReturnEntrySize; } static int LengthForReturn(int entries) { return entries * kReturnEntrySize; }
DECLARE_CAST(HandlerTable) DECL_CAST(HandlerTable)
#ifdef ENABLE_DISASSEMBLER #ifdef ENABLE_DISASSEMBLER
void HandlerTableRangePrint(std::ostream& os); // NOLINT void HandlerTableRangePrint(std::ostream& os); // NOLINT
...@@ -3130,12 +3128,12 @@ class ByteArray: public FixedArrayBase { ...@@ -3130,12 +3128,12 @@ class ByteArray: public FixedArrayBase {
// Returns a pointer to the ByteArray object for a given data start address. // Returns a pointer to the ByteArray object for a given data start address.
static inline ByteArray* FromDataStartAddress(Address address); static inline ByteArray* FromDataStartAddress(Address address);
DECLARE_CAST(ByteArray) DECL_CAST(ByteArray)
// Dispatched behavior. // Dispatched behavior.
inline int ByteArraySize(); inline int ByteArraySize();
DECLARE_PRINTER(ByteArray) DECL_PRINTER(ByteArray)
DECLARE_VERIFIER(ByteArray) DECL_VERIFIER(ByteArray)
// Layout description. // Layout description.
static const int kAlignedSize = OBJECT_POINTER_ALIGN(kHeaderSize); static const int kAlignedSize = OBJECT_POINTER_ALIGN(kHeaderSize);
...@@ -3174,7 +3172,7 @@ class PodArray : public ByteArray { ...@@ -3174,7 +3172,7 @@ class PodArray : public ByteArray {
sizeof(T)); sizeof(T));
} }
int length() { return ByteArray::length() / sizeof(T); } int length() { return ByteArray::length() / sizeof(T); }
DECLARE_CAST(PodArray<T>) DECL_CAST(PodArray<T>)
private: private:
DISALLOW_IMPLICIT_CONSTRUCTORS(PodArray<T>); DISALLOW_IMPLICIT_CONSTRUCTORS(PodArray<T>);
...@@ -3183,16 +3181,16 @@ class PodArray : public ByteArray { ...@@ -3183,16 +3181,16 @@ class PodArray : public ByteArray {
// BytecodeArray represents a sequence of interpreter bytecodes. // BytecodeArray represents a sequence of interpreter bytecodes.
class BytecodeArray : public FixedArrayBase { class BytecodeArray : public FixedArrayBase {
public: public:
#define DECLARE_BYTECODE_AGE_ENUM(X) k##X##BytecodeAge, #define DECL_BYTECODE_AGE_ENUM(X) k##X##BytecodeAge,
enum Age { enum Age {
kNoAgeBytecodeAge = 0, kNoAgeBytecodeAge = 0,
CODE_AGE_LIST(DECLARE_BYTECODE_AGE_ENUM) kAfterLastBytecodeAge, CODE_AGE_LIST(DECL_BYTECODE_AGE_ENUM) kAfterLastBytecodeAge,
kFirstBytecodeAge = kNoAgeBytecodeAge, kFirstBytecodeAge = kNoAgeBytecodeAge,
kLastBytecodeAge = kAfterLastBytecodeAge - 1, kLastBytecodeAge = kAfterLastBytecodeAge - 1,
kBytecodeAgeCount = kAfterLastBytecodeAge - kFirstBytecodeAge - 1, kBytecodeAgeCount = kAfterLastBytecodeAge - kFirstBytecodeAge - 1,
kIsOldBytecodeAge = kSexagenarianBytecodeAge kIsOldBytecodeAge = kSexagenarianBytecodeAge
}; };
#undef DECLARE_BYTECODE_AGE_ENUM #undef DECL_BYTECODE_AGE_ENUM
static int SizeFor(int length) { static int SizeFor(int length) {
return OBJECT_POINTER_ALIGN(kHeaderSize + length); return OBJECT_POINTER_ALIGN(kHeaderSize + length);
...@@ -3240,7 +3238,7 @@ class BytecodeArray : public FixedArrayBase { ...@@ -3240,7 +3238,7 @@ class BytecodeArray : public FixedArrayBase {
inline ByteArray* SourcePositionTable(); inline ByteArray* SourcePositionTable();
DECLARE_CAST(BytecodeArray) DECL_CAST(BytecodeArray)
// Dispatched behavior. // Dispatched behavior.
inline int BytecodeArraySize(); inline int BytecodeArraySize();
...@@ -3254,8 +3252,8 @@ class BytecodeArray : public FixedArrayBase { ...@@ -3254,8 +3252,8 @@ class BytecodeArray : public FixedArrayBase {
int SourcePosition(int offset); int SourcePosition(int offset);
int SourceStatementPosition(int offset); int SourceStatementPosition(int offset);
DECLARE_PRINTER(BytecodeArray) DECL_PRINTER(BytecodeArray)
DECLARE_VERIFIER(BytecodeArray) DECL_VERIFIER(BytecodeArray)
void Disassemble(std::ostream& os); void Disassemble(std::ostream& os);
...@@ -3317,8 +3315,8 @@ class FreeSpace: public HeapObject { ...@@ -3317,8 +3315,8 @@ class FreeSpace: public HeapObject {
inline static FreeSpace* cast(HeapObject* obj); inline static FreeSpace* cast(HeapObject* obj);
// Dispatched behavior. // Dispatched behavior.
DECLARE_PRINTER(FreeSpace) DECL_PRINTER(FreeSpace)
DECLARE_VERIFIER(FreeSpace) DECL_VERIFIER(FreeSpace)
// Layout description. // Layout description.
// Size is smi tagged when it is stored. // Size is smi tagged when it is stored.
...@@ -3355,7 +3353,7 @@ class FixedTypedArrayBase: public FixedArrayBase { ...@@ -3355,7 +3353,7 @@ class FixedTypedArrayBase: public FixedArrayBase {
DECL_ACCESSORS(external_pointer, void) DECL_ACCESSORS(external_pointer, void)
// Dispatched behavior. // Dispatched behavior.
DECLARE_CAST(FixedTypedArrayBase) DECL_CAST(FixedTypedArrayBase)
static const int kBasePointerOffset = FixedArrayBase::kHeaderSize; static const int kBasePointerOffset = FixedArrayBase::kHeaderSize;
static const int kExternalPointerOffset = kBasePointerOffset + kPointerSize; static const int kExternalPointerOffset = kBasePointerOffset + kPointerSize;
...@@ -3404,7 +3402,7 @@ class FixedTypedArray: public FixedTypedArrayBase { ...@@ -3404,7 +3402,7 @@ class FixedTypedArray: public FixedTypedArrayBase {
typedef typename Traits::ElementType ElementType; typedef typename Traits::ElementType ElementType;
static const InstanceType kInstanceType = Traits::kInstanceType; static const InstanceType kInstanceType = Traits::kInstanceType;
DECLARE_CAST(FixedTypedArray<Traits>) DECL_CAST(FixedTypedArray<Traits>)
inline ElementType get_scalar(int index); inline ElementType get_scalar(int index);
static inline Handle<Object> get(FixedTypedArray* array, int index); static inline Handle<Object> get(FixedTypedArray* array, int index);
...@@ -3418,8 +3416,8 @@ class FixedTypedArray: public FixedTypedArrayBase { ...@@ -3418,8 +3416,8 @@ class FixedTypedArray: public FixedTypedArrayBase {
// and undefined. // and undefined.
inline void SetValue(uint32_t index, Object* value); inline void SetValue(uint32_t index, Object* value);
DECLARE_PRINTER(FixedTypedArray) DECL_PRINTER(FixedTypedArray)
DECLARE_VERIFIER(FixedTypedArray) DECL_VERIFIER(FixedTypedArray)
private: private:
DISALLOW_IMPLICIT_CONSTRUCTORS(FixedTypedArray); DISALLOW_IMPLICIT_CONSTRUCTORS(FixedTypedArray);
...@@ -3471,33 +3469,33 @@ class DeoptimizationInputData: public FixedArray { ...@@ -3471,33 +3469,33 @@ class DeoptimizationInputData: public FixedArray {
static const int kDeoptEntrySize = 4; static const int kDeoptEntrySize = 4;
// Simple element accessors. // Simple element accessors.
#define DECLARE_ELEMENT_ACCESSORS(name, type) \ #define DECL_ELEMENT_ACCESSORS(name, type) \
inline type* name(); \ inline type* name(); \
inline void Set##name(type* value); inline void Set##name(type* value);
DECLARE_ELEMENT_ACCESSORS(TranslationByteArray, ByteArray) DECL_ELEMENT_ACCESSORS(TranslationByteArray, ByteArray)
DECLARE_ELEMENT_ACCESSORS(InlinedFunctionCount, Smi) DECL_ELEMENT_ACCESSORS(InlinedFunctionCount, Smi)
DECLARE_ELEMENT_ACCESSORS(LiteralArray, FixedArray) DECL_ELEMENT_ACCESSORS(LiteralArray, FixedArray)
DECLARE_ELEMENT_ACCESSORS(OsrAstId, Smi) DECL_ELEMENT_ACCESSORS(OsrAstId, Smi)
DECLARE_ELEMENT_ACCESSORS(OsrPcOffset, Smi) DECL_ELEMENT_ACCESSORS(OsrPcOffset, Smi)
DECLARE_ELEMENT_ACCESSORS(OptimizationId, Smi) DECL_ELEMENT_ACCESSORS(OptimizationId, Smi)
DECLARE_ELEMENT_ACCESSORS(SharedFunctionInfo, Object) DECL_ELEMENT_ACCESSORS(SharedFunctionInfo, Object)
DECLARE_ELEMENT_ACCESSORS(WeakCellCache, Object) DECL_ELEMENT_ACCESSORS(WeakCellCache, Object)
DECLARE_ELEMENT_ACCESSORS(InliningPositions, PodArray<InliningPosition>) DECL_ELEMENT_ACCESSORS(InliningPositions, PodArray<InliningPosition>)
#undef DECLARE_ELEMENT_ACCESSORS #undef DECL_ELEMENT_ACCESSORS
// Accessors for elements of the ith deoptimization entry. // Accessors for elements of the ith deoptimization entry.
#define DECLARE_ENTRY_ACCESSORS(name, type) \ #define DECL_ENTRY_ACCESSORS(name, type) \
inline type* name(int i); \ inline type* name(int i); \
inline void Set##name(int i, type* value); inline void Set##name(int i, type* value);
DECLARE_ENTRY_ACCESSORS(AstIdRaw, Smi) DECL_ENTRY_ACCESSORS(AstIdRaw, Smi)
DECLARE_ENTRY_ACCESSORS(TranslationIndex, Smi) DECL_ENTRY_ACCESSORS(TranslationIndex, Smi)
DECLARE_ENTRY_ACCESSORS(ArgumentsStackHeight, Smi) DECL_ENTRY_ACCESSORS(ArgumentsStackHeight, Smi)
DECLARE_ENTRY_ACCESSORS(Pc, Smi) DECL_ENTRY_ACCESSORS(Pc, Smi)
#undef DECLARE_ENTRY_ACCESSORS #undef DECL_ENTRY_ACCESSORS
inline BailoutId AstId(int i); inline BailoutId AstId(int i);
...@@ -3516,7 +3514,7 @@ class DeoptimizationInputData: public FixedArray { ...@@ -3516,7 +3514,7 @@ class DeoptimizationInputData: public FixedArray {
int deopt_entry_count, int deopt_entry_count,
PretenureFlag pretenure); PretenureFlag pretenure);
DECLARE_CAST(DeoptimizationInputData) DECL_CAST(DeoptimizationInputData)
#ifdef ENABLE_DISASSEMBLER #ifdef ENABLE_DISASSEMBLER
void DeoptimizationInputDataPrint(std::ostream& os); // NOLINT void DeoptimizationInputDataPrint(std::ostream& os); // NOLINT
...@@ -3539,7 +3537,7 @@ class TemplateList : public FixedArray { ...@@ -3539,7 +3537,7 @@ class TemplateList : public FixedArray {
inline void set(int index, Object* value); inline void set(int index, Object* value);
static Handle<TemplateList> Add(Isolate* isolate, Handle<TemplateList> list, static Handle<TemplateList> Add(Isolate* isolate, Handle<TemplateList> list,
Handle<Object> value); Handle<Object> value);
DECLARE_CAST(TemplateList) DECL_CAST(TemplateList)
private: private:
static const int kLengthIndex = 0; static const int kLengthIndex = 0;
static const int kFirstElementIndex = kLengthIndex + 1; static const int kFirstElementIndex = kLengthIndex + 1;
...@@ -3912,34 +3910,33 @@ class Code: public HeapObject { ...@@ -3912,34 +3910,33 @@ class Code: public HeapObject {
// the layout of the code object into account. // the layout of the code object into account.
inline int ExecutableSize(); inline int ExecutableSize();
DECLARE_CAST(Code) DECL_CAST(Code)
// Dispatched behavior. // Dispatched behavior.
inline int CodeSize(); inline int CodeSize();
DECLARE_PRINTER(Code) DECL_PRINTER(Code)
DECLARE_VERIFIER(Code) DECL_VERIFIER(Code)
void ClearInlineCaches(); void ClearInlineCaches();
BailoutId TranslatePcOffsetToAstId(uint32_t pc_offset); BailoutId TranslatePcOffsetToAstId(uint32_t pc_offset);
uint32_t TranslateAstIdToPcOffset(BailoutId ast_id); uint32_t TranslateAstIdToPcOffset(BailoutId ast_id);
#define DECLARE_CODE_AGE_ENUM(X) k##X##CodeAge, #define DECL_CODE_AGE_ENUM(X) k##X##CodeAge,
enum Age { enum Age {
kToBeExecutedOnceCodeAge = -3, kToBeExecutedOnceCodeAge = -3,
kNotExecutedCodeAge = -2, kNotExecutedCodeAge = -2,
kExecutedOnceCodeAge = -1, kExecutedOnceCodeAge = -1,
kNoAgeCodeAge = 0, kNoAgeCodeAge = 0,
CODE_AGE_LIST(DECLARE_CODE_AGE_ENUM) CODE_AGE_LIST(DECL_CODE_AGE_ENUM) kAfterLastCodeAge,
kAfterLastCodeAge,
kFirstCodeAge = kToBeExecutedOnceCodeAge, kFirstCodeAge = kToBeExecutedOnceCodeAge,
kLastCodeAge = kAfterLastCodeAge - 1, kLastCodeAge = kAfterLastCodeAge - 1,
kCodeAgeCount = kAfterLastCodeAge - kFirstCodeAge - 1, kCodeAgeCount = kAfterLastCodeAge - kFirstCodeAge - 1,
kIsOldCodeAge = kSexagenarianCodeAge, kIsOldCodeAge = kSexagenarianCodeAge,
kPreAgedCodeAge = kIsOldCodeAge - 1 kPreAgedCodeAge = kIsOldCodeAge - 1
}; };
#undef DECLARE_CODE_AGE_ENUM #undef DECL_CODE_AGE_ENUM
// Code aging. Indicates how many full GCs this code has survived without // Code aging. Indicates how many full GCs this code has survived without
// being entered through the prologue. Used to determine when to flush code // being entered through the prologue. Used to determine when to flush code
...@@ -4165,7 +4162,7 @@ class AbstractCode : public HeapObject { ...@@ -4165,7 +4162,7 @@ class AbstractCode : public HeapObject {
// the layout of the code object into account. // the layout of the code object into account.
inline int ExecutableSize(); inline int ExecutableSize();
DECLARE_CAST(AbstractCode) DECL_CAST(AbstractCode)
inline Code* GetCode(); inline Code* GetCode();
inline BytecodeArray* GetBytecodeArray(); inline BytecodeArray* GetBytecodeArray();
...@@ -4266,7 +4263,7 @@ class DependentCode: public FixedArray { ...@@ -4266,7 +4263,7 @@ class DependentCode: public FixedArray {
inline void set_object_at(int i, Object* object); inline void set_object_at(int i, Object* object);
inline void clear_at(int i); inline void clear_at(int i);
inline void copy(int from, int to); inline void copy(int from, int to);
DECLARE_CAST(DependentCode) DECL_CAST(DependentCode)
static const char* DependencyGroupName(DependencyGroup group); static const char* DependencyGroupName(DependencyGroup group);
static void SetMarkedForDeoptimization(Code* code, DependencyGroup group); static void SetMarkedForDeoptimization(Code* code, DependencyGroup group);
...@@ -4300,7 +4297,7 @@ class PrototypeInfo; ...@@ -4300,7 +4297,7 @@ class PrototypeInfo;
class Struct: public HeapObject { class Struct: public HeapObject {
public: public:
inline void InitializeBody(int object_size); inline void InitializeBody(int object_size);
DECLARE_CAST(Struct) DECL_CAST(Struct)
}; };
// A container struct to hold state required for PromiseResolveThenableJob. // A container struct to hold state required for PromiseResolveThenableJob.
...@@ -4320,9 +4317,9 @@ class PromiseResolveThenableJobInfo : public Struct { ...@@ -4320,9 +4317,9 @@ class PromiseResolveThenableJobInfo : public Struct {
static const int kContextOffset = kRejectOffset + kPointerSize; static const int kContextOffset = kRejectOffset + kPointerSize;
static const int kSize = kContextOffset + kPointerSize; static const int kSize = kContextOffset + kPointerSize;
DECLARE_CAST(PromiseResolveThenableJobInfo) DECL_CAST(PromiseResolveThenableJobInfo)
DECLARE_PRINTER(PromiseResolveThenableJobInfo) DECL_PRINTER(PromiseResolveThenableJobInfo)
DECLARE_VERIFIER(PromiseResolveThenableJobInfo) DECL_VERIFIER(PromiseResolveThenableJobInfo)
private: private:
DISALLOW_IMPLICIT_CONSTRUCTORS(PromiseResolveThenableJobInfo); DISALLOW_IMPLICIT_CONSTRUCTORS(PromiseResolveThenableJobInfo);
...@@ -4356,9 +4353,9 @@ class PromiseReactionJobInfo : public Struct { ...@@ -4356,9 +4353,9 @@ class PromiseReactionJobInfo : public Struct {
static const int kContextOffset = kDeferredOnRejectOffset + kPointerSize; static const int kContextOffset = kDeferredOnRejectOffset + kPointerSize;
static const int kSize = kContextOffset + kPointerSize; static const int kSize = kContextOffset + kPointerSize;
DECLARE_CAST(PromiseReactionJobInfo) DECL_CAST(PromiseReactionJobInfo)
DECLARE_PRINTER(PromiseReactionJobInfo) DECL_PRINTER(PromiseReactionJobInfo)
DECLARE_VERIFIER(PromiseReactionJobInfo) DECL_VERIFIER(PromiseReactionJobInfo)
private: private:
DISALLOW_IMPLICIT_CONSTRUCTORS(PromiseReactionJobInfo); DISALLOW_IMPLICIT_CONSTRUCTORS(PromiseReactionJobInfo);
...@@ -4378,9 +4375,9 @@ class AsyncGeneratorRequest : public Struct { ...@@ -4378,9 +4375,9 @@ class AsyncGeneratorRequest : public Struct {
static const int kPromiseOffset = kValueOffset + kPointerSize; static const int kPromiseOffset = kValueOffset + kPointerSize;
static const int kSize = kPromiseOffset + kPointerSize; static const int kSize = kPromiseOffset + kPointerSize;
DECLARE_CAST(AsyncGeneratorRequest) DECL_CAST(AsyncGeneratorRequest)
DECLARE_PRINTER(AsyncGeneratorRequest) DECL_PRINTER(AsyncGeneratorRequest)
DECLARE_VERIFIER(AsyncGeneratorRequest) DECL_VERIFIER(AsyncGeneratorRequest)
private: private:
DISALLOW_IMPLICIT_CONSTRUCTORS(AsyncGeneratorRequest); DISALLOW_IMPLICIT_CONSTRUCTORS(AsyncGeneratorRequest);
...@@ -4421,11 +4418,11 @@ class PrototypeInfo : public Struct { ...@@ -4421,11 +4418,11 @@ class PrototypeInfo : public Struct {
DECL_BOOLEAN_ACCESSORS(should_be_fast_map) DECL_BOOLEAN_ACCESSORS(should_be_fast_map)
DECLARE_CAST(PrototypeInfo) DECL_CAST(PrototypeInfo)
// Dispatched behavior. // Dispatched behavior.
DECLARE_PRINTER(PrototypeInfo) DECL_PRINTER(PrototypeInfo)
DECLARE_VERIFIER(PrototypeInfo) DECL_VERIFIER(PrototypeInfo)
static const int kWeakCellOffset = HeapObject::kHeaderSize; static const int kWeakCellOffset = HeapObject::kHeaderSize;
static const int kPrototypeUsersOffset = kWeakCellOffset + kPointerSize; static const int kPrototypeUsersOffset = kWeakCellOffset + kPointerSize;
...@@ -4449,11 +4446,11 @@ class Tuple2 : public Struct { ...@@ -4449,11 +4446,11 @@ class Tuple2 : public Struct {
DECL_ACCESSORS(value1, Object) DECL_ACCESSORS(value1, Object)
DECL_ACCESSORS(value2, Object) DECL_ACCESSORS(value2, Object)
DECLARE_CAST(Tuple2) DECL_CAST(Tuple2)
// Dispatched behavior. // Dispatched behavior.
DECLARE_PRINTER(Tuple2) DECL_PRINTER(Tuple2)
DECLARE_VERIFIER(Tuple2) DECL_VERIFIER(Tuple2)
static const int kValue1Offset = HeapObject::kHeaderSize; static const int kValue1Offset = HeapObject::kHeaderSize;
static const int kValue2Offset = kValue1Offset + kPointerSize; static const int kValue2Offset = kValue1Offset + kPointerSize;
...@@ -4467,11 +4464,11 @@ class Tuple3 : public Tuple2 { ...@@ -4467,11 +4464,11 @@ class Tuple3 : public Tuple2 {
public: public:
DECL_ACCESSORS(value3, Object) DECL_ACCESSORS(value3, Object)
DECLARE_CAST(Tuple3) DECL_CAST(Tuple3)
// Dispatched behavior. // Dispatched behavior.
DECLARE_PRINTER(Tuple3) DECL_PRINTER(Tuple3)
DECLARE_VERIFIER(Tuple3) DECL_VERIFIER(Tuple3)
static const int kValue3Offset = Tuple2::kSize; static const int kValue3Offset = Tuple2::kSize;
static const int kSize = kValue3Offset + kPointerSize; static const int kSize = kValue3Offset + kPointerSize;
...@@ -4492,11 +4489,11 @@ class ContextExtension : public Struct { ...@@ -4492,11 +4489,11 @@ class ContextExtension : public Struct {
// [extension]: Extension object. // [extension]: Extension object.
DECL_ACCESSORS(extension, Object) DECL_ACCESSORS(extension, Object)
DECLARE_CAST(ContextExtension) DECL_CAST(ContextExtension)
// Dispatched behavior. // Dispatched behavior.
DECLARE_PRINTER(ContextExtension) DECL_PRINTER(ContextExtension)
DECLARE_VERIFIER(ContextExtension) DECL_VERIFIER(ContextExtension)
static const int kScopeInfoOffset = HeapObject::kHeaderSize; static const int kScopeInfoOffset = HeapObject::kHeaderSize;
static const int kExtensionOffset = kScopeInfoOffset + kPointerSize; static const int kExtensionOffset = kScopeInfoOffset + kPointerSize;
...@@ -4659,11 +4656,10 @@ class ContextExtension : public Struct { ...@@ -4659,11 +4656,10 @@ class ContextExtension : public Struct {
enum BuiltinFunctionId { enum BuiltinFunctionId {
kInvalidBuiltinFunctionId = -1, kInvalidBuiltinFunctionId = -1,
kArrayCode, kArrayCode,
#define DECLARE_FUNCTION_ID(ignored1, ignore2, name) \ #define DECL_FUNCTION_ID(ignored1, ignore2, name) k##name,
k##name, FUNCTIONS_WITH_ID_LIST(DECL_FUNCTION_ID)
FUNCTIONS_WITH_ID_LIST(DECLARE_FUNCTION_ID) ATOMIC_FUNCTIONS_WITH_ID_LIST(DECL_FUNCTION_ID)
ATOMIC_FUNCTIONS_WITH_ID_LIST(DECLARE_FUNCTION_ID) #undef DECL_FUNCTION_ID
#undef DECLARE_FUNCTION_ID
// Fake id for a special case of Math.pow. Note, it continues the // Fake id for a special case of Math.pow. Note, it continues the
// list of math functions. // list of math functions.
kMathPowHalf, kMathPowHalf,
...@@ -4738,10 +4734,10 @@ class JSGeneratorObject: public JSObject { ...@@ -4738,10 +4734,10 @@ class JSGeneratorObject: public JSObject {
// [register_file]: Saved interpreter register file. // [register_file]: Saved interpreter register file.
DECL_ACCESSORS(register_file, FixedArray) DECL_ACCESSORS(register_file, FixedArray)
DECLARE_CAST(JSGeneratorObject) DECL_CAST(JSGeneratorObject)
// Dispatched behavior. // Dispatched behavior.
DECLARE_VERIFIER(JSGeneratorObject) DECL_VERIFIER(JSGeneratorObject)
// Magic sentinel values for the continuation. // Magic sentinel values for the continuation.
static const int kGeneratorExecuting = -2; static const int kGeneratorExecuting = -2;
...@@ -4763,10 +4759,10 @@ class JSGeneratorObject: public JSObject { ...@@ -4763,10 +4759,10 @@ class JSGeneratorObject: public JSObject {
class JSAsyncGeneratorObject : public JSGeneratorObject { class JSAsyncGeneratorObject : public JSGeneratorObject {
public: public:
DECLARE_CAST(JSAsyncGeneratorObject) DECL_CAST(JSAsyncGeneratorObject)
// Dispatched behavior. // Dispatched behavior.
DECLARE_VERIFIER(JSAsyncGeneratorObject) DECL_VERIFIER(JSAsyncGeneratorObject)
// [queue] // [queue]
// Pointer to the head of a singly linked list of AsyncGeneratorRequest, or // Pointer to the head of a singly linked list of AsyncGeneratorRequest, or
...@@ -4799,9 +4795,9 @@ class JSAsyncGeneratorObject : public JSGeneratorObject { ...@@ -4799,9 +4795,9 @@ class JSAsyncGeneratorObject : public JSGeneratorObject {
// the declared variable (foo). A module can have at most one namespace object. // the declared variable (foo). A module can have at most one namespace object.
class JSModuleNamespace : public JSObject { class JSModuleNamespace : public JSObject {
public: public:
DECLARE_CAST(JSModuleNamespace) DECL_CAST(JSModuleNamespace)
DECLARE_PRINTER(JSModuleNamespace) DECL_PRINTER(JSModuleNamespace)
DECLARE_VERIFIER(JSModuleNamespace) DECL_VERIFIER(JSModuleNamespace)
// The actual module whose namespace is being represented. // The actual module whose namespace is being represented.
DECL_ACCESSORS(module, Module) DECL_ACCESSORS(module, Module)
...@@ -4830,9 +4826,9 @@ class JSModuleNamespace : public JSObject { ...@@ -4830,9 +4826,9 @@ class JSModuleNamespace : public JSObject {
// This is still very much in flux. // This is still very much in flux.
class Module : public Struct { class Module : public Struct {
public: public:
DECLARE_CAST(Module) DECL_CAST(Module)
DECLARE_VERIFIER(Module) DECL_VERIFIER(Module)
DECLARE_PRINTER(Module) DECL_PRINTER(Module)
// The code representing this Module, or an abstraction thereof. // The code representing this Module, or an abstraction thereof.
// This is either a SharedFunctionInfo or a JSFunction or a ModuleInfo // This is either a SharedFunctionInfo or a JSFunction or a ModuleInfo
...@@ -5002,11 +4998,11 @@ class JSBoundFunction : public JSObject { ...@@ -5002,11 +4998,11 @@ class JSBoundFunction : public JSObject {
static MaybeHandle<Context> GetFunctionRealm( static MaybeHandle<Context> GetFunctionRealm(
Handle<JSBoundFunction> function); Handle<JSBoundFunction> function);
DECLARE_CAST(JSBoundFunction) DECL_CAST(JSBoundFunction)
// Dispatched behavior. // Dispatched behavior.
DECLARE_PRINTER(JSBoundFunction) DECL_PRINTER(JSBoundFunction)
DECLARE_VERIFIER(JSBoundFunction) DECL_VERIFIER(JSBoundFunction)
// The bound function's string representation implemented according // The bound function's string representation implemented according
// to ES6 section 19.2.3.5 Function.prototype.toString ( ). // to ES6 section 19.2.3.5 Function.prototype.toString ( ).
...@@ -5171,7 +5167,7 @@ class JSFunction: public JSObject { ...@@ -5171,7 +5167,7 @@ class JSFunction: public JSObject {
// Prints the name of the function using PrintF. // Prints the name of the function using PrintF.
void PrintName(FILE* out = stdout); void PrintName(FILE* out = stdout);
DECLARE_CAST(JSFunction) DECL_CAST(JSFunction)
// Calculate the instance size and in-object properties count. // Calculate the instance size and in-object properties count.
static void CalculateInstanceSizeForDerivedClass( static void CalculateInstanceSizeForDerivedClass(
...@@ -5192,8 +5188,8 @@ class JSFunction: public JSObject { ...@@ -5192,8 +5188,8 @@ class JSFunction: public JSObject {
typedef BodyDescriptorImpl<kRespectWeakness> BodyDescriptorWeak; typedef BodyDescriptorImpl<kRespectWeakness> BodyDescriptorWeak;
// Dispatched behavior. // Dispatched behavior.
DECLARE_PRINTER(JSFunction) DECL_PRINTER(JSFunction)
DECLARE_VERIFIER(JSFunction) DECL_VERIFIER(JSFunction)
// The function's name if it is configured, otherwise shared function info // The function's name if it is configured, otherwise shared function info
// debug name. // debug name.
...@@ -5249,15 +5245,15 @@ class JSGlobalProxy : public JSObject { ...@@ -5249,15 +5245,15 @@ class JSGlobalProxy : public JSObject {
// [hash]: The hash code property (undefined if not initialized yet). // [hash]: The hash code property (undefined if not initialized yet).
DECL_ACCESSORS(hash, Object) DECL_ACCESSORS(hash, Object)
DECLARE_CAST(JSGlobalProxy) DECL_CAST(JSGlobalProxy)
inline bool IsDetachedFrom(JSGlobalObject* global) const; inline bool IsDetachedFrom(JSGlobalObject* global) const;
static int SizeWithEmbedderFields(int embedder_field_count); static int SizeWithEmbedderFields(int embedder_field_count);
// Dispatched behavior. // Dispatched behavior.
DECLARE_PRINTER(JSGlobalProxy) DECL_PRINTER(JSGlobalProxy)
DECLARE_VERIFIER(JSGlobalProxy) DECL_VERIFIER(JSGlobalProxy)
// Layout description. // Layout description.
static const int kNativeContextOffset = JSObject::kHeaderSize; static const int kNativeContextOffset = JSObject::kHeaderSize;
...@@ -5286,13 +5282,13 @@ class JSGlobalObject : public JSObject { ...@@ -5286,13 +5282,13 @@ class JSGlobalObject : public JSObject {
Handle<JSGlobalObject> global, Handle<Name> name, Handle<JSGlobalObject> global, Handle<Name> name,
PropertyCellType cell_type, int* entry_out = nullptr); PropertyCellType cell_type, int* entry_out = nullptr);
DECLARE_CAST(JSGlobalObject) DECL_CAST(JSGlobalObject)
inline bool IsDetached(); inline bool IsDetached();
// Dispatched behavior. // Dispatched behavior.
DECLARE_PRINTER(JSGlobalObject) DECL_PRINTER(JSGlobalObject)
DECLARE_VERIFIER(JSGlobalObject) DECL_VERIFIER(JSGlobalObject)
// Layout description. // Layout description.
static const int kNativeContextOffset = JSObject::kHeaderSize; static const int kNativeContextOffset = JSObject::kHeaderSize;
...@@ -5311,11 +5307,11 @@ class JSValue: public JSObject { ...@@ -5311,11 +5307,11 @@ class JSValue: public JSObject {
// [value]: the object being wrapped. // [value]: the object being wrapped.
DECL_ACCESSORS(value, Object) DECL_ACCESSORS(value, Object)
DECLARE_CAST(JSValue) DECL_CAST(JSValue)
// Dispatched behavior. // Dispatched behavior.
DECLARE_PRINTER(JSValue) DECL_PRINTER(JSValue)
DECLARE_VERIFIER(JSValue) DECL_VERIFIER(JSValue)
// Layout description. // Layout description.
static const int kValueOffset = JSObject::kHeaderSize; static const int kValueOffset = JSObject::kHeaderSize;
...@@ -5356,7 +5352,7 @@ class JSDate: public JSObject { ...@@ -5356,7 +5352,7 @@ class JSDate: public JSObject {
// moment when chached fields were cached. // moment when chached fields were cached.
DECL_ACCESSORS(cache_stamp, Object) DECL_ACCESSORS(cache_stamp, Object)
DECLARE_CAST(JSDate) DECL_CAST(JSDate)
// Returns the time value (UTC) identifying the current time. // Returns the time value (UTC) identifying the current time.
static double CurrentTimeValue(Isolate* isolate); static double CurrentTimeValue(Isolate* isolate);
...@@ -5370,8 +5366,8 @@ class JSDate: public JSObject { ...@@ -5370,8 +5366,8 @@ class JSDate: public JSObject {
void SetValue(Object* value, bool is_value_nan); void SetValue(Object* value, bool is_value_nan);
// Dispatched behavior. // Dispatched behavior.
DECLARE_PRINTER(JSDate) DECL_PRINTER(JSDate)
DECLARE_VERIFIER(JSDate) DECL_VERIFIER(JSDate)
// The order is important. It must be kept in sync with date macros // The order is important. It must be kept in sync with date macros
// in macros.py. // in macros.py.
...@@ -5468,11 +5464,11 @@ class JSMessageObject: public JSObject { ...@@ -5468,11 +5464,11 @@ class JSMessageObject: public JSObject {
inline int error_level() const; inline int error_level() const;
inline void set_error_level(int level); inline void set_error_level(int level);
DECLARE_CAST(JSMessageObject) DECL_CAST(JSMessageObject)
// Dispatched behavior. // Dispatched behavior.
DECLARE_PRINTER(JSMessageObject) DECL_PRINTER(JSMessageObject)
DECLARE_VERIFIER(JSMessageObject) DECL_VERIFIER(JSMessageObject)
// Layout description. // Layout description.
static const int kTypeOffset = JSObject::kHeaderSize; static const int kTypeOffset = JSObject::kHeaderSize;
...@@ -5497,9 +5493,9 @@ class JSPromise; ...@@ -5497,9 +5493,9 @@ class JSPromise;
// JS // JS
class JSPromiseCapability : public JSObject { class JSPromiseCapability : public JSObject {
public: public:
DECLARE_CAST(JSPromiseCapability) DECL_CAST(JSPromiseCapability)
DECLARE_VERIFIER(JSPromiseCapability) DECL_VERIFIER(JSPromiseCapability)
DECL_ACCESSORS(promise, Object) DECL_ACCESSORS(promise, Object)
DECL_ACCESSORS(resolve, Object) DECL_ACCESSORS(resolve, Object)
...@@ -5556,11 +5552,11 @@ class JSPromise : public JSObject { ...@@ -5556,11 +5552,11 @@ class JSPromise : public JSObject {
static const char* Status(int status); static const char* Status(int status);
DECLARE_CAST(JSPromise) DECL_CAST(JSPromise)
// Dispatched behavior. // Dispatched behavior.
DECLARE_PRINTER(JSPromise) DECL_PRINTER(JSPromise)
DECLARE_VERIFIER(JSPromise) DECL_VERIFIER(JSPromise)
// Layout description. // Layout description.
static const int kStatusOffset = JSObject::kHeaderSize; static const int kStatusOffset = JSObject::kHeaderSize;
...@@ -5664,11 +5660,11 @@ class JSRegExp: public JSObject { ...@@ -5664,11 +5660,11 @@ class JSRegExp: public JSObject {
} }
} }
DECLARE_CAST(JSRegExp) DECL_CAST(JSRegExp)
// Dispatched behavior. // Dispatched behavior.
DECLARE_PRINTER(JSRegExp) DECL_PRINTER(JSRegExp)
DECLARE_VERIFIER(JSRegExp) DECL_VERIFIER(JSRegExp)
static const int kDataOffset = JSObject::kHeaderSize; static const int kDataOffset = JSObject::kHeaderSize;
static const int kSourceOffset = kDataOffset + kPointerSize; static const int kSourceOffset = kDataOffset + kPointerSize;
...@@ -5752,7 +5748,7 @@ class TypeFeedbackInfo : public Tuple3 { ...@@ -5752,7 +5748,7 @@ class TypeFeedbackInfo : public Tuple3 {
inline void set_inlined_type_change_checksum(int checksum); inline void set_inlined_type_change_checksum(int checksum);
inline bool matches_inlined_type_change_checksum(int checksum); inline bool matches_inlined_type_change_checksum(int checksum);
DECLARE_CAST(TypeFeedbackInfo) DECL_CAST(TypeFeedbackInfo)
static const int kStorage1Offset = kValue1Offset; static const int kStorage1Offset = kValue1Offset;
static const int kStorage2Offset = kValue2Offset; static const int kStorage2Offset = kValue2Offset;
...@@ -5870,10 +5866,10 @@ class AllocationSite: public Struct { ...@@ -5870,10 +5866,10 @@ class AllocationSite: public Struct {
static bool DigestTransitionFeedback(Handle<AllocationSite> site, static bool DigestTransitionFeedback(Handle<AllocationSite> site,
ElementsKind to_kind); ElementsKind to_kind);
DECLARE_PRINTER(AllocationSite) DECL_PRINTER(AllocationSite)
DECLARE_VERIFIER(AllocationSite) DECL_VERIFIER(AllocationSite)
DECLARE_CAST(AllocationSite) DECL_CAST(AllocationSite)
static inline bool ShouldTrack(ElementsKind boilerplate_elements_kind); static inline bool ShouldTrack(ElementsKind boilerplate_elements_kind);
static bool ShouldTrack(ElementsKind from, ElementsKind to); static bool ShouldTrack(ElementsKind from, ElementsKind to);
static inline bool CanTrack(InstanceType type); static inline bool CanTrack(InstanceType type);
...@@ -5920,10 +5916,10 @@ class AllocationMemento: public Struct { ...@@ -5920,10 +5916,10 @@ class AllocationMemento: public Struct {
inline AllocationSite* GetAllocationSite(); inline AllocationSite* GetAllocationSite();
inline Address GetAllocationSiteUnchecked(); inline Address GetAllocationSiteUnchecked();
DECLARE_PRINTER(AllocationMemento) DECL_PRINTER(AllocationMemento)
DECLARE_VERIFIER(AllocationMemento) DECL_VERIFIER(AllocationMemento)
DECLARE_CAST(AllocationMemento) DECL_CAST(AllocationMemento)
private: private:
DISALLOW_IMPLICIT_CONSTRUCTORS(AllocationMemento); DISALLOW_IMPLICIT_CONSTRUCTORS(AllocationMemento);
...@@ -5989,10 +5985,10 @@ class Oddball: public HeapObject { ...@@ -5989,10 +5985,10 @@ class Oddball: public HeapObject {
// ES6 section 7.1.3 ToNumber for Boolean, Null, Undefined. // ES6 section 7.1.3 ToNumber for Boolean, Null, Undefined.
MUST_USE_RESULT static inline Handle<Object> ToNumber(Handle<Oddball> input); MUST_USE_RESULT static inline Handle<Object> ToNumber(Handle<Oddball> input);
DECLARE_CAST(Oddball) DECL_CAST(Oddball)
// Dispatched behavior. // Dispatched behavior.
DECLARE_VERIFIER(Oddball) DECL_VERIFIER(Oddball)
// Initialize the fields. // Initialize the fields.
static void Initialize(Isolate* isolate, Handle<Oddball> oddball, static void Initialize(Isolate* isolate, Handle<Oddball> oddball,
...@@ -6040,7 +6036,7 @@ class Cell: public HeapObject { ...@@ -6040,7 +6036,7 @@ class Cell: public HeapObject {
// [value]: value of the cell. // [value]: value of the cell.
DECL_ACCESSORS(value, Object) DECL_ACCESSORS(value, Object)
DECLARE_CAST(Cell) DECL_CAST(Cell)
static inline Cell* FromValueAddress(Address value) { static inline Cell* FromValueAddress(Address value) {
Object* result = FromAddress(value - kValueOffset); Object* result = FromAddress(value - kValueOffset);
...@@ -6052,8 +6048,8 @@ class Cell: public HeapObject { ...@@ -6052,8 +6048,8 @@ class Cell: public HeapObject {
} }
// Dispatched behavior. // Dispatched behavior.
DECLARE_PRINTER(Cell) DECL_PRINTER(Cell)
DECLARE_VERIFIER(Cell) DECL_VERIFIER(Cell)
// Layout description. // Layout description.
static const int kValueOffset = HeapObject::kHeaderSize; static const int kValueOffset = HeapObject::kHeaderSize;
...@@ -6105,11 +6101,11 @@ class PropertyCell : public HeapObject { ...@@ -6105,11 +6101,11 @@ class PropertyCell : public HeapObject {
static void SetValueWithInvalidation(Handle<PropertyCell> cell, static void SetValueWithInvalidation(Handle<PropertyCell> cell,
Handle<Object> new_value); Handle<Object> new_value);
DECLARE_CAST(PropertyCell) DECL_CAST(PropertyCell)
// Dispatched behavior. // Dispatched behavior.
DECLARE_PRINTER(PropertyCell) DECL_PRINTER(PropertyCell)
DECLARE_VERIFIER(PropertyCell) DECL_VERIFIER(PropertyCell)
// Layout description. // Layout description.
static const int kDetailsOffset = HeapObject::kHeaderSize; static const int kDetailsOffset = HeapObject::kHeaderSize;
...@@ -6145,10 +6141,10 @@ class WeakCell : public HeapObject { ...@@ -6145,10 +6141,10 @@ class WeakCell : public HeapObject {
inline bool next_cleared(); inline bool next_cleared();
DECLARE_CAST(WeakCell) DECL_CAST(WeakCell)
DECLARE_PRINTER(WeakCell) DECL_PRINTER(WeakCell)
DECLARE_VERIFIER(WeakCell) DECL_VERIFIER(WeakCell)
// Layout description. // Layout description.
static const int kValueOffset = HeapObject::kHeaderSize; static const int kValueOffset = HeapObject::kHeaderSize;
...@@ -6178,7 +6174,7 @@ class JSProxy: public JSReceiver { ...@@ -6178,7 +6174,7 @@ class JSProxy: public JSReceiver {
static MaybeHandle<Context> GetFunctionRealm(Handle<JSProxy> proxy); static MaybeHandle<Context> GetFunctionRealm(Handle<JSProxy> proxy);
DECLARE_CAST(JSProxy) DECL_CAST(JSProxy)
INLINE(bool IsRevoked() const); INLINE(bool IsRevoked() const);
static void Revoke(Handle<JSProxy> proxy); static void Revoke(Handle<JSProxy> proxy);
...@@ -6241,8 +6237,8 @@ class JSProxy: public JSReceiver { ...@@ -6241,8 +6237,8 @@ class JSProxy: public JSReceiver {
LookupIterator* it); LookupIterator* it);
// Dispatched behavior. // Dispatched behavior.
DECLARE_PRINTER(JSProxy) DECL_PRINTER(JSProxy)
DECLARE_VERIFIER(JSProxy) DECL_VERIFIER(JSProxy)
static const int kMaxIterationLimit = 100 * 1024; static const int kMaxIterationLimit = 100 * 1024;
...@@ -6289,14 +6285,14 @@ class JSCollection : public JSObject { ...@@ -6289,14 +6285,14 @@ class JSCollection : public JSObject {
// objects/hash-table.h) into the same file. // objects/hash-table.h) into the same file.
class JSSet : public JSCollection { class JSSet : public JSCollection {
public: public:
DECLARE_CAST(JSSet) DECL_CAST(JSSet)
static void Initialize(Handle<JSSet> set, Isolate* isolate); static void Initialize(Handle<JSSet> set, Isolate* isolate);
static void Clear(Handle<JSSet> set); static void Clear(Handle<JSSet> set);
// Dispatched behavior. // Dispatched behavior.
DECLARE_PRINTER(JSSet) DECL_PRINTER(JSSet)
DECLARE_VERIFIER(JSSet) DECL_VERIFIER(JSSet)
private: private:
DISALLOW_IMPLICIT_CONSTRUCTORS(JSSet); DISALLOW_IMPLICIT_CONSTRUCTORS(JSSet);
...@@ -6308,14 +6304,14 @@ class JSSet : public JSCollection { ...@@ -6308,14 +6304,14 @@ class JSSet : public JSCollection {
// objects/hash-table.h) into the same file. // objects/hash-table.h) into the same file.
class JSMap : public JSCollection { class JSMap : public JSCollection {
public: public:
DECLARE_CAST(JSMap) DECL_CAST(JSMap)
static void Initialize(Handle<JSMap> map, Isolate* isolate); static void Initialize(Handle<JSMap> map, Isolate* isolate);
static void Clear(Handle<JSMap> map); static void Clear(Handle<JSMap> map);
// Dispatched behavior. // Dispatched behavior.
DECLARE_PRINTER(JSMap) DECL_PRINTER(JSMap)
DECLARE_VERIFIER(JSMap) DECL_VERIFIER(JSMap)
private: private:
DISALLOW_IMPLICIT_CONSTRUCTORS(JSMap); DISALLOW_IMPLICIT_CONSTRUCTORS(JSMap);
...@@ -6323,10 +6319,10 @@ class JSMap : public JSCollection { ...@@ -6323,10 +6319,10 @@ class JSMap : public JSCollection {
class JSArrayIterator : public JSObject { class JSArrayIterator : public JSObject {
public: public:
DECLARE_PRINTER(JSArrayIterator) DECL_PRINTER(JSArrayIterator)
DECLARE_VERIFIER(JSArrayIterator) DECL_VERIFIER(JSArrayIterator)
DECLARE_CAST(JSArrayIterator) DECL_CAST(JSArrayIterator)
// [object]: the [[IteratedObject]] inobject property. // [object]: the [[IteratedObject]] inobject property.
DECL_ACCESSORS(object, Object) DECL_ACCESSORS(object, Object)
...@@ -6358,9 +6354,9 @@ class JSArrayIterator : public JSObject { ...@@ -6358,9 +6354,9 @@ class JSArrayIterator : public JSObject {
// (See https://tc39.github.io/proposal-async-iteration/#sec-iteration) // (See https://tc39.github.io/proposal-async-iteration/#sec-iteration)
class JSAsyncFromSyncIterator : public JSObject { class JSAsyncFromSyncIterator : public JSObject {
public: public:
DECLARE_CAST(JSAsyncFromSyncIterator) DECL_CAST(JSAsyncFromSyncIterator)
DECLARE_PRINTER(JSAsyncFromSyncIterator) DECL_PRINTER(JSAsyncFromSyncIterator)
DECLARE_VERIFIER(JSAsyncFromSyncIterator) DECL_VERIFIER(JSAsyncFromSyncIterator)
// Async-from-Sync Iterator instances are ordinary objects that inherit // Async-from-Sync Iterator instances are ordinary objects that inherit
// properties from the %AsyncFromSyncIteratorPrototype% intrinsic object. // properties from the %AsyncFromSyncIteratorPrototype% intrinsic object.
...@@ -6380,10 +6376,10 @@ class JSAsyncFromSyncIterator : public JSObject { ...@@ -6380,10 +6376,10 @@ class JSAsyncFromSyncIterator : public JSObject {
class JSStringIterator : public JSObject { class JSStringIterator : public JSObject {
public: public:
// Dispatched behavior. // Dispatched behavior.
DECLARE_PRINTER(JSStringIterator) DECL_PRINTER(JSStringIterator)
DECLARE_VERIFIER(JSStringIterator) DECL_VERIFIER(JSStringIterator)
DECLARE_CAST(JSStringIterator) DECL_CAST(JSStringIterator)
// [string]: the [[IteratedString]] inobject property. // [string]: the [[IteratedString]] inobject property.
DECL_ACCESSORS(string, String) DECL_ACCESSORS(string, String)
...@@ -6403,7 +6399,7 @@ class JSStringIterator : public JSObject { ...@@ -6403,7 +6399,7 @@ class JSStringIterator : public JSObject {
// Base class for both JSWeakMap and JSWeakSet // Base class for both JSWeakMap and JSWeakSet
class JSWeakCollection: public JSObject { class JSWeakCollection: public JSObject {
public: public:
DECLARE_CAST(JSWeakCollection) DECL_CAST(JSWeakCollection)
// [table]: the backing hash table mapping keys to values. // [table]: the backing hash table mapping keys to values.
DECL_ACCESSORS(table, Object) DECL_ACCESSORS(table, Object)
...@@ -6445,11 +6441,11 @@ class JSWeakCollection: public JSObject { ...@@ -6445,11 +6441,11 @@ class JSWeakCollection: public JSObject {
// The JSWeakMap describes EcmaScript Harmony weak maps // The JSWeakMap describes EcmaScript Harmony weak maps
class JSWeakMap: public JSWeakCollection { class JSWeakMap: public JSWeakCollection {
public: public:
DECLARE_CAST(JSWeakMap) DECL_CAST(JSWeakMap)
// Dispatched behavior. // Dispatched behavior.
DECLARE_PRINTER(JSWeakMap) DECL_PRINTER(JSWeakMap)
DECLARE_VERIFIER(JSWeakMap) DECL_VERIFIER(JSWeakMap)
private: private:
DISALLOW_IMPLICIT_CONSTRUCTORS(JSWeakMap); DISALLOW_IMPLICIT_CONSTRUCTORS(JSWeakMap);
...@@ -6459,11 +6455,11 @@ class JSWeakMap: public JSWeakCollection { ...@@ -6459,11 +6455,11 @@ class JSWeakMap: public JSWeakCollection {
// The JSWeakSet describes EcmaScript Harmony weak sets // The JSWeakSet describes EcmaScript Harmony weak sets
class JSWeakSet: public JSWeakCollection { class JSWeakSet: public JSWeakCollection {
public: public:
DECLARE_CAST(JSWeakSet) DECL_CAST(JSWeakSet)
// Dispatched behavior. // Dispatched behavior.
DECLARE_PRINTER(JSWeakSet) DECL_PRINTER(JSWeakSet)
DECLARE_VERIFIER(JSWeakSet) DECL_VERIFIER(JSWeakSet)
private: private:
DISALLOW_IMPLICIT_CONSTRUCTORS(JSWeakSet); DISALLOW_IMPLICIT_CONSTRUCTORS(JSWeakSet);
...@@ -6517,7 +6513,7 @@ class JSArrayBuffer: public JSObject { ...@@ -6517,7 +6513,7 @@ class JSArrayBuffer: public JSObject {
inline bool is_wasm_buffer(); inline bool is_wasm_buffer();
inline void set_is_wasm_buffer(bool value); inline void set_is_wasm_buffer(bool value);
DECLARE_CAST(JSArrayBuffer) DECL_CAST(JSArrayBuffer)
void Neuter(); void Neuter();
...@@ -6543,8 +6539,8 @@ class JSArrayBuffer: public JSObject { ...@@ -6543,8 +6539,8 @@ class JSArrayBuffer: public JSObject {
SharedFlag shared = SharedFlag::kNotShared) WARN_UNUSED_RESULT; SharedFlag shared = SharedFlag::kNotShared) WARN_UNUSED_RESULT;
// Dispatched behavior. // Dispatched behavior.
DECLARE_PRINTER(JSArrayBuffer) DECL_PRINTER(JSArrayBuffer)
DECLARE_VERIFIER(JSArrayBuffer) DECL_VERIFIER(JSArrayBuffer)
static const int kByteLengthOffset = JSObject::kHeaderSize; static const int kByteLengthOffset = JSObject::kHeaderSize;
// The rest of the fields are not JSObjects, so they are not iterated over in // The rest of the fields are not JSObjects, so they are not iterated over in
...@@ -6593,9 +6589,9 @@ class JSArrayBufferView: public JSObject { ...@@ -6593,9 +6589,9 @@ class JSArrayBufferView: public JSObject {
// [byte_length]: length of typed array in bytes. // [byte_length]: length of typed array in bytes.
DECL_ACCESSORS(byte_length, Object) DECL_ACCESSORS(byte_length, Object)
DECLARE_CAST(JSArrayBufferView) DECL_CAST(JSArrayBufferView)
DECLARE_VERIFIER(JSArrayBufferView) DECL_VERIFIER(JSArrayBufferView)
inline bool WasNeutered() const; inline bool WasNeutered() const;
...@@ -6625,7 +6621,7 @@ class JSTypedArray: public JSArrayBufferView { ...@@ -6625,7 +6621,7 @@ class JSTypedArray: public JSArrayBufferView {
Isolate* isolate, Handle<JSTypedArray> o, Handle<Object> key, Isolate* isolate, Handle<JSTypedArray> o, Handle<Object> key,
PropertyDescriptor* desc, ShouldThrow should_throw); PropertyDescriptor* desc, ShouldThrow should_throw);
DECLARE_CAST(JSTypedArray) DECL_CAST(JSTypedArray)
ExternalArrayType type(); ExternalArrayType type();
V8_EXPORT_PRIVATE size_t element_size(); V8_EXPORT_PRIVATE size_t element_size();
...@@ -6647,8 +6643,8 @@ class JSTypedArray: public JSArrayBufferView { ...@@ -6647,8 +6643,8 @@ class JSTypedArray: public JSArrayBufferView {
const char* method_name); const char* method_name);
// Dispatched behavior. // Dispatched behavior.
DECLARE_PRINTER(JSTypedArray) DECL_PRINTER(JSTypedArray)
DECLARE_VERIFIER(JSTypedArray) DECL_VERIFIER(JSTypedArray)
static const int kLengthOffset = kViewSize + kPointerSize; static const int kLengthOffset = kViewSize + kPointerSize;
static const int kSize = kLengthOffset + kPointerSize; static const int kSize = kLengthOffset + kPointerSize;
...@@ -6669,11 +6665,11 @@ class JSTypedArray: public JSArrayBufferView { ...@@ -6669,11 +6665,11 @@ class JSTypedArray: public JSArrayBufferView {
class JSDataView: public JSArrayBufferView { class JSDataView: public JSArrayBufferView {
public: public:
DECLARE_CAST(JSDataView) DECL_CAST(JSDataView)
// Dispatched behavior. // Dispatched behavior.
DECLARE_PRINTER(JSDataView) DECL_PRINTER(JSDataView)
DECLARE_VERIFIER(JSDataView) DECL_VERIFIER(JSDataView)
static const int kSize = kViewSize; static const int kSize = kViewSize;
...@@ -6692,11 +6688,11 @@ class Foreign: public HeapObject { ...@@ -6692,11 +6688,11 @@ class Foreign: public HeapObject {
inline Address foreign_address(); inline Address foreign_address();
inline void set_foreign_address(Address value); inline void set_foreign_address(Address value);
DECLARE_CAST(Foreign) DECL_CAST(Foreign)
// Dispatched behavior. // Dispatched behavior.
DECLARE_PRINTER(Foreign) DECL_PRINTER(Foreign)
DECLARE_VERIFIER(Foreign) DECL_VERIFIER(Foreign)
// Layout description. // Layout description.
...@@ -6769,11 +6765,11 @@ class JSArray: public JSObject { ...@@ -6769,11 +6765,11 @@ class JSArray: public JSObject {
// to Proxies and objects with a hidden prototype. // to Proxies and objects with a hidden prototype.
inline bool HasArrayPrototype(Isolate* isolate); inline bool HasArrayPrototype(Isolate* isolate);
DECLARE_CAST(JSArray) DECL_CAST(JSArray)
// Dispatched behavior. // Dispatched behavior.
DECLARE_PRINTER(JSArray) DECL_PRINTER(JSArray)
DECLARE_VERIFIER(JSArray) DECL_VERIFIER(JSArray)
// Number of element slots to pre-allocate for an empty array. // Number of element slots to pre-allocate for an empty array.
static const int kPreallocatedArrayElements = 4; static const int kPreallocatedArrayElements = 4;
...@@ -6846,7 +6842,7 @@ class AccessorInfo: public Struct { ...@@ -6846,7 +6842,7 @@ class AccessorInfo: public Struct {
Address redirected_getter() const; Address redirected_getter() const;
// Dispatched behavior. // Dispatched behavior.
DECLARE_PRINTER(AccessorInfo) DECL_PRINTER(AccessorInfo)
inline bool all_can_read(); inline bool all_can_read();
inline void set_all_can_read(bool value); inline void set_all_can_read(bool value);
...@@ -6872,10 +6868,10 @@ class AccessorInfo: public Struct { ...@@ -6872,10 +6868,10 @@ class AccessorInfo: public Struct {
Handle<Map> map); Handle<Map> map);
inline bool IsCompatibleReceiver(Object* receiver); inline bool IsCompatibleReceiver(Object* receiver);
DECLARE_CAST(AccessorInfo) DECL_CAST(AccessorInfo)
// Dispatched behavior. // Dispatched behavior.
DECLARE_VERIFIER(AccessorInfo) DECL_VERIFIER(AccessorInfo)
// Append all descriptors to the array that are not already there. // Append all descriptors to the array that are not already there.
// Return number added. // Return number added.
...@@ -6919,7 +6915,7 @@ class AccessorPair: public Struct { ...@@ -6919,7 +6915,7 @@ class AccessorPair: public Struct {
DECL_ACCESSORS(getter, Object) DECL_ACCESSORS(getter, Object)
DECL_ACCESSORS(setter, Object) DECL_ACCESSORS(setter, Object)
DECLARE_CAST(AccessorPair) DECL_CAST(AccessorPair)
static Handle<AccessorPair> Copy(Handle<AccessorPair> pair); static Handle<AccessorPair> Copy(Handle<AccessorPair> pair);
...@@ -6939,8 +6935,8 @@ class AccessorPair: public Struct { ...@@ -6939,8 +6935,8 @@ class AccessorPair: public Struct {
inline bool ContainsAccessor(); inline bool ContainsAccessor();
// Dispatched behavior. // Dispatched behavior.
DECLARE_PRINTER(AccessorPair) DECL_PRINTER(AccessorPair)
DECLARE_VERIFIER(AccessorPair) DECL_VERIFIER(AccessorPair)
static const int kGetterOffset = HeapObject::kHeaderSize; static const int kGetterOffset = HeapObject::kHeaderSize;
static const int kSetterOffset = kGetterOffset + kPointerSize; static const int kSetterOffset = kGetterOffset + kPointerSize;
...@@ -6965,11 +6961,11 @@ class AccessCheckInfo: public Struct { ...@@ -6965,11 +6961,11 @@ class AccessCheckInfo: public Struct {
DECL_ACCESSORS(indexed_interceptor, Object) DECL_ACCESSORS(indexed_interceptor, Object)
DECL_ACCESSORS(data, Object) DECL_ACCESSORS(data, Object)
DECLARE_CAST(AccessCheckInfo) DECL_CAST(AccessCheckInfo)
// Dispatched behavior. // Dispatched behavior.
DECLARE_PRINTER(AccessCheckInfo) DECL_PRINTER(AccessCheckInfo)
DECLARE_VERIFIER(AccessCheckInfo) DECL_VERIFIER(AccessCheckInfo)
static AccessCheckInfo* Get(Isolate* isolate, Handle<JSObject> receiver); static AccessCheckInfo* Get(Isolate* isolate, Handle<JSObject> receiver);
...@@ -7002,11 +6998,11 @@ class InterceptorInfo: public Struct { ...@@ -7002,11 +6998,11 @@ class InterceptorInfo: public Struct {
inline int flags() const; inline int flags() const;
inline void set_flags(int flags); inline void set_flags(int flags);
DECLARE_CAST(InterceptorInfo) DECL_CAST(InterceptorInfo)
// Dispatched behavior. // Dispatched behavior.
DECLARE_PRINTER(InterceptorInfo) DECL_PRINTER(InterceptorInfo)
DECLARE_VERIFIER(InterceptorInfo) DECL_VERIFIER(InterceptorInfo)
static const int kGetterOffset = HeapObject::kHeaderSize; static const int kGetterOffset = HeapObject::kHeaderSize;
static const int kSetterOffset = kGetterOffset + kPointerSize; static const int kSetterOffset = kGetterOffset + kPointerSize;
...@@ -7032,7 +7028,7 @@ class CallHandlerInfo : public Tuple2 { ...@@ -7032,7 +7028,7 @@ class CallHandlerInfo : public Tuple2 {
DECL_ACCESSORS(callback, Object) DECL_ACCESSORS(callback, Object)
DECL_ACCESSORS(data, Object) DECL_ACCESSORS(data, Object)
DECLARE_CAST(CallHandlerInfo) DECL_CAST(CallHandlerInfo)
static const int kCallbackOffset = kValue1Offset; static const int kCallbackOffset = kValue1Offset;
static const int kDataOffset = kValue2Offset; static const int kDataOffset = kValue2Offset;
...@@ -7050,9 +7046,9 @@ class TemplateInfo: public Struct { ...@@ -7050,9 +7046,9 @@ class TemplateInfo: public Struct {
DECL_ACCESSORS(property_list, Object) DECL_ACCESSORS(property_list, Object)
DECL_ACCESSORS(property_accessors, Object) DECL_ACCESSORS(property_accessors, Object)
DECLARE_VERIFIER(TemplateInfo) DECL_VERIFIER(TemplateInfo)
DECLARE_CAST(TemplateInfo) DECL_CAST(TemplateInfo)
static const int kTagOffset = HeapObject::kHeaderSize; static const int kTagOffset = HeapObject::kHeaderSize;
static const int kSerialNumberOffset = kTagOffset + kPointerSize; static const int kSerialNumberOffset = kTagOffset + kPointerSize;
...@@ -7107,11 +7103,11 @@ class FunctionTemplateInfo: public TemplateInfo { ...@@ -7107,11 +7103,11 @@ class FunctionTemplateInfo: public TemplateInfo {
DECL_ACCESSORS(cached_property_name, Object) DECL_ACCESSORS(cached_property_name, Object)
DECLARE_CAST(FunctionTemplateInfo) DECL_CAST(FunctionTemplateInfo)
// Dispatched behavior. // Dispatched behavior.
DECLARE_PRINTER(FunctionTemplateInfo) DECL_PRINTER(FunctionTemplateInfo)
DECLARE_VERIFIER(FunctionTemplateInfo) DECL_VERIFIER(FunctionTemplateInfo)
static const int kInvalidSerialNumber = 0; static const int kInvalidSerialNumber = 0;
...@@ -7174,11 +7170,11 @@ class ObjectTemplateInfo: public TemplateInfo { ...@@ -7174,11 +7170,11 @@ class ObjectTemplateInfo: public TemplateInfo {
DECL_INT_ACCESSORS(embedder_field_count) DECL_INT_ACCESSORS(embedder_field_count)
DECL_BOOLEAN_ACCESSORS(immutable_proto) DECL_BOOLEAN_ACCESSORS(immutable_proto)
DECLARE_CAST(ObjectTemplateInfo) DECL_CAST(ObjectTemplateInfo)
// Dispatched behavior. // Dispatched behavior.
DECLARE_PRINTER(ObjectTemplateInfo) DECL_PRINTER(ObjectTemplateInfo)
DECLARE_VERIFIER(ObjectTemplateInfo) DECL_VERIFIER(ObjectTemplateInfo)
static const int kConstructorOffset = TemplateInfo::kHeaderSize; static const int kConstructorOffset = TemplateInfo::kHeaderSize;
// LSB is for immutable_proto, higher bits for embedder_field_count // LSB is for immutable_proto, higher bits for embedder_field_count
...@@ -7209,11 +7205,11 @@ class StackFrameInfo : public Struct { ...@@ -7209,11 +7205,11 @@ class StackFrameInfo : public Struct {
DECL_INT_ACCESSORS(flag) DECL_INT_ACCESSORS(flag)
DECL_INT_ACCESSORS(id) DECL_INT_ACCESSORS(id)
DECLARE_CAST(StackFrameInfo) DECL_CAST(StackFrameInfo)
// Dispatched behavior. // Dispatched behavior.
DECLARE_PRINTER(StackFrameInfo) DECL_PRINTER(StackFrameInfo)
DECLARE_VERIFIER(StackFrameInfo) DECL_VERIFIER(StackFrameInfo)
static const int kLineNumberIndex = Struct::kHeaderSize; static const int kLineNumberIndex = Struct::kHeaderSize;
static const int kColumnNumberIndex = kLineNumberIndex + kPointerSize; static const int kColumnNumberIndex = kLineNumberIndex + kPointerSize;
...@@ -7241,7 +7237,7 @@ class SourcePositionTableWithFrameCache : public Tuple2 { ...@@ -7241,7 +7237,7 @@ class SourcePositionTableWithFrameCache : public Tuple2 {
DECL_ACCESSORS(source_position_table, ByteArray) DECL_ACCESSORS(source_position_table, ByteArray)
DECL_ACCESSORS(stack_frame_cache, UnseededNumberDictionary) DECL_ACCESSORS(stack_frame_cache, UnseededNumberDictionary)
DECLARE_CAST(SourcePositionTableWithFrameCache) DECL_CAST(SourcePositionTableWithFrameCache)
static const int kSourcePositionTableIndex = Struct::kHeaderSize; static const int kSourcePositionTableIndex = Struct::kHeaderSize;
static const int kStackFrameCacheIndex = static const int kStackFrameCacheIndex =
......
...@@ -24,8 +24,8 @@ class JSArgumentsObject : public JSObject { ...@@ -24,8 +24,8 @@ class JSArgumentsObject : public JSObject {
DECL_ACCESSORS(length, Object) DECL_ACCESSORS(length, Object)
DECLARE_VERIFIER(JSArgumentsObject) DECL_VERIFIER(JSArgumentsObject)
DECLARE_CAST(JSArgumentsObject) DECL_CAST(JSArgumentsObject)
private: private:
DISALLOW_IMPLICIT_CONSTRUCTORS(JSArgumentsObject); DISALLOW_IMPLICIT_CONSTRUCTORS(JSArgumentsObject);
...@@ -43,8 +43,8 @@ class JSSloppyArgumentsObject : public JSArgumentsObject { ...@@ -43,8 +43,8 @@ class JSSloppyArgumentsObject : public JSArgumentsObject {
DECL_ACCESSORS(callee, Object) DECL_ACCESSORS(callee, Object)
DECLARE_VERIFIER(JSSloppyArgumentsObject) DECL_VERIFIER(JSSloppyArgumentsObject)
DECLARE_CAST(JSSloppyArgumentsObject) DECL_CAST(JSSloppyArgumentsObject)
private: private:
DISALLOW_IMPLICIT_CONSTRUCTORS(JSSloppyArgumentsObject); DISALLOW_IMPLICIT_CONSTRUCTORS(JSSloppyArgumentsObject);
...@@ -57,7 +57,7 @@ class JSStrictArgumentsObject : public JSArgumentsObject { ...@@ -57,7 +57,7 @@ class JSStrictArgumentsObject : public JSArgumentsObject {
// Offsets of object fields. // Offsets of object fields.
static const int kSize = JSArgumentsObject::kHeaderSize; static const int kSize = JSArgumentsObject::kHeaderSize;
DECLARE_CAST(JSStrictArgumentsObject) DECL_CAST(JSStrictArgumentsObject)
private: private:
DISALLOW_IMPLICIT_CONSTRUCTORS(JSStrictArgumentsObject); DISALLOW_IMPLICIT_CONSTRUCTORS(JSStrictArgumentsObject);
...@@ -98,7 +98,7 @@ class SloppyArgumentsElements : public FixedArray { ...@@ -98,7 +98,7 @@ class SloppyArgumentsElements : public FixedArray {
inline Object* get_mapped_entry(uint32_t entry); inline Object* get_mapped_entry(uint32_t entry);
inline void set_mapped_entry(uint32_t entry, Object* object); inline void set_mapped_entry(uint32_t entry, Object* object);
DECLARE_CAST(SloppyArgumentsElements) DECL_CAST(SloppyArgumentsElements)
#ifdef VERIFY_HEAP #ifdef VERIFY_HEAP
void SloppyArgumentsElementsVerify(JSSloppyArgumentsObject* holder); void SloppyArgumentsElementsVerify(JSSloppyArgumentsObject* holder);
#endif #endif
...@@ -120,11 +120,11 @@ class AliasedArgumentsEntry : public Struct { ...@@ -120,11 +120,11 @@ class AliasedArgumentsEntry : public Struct {
inline int aliased_context_slot() const; inline int aliased_context_slot() const;
inline void set_aliased_context_slot(int count); inline void set_aliased_context_slot(int count);
DECLARE_CAST(AliasedArgumentsEntry) DECL_CAST(AliasedArgumentsEntry)
// Dispatched behavior. // Dispatched behavior.
DECLARE_PRINTER(AliasedArgumentsEntry) DECL_PRINTER(AliasedArgumentsEntry)
DECLARE_VERIFIER(AliasedArgumentsEntry) DECL_VERIFIER(AliasedArgumentsEntry)
static const int kAliasedContextSlot = HeapObject::kHeaderSize; static const int kAliasedContextSlot = HeapObject::kHeaderSize;
static const int kSize = kAliasedContextSlot + kPointerSize; static const int kSize = kAliasedContextSlot + kPointerSize;
......
...@@ -96,7 +96,7 @@ class CodeCacheHashTable ...@@ -96,7 +96,7 @@ class CodeCacheHashTable
Code* Lookup(Name* name, Code::Flags flags); Code* Lookup(Name* name, Code::Flags flags);
DECLARE_CAST(CodeCacheHashTable) DECL_CAST(CodeCacheHashTable)
private: private:
DISALLOW_IMPLICIT_CONSTRUCTORS(CodeCacheHashTable); DISALLOW_IMPLICIT_CONSTRUCTORS(CodeCacheHashTable);
......
...@@ -97,7 +97,7 @@ class CompilationCacheTable ...@@ -97,7 +97,7 @@ class CompilationCacheTable
void Age(); void Age();
static const int kHashGenerations = 10; static const int kHashGenerations = 10;
DECLARE_CAST(CompilationCacheTable) DECL_CAST(CompilationCacheTable)
private: private:
DISALLOW_IMPLICIT_CONSTRUCTORS(CompilationCacheTable); DISALLOW_IMPLICIT_CONSTRUCTORS(CompilationCacheTable);
......
...@@ -84,11 +84,11 @@ class DebugInfo : public Struct { ...@@ -84,11 +84,11 @@ class DebugInfo : public Struct {
bool ClearCoverageInfo(); bool ClearCoverageInfo();
DECL_ACCESSORS(coverage_info, Object) DECL_ACCESSORS(coverage_info, Object)
DECLARE_CAST(DebugInfo) DECL_CAST(DebugInfo)
// Dispatched behavior. // Dispatched behavior.
DECLARE_PRINTER(DebugInfo) DECL_PRINTER(DebugInfo)
DECLARE_VERIFIER(DebugInfo) DECL_VERIFIER(DebugInfo)
static const int kSharedFunctionInfoOffset = Struct::kHeaderSize; static const int kSharedFunctionInfoOffset = Struct::kHeaderSize;
static const int kDebuggerHintsOffset = static const int kDebuggerHintsOffset =
...@@ -134,7 +134,7 @@ class BreakPointInfo : public Tuple2 { ...@@ -134,7 +134,7 @@ class BreakPointInfo : public Tuple2 {
int GetStatementPosition(Handle<DebugInfo> debug_info); int GetStatementPosition(Handle<DebugInfo> debug_info);
DECLARE_CAST(BreakPointInfo) DECL_CAST(BreakPointInfo)
static const int kSourcePositionOffset = kValue1Offset; static const int kSourcePositionOffset = kValue1Offset;
static const int kBreakPointObjectsOffset = kValue2Offset; static const int kBreakPointObjectsOffset = kValue2Offset;
...@@ -160,7 +160,7 @@ class CoverageInfo : public FixedArray { ...@@ -160,7 +160,7 @@ class CoverageInfo : public FixedArray {
return slot_count * kSlotIndexCount + kFirstSlotIndex; return slot_count * kSlotIndexCount + kFirstSlotIndex;
} }
DECLARE_CAST(CoverageInfo) DECL_CAST(CoverageInfo)
private: private:
static int FirstIndexForSlot(int slot_index) { static int FirstIndexForSlot(int slot_index) {
......
...@@ -116,7 +116,7 @@ class DescriptorArray : public FixedArray { ...@@ -116,7 +116,7 @@ class DescriptorArray : public FixedArray {
Isolate* isolate, int number_of_descriptors, int slack, Isolate* isolate, int number_of_descriptors, int slack,
PretenureFlag pretenure = NOT_TENURED); PretenureFlag pretenure = NOT_TENURED);
DECLARE_CAST(DescriptorArray) DECL_CAST(DescriptorArray)
// Constant for denoting key was not found. // Constant for denoting key was not found.
static const int kNotFound = -1; static const int kNotFound = -1;
......
...@@ -167,7 +167,7 @@ class BaseNameDictionary : public Dictionary<Derived, Shape> { ...@@ -167,7 +167,7 @@ class BaseNameDictionary : public Dictionary<Derived, Shape> {
class NameDictionary class NameDictionary
: public BaseNameDictionary<NameDictionary, NameDictionaryShape> { : public BaseNameDictionary<NameDictionary, NameDictionaryShape> {
public: public:
DECLARE_CAST(NameDictionary) DECL_CAST(NameDictionary)
static const int kEntryDetailsIndex = 2; static const int kEntryDetailsIndex = 2;
static const int kInitialCapacity = 2; static const int kInitialCapacity = 2;
...@@ -196,7 +196,7 @@ class GlobalDictionaryShape : public NameDictionaryShape { ...@@ -196,7 +196,7 @@ class GlobalDictionaryShape : public NameDictionaryShape {
class GlobalDictionary class GlobalDictionary
: public BaseNameDictionary<GlobalDictionary, GlobalDictionaryShape> { : public BaseNameDictionary<GlobalDictionary, GlobalDictionaryShape> {
public: public:
DECLARE_CAST(GlobalDictionary) DECL_CAST(GlobalDictionary)
inline Object* ValueAt(int entry); inline Object* ValueAt(int entry);
inline PropertyCell* CellAt(int entry); inline PropertyCell* CellAt(int entry);
...@@ -253,7 +253,7 @@ extern template class EXPORT_TEMPLATE_DECLARE(V8_EXPORT_PRIVATE) ...@@ -253,7 +253,7 @@ extern template class EXPORT_TEMPLATE_DECLARE(V8_EXPORT_PRIVATE)
class SeededNumberDictionary class SeededNumberDictionary
: public Dictionary<SeededNumberDictionary, SeededNumberDictionaryShape> { : public Dictionary<SeededNumberDictionary, SeededNumberDictionaryShape> {
public: public:
DECLARE_CAST(SeededNumberDictionary) DECL_CAST(SeededNumberDictionary)
// Type specific at put (default NONE attributes is used when adding). // Type specific at put (default NONE attributes is used when adding).
MUST_USE_RESULT static Handle<SeededNumberDictionary> Set( MUST_USE_RESULT static Handle<SeededNumberDictionary> Set(
...@@ -301,7 +301,7 @@ class UnseededNumberDictionary ...@@ -301,7 +301,7 @@ class UnseededNumberDictionary
: public Dictionary<UnseededNumberDictionary, : public Dictionary<UnseededNumberDictionary,
UnseededNumberDictionaryShape> { UnseededNumberDictionaryShape> {
public: public:
DECLARE_CAST(UnseededNumberDictionary) DECL_CAST(UnseededNumberDictionary)
// Type specific at put (default NONE attributes is used when adding). // Type specific at put (default NONE attributes is used when adding).
MUST_USE_RESULT static Handle<UnseededNumberDictionary> Set( MUST_USE_RESULT static Handle<UnseededNumberDictionary> Set(
......
...@@ -29,11 +29,11 @@ class Handle; ...@@ -29,11 +29,11 @@ class Handle;
// Container object for data collected during simple stack trace captures. // Container object for data collected during simple stack trace captures.
class FrameArray : public FixedArray { class FrameArray : public FixedArray {
public: public:
#define DECLARE_FRAME_ARRAY_ACCESSORS(name, type) \ #define DECL_FRAME_ARRAY_ACCESSORS(name, type) \
inline type* name(int frame_ix) const; \ inline type* name(int frame_ix) const; \
inline void Set##name(int frame_ix, type* value); inline void Set##name(int frame_ix, type* value);
FRAME_ARRAY_FIELD_LIST(DECLARE_FRAME_ARRAY_ACCESSORS) FRAME_ARRAY_FIELD_LIST(DECL_FRAME_ARRAY_ACCESSORS)
#undef DECLARE_FRAME_ARRAY_ACCESSORS #undef DECL_FRAME_ARRAY_ACCESSORS
inline bool IsWasmFrame(int frame_ix) const; inline bool IsWasmFrame(int frame_ix) const;
inline bool IsWasmInterpretedFrame(int frame_ix) const; inline bool IsWasmInterpretedFrame(int frame_ix) const;
...@@ -62,7 +62,7 @@ class FrameArray : public FixedArray { ...@@ -62,7 +62,7 @@ class FrameArray : public FixedArray {
int wasm_function_index, Handle<AbstractCode> code, int offset, int wasm_function_index, Handle<AbstractCode> code, int offset,
int flags); int flags);
DECLARE_CAST(FrameArray) DECL_CAST(FrameArray)
private: private:
// The underlying fixed array embodies a captured stack trace. Frame i // The underlying fixed array embodies a captured stack trace. Frame i
......
...@@ -140,7 +140,7 @@ class HashTable : public HashTableBase { ...@@ -140,7 +140,7 @@ class HashTable : public HashTableBase {
PretenureFlag pretenure = NOT_TENURED, PretenureFlag pretenure = NOT_TENURED,
MinimumCapacity capacity_option = USE_DEFAULT_MINIMUM_CAPACITY); MinimumCapacity capacity_option = USE_DEFAULT_MINIMUM_CAPACITY);
DECLARE_CAST(HashTable) DECL_CAST(HashTable)
// Garbage collection support. // Garbage collection support.
void IteratePrefix(ObjectVisitor* visitor); void IteratePrefix(ObjectVisitor* visitor);
...@@ -282,7 +282,7 @@ class ObjectHashTable ...@@ -282,7 +282,7 @@ class ObjectHashTable
typedef HashTable<ObjectHashTable, ObjectHashTableShape> DerivedHashTable; typedef HashTable<ObjectHashTable, ObjectHashTableShape> DerivedHashTable;
public: public:
DECLARE_CAST(ObjectHashTable) DECL_CAST(ObjectHashTable)
// Attempt to shrink hash table after removal of key. // Attempt to shrink hash table after removal of key.
MUST_USE_RESULT static inline Handle<ObjectHashTable> Shrink( MUST_USE_RESULT static inline Handle<ObjectHashTable> Shrink(
...@@ -337,7 +337,7 @@ class ObjectHashSet : public HashTable<ObjectHashSet, ObjectHashSetShape> { ...@@ -337,7 +337,7 @@ class ObjectHashSet : public HashTable<ObjectHashSet, ObjectHashSetShape> {
inline bool Has(Isolate* isolate, Handle<Object> key, int32_t hash); inline bool Has(Isolate* isolate, Handle<Object> key, int32_t hash);
inline bool Has(Isolate* isolate, Handle<Object> key); inline bool Has(Isolate* isolate, Handle<Object> key);
DECLARE_CAST(ObjectHashSet) DECL_CAST(ObjectHashSet)
}; };
// OrderedHashTable is a HashTable with Object keys that preserves // OrderedHashTable is a HashTable with Object keys that preserves
...@@ -543,7 +543,7 @@ class OrderedHashTable : public FixedArray { ...@@ -543,7 +543,7 @@ class OrderedHashTable : public FixedArray {
class OrderedHashSet : public OrderedHashTable<OrderedHashSet, 1> { class OrderedHashSet : public OrderedHashTable<OrderedHashSet, 1> {
public: public:
DECLARE_CAST(OrderedHashSet) DECL_CAST(OrderedHashSet)
static Handle<OrderedHashSet> Add(Handle<OrderedHashSet> table, static Handle<OrderedHashSet> Add(Handle<OrderedHashSet> table,
Handle<Object> value); Handle<Object> value);
...@@ -553,7 +553,7 @@ class OrderedHashSet : public OrderedHashTable<OrderedHashSet, 1> { ...@@ -553,7 +553,7 @@ class OrderedHashSet : public OrderedHashTable<OrderedHashSet, 1> {
class OrderedHashMap : public OrderedHashTable<OrderedHashMap, 2> { class OrderedHashMap : public OrderedHashTable<OrderedHashMap, 2> {
public: public:
DECLARE_CAST(OrderedHashMap) DECL_CAST(OrderedHashMap)
// Returns a value if the OrderedHashMap contains the key, otherwise // Returns a value if the OrderedHashMap contains the key, otherwise
// returns undefined. // returns undefined.
...@@ -584,7 +584,7 @@ class WeakHashTable : public HashTable<WeakHashTable, WeakHashTableShape<2>> { ...@@ -584,7 +584,7 @@ class WeakHashTable : public HashTable<WeakHashTable, WeakHashTableShape<2>> {
typedef HashTable<WeakHashTable, WeakHashTableShape<2>> DerivedHashTable; typedef HashTable<WeakHashTable, WeakHashTableShape<2>> DerivedHashTable;
public: public:
DECLARE_CAST(WeakHashTable) DECL_CAST(WeakHashTable)
// Looks up the value associated with the given key. The hole value is // Looks up the value associated with the given key. The hole value is
// returned in case the key is not present. // returned in case the key is not present.
...@@ -764,7 +764,7 @@ class SmallOrderedHashTable : public HeapObject { ...@@ -764,7 +764,7 @@ class SmallOrderedHashTable : public HeapObject {
// SmallOrderedHashTable::Grow. // SmallOrderedHashTable::Grow.
static const int kGrowthHack = 256; static const int kGrowthHack = 256;
DECLARE_VERIFIER(SmallOrderedHashTable) DECL_VERIFIER(SmallOrderedHashTable)
protected: protected:
// This is used for accessing the non |DataTable| part of the // This is used for accessing the non |DataTable| part of the
...@@ -792,9 +792,9 @@ class SmallOrderedHashTable : public HeapObject { ...@@ -792,9 +792,9 @@ class SmallOrderedHashTable : public HeapObject {
class SmallOrderedHashSet : public SmallOrderedHashTable<SmallOrderedHashSet> { class SmallOrderedHashSet : public SmallOrderedHashTable<SmallOrderedHashSet> {
public: public:
DECLARE_CAST(SmallOrderedHashSet) DECL_CAST(SmallOrderedHashSet)
DECLARE_PRINTER(SmallOrderedHashSet) DECL_PRINTER(SmallOrderedHashSet)
static const int kKeyIndex = 0; static const int kKeyIndex = 0;
static const int kEntrySize = 1; static const int kEntrySize = 1;
...@@ -808,9 +808,9 @@ class SmallOrderedHashSet : public SmallOrderedHashTable<SmallOrderedHashSet> { ...@@ -808,9 +808,9 @@ class SmallOrderedHashSet : public SmallOrderedHashTable<SmallOrderedHashSet> {
class SmallOrderedHashMap : public SmallOrderedHashTable<SmallOrderedHashMap> { class SmallOrderedHashMap : public SmallOrderedHashTable<SmallOrderedHashMap> {
public: public:
DECLARE_CAST(SmallOrderedHashMap) DECL_CAST(SmallOrderedHashMap)
DECLARE_PRINTER(SmallOrderedHashMap) DECL_PRINTER(SmallOrderedHashMap)
static const int kKeyIndex = 0; static const int kKeyIndex = 0;
static const int kValueIndex = 1; static const int kValueIndex = 1;
...@@ -887,10 +887,10 @@ class JSSetIterator ...@@ -887,10 +887,10 @@ class JSSetIterator
: public OrderedHashTableIterator<JSSetIterator, OrderedHashSet> { : public OrderedHashTableIterator<JSSetIterator, OrderedHashSet> {
public: public:
// Dispatched behavior. // Dispatched behavior.
DECLARE_PRINTER(JSSetIterator) DECL_PRINTER(JSSetIterator)
DECLARE_VERIFIER(JSSetIterator) DECL_VERIFIER(JSSetIterator)
DECLARE_CAST(JSSetIterator) DECL_CAST(JSSetIterator)
// Called by |Next| to populate the array. This allows the subclasses to // Called by |Next| to populate the array. This allows the subclasses to
// populate the array differently. // populate the array differently.
...@@ -904,10 +904,10 @@ class JSMapIterator ...@@ -904,10 +904,10 @@ class JSMapIterator
: public OrderedHashTableIterator<JSMapIterator, OrderedHashMap> { : public OrderedHashTableIterator<JSMapIterator, OrderedHashMap> {
public: public:
// Dispatched behavior. // Dispatched behavior.
DECLARE_PRINTER(JSMapIterator) DECL_PRINTER(JSMapIterator)
DECLARE_VERIFIER(JSMapIterator) DECL_VERIFIER(JSMapIterator)
DECLARE_CAST(JSMapIterator) DECL_CAST(JSMapIterator)
// Called by |Next| to populate the array. This allows the subclasses to // Called by |Next| to populate the array. This allows the subclasses to
// populate the array differently. // populate the array differently.
......
...@@ -31,7 +31,7 @@ class BoilerplateDescription : public FixedArray { ...@@ -31,7 +31,7 @@ class BoilerplateDescription : public FixedArray {
void set_backing_store_size(Isolate* isolate, int backing_store_size); void set_backing_store_size(Isolate* isolate, int backing_store_size);
DECLARE_CAST(BoilerplateDescription) DECL_CAST(BoilerplateDescription)
private: private:
bool has_number_of_properties() const; bool has_number_of_properties() const;
...@@ -45,7 +45,7 @@ class ConstantElementsPair : public Tuple2 { ...@@ -45,7 +45,7 @@ class ConstantElementsPair : public Tuple2 {
DECL_INT_ACCESSORS(elements_kind) DECL_INT_ACCESSORS(elements_kind)
DECL_ACCESSORS(constant_values, FixedArrayBase) DECL_ACCESSORS(constant_values, FixedArrayBase)
DECLARE_CAST(ConstantElementsPair) DECL_CAST(ConstantElementsPair)
static const int kElementsKindOffset = kValue1Offset; static const int kElementsKindOffset = kValue1Offset;
static const int kConstantValuesOffset = kValue2Offset; static const int kConstantValuesOffset = kValue2Offset;
......
...@@ -493,7 +493,7 @@ class Map : public HeapObject { ...@@ -493,7 +493,7 @@ class Map : public HeapObject {
// Returns the number of enumerable properties. // Returns the number of enumerable properties.
int NumberOfEnumerableProperties(); int NumberOfEnumerableProperties();
DECLARE_CAST(Map) DECL_CAST(Map)
// Code cache operations. // Code cache operations.
...@@ -554,8 +554,8 @@ class Map : public HeapObject { ...@@ -554,8 +554,8 @@ class Map : public HeapObject {
static Handle<WeakCell> WeakCellForMap(Handle<Map> map); static Handle<WeakCell> WeakCellForMap(Handle<Map> map);
// Dispatched behavior. // Dispatched behavior.
DECLARE_PRINTER(Map) DECL_PRINTER(Map)
DECLARE_VERIFIER(Map) DECL_VERIFIER(Map)
#ifdef VERIFY_HEAP #ifdef VERIFY_HEAP
void DictionaryMapVerify(); void DictionaryMapVerify();
...@@ -791,11 +791,11 @@ class NormalizedMapCache : public FixedArray { ...@@ -791,11 +791,11 @@ class NormalizedMapCache : public FixedArray {
void Clear(); void Clear();
DECLARE_CAST(NormalizedMapCache) DECL_CAST(NormalizedMapCache)
static inline bool IsNormalizedMapCache(const HeapObject* obj); static inline bool IsNormalizedMapCache(const HeapObject* obj);
DECLARE_VERIFIER(NormalizedMapCache) DECL_VERIFIER(NormalizedMapCache)
private: private:
static const int kEntries = 64; static const int kEntries = 64;
......
...@@ -24,7 +24,7 @@ class Zone; ...@@ -24,7 +24,7 @@ class Zone;
// ModuleInfo is to ModuleDescriptor what ScopeInfo is to Scope. // ModuleInfo is to ModuleDescriptor what ScopeInfo is to Scope.
class ModuleInfo : public FixedArray { class ModuleInfo : public FixedArray {
public: public:
DECLARE_CAST(ModuleInfo) DECL_CAST(ModuleInfo)
static Handle<ModuleInfo> New(Isolate* isolate, Zone* zone, static Handle<ModuleInfo> New(Isolate* isolate, Zone* zone,
ModuleDescriptor* descr); ModuleDescriptor* descr);
...@@ -93,9 +93,9 @@ class ModuleInfo : public FixedArray { ...@@ -93,9 +93,9 @@ class ModuleInfo : public FixedArray {
class ModuleInfoEntry : public Struct { class ModuleInfoEntry : public Struct {
public: public:
DECLARE_CAST(ModuleInfoEntry) DECL_CAST(ModuleInfoEntry)
DECLARE_PRINTER(ModuleInfoEntry) DECL_PRINTER(ModuleInfoEntry)
DECLARE_VERIFIER(ModuleInfoEntry) DECL_VERIFIER(ModuleInfoEntry)
DECL_ACCESSORS(export_name, Object) DECL_ACCESSORS(export_name, Object)
DECL_ACCESSORS(local_name, Object) DECL_ACCESSORS(local_name, Object)
......
...@@ -47,9 +47,9 @@ class Name : public HeapObject { ...@@ -47,9 +47,9 @@ class Name : public HeapObject {
MUST_USE_RESULT static MaybeHandle<String> ToFunctionName( MUST_USE_RESULT static MaybeHandle<String> ToFunctionName(
Handle<Name> name, Handle<String> prefix); Handle<Name> name, Handle<String> prefix);
DECLARE_CAST(Name) DECL_CAST(Name)
DECLARE_PRINTER(Name) DECL_PRINTER(Name)
#if V8_TRACE_MAPS #if V8_TRACE_MAPS
void NameShortPrint(); void NameShortPrint();
int NameShortPrint(Vector<char> str); int NameShortPrint(Vector<char> str);
...@@ -148,11 +148,11 @@ class Symbol : public Name { ...@@ -148,11 +148,11 @@ class Symbol : public Name {
// Symbol.keyFor on such a symbol simply needs to return the attached name. // Symbol.keyFor on such a symbol simply needs to return the attached name.
DECL_BOOLEAN_ACCESSORS(is_public) DECL_BOOLEAN_ACCESSORS(is_public)
DECLARE_CAST(Symbol) DECL_CAST(Symbol)
// Dispatched behavior. // Dispatched behavior.
DECLARE_PRINTER(Symbol) DECL_PRINTER(Symbol)
DECLARE_VERIFIER(Symbol) DECL_VERIFIER(Symbol)
// Layout description. // Layout description.
static const int kNameOffset = Name::kSize; static const int kNameOffset = Name::kSize;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
#undef DECL_BOOLEAN_ACCESSORS #undef DECL_BOOLEAN_ACCESSORS
#undef DECL_INT_ACCESSORS #undef DECL_INT_ACCESSORS
#undef DECL_ACCESSORS #undef DECL_ACCESSORS
#undef DECLARE_CAST #undef DECL_CAST
#undef CAST_ACCESSOR #undef CAST_ACCESSOR
#undef INT_ACCESSORS #undef INT_ACCESSORS
#undef ACCESSORS_CHECKED2 #undef ACCESSORS_CHECKED2
...@@ -56,6 +56,6 @@ ...@@ -56,6 +56,6 @@
#undef RELAXED_READ_BYTE_FIELD #undef RELAXED_READ_BYTE_FIELD
#undef WRITE_BYTE_FIELD #undef WRITE_BYTE_FIELD
#undef RELAXED_WRITE_BYTE_FIELD #undef RELAXED_WRITE_BYTE_FIELD
#undef DECLARE_VERIFIER #undef DECL_VERIFIER
#undef DEFINE_DEOPT_ELEMENT_ACCESSORS #undef DEFINE_DEOPT_ELEMENT_ACCESSORS
#undef DEFINE_DEOPT_ENTRY_ACCESSORS #undef DEFINE_DEOPT_ENTRY_ACCESSORS
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
inline void set_##name(type* value, \ inline void set_##name(type* value, \
WriteBarrierMode mode = UPDATE_WRITE_BARRIER); WriteBarrierMode mode = UPDATE_WRITE_BARRIER);
#define DECLARE_CAST(type) \ #define DECL_CAST(type) \
INLINE(static type* cast(Object* object)); \ INLINE(static type* cast(Object* object)); \
INLINE(static const type* cast(const Object* object)); INLINE(static const type* cast(const Object* object));
...@@ -258,9 +258,9 @@ ...@@ -258,9 +258,9 @@
static_cast<base::Atomic8>(value)); static_cast<base::Atomic8>(value));
#ifdef VERIFY_HEAP #ifdef VERIFY_HEAP
#define DECLARE_VERIFIER(Name) void Name##Verify(); #define DECL_VERIFIER(Name) void Name##Verify();
#else #else
#define DECLARE_VERIFIER(Name) #define DECL_VERIFIER(Name)
#endif #endif
#define DEFINE_DEOPT_ELEMENT_ACCESSORS(name, type) \ #define DEFINE_DEOPT_ELEMENT_ACCESSORS(name, type) \
......
...@@ -48,7 +48,7 @@ class V8_EXPORT_PRIVATE RegExpMatchInfo : NON_EXPORTED_BASE(public FixedArray) { ...@@ -48,7 +48,7 @@ class V8_EXPORT_PRIVATE RegExpMatchInfo : NON_EXPORTED_BASE(public FixedArray) {
static Handle<RegExpMatchInfo> ReserveCaptures( static Handle<RegExpMatchInfo> ReserveCaptures(
Handle<RegExpMatchInfo> match_info, int capture_count); Handle<RegExpMatchInfo> match_info, int capture_count);
DECLARE_CAST(RegExpMatchInfo) DECL_CAST(RegExpMatchInfo)
static const int kNumberOfCapturesIndex = 0; static const int kNumberOfCapturesIndex = 0;
static const int kLastSubjectIndex = 1; static const int kLastSubjectIndex = 1;
......
...@@ -32,7 +32,7 @@ class Zone; ...@@ -32,7 +32,7 @@ class Zone;
// routines. // routines.
class ScopeInfo : public FixedArray { class ScopeInfo : public FixedArray {
public: public:
DECLARE_CAST(ScopeInfo) DECL_CAST(ScopeInfo)
// Return the type of this scope. // Return the type of this scope.
ScopeType scope_type(); ScopeType scope_type();
......
...@@ -106,7 +106,7 @@ class Script : public Struct { ...@@ -106,7 +106,7 @@ class Script : public Struct {
inline v8::ScriptOriginOptions origin_options(); inline v8::ScriptOriginOptions origin_options();
inline void set_origin_options(ScriptOriginOptions origin_options); inline void set_origin_options(ScriptOriginOptions origin_options);
DECLARE_CAST(Script) DECL_CAST(Script)
// If script source is an external string, check that the underlying // If script source is an external string, check that the underlying
// resource is accessible. Otherwise, always return true. // resource is accessible. Otherwise, always return true.
...@@ -179,8 +179,8 @@ class Script : public Struct { ...@@ -179,8 +179,8 @@ class Script : public Struct {
bool HasPreparsedScopeData() const; bool HasPreparsedScopeData() const;
// Dispatched behavior. // Dispatched behavior.
DECLARE_PRINTER(Script) DECL_PRINTER(Script)
DECLARE_VERIFIER(Script) DECL_VERIFIER(Script)
static const int kSourceOffset = HeapObject::kHeaderSize; static const int kSourceOffset = HeapObject::kHeaderSize;
static const int kNameOffset = kSourceOffset + kPointerSize; static const int kNameOffset = kSourceOffset + kPointerSize;
......
...@@ -374,8 +374,8 @@ class SharedFunctionInfo : public HeapObject { ...@@ -374,8 +374,8 @@ class SharedFunctionInfo : public HeapObject {
void SetExpectedNofPropertiesFromEstimate(FunctionLiteral* literal); void SetExpectedNofPropertiesFromEstimate(FunctionLiteral* literal);
// Dispatched behavior. // Dispatched behavior.
DECLARE_PRINTER(SharedFunctionInfo) DECL_PRINTER(SharedFunctionInfo)
DECLARE_VERIFIER(SharedFunctionInfo) DECL_VERIFIER(SharedFunctionInfo)
void ResetForNewContext(int new_ic_age); void ResetForNewContext(int new_ic_age);
...@@ -410,7 +410,7 @@ class SharedFunctionInfo : public HeapObject { ...@@ -410,7 +410,7 @@ class SharedFunctionInfo : public HeapObject {
DISALLOW_COPY_AND_ASSIGN(GlobalIterator); DISALLOW_COPY_AND_ASSIGN(GlobalIterator);
}; };
DECLARE_CAST(SharedFunctionInfo) DECL_CAST(SharedFunctionInfo)
// Constants. // Constants.
static const int kDontAdaptArgumentsSentinel = -1; static const int kDontAdaptArgumentsSentinel = -1;
......
...@@ -69,7 +69,7 @@ class StringTable : public HashTable<StringTable, StringTableShape> { ...@@ -69,7 +69,7 @@ class StringTable : public HashTable<StringTable, StringTableShape> {
static void EnsureCapacityForDeserialization(Isolate* isolate, int expected); static void EnsureCapacityForDeserialization(Isolate* isolate, int expected);
DECLARE_CAST(StringTable) DECL_CAST(StringTable)
private: private:
template <bool seq_one_byte> template <bool seq_one_byte>
...@@ -95,7 +95,7 @@ class StringSet : public HashTable<StringSet, StringSetShape> { ...@@ -95,7 +95,7 @@ class StringSet : public HashTable<StringSet, StringSetShape> {
Handle<String> name); Handle<String> name);
bool Has(Handle<String> name); bool Has(Handle<String> name);
DECLARE_CAST(StringSet) DECL_CAST(StringSet)
}; };
} // namespace internal } // namespace internal
......
...@@ -314,7 +314,7 @@ class String : public Name { ...@@ -314,7 +314,7 @@ class String : public Name {
enum TrimMode { kTrim, kTrimLeft, kTrimRight }; enum TrimMode { kTrim, kTrimLeft, kTrimRight };
static Handle<String> Trim(Handle<String> string, TrimMode mode); static Handle<String> Trim(Handle<String> string, TrimMode mode);
DECLARE_CAST(String) DECL_CAST(String)
void PrintOn(FILE* out); void PrintOn(FILE* out);
...@@ -327,8 +327,8 @@ class String : public Name { ...@@ -327,8 +327,8 @@ class String : public Name {
#if defined(DEBUG) || defined(OBJECT_PRINT) #if defined(DEBUG) || defined(OBJECT_PRINT)
char* ToAsciiArray(); char* ToAsciiArray();
#endif #endif
DECLARE_PRINTER(String) DECL_PRINTER(String)
DECLARE_VERIFIER(String) DECL_VERIFIER(String)
inline bool IsFlat(); inline bool IsFlat();
...@@ -458,7 +458,7 @@ class String : public Name { ...@@ -458,7 +458,7 @@ class String : public Name {
// The SeqString abstract class captures sequential string values. // The SeqString abstract class captures sequential string values.
class SeqString : public String { class SeqString : public String {
public: public:
DECLARE_CAST(SeqString) DECL_CAST(SeqString)
// Layout description. // Layout description.
static const int kHeaderSize = String::kSize; static const int kHeaderSize = String::kSize;
...@@ -488,7 +488,7 @@ class SeqOneByteString : public SeqString { ...@@ -488,7 +488,7 @@ class SeqOneByteString : public SeqString {
inline uint8_t* GetChars(); inline uint8_t* GetChars();
DECLARE_CAST(SeqOneByteString) DECL_CAST(SeqOneByteString)
// Garbage collection support. This method is called by the // Garbage collection support. This method is called by the
// garbage collector to compute the actual size of an OneByteString // garbage collector to compute the actual size of an OneByteString
...@@ -530,7 +530,7 @@ class SeqTwoByteString : public SeqString { ...@@ -530,7 +530,7 @@ class SeqTwoByteString : public SeqString {
// For regexp code. // For regexp code.
const uint16_t* SeqTwoByteStringGetData(unsigned start); const uint16_t* SeqTwoByteStringGetData(unsigned start);
DECLARE_CAST(SeqTwoByteString) DECL_CAST(SeqTwoByteString)
// Garbage collection support. This method is called by the // Garbage collection support. This method is called by the
// garbage collector to compute the actual size of a TwoByteString // garbage collector to compute the actual size of a TwoByteString
...@@ -584,7 +584,7 @@ class ConsString : public String { ...@@ -584,7 +584,7 @@ class ConsString : public String {
// Dispatched behavior. // Dispatched behavior.
V8_EXPORT_PRIVATE uint16_t ConsStringGet(int index); V8_EXPORT_PRIVATE uint16_t ConsStringGet(int index);
DECLARE_CAST(ConsString) DECL_CAST(ConsString)
// Layout description. // Layout description.
static const int kFirstOffset = POINTER_SIZE_ALIGN(String::kSize); static const int kFirstOffset = POINTER_SIZE_ALIGN(String::kSize);
...@@ -599,7 +599,7 @@ class ConsString : public String { ...@@ -599,7 +599,7 @@ class ConsString : public String {
// No weak fields. // No weak fields.
typedef BodyDescriptor BodyDescriptorWeak; typedef BodyDescriptor BodyDescriptorWeak;
DECLARE_VERIFIER(ConsString) DECL_VERIFIER(ConsString)
private: private:
DISALLOW_IMPLICIT_CONSTRUCTORS(ConsString); DISALLOW_IMPLICIT_CONSTRUCTORS(ConsString);
...@@ -621,8 +621,8 @@ class ThinString : public String { ...@@ -621,8 +621,8 @@ class ThinString : public String {
V8_EXPORT_PRIVATE uint16_t ThinStringGet(int index); V8_EXPORT_PRIVATE uint16_t ThinStringGet(int index);
DECLARE_CAST(ThinString) DECL_CAST(ThinString)
DECLARE_VERIFIER(ThinString) DECL_VERIFIER(ThinString)
// Layout description. // Layout description.
static const int kActualOffset = String::kSize; static const int kActualOffset = String::kSize;
...@@ -659,7 +659,7 @@ class SlicedString : public String { ...@@ -659,7 +659,7 @@ class SlicedString : public String {
// Dispatched behavior. // Dispatched behavior.
V8_EXPORT_PRIVATE uint16_t SlicedStringGet(int index); V8_EXPORT_PRIVATE uint16_t SlicedStringGet(int index);
DECLARE_CAST(SlicedString) DECL_CAST(SlicedString)
// Layout description. // Layout description.
static const int kParentOffset = POINTER_SIZE_ALIGN(String::kSize); static const int kParentOffset = POINTER_SIZE_ALIGN(String::kSize);
...@@ -675,7 +675,7 @@ class SlicedString : public String { ...@@ -675,7 +675,7 @@ class SlicedString : public String {
// No weak fields. // No weak fields.
typedef BodyDescriptor BodyDescriptorWeak; typedef BodyDescriptor BodyDescriptorWeak;
DECLARE_VERIFIER(SlicedString) DECL_VERIFIER(SlicedString)
private: private:
DISALLOW_IMPLICIT_CONSTRUCTORS(SlicedString); DISALLOW_IMPLICIT_CONSTRUCTORS(SlicedString);
...@@ -692,7 +692,7 @@ class SlicedString : public String { ...@@ -692,7 +692,7 @@ class SlicedString : public String {
// API. Therefore, ExternalStrings should not be used internally. // API. Therefore, ExternalStrings should not be used internally.
class ExternalString : public String { class ExternalString : public String {
public: public:
DECLARE_CAST(ExternalString) DECL_CAST(ExternalString)
// Layout description. // Layout description.
static const int kResourceOffset = POINTER_SIZE_ALIGN(String::kSize); static const int kResourceOffset = POINTER_SIZE_ALIGN(String::kSize);
...@@ -732,7 +732,7 @@ class ExternalOneByteString : public ExternalString { ...@@ -732,7 +732,7 @@ class ExternalOneByteString : public ExternalString {
// Dispatched behavior. // Dispatched behavior.
inline uint16_t ExternalOneByteStringGet(int index); inline uint16_t ExternalOneByteStringGet(int index);
DECLARE_CAST(ExternalOneByteString) DECL_CAST(ExternalOneByteString)
class BodyDescriptor; class BodyDescriptor;
// No weak fields. // No weak fields.
...@@ -768,7 +768,7 @@ class ExternalTwoByteString : public ExternalString { ...@@ -768,7 +768,7 @@ class ExternalTwoByteString : public ExternalString {
// For regexp code. // For regexp code.
inline const uint16_t* ExternalTwoByteStringGetData(unsigned start); inline const uint16_t* ExternalTwoByteStringGetData(unsigned start);
DECLARE_CAST(ExternalTwoByteString) DECL_CAST(ExternalTwoByteString)
class BodyDescriptor; class BodyDescriptor;
// No weak fields. // No weak fields.
......
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