6378 {
6379 if (next_offset_ >= maps_.payload_size()) {
6380 return false;
6381 }
6382
6383 NoSafepointScope scope;
6384 ReadStream
stream(maps_.data(), maps_.payload_size(), next_offset_);
6385
6386 auto const pc_delta =
stream.ReadLEB128();
6388 current_pc_offset_ += pc_delta;
6389
6390
6391
6392
6393
6394
6395 if (maps_.UsesGlobalTable()) {
6396 current_global_table_offset_ =
stream.ReadLEB128();
6397 ASSERT(current_global_table_offset_ < bits_container_.payload_size());
6398
6399
6400
6401
6402
6403 current_spill_slot_bit_count_ = -1;
6404 current_non_spill_slot_bit_count_ = -1;
6405 current_bits_offset_ = -1;
6406
6407 next_offset_ =
stream.Position();
6408 } else {
6409 current_spill_slot_bit_count_ =
stream.ReadLEB128();
6410 ASSERT(current_spill_slot_bit_count_ >= 0);
6411
6412 current_non_spill_slot_bit_count_ =
stream.ReadLEB128();
6413 ASSERT(current_non_spill_slot_bit_count_ >= 0);
6414
6415 const auto stackmap_bits =
6416 current_spill_slot_bit_count_ + current_non_spill_slot_bit_count_;
6417 const uintptr_t stackmap_size =
6419 ASSERT(stackmap_size <= (maps_.payload_size() -
stream.Position()));
6420
6421 current_bits_offset_ =
stream.Position();
6422 next_offset_ = current_bits_offset_ + stackmap_size;
6423 }
6424
6425 return true;
6426 }
static constexpr T RoundUp(T x, uintptr_t alignment, uintptr_t offset=0)
constexpr uint32_t kMaxUint32