Commit 867a2040 authored by Seth Brenith's avatar Seth Brenith Committed by Commit Bot

[torque] Check pointer size when generating debug helper code

This fixes an issue found by the upcoming change that verifies a match
between 32-bit Torque output from a 32-bit build and 32-bit output from
a 64-bit build: https://crrev.com/c/v8/v8/+/1998078 . 32-bit output
never needs to deal with pointer compression.

Bug: v8:10124

Change-Id: I0e04728dafc4118a8816a3afa98651dddea7a574
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2001460Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#65962}
parent 534482b3
......@@ -137,7 +137,8 @@ class DebugFieldType {
return "";
}
if (IsTagged()) {
if (storage == kAsStoredInHeap && COMPRESS_POINTERS_BOOL) {
if (storage == kAsStoredInHeap &&
TargetArchitecture::ArePointersCompressed()) {
return "v8::internal::TaggedValue";
}
base::Optional<const ClassType*> field_class_type =
......
......@@ -102,6 +102,7 @@ class TargetArchitecture : public ContextualClass<TargetArchitecture> {
static size_t TaggedSize() { return Get().tagged_size_; }
static size_t RawPtrSize() { return Get().raw_ptr_size_; }
static size_t MaxHeapAlignment() { return TaggedSize(); }
static bool ArePointersCompressed() { return TaggedSize() < RawPtrSize(); }
private:
const size_t tagged_size_;
......
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