Delete SrcMap
No longer used. SrcMapElem is still used by elf_debug_line_writer.h.
Address previous comments from aog/351387.
Test: make
Change-Id: Ib1525168b14889abbdc78ba20c64f3223b140a51
diff --git a/compiler/compiled_method.h b/compiler/compiled_method.h
index 2342257..aa529f8 100644
--- a/compiler/compiled_method.h
+++ b/compiler/compiled_method.h
@@ -109,57 +109,6 @@
return lhs.from_ == rhs.from_ && lhs.to_ == rhs.to_;
}
-template <class Allocator>
-class SrcMap FINAL : public std::vector<SrcMapElem, Allocator> {
- public:
- using std::vector<SrcMapElem, Allocator>::begin;
- using typename std::vector<SrcMapElem, Allocator>::const_iterator;
- using std::vector<SrcMapElem, Allocator>::empty;
- using std::vector<SrcMapElem, Allocator>::end;
- using std::vector<SrcMapElem, Allocator>::resize;
- using std::vector<SrcMapElem, Allocator>::shrink_to_fit;
- using std::vector<SrcMapElem, Allocator>::size;
-
- explicit SrcMap() {}
- explicit SrcMap(const Allocator& alloc) : std::vector<SrcMapElem, Allocator>(alloc) {}
-
- template <class InputIt>
- SrcMap(InputIt first, InputIt last, const Allocator& alloc)
- : std::vector<SrcMapElem, Allocator>(first, last, alloc) {}
-
- void push_back(const SrcMapElem& elem) {
- if (!empty()) {
- // Check that the addresses are inserted in sorted order.
- DCHECK_GE(elem.from_, this->back().from_);
- // If two consequitive entries map to the same value, ignore the later.
- // E.g. for map {{0, 1}, {4, 1}, {8, 2}}, all values in [0,8) map to 1.
- if (elem.to_ == this->back().to_) {
- return;
- }
- }
- std::vector<SrcMapElem, Allocator>::push_back(elem);
- }
-
- // Returns true and the corresponding "to" value if the mapping is found.
- // Oterwise returns false and 0.
- std::pair<bool, int32_t> Find(uint32_t from) const {
- // Finds first mapping such that lb.from_ >= from.
- auto lb = std::lower_bound(begin(), end(), SrcMapElem {from, INT32_MIN});
- if (lb != end() && lb->from_ == from) {
- // Found exact match.
- return std::make_pair(true, lb->to_);
- } else if (lb != begin()) {
- // The previous mapping is still in effect.
- return std::make_pair(true, (--lb)->to_);
- } else {
- // Not found because 'from' is smaller than first entry in the map.
- return std::make_pair(false, 0);
- }
- }
-};
-
-using DefaultSrcMap = SrcMap<std::allocator<SrcMapElem>>;
-
class LinkerPatch {
public:
// Note: We explicitly specify the underlying type of the enum because GCC
diff --git a/compiler/driver/compiled_method_storage.h b/compiler/driver/compiled_method_storage.h
index b833702..27011e8 100644
--- a/compiler/driver/compiled_method_storage.h
+++ b/compiler/driver/compiled_method_storage.h
@@ -29,7 +29,6 @@
namespace art {
class LinkerPatch;
-class SrcMapElem;
class CompiledMethodStorage {
public:
diff --git a/compiler/driver/compiler_driver.h b/compiler/driver/compiler_driver.h
index cbde587..874e357 100644
--- a/compiler/driver/compiler_driver.h
+++ b/compiler/driver/compiler_driver.h
@@ -65,8 +65,6 @@
class ParallelCompilationManager;
class ScopedObjectAccess;
template <class Allocator> class SrcMap;
-class SrcMapElem;
-using SwapSrcMap = SrcMap<SwapAllocator<SrcMapElem>>;
template<class T> class Handle;
class TimingLogger;
class VdexFile;
diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc
index 8b1b04b..23ccd9e 100644
--- a/compiler/optimizing/optimizing_compiler.cc
+++ b/compiler/optimizing/optimizing_compiler.cc
@@ -1,4 +1,3 @@
-
/*
* Copyright (C) 2014 The Android Open Source Project
*
diff --git a/runtime/oat.h b/runtime/oat.h
index 7943b0f..190d533 100644
--- a/runtime/oat.h
+++ b/runtime/oat.h
@@ -32,7 +32,7 @@
class PACKED(4) OatHeader {
public:
static constexpr uint8_t kOatMagic[] = { 'o', 'a', 't', '\n' };
- static constexpr uint8_t kOatVersion[] = { '1', '1', '6', '\0' }; // Add method infos
+ static constexpr uint8_t kOatVersion[] = { '1', '1', '6', '\0' }; // Add method infos.
static constexpr const char* kImageLocationKey = "image-location";
static constexpr const char* kDex2OatCmdLineKey = "dex2oat-cmdline";
diff --git a/runtime/oat_quick_method_header.h b/runtime/oat_quick_method_header.h
index 07a4a9f..f2a2af2 100644
--- a/runtime/oat_quick_method_header.h
+++ b/runtime/oat_quick_method_header.h
@@ -193,7 +193,6 @@
// The method info offset is not in the CodeInfo since CodeInfo has good dedupe properties that
// would be lost from doing so. The method info memory region contains method indices since they
// are hard to dedupe.
-
uint32_t method_info_offset_ = 0u;
// The stack frame information.
QuickMethodFrameInfo frame_info_;