[vm] Cleanup unused UntaggedPcDescriptors::kBSSRelocation
TEST=ci Change-Id: Ifd926f3bd3630b80c9659dbe60892c3c229bf838 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/510400 Reviewed-by: Ryan Macnak <rmacnak@google.com> Commit-Queue: Alexander Markov <alexmarkov@google.com>
This commit is contained in:
committed by
dart-scoped@luci-project-accounts.iam.gserviceaccount.com
parent
ea50ec6486
commit
e043a7453e
@@ -40,7 +40,6 @@ void DescriptorList::AddDescriptor(UntaggedPcDescriptors::Kind kind,
|
||||
RELEASE_ASSERT(yield_index != 0);
|
||||
|
||||
ASSERT((kind == UntaggedPcDescriptors::kRuntimeCall) ||
|
||||
(kind == UntaggedPcDescriptors::kBSSRelocation) ||
|
||||
(kind == UntaggedPcDescriptors::kOther) ||
|
||||
(yield_index != UntaggedPcDescriptors::kInvalidYieldIndex) ||
|
||||
(deopt_id != DeoptId::kNone));
|
||||
@@ -48,8 +47,7 @@ void DescriptorList::AddDescriptor(UntaggedPcDescriptors::Kind kind,
|
||||
// When precompiling, we only use pc descriptors for exceptions,
|
||||
// relocations and yield indices.
|
||||
if (!FLAG_precompiled_mode || try_index != -1 ||
|
||||
yield_index != UntaggedPcDescriptors::kInvalidYieldIndex ||
|
||||
kind == UntaggedPcDescriptors::kBSSRelocation) {
|
||||
yield_index != UntaggedPcDescriptors::kInvalidYieldIndex) {
|
||||
const int32_t kind_and_metadata =
|
||||
UntaggedPcDescriptors::KindAndMetadata::Encode(kind, try_index,
|
||||
yield_index);
|
||||
|
||||
@@ -867,10 +867,6 @@ void ImageWriter::WriteText(bool vm) {
|
||||
FrameUnwindPrologue();
|
||||
#endif
|
||||
|
||||
#if defined(DART_PRECOMPILER)
|
||||
PcDescriptors& descriptors = PcDescriptors::Handle(zone_);
|
||||
#endif
|
||||
|
||||
// We don't expect more than 64 bytes of padding.
|
||||
uint8_t padding_bytes[64];
|
||||
memset(&padding_bytes[0], 0, sizeof(padding_bytes));
|
||||
@@ -959,34 +955,7 @@ void ImageWriter::WriteText(bool vm) {
|
||||
// target-sized words starting from that address.
|
||||
ASSERT(Utils::IsAligned(payload_start, compiler::target::kWordSize));
|
||||
const uword payload_size = insns.Size();
|
||||
auto const payload_end = payload_start + payload_size;
|
||||
auto cursor = payload_start;
|
||||
#if defined(DART_PRECOMPILER)
|
||||
descriptors = code.pc_descriptors();
|
||||
PcDescriptors::Iterator iterator(
|
||||
descriptors, /*kind_mask=*/UntaggedPcDescriptors::kBSSRelocation);
|
||||
while (iterator.MoveNext()) {
|
||||
// We only generate BSS relocations in the precompiler.
|
||||
ASSERT(FLAG_precompiled_mode);
|
||||
auto const next_reloc_offset = iterator.PcOffset();
|
||||
auto const next_reloc_address = payload_start + next_reloc_offset;
|
||||
// We only generate BSS relocations that are target word-sized and at
|
||||
// target word-aligned offsets in the payload. Double-check this.
|
||||
ASSERT(
|
||||
Utils::IsAligned(next_reloc_address, compiler::target::kWordSize));
|
||||
text_offset += WriteBytes(cursor, next_reloc_address - cursor);
|
||||
|
||||
// The instruction stream at the relocation position holds the target
|
||||
// offset into the BSS section.
|
||||
const auto target_offset =
|
||||
*reinterpret_cast<const compiler::target::word*>(
|
||||
next_reloc_address);
|
||||
text_offset += Relocation(text_offset, instructions_label, text_offset,
|
||||
bss_label, target_offset);
|
||||
cursor = next_reloc_address + compiler::target::kWordSize;
|
||||
}
|
||||
#endif
|
||||
text_offset += WriteBytes(cursor, payload_end - cursor);
|
||||
text_offset += WriteBytes(payload_start, payload_size);
|
||||
}
|
||||
|
||||
// 4. Add appropriate padding. Note we can't simply copy from the object
|
||||
|
||||
@@ -16326,8 +16326,6 @@ const char* PcDescriptors::KindAsStr(UntaggedPcDescriptors::Kind kind) {
|
||||
return "osr-entry";
|
||||
case UntaggedPcDescriptors::kRewind:
|
||||
return "rewind";
|
||||
case UntaggedPcDescriptors::kBSSRelocation:
|
||||
return "bss reloc";
|
||||
case UntaggedPcDescriptors::kOther:
|
||||
return "other";
|
||||
case UntaggedPcDescriptors::kAnyKind:
|
||||
|
||||
@@ -2260,9 +2260,7 @@ class UntaggedPcDescriptors : public UntaggedObject {
|
||||
V(OsrEntry, kRuntimeCall << 1) \
|
||||
/* Call rewind target address. */ \
|
||||
V(Rewind, kOsrEntry << 1) \
|
||||
/* Target-word-size relocation. */ \
|
||||
V(BSSRelocation, kRewind << 1) \
|
||||
V(Other, kBSSRelocation << 1) \
|
||||
V(Other, kRewind << 1) \
|
||||
V(AnyKind, -1)
|
||||
|
||||
enum Kind {
|
||||
|
||||
Reference in New Issue
Block a user