[wasm] Reorder WasmInstanceObject fields for alignment
While pointer-compression still doesn't guarantee 8-byte alignment for objects, the WasmInstanceObject definition should be prepared for a future where that changes. No behavioral differences are expected from this, and likely no performance differences for now either. Change-Id: Iedd85f4361d45e1e3cf5d645496b9ad34acf533b Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3038527 Commit-Queue: Jakob Kummerow <jkummerow@chromium.org> Auto-Submit: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#75855}
This commit is contained in:
parent
9a12f2736b
commit
da63900c50
@ -389,27 +389,36 @@ class V8_EXPORT_PRIVATE WasmInstanceObject : public JSObject {
|
||||
// Layout description.
|
||||
#define WASM_INSTANCE_OBJECT_FIELDS(V) \
|
||||
/* Often-accessed fields go first to minimize generated code size. */ \
|
||||
/* Less than system pointer sized fields come first. */ \
|
||||
V(kImportedFunctionRefsOffset, kTaggedSize) \
|
||||
V(kIndirectFunctionTableRefsOffset, kTaggedSize) \
|
||||
V(kIndirectFunctionTableSizeOffset, kUInt32Size) \
|
||||
/* Optional padding to align system pointer size fields */ \
|
||||
V(kOptionalPaddingOffset, POINTER_SIZE_PADDING(kOptionalPaddingOffset)) \
|
||||
V(kMemoryStartOffset, kSystemPointerSize) \
|
||||
V(kMemorySizeOffset, kSizetSize) \
|
||||
V(kMemoryMaskOffset, kSizetSize) \
|
||||
V(kStackLimitAddressOffset, kSystemPointerSize) \
|
||||
V(kImportedFunctionRefsOffset, kTaggedSize) \
|
||||
V(kImportedFunctionTargetsOffset, kSystemPointerSize) \
|
||||
V(kIndirectFunctionTableRefsOffset, kTaggedSize) \
|
||||
V(kIndirectFunctionTableTargetsOffset, kSystemPointerSize) \
|
||||
V(kIndirectFunctionTableSigIdsOffset, kSystemPointerSize) \
|
||||
V(kIndirectFunctionTableSizeOffset, kUInt32Size) \
|
||||
/* Optional padding to align system pointer size fields */ \
|
||||
V(kOptionalPaddingOffset, POINTER_SIZE_PADDING(kOptionalPaddingOffset)) \
|
||||
V(kGlobalsStartOffset, kSystemPointerSize) \
|
||||
V(kImportedMutableGlobalsOffset, kSystemPointerSize) \
|
||||
V(kIsolateRootOffset, kSystemPointerSize) \
|
||||
V(kJumpTableStartOffset, kSystemPointerSize) \
|
||||
/* End of often-accessed fields. */ \
|
||||
/* Continue with system pointer size fields to maintain alignment. */ \
|
||||
V(kNewAllocationLimitAddressOffset, kSystemPointerSize) \
|
||||
V(kNewAllocationTopAddressOffset, kSystemPointerSize) \
|
||||
V(kOldAllocationLimitAddressOffset, kSystemPointerSize) \
|
||||
V(kOldAllocationTopAddressOffset, kSystemPointerSize) \
|
||||
V(kRealStackLimitAddressOffset, kSystemPointerSize) \
|
||||
V(kDataSegmentStartsOffset, kSystemPointerSize) \
|
||||
V(kDataSegmentSizesOffset, kSystemPointerSize) \
|
||||
V(kDroppedElemSegmentsOffset, kSystemPointerSize) \
|
||||
V(kHookOnFunctionCallAddressOffset, kSystemPointerSize) \
|
||||
V(kNumLiftoffFunctionCallsArrayOffset, kSystemPointerSize) \
|
||||
/* Less than system pointer size aligned fields are below. */ \
|
||||
V(kModuleObjectOffset, kTaggedSize) \
|
||||
V(kExportsObjectOffset, kTaggedSize) \
|
||||
V(kNativeContextOffset, kTaggedSize) \
|
||||
@ -423,12 +432,6 @@ class V8_EXPORT_PRIVATE WasmInstanceObject : public JSObject {
|
||||
V(kExceptionsTableOffset, kTaggedSize) \
|
||||
V(kWasmExternalFunctionsOffset, kTaggedSize) \
|
||||
V(kManagedObjectMapsOffset, kTaggedSize) \
|
||||
V(kRealStackLimitAddressOffset, kSystemPointerSize) \
|
||||
V(kDataSegmentStartsOffset, kSystemPointerSize) \
|
||||
V(kDataSegmentSizesOffset, kSystemPointerSize) \
|
||||
V(kDroppedElemSegmentsOffset, kSystemPointerSize) \
|
||||
V(kHookOnFunctionCallAddressOffset, kSystemPointerSize) \
|
||||
V(kNumLiftoffFunctionCallsArrayOffset, kSystemPointerSize) \
|
||||
V(kBreakOnEntryOffset, kUInt8Size) \
|
||||
/* More padding to make the header pointer-size aligned */ \
|
||||
V(kHeaderPaddingOffset, POINTER_SIZE_PADDING(kHeaderPaddingOffset)) \
|
||||
|
Loading…
Reference in New Issue
Block a user