diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2015-03-13 14:39:40 +0000 |
---|---|---|
committer | Nicolas Geoffray <ngeoffray@google.com> | 2015-03-13 18:28:19 +0000 |
commit | fead4e4f397455aa31905b2982d4d861126ab89d (patch) | |
tree | 21e4ccd99472bbf5cf1fac3bc20d0bca6f176022 /runtime/check_reference_map_visitor.h | |
parent | cc22e3946baf035c8732e9417ab132bfe663aa45 (diff) | |
download | art-fead4e4f397455aa31905b2982d4d861126ab89d.zip art-fead4e4f397455aa31905b2982d4d861126ab89d.tar.gz art-fead4e4f397455aa31905b2982d4d861126ab89d.tar.bz2 |
[optimizing] Don't record None locations in the stack maps.
- moved environment recording from code generator to stack map stream
- added creation/loading factory methods for the DexRegisterMap (hides
internal details)
- added new tests
Change-Id: Ic8b6d044f0d8255c6759c19a41df332ef37876fe
Diffstat (limited to 'runtime/check_reference_map_visitor.h')
-rw-r--r-- | runtime/check_reference_map_visitor.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/runtime/check_reference_map_visitor.h b/runtime/check_reference_map_visitor.h index 893ab11..0ec0295 100644 --- a/runtime/check_reference_map_visitor.h +++ b/runtime/check_reference_map_visitor.h @@ -66,14 +66,16 @@ class CheckReferenceMapVisitor : public StackVisitor { mirror::ArtMethod* m = GetMethod(); CodeInfo code_info = m->GetOptimizedCodeInfo(); StackMap stack_map = code_info.GetStackMapForNativePcOffset(native_pc_offset); + uint16_t number_of_dex_registers = m->GetCodeItem()->registers_size_; DexRegisterMap dex_register_map = - code_info.GetDexRegisterMapOf(stack_map, m->GetCodeItem()->registers_size_); + code_info.GetDexRegisterMapOf(stack_map, number_of_dex_registers); MemoryRegion stack_mask = stack_map.GetStackMask(); uint32_t register_mask = stack_map.GetRegisterMask(); for (int i = 0; i < number_of_references; ++i) { int reg = registers[i]; CHECK(reg < m->GetCodeItem()->registers_size_); - DexRegisterLocation location = dex_register_map.GetLocationKindAndValue(reg); + DexRegisterLocation location = + dex_register_map.GetLocationKindAndValue(reg, number_of_dex_registers); switch (location.GetKind()) { case DexRegisterLocation::Kind::kNone: // Not set, should not be a reference. |