Revert "[vm] Switch datastream Write/WriteUnsigned to (S)LEB128."

This reverts commit 80102c981b.

Reason for revert: b/186359854

Original change's description:
> [vm] Switch datastream Write/WriteUnsigned to (S)LEB128.
>
> This reduces the number of variable-length integer encodings in our
> database from 2 to 1, and chooses the more standard one.
>
> TEST=Existing tests, in particular any that involve snapshots.
>
> Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-asan-linux-release-x64-try,vm-kernel-precomp-dwarf-linux-product-x64-try,vm-kernel-precomp-msan-linux-release-x64-try,vm-kernel-precomp-ubsan-linux-release-x64-try,vm-kernel-precomp-tsan-linux-release-x64-try,vm-kernel-precomp-nnbd-linux-debug-x64-try,vm-kernel-precomp-nnbd-linux-debug-simarm_x64-try,vm-kernel-precomp-linux-debug-simarm64c-try,vm-kernel-precomp-linux-debug-simarm_x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-debug-x64c-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-linux-release-x64-try
> Change-Id: Ia700158ac873ad32ac28c1027a669895961bc715
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196321
> Commit-Queue: Tess Strickland <sstrickl@google.com>
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: Idf32bdd879cf8bb7407f6dae764312140ad6eeb2
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-asan-linux-release-x64-try,vm-kernel-precomp-dwarf-linux-product-x64-try,vm-kernel-precomp-msan-linux-release-x64-try,vm-kernel-precomp-ubsan-linux-release-x64-try,vm-kernel-precomp-tsan-linux-release-x64-try,vm-kernel-precomp-nnbd-linux-debug-x64-try,vm-kernel-precomp-nnbd-linux-debug-simarm_x64-try,vm-kernel-precomp-linux-debug-simarm64c-try,vm-kernel-precomp-linux-debug-simarm_x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-debug-x64c-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196920
Reviewed-by: Ivan Inozemtsev <iinozemtsev@google.com>
Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>
This commit is contained in:
Ivan Inozemtsev
2021-04-26 07:52:47 +00:00
committed by commit-bot@chromium.org
parent 50de84a3fb
commit a5ff656da1
14 changed files with 251 additions and 187 deletions
+6 -6
View File
@@ -14667,7 +14667,7 @@ bool CompressedStackMaps::Iterator::MoveNext() {
NoSafepointScope scope;
ReadStream stream(maps_.untag()->data(), maps_.payload_size(), next_offset_);
auto const pc_delta = stream.ReadUnsigned();
auto const pc_delta = stream.ReadLEB128();
ASSERT(pc_delta <= (kMaxUint32 - current_pc_offset_));
current_pc_offset_ += pc_delta;
@@ -14675,7 +14675,7 @@ bool CompressedStackMaps::Iterator::MoveNext() {
// the post-delta part of inlined entries has the same information as
// global table entries.
if (maps_.UsesGlobalTable()) {
current_global_table_offset_ = stream.ReadUnsigned();
current_global_table_offset_ = stream.ReadLEB128();
ASSERT(current_global_table_offset_ < bits_container_.payload_size());
// Since generally we only use entries in the GC and the GC only needs
@@ -14688,10 +14688,10 @@ bool CompressedStackMaps::Iterator::MoveNext() {
next_offset_ = stream.Position();
} else {
current_spill_slot_bit_count_ = stream.ReadUnsigned();
current_spill_slot_bit_count_ = stream.ReadLEB128();
ASSERT(current_spill_slot_bit_count_ >= 0);
current_non_spill_slot_bit_count_ = stream.ReadUnsigned();
current_non_spill_slot_bit_count_ = stream.ReadLEB128();
ASSERT(current_non_spill_slot_bit_count_ >= 0);
const auto stackmap_bits =
@@ -14737,10 +14737,10 @@ void CompressedStackMaps::Iterator::LazyLoadGlobalTableEntry() const {
bits_container_.payload_size(),
current_global_table_offset_);
current_spill_slot_bit_count_ = stream.ReadUnsigned();
current_spill_slot_bit_count_ = stream.ReadLEB128();
ASSERT(current_spill_slot_bit_count_ >= 0);
current_non_spill_slot_bit_count_ = stream.ReadUnsigned();
current_non_spill_slot_bit_count_ = stream.ReadLEB128();
ASSERT(current_non_spill_slot_bit_count_ >= 0);
const auto stackmap_bits = Length();