Commit a66712de authored by Tobias Tebbi's avatar Tobias Tebbi Committed by Commit Bot

[torque] give field layout macros names that refer to Torque

To make it obvious these are not defined in C++.

Bug: v8:7793
Change-Id: Ib846023992e32ddd10dadc3834ce42b7604a1f48
Reviewed-on: https://chromium-review.googlesource.com/c/1495993Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59978}
parent 77434fb9
...@@ -127,7 +127,7 @@ class AccessCheckInfo : public Struct { ...@@ -127,7 +127,7 @@ class AccessCheckInfo : public Struct {
static AccessCheckInfo Get(Isolate* isolate, Handle<JSObject> receiver); static AccessCheckInfo Get(Isolate* isolate, Handle<JSObject> receiver);
DEFINE_FIELD_OFFSET_CONSTANTS(HeapObject::kHeaderSize, DEFINE_FIELD_OFFSET_CONSTANTS(HeapObject::kHeaderSize,
ACCESS_CHECK_INFO_FIELDS) TORQUE_GENERATED_ACCESS_CHECK_INFO_FIELDS)
OBJECT_CONSTRUCTORS(AccessCheckInfo, Struct); OBJECT_CONSTRUCTORS(AccessCheckInfo, Struct);
}; };
...@@ -158,7 +158,7 @@ class InterceptorInfo : public Struct { ...@@ -158,7 +158,7 @@ class InterceptorInfo : public Struct {
DECL_VERIFIER(InterceptorInfo) DECL_VERIFIER(InterceptorInfo)
DEFINE_FIELD_OFFSET_CONSTANTS(HeapObject::kHeaderSize, DEFINE_FIELD_OFFSET_CONSTANTS(HeapObject::kHeaderSize,
INTERCEPTOR_INFO_FIELDS) TORQUE_GENERATED_INTERCEPTOR_INFO_FIELDS)
static const int kCanInterceptSymbolsBit = 0; static const int kCanInterceptSymbolsBit = 0;
static const int kAllCanReadBit = 1; static const int kAllCanReadBit = 1;
......
...@@ -31,8 +31,9 @@ class JSArgumentsObject : public JSObject { ...@@ -31,8 +31,9 @@ class JSArgumentsObject : public JSObject {
class JSArgumentsObjectWithLength : public JSArgumentsObject { class JSArgumentsObjectWithLength : public JSArgumentsObject {
public: public:
// Layout description. // Layout description.
DEFINE_FIELD_OFFSET_CONSTANTS(JSObject::kHeaderSize, DEFINE_FIELD_OFFSET_CONSTANTS(
JSARGUMENTS_OBJECT_WITH_LENGTH_FIELDS) JSObject::kHeaderSize,
TORQUE_GENERATED_JSARGUMENTS_OBJECT_WITH_LENGTH_FIELDS)
// Indices of in-object properties. // Indices of in-object properties.
static const int kLengthIndex = 0; static const int kLengthIndex = 0;
...@@ -141,7 +142,7 @@ class AliasedArgumentsEntry : public Struct { ...@@ -141,7 +142,7 @@ class AliasedArgumentsEntry : public Struct {
DECL_VERIFIER(AliasedArgumentsEntry) DECL_VERIFIER(AliasedArgumentsEntry)
DEFINE_FIELD_OFFSET_CONSTANTS(HeapObject::kHeaderSize, DEFINE_FIELD_OFFSET_CONSTANTS(HeapObject::kHeaderSize,
ALIASED_ARGUMENTS_ENTRY_FIELDS) TORQUE_GENERATED_ALIASED_ARGUMENTS_ENTRY_FIELDS)
OBJECT_CONSTRUCTORS(AliasedArgumentsEntry, Struct); OBJECT_CONSTRUCTORS(AliasedArgumentsEntry, Struct);
}; };
......
...@@ -29,7 +29,8 @@ class Cell : public HeapObject { ...@@ -29,7 +29,8 @@ class Cell : public HeapObject {
DECL_PRINTER(Cell) DECL_PRINTER(Cell)
DECL_VERIFIER(Cell) DECL_VERIFIER(Cell)
DEFINE_FIELD_OFFSET_CONSTANTS(HeapObject::kHeaderSize, CELL_FIELDS) DEFINE_FIELD_OFFSET_CONSTANTS(HeapObject::kHeaderSize,
TORQUE_GENERATED_CELL_FIELDS)
typedef FixedBodyDescriptor<kValueOffset, kSize, kSize> BodyDescriptor; typedef FixedBodyDescriptor<kValueOffset, kSize, kSize> BodyDescriptor;
......
...@@ -35,7 +35,8 @@ class DataHandler : public Struct { ...@@ -35,7 +35,8 @@ class DataHandler : public Struct {
DECL_ACCESSORS(data2, MaybeObject) DECL_ACCESSORS(data2, MaybeObject)
DECL_ACCESSORS(data3, MaybeObject) DECL_ACCESSORS(data3, MaybeObject)
DEFINE_FIELD_OFFSET_CONSTANTS(HeapObject::kHeaderSize, DATA_HANDLER_FIELDS) DEFINE_FIELD_OFFSET_CONSTANTS(HeapObject::kHeaderSize,
TORQUE_GENERATED_DATA_HANDLER_FIELDS)
static const int kSizeWithData0 = kData1Offset; static const int kSizeWithData0 = kData1Offset;
static const int kSizeWithData1 = kData2Offset; static const int kSizeWithData1 = kData2Offset;
......
...@@ -99,7 +99,7 @@ class FixedArrayBase : public HeapObject { ...@@ -99,7 +99,7 @@ class FixedArrayBase : public HeapObject {
// Layout description. // Layout description.
DEFINE_FIELD_OFFSET_CONSTANTS(HeapObject::kHeaderSize, DEFINE_FIELD_OFFSET_CONSTANTS(HeapObject::kHeaderSize,
FIXED_ARRAY_BASE_FIELDS) TORQUE_GENERATED_FIXED_ARRAY_BASE_FIELDS)
static const int kHeaderSize = kSize; static const int kHeaderSize = kSize;
...@@ -591,7 +591,7 @@ class FixedTypedArrayBase : public FixedArrayBase { ...@@ -591,7 +591,7 @@ class FixedTypedArrayBase : public FixedArrayBase {
DECL_CAST(FixedTypedArrayBase) DECL_CAST(FixedTypedArrayBase)
DEFINE_FIELD_OFFSET_CONSTANTS(FixedArrayBase::kHeaderSize, DEFINE_FIELD_OFFSET_CONSTANTS(FixedArrayBase::kHeaderSize,
FIXED_TYPED_ARRAY_BASE_FIELDS) TORQUE_GENERATED_FIXED_TYPED_ARRAY_BASE_FIELDS)
static const int kHeaderSize = kSize; static const int kHeaderSize = kSize;
STATIC_ASSERT(IsAligned(kHeaderSize, kDoubleAlignment)); STATIC_ASSERT(IsAligned(kHeaderSize, kDoubleAlignment));
......
...@@ -28,7 +28,8 @@ class Foreign : public HeapObject { ...@@ -28,7 +28,8 @@ class Foreign : public HeapObject {
DECL_PRINTER(Foreign) DECL_PRINTER(Foreign)
DECL_VERIFIER(Foreign) DECL_VERIFIER(Foreign)
DEFINE_FIELD_OFFSET_CONSTANTS(HeapObject::kHeaderSize, FOREIGN_FIELDS) DEFINE_FIELD_OFFSET_CONSTANTS(HeapObject::kHeaderSize,
TORQUE_GENERATED_FOREIGN_FIELDS)
STATIC_ASSERT(IsAligned(kForeignAddressOffset, kSystemPointerSize)); STATIC_ASSERT(IsAligned(kForeignAddressOffset, kSystemPointerSize));
STATIC_ASSERT(kForeignAddressOffset == Internals::kForeignAddressOffset); STATIC_ASSERT(kForeignAddressOffset == Internals::kForeignAddressOffset);
......
...@@ -105,7 +105,8 @@ class JSArray : public JSObject { ...@@ -105,7 +105,8 @@ class JSArray : public JSObject {
// 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;
DEFINE_FIELD_OFFSET_CONSTANTS(JSObject::kHeaderSize, JSARRAY_FIELDS) DEFINE_FIELD_OFFSET_CONSTANTS(JSObject::kHeaderSize,
TORQUE_GENERATED_JSARRAY_FIELDS)
static const int kLengthDescriptorIndex = 0; static const int kLengthDescriptorIndex = 0;
......
...@@ -20,7 +20,8 @@ class JSCollection : public JSObject { ...@@ -20,7 +20,8 @@ class JSCollection : public JSObject {
DECL_ACCESSORS(table, Object) DECL_ACCESSORS(table, Object)
// Layout description. // Layout description.
DEFINE_FIELD_OFFSET_CONSTANTS(JSObject::kHeaderSize, JSCOLLECTION_FIELDS) DEFINE_FIELD_OFFSET_CONSTANTS(JSObject::kHeaderSize,
TORQUE_GENERATED_JSCOLLECTION_FIELDS)
static const int kAddFunctionDescriptorIndex = 3; static const int kAddFunctionDescriptorIndex = 3;
......
...@@ -147,7 +147,7 @@ class AsyncGeneratorRequest : public Struct { ...@@ -147,7 +147,7 @@ class AsyncGeneratorRequest : public Struct {
DECL_ACCESSORS(promise, Object) DECL_ACCESSORS(promise, Object)
DEFINE_FIELD_OFFSET_CONSTANTS(Struct::kHeaderSize, DEFINE_FIELD_OFFSET_CONSTANTS(Struct::kHeaderSize,
ASYNC_GENERATOR_REQUEST_FIELDS) TORQUE_GENERATED_ASYNC_GENERATOR_REQUEST_FIELDS)
DECL_CAST(AsyncGeneratorRequest) DECL_CAST(AsyncGeneratorRequest)
DECL_PRINTER(AsyncGeneratorRequest) DECL_PRINTER(AsyncGeneratorRequest)
......
...@@ -264,7 +264,8 @@ class JSReceiver : public HeapObject { ...@@ -264,7 +264,8 @@ class JSReceiver : public HeapObject {
static const int kHashMask = PropertyArray::HashField::kMask; static const int kHashMask = PropertyArray::HashField::kMask;
DEFINE_FIELD_OFFSET_CONSTANTS(HeapObject::kHeaderSize, JSRECEIVER_FIELDS) DEFINE_FIELD_OFFSET_CONSTANTS(HeapObject::kHeaderSize,
TORQUE_GENERATED_JSRECEIVER_FIELDS)
static const int kHeaderSize = kSize; static const int kHeaderSize = kSize;
bool HasProxyInPrototype(Isolate* isolate); bool HasProxyInPrototype(Isolate* isolate);
...@@ -832,8 +833,9 @@ class JSObject : public JSReceiver { ...@@ -832,8 +833,9 @@ class JSObject : public JSReceiver {
class JSAccessorPropertyDescriptor : public JSObject { class JSAccessorPropertyDescriptor : public JSObject {
public: public:
// Layout description. // Layout description.
DEFINE_FIELD_OFFSET_CONSTANTS(JSObject::kHeaderSize, DEFINE_FIELD_OFFSET_CONSTANTS(
JSACCESSOR_PROPERTY_DESCRIPTOR_FIELDS) JSObject::kHeaderSize,
TORQUE_GENERATED_JSACCESSOR_PROPERTY_DESCRIPTOR_FIELDS)
// Indices of in-object properties. // Indices of in-object properties.
static const int kGetIndex = 0; static const int kGetIndex = 0;
...@@ -936,7 +938,8 @@ class JSBoundFunction : public JSObject { ...@@ -936,7 +938,8 @@ class JSBoundFunction : public JSObject {
static Handle<String> ToString(Handle<JSBoundFunction> function); static Handle<String> ToString(Handle<JSBoundFunction> function);
// Layout description. // Layout description.
DEFINE_FIELD_OFFSET_CONSTANTS(JSObject::kHeaderSize, JSBOUND_FUNCTION_FIELDS) DEFINE_FIELD_OFFSET_CONSTANTS(JSObject::kHeaderSize,
TORQUE_GENERATED_JSBOUND_FUNCTION_FIELDS)
OBJECT_CONSTRUCTORS(JSBoundFunction, JSObject); OBJECT_CONSTRUCTORS(JSBoundFunction, JSObject);
}; };
...@@ -1126,7 +1129,8 @@ class JSFunction : public JSObject { ...@@ -1126,7 +1129,8 @@ class JSFunction : public JSObject {
// ES6 section 19.2.3.5 Function.prototype.toString ( ). // ES6 section 19.2.3.5 Function.prototype.toString ( ).
static Handle<String> ToString(Handle<JSFunction> function); static Handle<String> ToString(Handle<JSFunction> function);
DEFINE_FIELD_OFFSET_CONSTANTS(JSObject::kHeaderSize, JSFUNCTION_FIELDS) DEFINE_FIELD_OFFSET_CONSTANTS(JSObject::kHeaderSize,
TORQUE_GENERATED_JSFUNCTION_FIELDS)
static constexpr int kSizeWithoutPrototype = kPrototypeOrInitialMapOffset; static constexpr int kSizeWithoutPrototype = kPrototypeOrInitialMapOffset;
static constexpr int kSizeWithPrototype = kSize; static constexpr int kSizeWithPrototype = kSize;
...@@ -1159,7 +1163,8 @@ class JSGlobalProxy : public JSObject { ...@@ -1159,7 +1163,8 @@ class JSGlobalProxy : public JSObject {
DECL_VERIFIER(JSGlobalProxy) DECL_VERIFIER(JSGlobalProxy)
// Layout description. // Layout description.
DEFINE_FIELD_OFFSET_CONSTANTS(JSObject::kHeaderSize, JSGLOBAL_PROXY_FIELDS) DEFINE_FIELD_OFFSET_CONSTANTS(JSObject::kHeaderSize,
TORQUE_GENERATED_JSGLOBAL_PROXY_FIELDS)
OBJECT_CONSTRUCTORS(JSGlobalProxy, JSObject); OBJECT_CONSTRUCTORS(JSGlobalProxy, JSObject);
}; };
...@@ -1219,7 +1224,8 @@ class JSValue : public JSObject { ...@@ -1219,7 +1224,8 @@ class JSValue : public JSObject {
DECL_VERIFIER(JSValue) DECL_VERIFIER(JSValue)
// Layout description. // Layout description.
DEFINE_FIELD_OFFSET_CONSTANTS(JSObject::kHeaderSize, JSVALUE_FIELDS) DEFINE_FIELD_OFFSET_CONSTANTS(JSObject::kHeaderSize,
TORQUE_GENERATED_JSVALUE_FIELDS)
OBJECT_CONSTRUCTORS(JSValue, JSObject); OBJECT_CONSTRUCTORS(JSValue, JSObject);
}; };
......
...@@ -68,7 +68,8 @@ class JSPromise : public JSObject { ...@@ -68,7 +68,8 @@ class JSPromise : public JSObject {
DECL_PRINTER(JSPromise) DECL_PRINTER(JSPromise)
DECL_VERIFIER(JSPromise) DECL_VERIFIER(JSPromise)
DEFINE_FIELD_OFFSET_CONSTANTS(JSObject::kHeaderSize, JSPROMISE_FIELDS) DEFINE_FIELD_OFFSET_CONSTANTS(JSObject::kHeaderSize,
TORQUE_GENERATED_JSPROMISE_FIELDS)
static const int kSizeWithEmbedderFields = static const int kSizeWithEmbedderFields =
kSize + v8::Promise::kEmbedderFieldCount * kEmbedderDataSlotSize; kSize + v8::Promise::kEmbedderFieldCount * kEmbedderDataSlotSize;
......
...@@ -106,7 +106,8 @@ class JSProxy : public JSReceiver { ...@@ -106,7 +106,8 @@ class JSProxy : public JSReceiver {
static const int kMaxIterationLimit = 100 * 1024; static const int kMaxIterationLimit = 100 * 1024;
// Layout description. // Layout description.
DEFINE_FIELD_OFFSET_CONSTANTS(JSReceiver::kHeaderSize, JSPROXY_FIELDS) DEFINE_FIELD_OFFSET_CONSTANTS(JSReceiver::kHeaderSize,
TORQUE_GENERATED_JSPROXY_FIELDS)
// kTargetOffset aliases with the elements of JSObject. The fact that // kTargetOffset aliases with the elements of JSObject. The fact that
// JSProxy::target is a Javascript value which cannot be confused with an // JSProxy::target is a Javascript value which cannot be confused with an
...@@ -132,8 +133,8 @@ class JSProxy : public JSReceiver { ...@@ -132,8 +133,8 @@ class JSProxy : public JSReceiver {
class JSProxyRevocableResult : public JSObject { class JSProxyRevocableResult : public JSObject {
public: public:
// Layout description. // Layout description.
DEFINE_FIELD_OFFSET_CONSTANTS(JSObject::kHeaderSize, DEFINE_FIELD_OFFSET_CONSTANTS(
JSPROXY_REVOCABLE_RESULT_FIELDS) JSObject::kHeaderSize, TORQUE_GENERATED_JSPROXY_REVOCABLE_RESULT_FIELDS)
// Indices of in-object properties. // Indices of in-object properties.
static const int kProxyIndex = 0; static const int kProxyIndex = 0;
......
...@@ -68,8 +68,9 @@ class ArrayBoilerplateDescription : public Struct { ...@@ -68,8 +68,9 @@ class ArrayBoilerplateDescription : public Struct {
DECL_VERIFIER(ArrayBoilerplateDescription) DECL_VERIFIER(ArrayBoilerplateDescription)
void BriefPrintDetails(std::ostream& os); void BriefPrintDetails(std::ostream& os);
DEFINE_FIELD_OFFSET_CONSTANTS(HeapObject::kHeaderSize, DEFINE_FIELD_OFFSET_CONSTANTS(
ARRAY_BOILERPLATE_DESCRIPTION_FIELDS) HeapObject::kHeaderSize,
TORQUE_GENERATED_ARRAY_BOILERPLATE_DESCRIPTION_FIELDS)
private: private:
DECL_INT_ACCESSORS(flags) DECL_INT_ACCESSORS(flags)
......
...@@ -34,7 +34,8 @@ class CallbackTask : public Microtask { ...@@ -34,7 +34,8 @@ class CallbackTask : public Microtask {
DECL_ACCESSORS(callback, Foreign) DECL_ACCESSORS(callback, Foreign)
DECL_ACCESSORS(data, Foreign) DECL_ACCESSORS(data, Foreign)
DEFINE_FIELD_OFFSET_CONSTANTS(Microtask::kHeaderSize, CALLBACK_TASK_FIELDS) DEFINE_FIELD_OFFSET_CONSTANTS(Microtask::kHeaderSize,
TORQUE_GENERATED_CALLBACK_TASK_FIELDS)
// Dispatched behavior. // Dispatched behavior.
DECL_CAST(CallbackTask) DECL_CAST(CallbackTask)
...@@ -52,7 +53,8 @@ class CallableTask : public Microtask { ...@@ -52,7 +53,8 @@ class CallableTask : public Microtask {
DECL_ACCESSORS(callable, JSReceiver) DECL_ACCESSORS(callable, JSReceiver)
DECL_ACCESSORS(context, Context) DECL_ACCESSORS(context, Context)
DEFINE_FIELD_OFFSET_CONSTANTS(Microtask::kHeaderSize, CALLABLE_TASK_FIELDS) DEFINE_FIELD_OFFSET_CONSTANTS(Microtask::kHeaderSize,
TORQUE_GENERATED_CALLABLE_TASK_FIELDS)
// Dispatched behavior. // Dispatched behavior.
DECL_CAST(CallableTask) DECL_CAST(CallableTask)
......
...@@ -333,7 +333,8 @@ class ModuleInfoEntry : public Struct { ...@@ -333,7 +333,8 @@ class ModuleInfoEntry : public Struct {
int module_request, int cell_index, int module_request, int cell_index,
int beg_pos, int end_pos); int beg_pos, int end_pos);
DEFINE_FIELD_OFFSET_CONSTANTS(Struct::kHeaderSize, MODULE_INFO_ENTRY_FIELDS) DEFINE_FIELD_OFFSET_CONSTANTS(Struct::kHeaderSize,
TORQUE_GENERATED_MODULE_INFO_ENTRY_FIELDS)
OBJECT_CONSTRUCTORS(ModuleInfoEntry, Struct); OBJECT_CONSTRUCTORS(ModuleInfoEntry, Struct);
}; };
......
...@@ -111,7 +111,8 @@ class PromiseCapability : public Struct { ...@@ -111,7 +111,8 @@ class PromiseCapability : public Struct {
DECL_ACCESSORS(resolve, Object) DECL_ACCESSORS(resolve, Object)
DECL_ACCESSORS(reject, Object) DECL_ACCESSORS(reject, Object)
DEFINE_FIELD_OFFSET_CONSTANTS(Struct::kHeaderSize, PROMISE_CAPABILITY_FIELDS) DEFINE_FIELD_OFFSET_CONSTANTS(Struct::kHeaderSize,
TORQUE_GENERATED_PROMISE_CAPABILITY_FIELDS)
// Dispatched behavior. // Dispatched behavior.
DECL_CAST(PromiseCapability) DECL_CAST(PromiseCapability)
...@@ -149,7 +150,8 @@ class PromiseReaction : public Struct { ...@@ -149,7 +150,8 @@ class PromiseReaction : public Struct {
// a PromiseCapability (general case), or undefined (in case of await). // a PromiseCapability (general case), or undefined (in case of await).
DECL_ACCESSORS(promise_or_capability, HeapObject) DECL_ACCESSORS(promise_or_capability, HeapObject)
DEFINE_FIELD_OFFSET_CONSTANTS(Struct::kHeaderSize, PROMISE_REACTION_FIELDS) DEFINE_FIELD_OFFSET_CONSTANTS(Struct::kHeaderSize,
TORQUE_GENERATED_PROMISE_REACTION_FIELDS)
// Dispatched behavior. // Dispatched behavior.
DECL_CAST(PromiseReaction) DECL_CAST(PromiseReaction)
......
...@@ -660,7 +660,7 @@ class SharedFunctionInfo : public HeapObject { ...@@ -660,7 +660,7 @@ class SharedFunctionInfo : public HeapObject {
STATIC_ASSERT(kMaximumFunctionTokenOffset + 1 == kFunctionTokenOutOfRange); STATIC_ASSERT(kMaximumFunctionTokenOffset + 1 == kFunctionTokenOutOfRange);
DEFINE_FIELD_OFFSET_CONSTANTS(HeapObject::kHeaderSize, DEFINE_FIELD_OFFSET_CONSTANTS(HeapObject::kHeaderSize,
SHARED_FUNCTION_INFO_FIELDS) TORQUE_GENERATED_SHARED_FUNCTION_INFO_FIELDS)
static const int kAlignedSize = POINTER_SIZE_ALIGN(kSize); static const int kAlignedSize = POINTER_SIZE_ALIGN(kSize);
...@@ -746,8 +746,9 @@ class SharedFunctionInfoWithID : public SharedFunctionInfo { ...@@ -746,8 +746,9 @@ class SharedFunctionInfoWithID : public SharedFunctionInfo {
DECL_CAST(SharedFunctionInfoWithID) DECL_CAST(SharedFunctionInfoWithID)
DEFINE_FIELD_OFFSET_CONSTANTS(SharedFunctionInfo::kSize, DEFINE_FIELD_OFFSET_CONSTANTS(
SHARED_FUNCTION_INFO_WITH_ID_FIELDS) SharedFunctionInfo::kSize,
TORQUE_GENERATED_SHARED_FUNCTION_INFO_WITH_ID_FIELDS)
static const int kAlignedSize = POINTER_SIZE_ALIGN(kSize); static const int kAlignedSize = POINTER_SIZE_ALIGN(kSize);
......
...@@ -36,7 +36,8 @@ class StackFrameInfo : public Struct { ...@@ -36,7 +36,8 @@ class StackFrameInfo : public Struct {
DECL_PRINTER(StackFrameInfo) DECL_PRINTER(StackFrameInfo)
DECL_VERIFIER(StackFrameInfo) DECL_VERIFIER(StackFrameInfo)
DEFINE_FIELD_OFFSET_CONSTANTS(Struct::kHeaderSize, STACK_FRAME_INFO_FIELDS) DEFINE_FIELD_OFFSET_CONSTANTS(Struct::kHeaderSize,
TORQUE_GENERATED_STACK_FRAME_INFO_FIELDS)
private: private:
// Bit position in the flag, from least significant bit position. // Bit position in the flag, from least significant bit position.
......
...@@ -39,8 +39,8 @@ class Tuple2 : public Struct { ...@@ -39,8 +39,8 @@ class Tuple2 : public Struct {
DECL_VERIFIER(Tuple2) DECL_VERIFIER(Tuple2)
void BriefPrintDetails(std::ostream& os); void BriefPrintDetails(std::ostream& os);
DEFINE_FIELD_OFFSET_CONSTANTS(HeapObject::kHeaderSize,
DEFINE_FIELD_OFFSET_CONSTANTS(HeapObject::kHeaderSize, TUPLE2_FIELDS) TORQUE_GENERATED_TUPLE2_FIELDS)
OBJECT_CONSTRUCTORS(Tuple2, Struct); OBJECT_CONSTRUCTORS(Tuple2, Struct);
}; };
...@@ -56,7 +56,7 @@ class Tuple3 : public Tuple2 { ...@@ -56,7 +56,7 @@ class Tuple3 : public Tuple2 {
DECL_VERIFIER(Tuple3) DECL_VERIFIER(Tuple3)
void BriefPrintDetails(std::ostream& os); void BriefPrintDetails(std::ostream& os);
DEFINE_FIELD_OFFSET_CONSTANTS(Tuple2::kSize, TUPLE3_FIELDS) DEFINE_FIELD_OFFSET_CONSTANTS(Tuple2::kSize, TORQUE_GENERATED_TUPLE3_FIELDS)
OBJECT_CONSTRUCTORS(Tuple3, Tuple2); OBJECT_CONSTRUCTORS(Tuple3, Tuple2);
}; };
...@@ -118,7 +118,8 @@ class ClassPositions : public Struct { ...@@ -118,7 +118,8 @@ class ClassPositions : public Struct {
DECL_VERIFIER(ClassPositions) DECL_VERIFIER(ClassPositions)
void BriefPrintDetails(std::ostream& os); void BriefPrintDetails(std::ostream& os);
DEFINE_FIELD_OFFSET_CONSTANTS(HeapObject::kHeaderSize, CLASS_POSITIONS_FIELDS) DEFINE_FIELD_OFFSET_CONSTANTS(HeapObject::kHeaderSize,
TORQUE_GENERATED_CLASS_POSITIONS_FIELDS)
OBJECT_CONSTRUCTORS(ClassPositions, Struct); OBJECT_CONSTRUCTORS(ClassPositions, Struct);
}; };
......
...@@ -166,7 +166,7 @@ void ImplementationVisitor::Visit(TypeAlias* alias) { ...@@ -166,7 +166,7 @@ void ImplementationVisitor::Visit(TypeAlias* alias) {
<< class_name << " {\n"; << class_name << " {\n";
header_out() << " public:\n"; header_out() << " public:\n";
header_out() << " DEFINE_FIELD_OFFSET_CONSTANTS(" << class_name header_out() << " DEFINE_FIELD_OFFSET_CONSTANTS(" << class_name
<< "::kSize, " << "::kSize, TORQUE_GENERATED_"
<< CapifyStringWithUnderscores(class_type->name()) << CapifyStringWithUnderscores(class_type->name())
<< "_FIELDS)\n"; << "_FIELDS)\n";
header_out() << " };\n"; header_out() << " };\n";
...@@ -2247,7 +2247,7 @@ VisitResult ImplementationVisitor::Visit(CallMethodExpression* expr) { ...@@ -2247,7 +2247,7 @@ VisitResult ImplementationVisitor::Visit(CallMethodExpression* expr) {
DCHECK_EQ(expr->method->namespace_qualification.size(), 0); DCHECK_EQ(expr->method->namespace_qualification.size(), 0);
QualifiedName qualified_name = QualifiedName(method_name); QualifiedName qualified_name = QualifiedName(method_name);
Callable* callable = nullptr; Callable* callable = nullptr;
callable = LookupMethod(method_name, target, arguments, {}); callable = LookupMethod(method_name, target, arguments, {});
return scope.Yield(GenerateCall(callable, target, arguments, {}, false)); return scope.Yield(GenerateCall(callable, target, arguments, {}, false));
} }
...@@ -2646,7 +2646,8 @@ void ImplementationVisitor::GenerateClassDefinitions(std::string& file_name) { ...@@ -2646,7 +2646,8 @@ void ImplementationVisitor::GenerateClassDefinitions(std::string& file_name) {
// currently just serves to additionally obfuscate where these values come // currently just serves to additionally obfuscate where these values come
// from. // from.
new_contents_stream << "#define "; new_contents_stream << "#define ";
new_contents_stream << CapifyStringWithUnderscores(i.first) new_contents_stream << "TORQUE_GENERATED_"
<< CapifyStringWithUnderscores(i.first)
<< "_FIELDS(V) \\\n"; << "_FIELDS(V) \\\n";
std::vector<Field> fields = type->fields(); std::vector<Field> fields = type->fields();
FieldSectionType section = FieldSectionType::kNoSection; FieldSectionType section = FieldSectionType::kNoSection;
......
...@@ -758,7 +758,8 @@ class WasmExceptionTag : public Struct { ...@@ -758,7 +758,8 @@ class WasmExceptionTag : public Struct {
DECL_PRINTER(WasmExceptionTag) DECL_PRINTER(WasmExceptionTag)
DECL_VERIFIER(WasmExceptionTag) DECL_VERIFIER(WasmExceptionTag)
DEFINE_FIELD_OFFSET_CONSTANTS(Struct::kHeaderSize, WASM_EXCEPTION_TAG_FIELDS) DEFINE_FIELD_OFFSET_CONSTANTS(Struct::kHeaderSize,
TORQUE_GENERATED_WASM_EXCEPTION_TAG_FIELDS)
OBJECT_CONSTRUCTORS(WasmExceptionTag, Struct); OBJECT_CONSTRUCTORS(WasmExceptionTag, Struct);
}; };
......
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