6405 {
6406 if (next_offset_ >= maps_.payload_size()) {
6407 return false;
6408 }
6409
6410 NoSafepointScope scope;
6411 ReadStream
stream(maps_.data(), maps_.payload_size(), next_offset_);
6412
6413 auto const pc_delta =
stream.ReadLEB128();
6415 current_pc_offset_ += pc_delta;
6416
6417
6418
6419
6420
6421
6422 if (maps_.UsesGlobalTable()) {
6423 current_global_table_offset_ =
stream.ReadLEB128();
6424 ASSERT(current_global_table_offset_ < bits_container_.payload_size());
6425
6426
6427
6428
6429
6430 current_spill_slot_bit_count_ = -1;
6431 current_non_spill_slot_bit_count_ = -1;
6432 current_bits_offset_ = -1;
6433
6434 next_offset_ =
stream.Position();
6435 } else {
6436 current_spill_slot_bit_count_ =
stream.ReadLEB128();
6437 ASSERT(current_spill_slot_bit_count_ >= 0);
6438
6439 current_non_spill_slot_bit_count_ =
stream.ReadLEB128();
6440 ASSERT(current_non_spill_slot_bit_count_ >= 0);
6441
6442 const auto stackmap_bits =
6443 current_spill_slot_bit_count_ + current_non_spill_slot_bit_count_;
6444 const uintptr_t stackmap_size =
6446 ASSERT(stackmap_size <= (maps_.payload_size() -
stream.Position()));
6447
6448 current_bits_offset_ =
stream.Position();
6449 next_offset_ = current_bits_offset_ + stackmap_size;
6450 }
6451
6452 return true;
6453 }
static constexpr T RoundUp(T x, uintptr_t alignment, uintptr_t offset=0)
constexpr uint32_t kMaxUint32