Commit 015203e4 authored by Jakob Kummerow's avatar Jakob Kummerow Committed by Commit Bot

[ubsan] Port Struct to the new design

Dropping the temporary StructPtr in the process.

Bug: v8:3770
Change-Id: I70784ede7b66b432d8438536ff0c70a51dfb7f83
Reviewed-on: https://chromium-review.googlesource.com/c/1377461
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: 's avatarBen Smith <binji@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58315}
parent 1f967aab
......@@ -3765,8 +3765,6 @@ void HeapObject::HeapObjectShortPrint(std::ostream& os) { // NOLINT
void Struct::BriefPrintDetails(std::ostream& os) {}
void StructPtr::BriefPrintDetails(std::ostream& os) {}
void Tuple2::BriefPrintDetails(std::ostream& os) {
os << " " << Brief(value1()) << ", " << Brief(value2());
}
......
......@@ -16,8 +16,8 @@
namespace v8 {
namespace internal {
OBJECT_CONSTRUCTORS_IMPL(AllocationMemento, StructPtr)
OBJECT_CONSTRUCTORS_IMPL(AllocationSite, StructPtr)
OBJECT_CONSTRUCTORS_IMPL(AllocationMemento, Struct)
OBJECT_CONSTRUCTORS_IMPL(AllocationSite, Struct)
NEVER_READ_ONLY_SPACE_IMPL(AllocationSite)
......
......@@ -16,7 +16,7 @@ namespace internal {
enum InstanceType : uint16_t;
class AllocationSite : public StructPtr {
class AllocationSite : public Struct {
public:
NEVER_READ_ONLY_SPACE
static const uint32_t kMaximumArrayBytesToPretransition = 8 * 1024;
......@@ -159,10 +159,10 @@ class AllocationSite : public StructPtr {
private:
inline bool PretenuringDecisionMade() const;
OBJECT_CONSTRUCTORS(AllocationSite, StructPtr);
OBJECT_CONSTRUCTORS(AllocationSite, Struct);
};
class AllocationMemento : public StructPtr {
class AllocationMemento : public Struct {
public:
// Layout description.
#define ALLOCATION_MEMENTO_FIELDS(V) \
......@@ -184,7 +184,7 @@ class AllocationMemento : public StructPtr {
DECL_CAST2(AllocationMemento)
OBJECT_CONSTRUCTORS(AllocationMemento, StructPtr);
OBJECT_CONSTRUCTORS(AllocationMemento, Struct);
};
} // namespace internal
......
......@@ -19,9 +19,9 @@
namespace v8 {
namespace internal {
OBJECT_CONSTRUCTORS_IMPL(AccessCheckInfo, StructPtr)
OBJECT_CONSTRUCTORS_IMPL(AccessorInfo, StructPtr)
OBJECT_CONSTRUCTORS_IMPL(InterceptorInfo, StructPtr)
OBJECT_CONSTRUCTORS_IMPL(AccessCheckInfo, Struct)
OBJECT_CONSTRUCTORS_IMPL(AccessorInfo, Struct)
OBJECT_CONSTRUCTORS_IMPL(InterceptorInfo, Struct)
OBJECT_CONSTRUCTORS_IMPL(CallHandlerInfo, Tuple3)
CAST_ACCESSOR2(AccessorInfo)
......
......@@ -22,7 +22,7 @@ namespace internal {
// If the accessor in the prototype has the READ_ONLY property attribute, then
// a new value is added to the derived object when the property is set.
// This shadows the accessor in the prototype.
class AccessorInfo : public StructPtr {
class AccessorInfo : public Struct {
public:
DECL_ACCESSORS2(name, Name)
DECL_INT_ACCESSORS(flags)
......@@ -108,10 +108,10 @@ class AccessorInfo : public StructPtr {
DEFINE_BIT_FIELDS(ACCESSOR_INFO_FLAGS_BIT_FIELDS)
#undef ACCESSOR_INFO_FLAGS_BIT_FIELDS
OBJECT_CONSTRUCTORS(AccessorInfo, StructPtr);
OBJECT_CONSTRUCTORS(AccessorInfo, Struct);
};
class AccessCheckInfo : public StructPtr {
class AccessCheckInfo : public Struct {
public:
DECL_ACCESSORS(callback, Object)
DECL_ACCESSORS(named_interceptor, Object)
......@@ -138,10 +138,10 @@ class AccessCheckInfo : public StructPtr {
ACCESS_CHECK_INFO_FIELDS)
#undef ACCESS_CHECK_INFO_FIELDS
OBJECT_CONSTRUCTORS(AccessCheckInfo, StructPtr);
OBJECT_CONSTRUCTORS(AccessCheckInfo, Struct);
};
class InterceptorInfo : public StructPtr {
class InterceptorInfo : public Struct {
public:
DECL_ACCESSORS(getter, Object)
DECL_ACCESSORS(setter, Object)
......@@ -189,7 +189,7 @@ class InterceptorInfo : public StructPtr {
static const int kNamed = 3;
static const int kHasNoSideEffect = 4;
OBJECT_CONSTRUCTORS(InterceptorInfo, StructPtr);
OBJECT_CONSTRUCTORS(InterceptorInfo, Struct);
};
class CallHandlerInfo : public Tuple3 {
......
......@@ -20,7 +20,7 @@ namespace internal {
OBJECT_CONSTRUCTORS_IMPL(SloppyArgumentsElements, FixedArray)
OBJECT_CONSTRUCTORS_IMPL(JSArgumentsObject, JSObject)
OBJECT_CONSTRUCTORS_IMPL(AliasedArgumentsEntry, StructPtr)
OBJECT_CONSTRUCTORS_IMPL(AliasedArgumentsEntry, Struct)
CAST_ACCESSOR2(AliasedArgumentsEntry)
CAST_ACCESSOR2(SloppyArgumentsElements)
......
......@@ -133,7 +133,7 @@ class SloppyArgumentsElements : public FixedArray {
// - the parameter map contains no fast alias mapping (i.e. the hole)
// - this struct (in the slow backing store) contains an index into the context
// - all attributes are available as part if the property details
class AliasedArgumentsEntry : public StructPtr {
class AliasedArgumentsEntry : public Struct {
public:
inline int aliased_context_slot() const;
inline void set_aliased_context_slot(int count);
......@@ -154,7 +154,7 @@ class AliasedArgumentsEntry : public StructPtr {
ALIASED_ARGUMENTS_FIELDS)
#undef ALIASED_ARGUMENTS_FIELDS
OBJECT_CONSTRUCTORS(AliasedArgumentsEntry, StructPtr);
OBJECT_CONSTRUCTORS(AliasedArgumentsEntry, Struct);
};
} // namespace internal
......
......@@ -14,7 +14,7 @@
namespace v8 {
namespace internal {
OBJECT_CONSTRUCTORS_IMPL(DataHandler, StructPtr)
OBJECT_CONSTRUCTORS_IMPL(DataHandler, Struct)
CAST_ACCESSOR2(DataHandler)
......
......@@ -15,7 +15,7 @@ namespace internal {
// DataHandler is a base class for load and store handlers that can't be
// encoded in one Smi. Kind of a handler can be deduced from instance type.
class DataHandler : public StructPtr {
class DataHandler : public Struct {
public:
// [smi_handler]: A Smi which encodes a handler or Code object (we still
// use code handlers for accessing lexical environment variables, but soon
......@@ -56,7 +56,7 @@ class DataHandler : public StructPtr {
class BodyDescriptor;
OBJECT_CONSTRUCTORS(DataHandler, StructPtr)
OBJECT_CONSTRUCTORS(DataHandler, Struct)
};
} // namespace internal
......
......@@ -21,7 +21,7 @@ namespace internal {
OBJECT_CONSTRUCTORS_IMPL(BreakPoint, Tuple2)
OBJECT_CONSTRUCTORS_IMPL(BreakPointInfo, Tuple2)
OBJECT_CONSTRUCTORS_IMPL(CoverageInfo, FixedArray)
OBJECT_CONSTRUCTORS_IMPL(DebugInfo, StructPtr)
OBJECT_CONSTRUCTORS_IMPL(DebugInfo, Struct)
NEVER_READ_ONLY_SPACE_IMPL(DebugInfo)
......
......@@ -20,7 +20,7 @@ class BytecodeArray;
// The DebugInfo class holds additional information for a function being
// debugged.
class DebugInfo : public StructPtr {
class DebugInfo : public Struct {
public:
NEVER_READ_ONLY_SPACE
enum Flag {
......@@ -190,7 +190,7 @@ class DebugInfo : public StructPtr {
// Get the break point info object for a source position.
Object* GetBreakPointInfo(Isolate* isolate, int source_position);
OBJECT_CONSTRUCTORS(DebugInfo, StructPtr);
OBJECT_CONSTRUCTORS(DebugInfo, Struct);
};
// The BreakPointInfo class holds information for break points set in a
......
......@@ -15,7 +15,7 @@
namespace v8 {
namespace internal {
OBJECT_CONSTRUCTORS_IMPL(FeedbackCell, StructPtr)
OBJECT_CONSTRUCTORS_IMPL(FeedbackCell, Struct)
CAST_ACCESSOR2(FeedbackCell)
......
......@@ -18,7 +18,7 @@ namespace internal {
// number of closures created for a certain function per native
// context. There's at most one FeedbackCell for each function in
// a native context.
class FeedbackCell : public StructPtr {
class FeedbackCell : public Struct {
public:
// [value]: value of the cell.
DECL_ACCESSORS(value, HeapObject)
......@@ -35,7 +35,7 @@ class FeedbackCell : public StructPtr {
typedef FixedBodyDescriptor<kValueOffset, kValueOffset + kPointerSize, kSize>
BodyDescriptor;
OBJECT_CONSTRUCTORS(FeedbackCell, StructPtr);
OBJECT_CONSTRUCTORS(FeedbackCell, Struct);
};
} // namespace internal
......
......@@ -19,7 +19,7 @@ namespace internal {
OBJECT_CONSTRUCTORS_IMPL(JSGeneratorObject, JSObject)
OBJECT_CONSTRUCTORS_IMPL(JSAsyncFunctionObject, JSGeneratorObject)
OBJECT_CONSTRUCTORS_IMPL(JSAsyncGeneratorObject, JSGeneratorObject)
OBJECT_CONSTRUCTORS_IMPL(AsyncGeneratorRequest, StructPtr)
OBJECT_CONSTRUCTORS_IMPL(AsyncGeneratorRequest, Struct)
CAST_ACCESSOR2(JSAsyncFunctionObject)
CAST_ACCESSOR2(JSAsyncGeneratorObject)
......
......@@ -138,7 +138,7 @@ class JSAsyncGeneratorObject : public JSGeneratorObject {
OBJECT_CONSTRUCTORS(JSAsyncGeneratorObject, JSGeneratorObject);
};
class AsyncGeneratorRequest : public StructPtr {
class AsyncGeneratorRequest : public Struct {
public:
// Holds an AsyncGeneratorRequest, or Undefined.
DECL_ACCESSORS(next, Object)
......@@ -163,7 +163,7 @@ class AsyncGeneratorRequest : public StructPtr {
DECL_PRINTER(AsyncGeneratorRequest)
DECL_VERIFIER(AsyncGeneratorRequest)
OBJECT_CONSTRUCTORS(AsyncGeneratorRequest, StructPtr);
OBJECT_CONSTRUCTORS(AsyncGeneratorRequest, Struct);
};
} // namespace internal
......
......@@ -50,7 +50,7 @@ ACCESSORS(ClassBoilerplate, instance_elements_template, Object,
ACCESSORS2(ClassBoilerplate, instance_computed_properties, FixedArray,
FixedArray::OffsetOfElementAt(kPrototypeComputedPropertiesIndex));
OBJECT_CONSTRUCTORS_IMPL(ArrayBoilerplateDescription, StructPtr)
OBJECT_CONSTRUCTORS_IMPL(ArrayBoilerplateDescription, Struct)
CAST_ACCESSOR2(ArrayBoilerplateDescription)
......
......@@ -52,7 +52,7 @@ class ObjectBoilerplateDescription : public FixedArray {
OBJECT_CONSTRUCTORS(ObjectBoilerplateDescription, FixedArray)
};
class ArrayBoilerplateDescription : public StructPtr {
class ArrayBoilerplateDescription : public Struct {
public:
// store constant_elements of a fixed array
DECL_ACCESSORS2(constant_elements, FixedArrayBase)
......@@ -80,7 +80,7 @@ class ArrayBoilerplateDescription : public StructPtr {
private:
DECL_INT_ACCESSORS(flags)
OBJECT_CONSTRUCTORS(ArrayBoilerplateDescription, StructPtr);
OBJECT_CONSTRUCTORS(ArrayBoilerplateDescription, Struct);
};
class ClassBoilerplate : public FixedArray {
......
......@@ -16,7 +16,7 @@
namespace v8 {
namespace internal {
OBJECT_CONSTRUCTORS_IMPL(Microtask, StructPtr)
OBJECT_CONSTRUCTORS_IMPL(Microtask, Struct)
OBJECT_CONSTRUCTORS_IMPL(CallbackTask, Microtask)
OBJECT_CONSTRUCTORS_IMPL(CallableTask, Microtask)
......
......@@ -17,13 +17,13 @@ namespace internal {
// Abstract base class for all microtasks that can be scheduled on the
// microtask queue. This class merely serves the purpose of a marker
// interface.
class Microtask : public StructPtr {
class Microtask : public Struct {
public:
// Dispatched behavior.
DECL_CAST2(Microtask)
DECL_VERIFIER(Microtask)
OBJECT_CONSTRUCTORS(Microtask, StructPtr);
OBJECT_CONSTRUCTORS(Microtask, Struct);
};
// A CallbackTask is a special Microtask that allows us to schedule
......
......@@ -16,8 +16,8 @@
namespace v8 {
namespace internal {
OBJECT_CONSTRUCTORS_IMPL(Module, StructPtr)
OBJECT_CONSTRUCTORS_IMPL(ModuleInfoEntry, StructPtr)
OBJECT_CONSTRUCTORS_IMPL(Module, Struct)
OBJECT_CONSTRUCTORS_IMPL(ModuleInfoEntry, Struct)
OBJECT_CONSTRUCTORS_IMPL(JSModuleNamespace, JSObject)
NEVER_READ_ONLY_SPACE_IMPL(Module)
......
......@@ -27,7 +27,7 @@ class String;
class Zone;
// The runtime representation of an ECMAScript module.
class Module : public StructPtr {
class Module : public Struct {
public:
NEVER_READ_ONLY_SPACE
DECL_CAST2(Module)
......@@ -217,7 +217,7 @@ class Module : public StructPtr {
void PrintStatusTransition(Status new_status);
#endif // DEBUG
OBJECT_CONSTRUCTORS(Module, StructPtr);
OBJECT_CONSTRUCTORS(Module, Struct);
};
// When importing a module namespace (import * as foo from "bar"), a
......@@ -312,7 +312,7 @@ class ModuleInfo : public FixedArray {
OBJECT_CONSTRUCTORS(ModuleInfo, FixedArray);
};
class ModuleInfoEntry : public StructPtr {
class ModuleInfoEntry : public Struct {
public:
DECL_CAST2(ModuleInfoEntry)
DECL_PRINTER(ModuleInfoEntry)
......@@ -348,7 +348,7 @@ class ModuleInfoEntry : public StructPtr {
DEFINE_FIELD_OFFSET_CONSTANTS(Struct::kHeaderSize, MODULE_INFO_FIELDS)
#undef MODULE_INFO_FIELDS
OBJECT_CONSTRUCTORS(ModuleInfoEntry, StructPtr);
OBJECT_CONSTRUCTORS(ModuleInfoEntry, Struct);
};
} // namespace internal
......
......@@ -20,8 +20,8 @@ OBJECT_CONSTRUCTORS_IMPL(PromiseReactionJobTask, Microtask)
OBJECT_CONSTRUCTORS_IMPL(PromiseFulfillReactionJobTask, PromiseReactionJobTask)
OBJECT_CONSTRUCTORS_IMPL(PromiseRejectReactionJobTask, PromiseReactionJobTask)
OBJECT_CONSTRUCTORS_IMPL(PromiseResolveThenableJobTask, Microtask)
OBJECT_CONSTRUCTORS_IMPL(PromiseCapability, StructPtr)
OBJECT_CONSTRUCTORS_IMPL(PromiseReaction, StructPtr)
OBJECT_CONSTRUCTORS_IMPL(PromiseCapability, Struct)
OBJECT_CONSTRUCTORS_IMPL(PromiseReaction, Struct)
CAST_ACCESSOR2(PromiseCapability)
CAST_ACCESSOR2(PromiseReaction)
......
......@@ -105,7 +105,7 @@ class PromiseResolveThenableJobTask : public Microtask {
};
// Struct to hold the state of a PromiseCapability.
class PromiseCapability : public StructPtr {
class PromiseCapability : public Struct {
public:
DECL_ACCESSORS(promise, HeapObject)
DECL_ACCESSORS(resolve, Object)
......@@ -127,7 +127,7 @@ class PromiseCapability : public StructPtr {
DECL_PRINTER(PromiseCapability)
DECL_VERIFIER(PromiseCapability)
OBJECT_CONSTRUCTORS(PromiseCapability, StructPtr);
OBJECT_CONSTRUCTORS(PromiseCapability, Struct);
};
// A representation of promise reaction. This differs from the specification
......@@ -147,7 +147,7 @@ class PromiseCapability : public StructPtr {
// Smi 0. On the JSPromise instance they are linked in reverse order,
// and are turned into the proper order again when scheduling them on
// the microtask queue.
class PromiseReaction : public StructPtr {
class PromiseReaction : public Struct {
public:
enum Type { kFulfill, kReject };
......@@ -175,7 +175,7 @@ class PromiseReaction : public StructPtr {
DECL_PRINTER(PromiseReaction)
DECL_VERIFIER(PromiseReaction)
OBJECT_CONSTRUCTORS(PromiseReaction, StructPtr);
OBJECT_CONSTRUCTORS(PromiseReaction, Struct);
};
} // namespace internal
......
......@@ -17,7 +17,7 @@
namespace v8 {
namespace internal {
OBJECT_CONSTRUCTORS_IMPL(PrototypeInfo, StructPtr)
OBJECT_CONSTRUCTORS_IMPL(PrototypeInfo, Struct)
CAST_ACCESSOR2(PrototypeInfo)
......
......@@ -16,7 +16,7 @@ namespace v8 {
namespace internal {
// Container for metadata stored on each prototype map.
class PrototypeInfo : public StructPtr {
class PrototypeInfo : public Struct {
public:
static const int UNREGISTERED = -1;
......@@ -75,7 +75,7 @@ class PrototypeInfo : public StructPtr {
private:
DECL_ACCESSORS2(object_create_map, MaybeObject)
OBJECT_CONSTRUCTORS(PrototypeInfo, StructPtr);
OBJECT_CONSTRUCTORS(PrototypeInfo, Struct);
};
// A growing array with an additional API for marking slots "empty". When adding
......
......@@ -17,7 +17,7 @@
namespace v8 {
namespace internal {
OBJECT_CONSTRUCTORS_IMPL(Script, StructPtr)
OBJECT_CONSTRUCTORS_IMPL(Script, Struct)
NEVER_READ_ONLY_SPACE_IMPL(Script)
......
......@@ -16,7 +16,7 @@ namespace v8 {
namespace internal {
// Script describes a script which has been added to the VM.
class Script : public StructPtr {
class Script : public Struct {
public:
NEVER_READ_ONLY_SPACE
// Script types.
......@@ -221,7 +221,7 @@ class Script : public StructPtr {
static const int kOriginOptionsMask = ((1 << kOriginOptionsSize) - 1)
<< kOriginOptionsShift;
OBJECT_CONSTRUCTORS(Script, StructPtr);
OBJECT_CONSTRUCTORS(Script, Struct);
};
} // namespace internal
......
......@@ -78,7 +78,7 @@ CAST_ACCESSOR2(UncompiledDataWithPreParsedScope)
ACCESSORS2(UncompiledDataWithPreParsedScope, pre_parsed_scope_data,
PreParsedScopeData, kPreParsedScopeDataOffset)
OBJECT_CONSTRUCTORS_IMPL(InterpreterData, StructPtr)
OBJECT_CONSTRUCTORS_IMPL(InterpreterData, Struct)
CAST_ACCESSOR2(InterpreterData)
ACCESSORS2(InterpreterData, bytecode_array, BytecodeArray, kBytecodeArrayOffset)
......
......@@ -173,7 +173,7 @@ class UncompiledDataWithPreParsedScope : public UncompiledData {
OBJECT_CONSTRUCTORS(UncompiledDataWithPreParsedScope, UncompiledData);
};
class InterpreterData : public StructPtr {
class InterpreterData : public Struct {
public:
DECL_ACCESSORS2(bytecode_array, BytecodeArray)
DECL_ACCESSORS2(interpreter_trampoline, Code)
......@@ -192,7 +192,7 @@ class InterpreterData : public StructPtr {
DECL_PRINTER(InterpreterData)
DECL_VERIFIER(InterpreterData)
OBJECT_CONSTRUCTORS(InterpreterData, StructPtr);
OBJECT_CONSTRUCTORS(InterpreterData, Struct);
};
// SharedFunctionInfo describes the JSFunction information that can be
......
......@@ -15,7 +15,7 @@
namespace v8 {
namespace internal {
OBJECT_CONSTRUCTORS_IMPL(StackFrameInfo, StructPtr)
OBJECT_CONSTRUCTORS_IMPL(StackFrameInfo, Struct)
NEVER_READ_ONLY_SPACE_IMPL(StackFrameInfo)
......
......@@ -13,7 +13,7 @@
namespace v8 {
namespace internal {
class StackFrameInfo : public StructPtr {
class StackFrameInfo : public Struct {
public:
NEVER_READ_ONLY_SPACE
DECL_INT_ACCESSORS(line_number)
......@@ -56,7 +56,7 @@ class StackFrameInfo : public StructPtr {
static const int kIsConstructorBit = 1;
static const int kIsWasmBit = 2;
OBJECT_CONSTRUCTORS(StackFrameInfo, StructPtr);
OBJECT_CONSTRUCTORS(StackFrameInfo, Struct);
};
} // namespace internal
......
......@@ -15,20 +15,15 @@
namespace v8 {
namespace internal {
bool StructPtr::IsStructPtr() const {
return reinterpret_cast<Struct*>(ptr())->IsStruct();
}
OBJECT_CONSTRUCTORS_IMPL(StructPtr, HeapObjectPtr)
OBJECT_CONSTRUCTORS_IMPL(Struct, HeapObjectPtr)
// TODO(jkummerow): Fix IsTuple2() and IsTuple3() to be subclassing-aware,
// or rethink this more generally (see crbug.com/v8/8516).
Tuple2::Tuple2(Address ptr) : StructPtr(ptr) {}
Tuple2::Tuple2(Address ptr) : Struct(ptr) {}
Tuple3::Tuple3(Address ptr) : Tuple2(ptr) {}
OBJECT_CONSTRUCTORS_IMPL(AccessorPair, StructPtr)
OBJECT_CONSTRUCTORS_IMPL(AccessorPair, Struct)
CAST_ACCESSOR2(AccessorPair)
CAST_ACCESSOR(Struct)
CAST_ACCESSOR2(StructPtr)
CAST_ACCESSOR2(Struct)
CAST_ACCESSOR2(Tuple2)
CAST_ACCESSOR2(Tuple3)
......@@ -39,13 +34,6 @@ void Struct::InitializeBody(int object_size) {
}
}
void StructPtr::InitializeBody(int object_size) {
Object* value = GetReadOnlyRoots().undefined_value();
for (int offset = kHeaderSize; offset < object_size; offset += kPointerSize) {
WRITE_FIELD(this, offset, value);
}
}
ACCESSORS(Tuple2, value1, Object, kValue1Offset)
ACCESSORS(Tuple2, value2, Object, kValue2Offset)
ACCESSORS(Tuple3, value3, Object, kValue3Offset)
......
......@@ -17,28 +17,16 @@ namespace internal {
// An abstract superclass, a marker class really, for simple structure classes.
// It doesn't carry much functionality but allows struct classes to be
// identified in the type system.
class Struct : public HeapObject {
class Struct : public HeapObjectPtr {
public:
inline void InitializeBody(int object_size);
DECL_CAST(Struct)
DECL_CAST2(Struct)
void BriefPrintDetails(std::ostream& os);
};
// Replacement for the above, temporarily separate for incremental transition
// of subclasses.
class StructPtr : public HeapObjectPtr {
public:
inline void InitializeBody(int object_size);
DECL_CAST2(StructPtr)
void BriefPrintDetails(std::ostream& os);
// TODO(3770): Temporary.
inline bool IsStructPtr() const;
OBJECT_CONSTRUCTORS(StructPtr, HeapObjectPtr);
OBJECT_CONSTRUCTORS(Struct, HeapObjectPtr)
};
class Tuple2 : public StructPtr {
class Tuple2 : public Struct {
public:
DECL_ACCESSORS(value1, Object)
DECL_ACCESSORS(value2, Object)
......@@ -54,7 +42,7 @@ class Tuple2 : public StructPtr {
static const int kValue2Offset = kValue1Offset + kPointerSize;
static const int kSize = kValue2Offset + kPointerSize;
OBJECT_CONSTRUCTORS(Tuple2, StructPtr);
OBJECT_CONSTRUCTORS(Tuple2, Struct);
};
class Tuple3 : public Tuple2 {
......@@ -80,7 +68,7 @@ class Tuple3 : public Tuple2 {
// * a FunctionTemplateInfo: a real (lazy) accessor
// * undefined: considered an accessor by the spec, too, strangely enough
// * null: an accessor which has not been set
class AccessorPair : public StructPtr {
class AccessorPair : public Struct {
public:
DECL_ACCESSORS(getter, Object)
DECL_ACCESSORS(setter, Object)
......@@ -110,7 +98,7 @@ class AccessorPair : public StructPtr {
static const int kSetterOffset = kGetterOffset + kPointerSize;
static const int kSize = kSetterOffset + kPointerSize;
OBJECT_CONSTRUCTORS(AccessorPair, StructPtr);
OBJECT_CONSTRUCTORS(AccessorPair, Struct);
};
} // namespace internal
......
......@@ -16,10 +16,10 @@
namespace v8 {
namespace internal {
OBJECT_CONSTRUCTORS_IMPL(TemplateInfo, StructPtr)
OBJECT_CONSTRUCTORS_IMPL(TemplateInfo, Struct)
OBJECT_CONSTRUCTORS_IMPL(FunctionTemplateInfo, TemplateInfo)
OBJECT_CONSTRUCTORS_IMPL(ObjectTemplateInfo, TemplateInfo)
OBJECT_CONSTRUCTORS_IMPL(FunctionTemplateRareData, StructPtr)
OBJECT_CONSTRUCTORS_IMPL(FunctionTemplateRareData, Struct)
NEVER_READ_ONLY_SPACE_IMPL(TemplateInfo)
......
......@@ -13,7 +13,7 @@
namespace v8 {
namespace internal {
class TemplateInfo : public StructPtr {
class TemplateInfo : public Struct {
public:
NEVER_READ_ONLY_SPACE
DECL_ACCESSORS(tag, Object)
......@@ -46,11 +46,11 @@ class TemplateInfo : public StructPtr {
// instead of caching them.
static const int kSlowTemplateInstantiationsCacheSize = 1 * MB;
OBJECT_CONSTRUCTORS(TemplateInfo, StructPtr);
OBJECT_CONSTRUCTORS(TemplateInfo, Struct);
};
// Contains data members that are rarely set on a FunctionTemplateInfo.
class FunctionTemplateRareData : public StructPtr {
class FunctionTemplateRareData : public Struct {
public:
// See DECL_RARE_ACCESSORS in FunctionTemplateInfo.
DECL_ACCESSORS(prototype_template, Object)
......@@ -84,7 +84,7 @@ class FunctionTemplateRareData : public StructPtr {
DEFINE_FIELD_OFFSET_CONSTANTS(HeapObject::kHeaderSize, SYMBOL_FIELDS)
#undef SYMBOL_FIELDS
OBJECT_CONSTRUCTORS(FunctionTemplateRareData, StructPtr);
OBJECT_CONSTRUCTORS(FunctionTemplateRareData, Struct);
};
// See the api-exposed FunctionTemplate for more information.
......
......@@ -24,15 +24,15 @@ namespace v8 {
namespace internal {
OBJECT_CONSTRUCTORS_IMPL(WasmExceptionObject, JSObject)
OBJECT_CONSTRUCTORS_IMPL(WasmExceptionTag, StructPtr)
OBJECT_CONSTRUCTORS_IMPL(WasmExportedFunctionData, StructPtr)
OBJECT_CONSTRUCTORS_IMPL(WasmDebugInfo, StructPtr)
OBJECT_CONSTRUCTORS_IMPL(WasmExceptionTag, Struct)
OBJECT_CONSTRUCTORS_IMPL(WasmExportedFunctionData, Struct)
OBJECT_CONSTRUCTORS_IMPL(WasmDebugInfo, Struct)
OBJECT_CONSTRUCTORS_IMPL(WasmGlobalObject, JSObject)
OBJECT_CONSTRUCTORS_IMPL(WasmInstanceObject, JSObject)
OBJECT_CONSTRUCTORS_IMPL(WasmMemoryObject, JSObject)
OBJECT_CONSTRUCTORS_IMPL(WasmModuleObject, JSObject)
OBJECT_CONSTRUCTORS_IMPL(WasmTableObject, JSObject)
OBJECT_CONSTRUCTORS_IMPL(AsmWasmData, StructPtr)
OBJECT_CONSTRUCTORS_IMPL(AsmWasmData, Struct)
NEVER_READ_ONLY_SPACE_IMPL(WasmDebugInfo)
......
......@@ -548,7 +548,7 @@ class WasmExportedFunction : public JSFunction {
// Information for a WasmExportedFunction which is referenced as the function
// data of the SharedFunctionInfo underlying the function. For details please
// see the {SharedFunctionInfo::HasWasmExportedFunctionData} predicate.
class WasmExportedFunctionData : public StructPtr {
class WasmExportedFunctionData : public Struct {
public:
DECL_ACCESSORS2(wrapper_code, Code);
DECL_ACCESSORS2(instance, WasmInstanceObject)
......@@ -573,10 +573,10 @@ class WasmExportedFunctionData : public StructPtr {
WASM_EXPORTED_FUNCTION_DATA_FIELDS)
#undef WASM_EXPORTED_FUNCTION_DATA_FIELDS
OBJECT_CONSTRUCTORS(WasmExportedFunctionData, StructPtr)
OBJECT_CONSTRUCTORS(WasmExportedFunctionData, Struct)
};
class WasmDebugInfo : public StructPtr {
class WasmDebugInfo : public Struct {
public:
NEVER_READ_ONLY_SPACE
DECL_ACCESSORS2(wasm_instance, WasmInstanceObject)
......@@ -671,14 +671,14 @@ class WasmDebugInfo : public StructPtr {
static Handle<JSFunction> GetCWasmEntry(Handle<WasmDebugInfo>,
wasm::FunctionSig*);
OBJECT_CONSTRUCTORS(WasmDebugInfo, StructPtr)
OBJECT_CONSTRUCTORS(WasmDebugInfo, Struct)
};
// Tags provide an object identity for each exception defined in a wasm module
// header. They are referenced by the following fields:
// - {WasmExceptionObject::exception_tag} : The tag of the exception object.
// - {WasmInstanceObject::exceptions_table}: List of tags used by an instance.
class WasmExceptionTag : public StructPtr {
class WasmExceptionTag : public Struct {
public:
static Handle<WasmExceptionTag> New(Isolate* isolate, int index);
......@@ -700,10 +700,10 @@ class WasmExceptionTag : public StructPtr {
DEFINE_FIELD_OFFSET_CONSTANTS(Struct::kHeaderSize, WASM_EXCEPTION_TAG_FIELDS)
#undef WASM_EXCEPTION_TAG_FIELDS
OBJECT_CONSTRUCTORS(WasmExceptionTag, StructPtr)
OBJECT_CONSTRUCTORS(WasmExceptionTag, Struct)
};
class AsmWasmData : public StructPtr {
class AsmWasmData : public Struct {
public:
static Handle<AsmWasmData> New(
Isolate* isolate, std::shared_ptr<wasm::NativeModule> native_module,
......@@ -731,7 +731,7 @@ class AsmWasmData : public StructPtr {
DEFINE_FIELD_OFFSET_CONSTANTS(Struct::kHeaderSize, ASM_WASM_DATA_FIELDS)
#undef ASM_WASM_DATA_FIELDS
OBJECT_CONSTRUCTORS(AsmWasmData, StructPtr)
OBJECT_CONSTRUCTORS(AsmWasmData, Struct)
};
#undef DECL_OPTIONAL_ACCESSORS
......
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