summaryrefslogtreecommitdiff
path: root/compiler/optimizing/instruction_builder.cc
diff options
context:
space:
mode:
authorNicolas Geoffray <ngeoffray@google.com>2017-11-20 13:27:29 +0000
committerNicolas Geoffray <ngeoffray@google.com>2017-11-23 10:44:47 +0000
commit58cc1cb66c1a96ffba4a314edb2c5b4e8b235d5b (patch)
treeed00c90ab564c54ae4f09a4acbc5f3ffa65b9e71 /compiler/optimizing/instruction_builder.cc
parent65e0432cdaf3ee170045b21943c24eae5d6a0357 (diff)
Pass the debug_info_offset explicitly.
In order to use debug_info_offset for encoding implementation details, rewrite all indirect users of it to fetch it before calling DexFile methods. This allows keeping the DexFile interface clean of runtime considerations. Test: test.py Change-Id: I4591e0039b5f822f4409aae411071ecbe97082b1
Diffstat (limited to 'compiler/optimizing/instruction_builder.cc')
-rw-r--r--compiler/optimizing/instruction_builder.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/optimizing/instruction_builder.cc b/compiler/optimizing/instruction_builder.cc
index 61840cc20f..978d0c2225 100644
--- a/compiler/optimizing/instruction_builder.cc
+++ b/compiler/optimizing/instruction_builder.cc
@@ -29,6 +29,7 @@
#include "driver/compiler_options.h"
#include "imtable-inl.h"
#include "mirror/dex_cache.h"
+#include "oat_file.h"
#include "optimizing_compiler_stats.h"
#include "quicken_info.h"
#include "scoped_thread_state_change-inl.h"
@@ -447,7 +448,8 @@ ArenaBitVector* HInstructionBuilder::FindNativeDebugInfoLocations() {
/* expandable */ false,
kArenaAllocGraphBuilder);
locations->ClearAllBits();
- dex_file_->DecodeDebugPositionInfo(code_item_, Callback::Position, locations);
+ uint32_t debug_info_offset = OatFile::GetDebugInfoOffset(*dex_file_, code_item_);
+ dex_file_->DecodeDebugPositionInfo(code_item_, debug_info_offset, Callback::Position, locations);
// Instruction-specific tweaks.
IterationRange<DexInstructionIterator> instructions = code_item_->Instructions();
for (const DexInstructionPcPair& inst : instructions) {