summaryrefslogtreecommitdiff
path: root/runtime/jit/jit.cc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/jit/jit.cc')
-rw-r--r--runtime/jit/jit.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/runtime/jit/jit.cc b/runtime/jit/jit.cc
index b7b779ce31..5e736035f8 100644
--- a/runtime/jit/jit.cc
+++ b/runtime/jit/jit.cc
@@ -333,7 +333,7 @@ void Jit::DeleteThreadPool() {
}
// When running sanitized, let all tasks finish to not leak. Otherwise just clear the queue.
- if (!RUNNING_ON_MEMORY_TOOL) {
+ if (!kRunningOnMemoryTool) {
pool->StopWorkers(self);
pool->RemoveAllTasks(self);
}
@@ -493,8 +493,7 @@ bool Jit::MaybeDoOnStackReplacement(Thread* thread,
// We found a stack map, now fill the frame with dex register values from the interpreter's
// shadow frame.
- DexRegisterMap vreg_map =
- code_info.GetDexRegisterMapOf(stack_map, number_of_vregs);
+ DexRegisterMap vreg_map = code_info.GetDexRegisterMapOf(stack_map);
frame_size = osr_method->GetFrameSizeInBytes();
@@ -510,12 +509,13 @@ bool Jit::MaybeDoOnStackReplacement(Thread* thread,
memory[0] = method;
shadow_frame = thread->PopShadowFrame();
- if (!vreg_map.IsValid()) {
+ if (vreg_map.empty()) {
// If we don't have a dex register map, then there are no live dex registers at
// this dex pc.
} else {
+ DCHECK_EQ(vreg_map.size(), number_of_vregs);
for (uint16_t vreg = 0; vreg < number_of_vregs; ++vreg) {
- DexRegisterLocation::Kind location = vreg_map.GetLocationKind(vreg);
+ DexRegisterLocation::Kind location = vreg_map[vreg].GetKind();
if (location == DexRegisterLocation::Kind::kNone) {
// Dex register is dead or uninitialized.
continue;
@@ -529,7 +529,7 @@ bool Jit::MaybeDoOnStackReplacement(Thread* thread,
DCHECK_EQ(location, DexRegisterLocation::Kind::kInStack);
int32_t vreg_value = shadow_frame->GetVReg(vreg);
- int32_t slot_offset = vreg_map.GetStackOffsetInBytes(vreg);
+ int32_t slot_offset = vreg_map[vreg].GetStackOffsetInBytes();
DCHECK_LT(slot_offset, static_cast<int32_t>(frame_size));
DCHECK_GT(slot_offset, 0);
(reinterpret_cast<int32_t*>(memory))[slot_offset / sizeof(int32_t)] = vreg_value;