Now we have a proper C++ library, use std::unique_ptr.
Also remove the Android.libcxx.mk and other bits of stlport compatibility
mechanics.
Change-Id: Icdf7188ba3c79cdf5617672c1cfd0a68ae596a61
diff --git a/runtime/verifier/method_verifier.cc b/runtime/verifier/method_verifier.cc
index 0a31f63..4863b83 100644
--- a/runtime/verifier/method_verifier.cc
+++ b/runtime/verifier/method_verifier.cc
@@ -1433,8 +1433,8 @@
// We need to ensure the work line is consistent while performing validation. When we spot a
// peephole pattern we compute a new line for either the fallthrough instruction or the
// branch target.
- UniquePtr<RegisterLine> branch_line;
- UniquePtr<RegisterLine> fallthrough_line;
+ std::unique_ptr<RegisterLine> branch_line;
+ std::unique_ptr<RegisterLine> fallthrough_line;
// We need precise constant types only for deoptimization which happens at runtime.
const bool need_precise_constant = !Runtime::Current()->IsCompiler();
@@ -3794,7 +3794,7 @@
}
}
} else {
- UniquePtr<RegisterLine> copy(gDebugVerify ?
+ std::unique_ptr<RegisterLine> copy(gDebugVerify ?
RegisterLine::Create(target_line->NumRegs(), this) :
NULL);
if (gDebugVerify) {
diff --git a/runtime/verifier/method_verifier.h b/runtime/verifier/method_verifier.h
index 14200f7..495d3c5 100644
--- a/runtime/verifier/method_verifier.h
+++ b/runtime/verifier/method_verifier.h
@@ -17,6 +17,7 @@
#ifndef ART_RUNTIME_VERIFIER_METHOD_VERIFIER_H_
#define ART_RUNTIME_VERIFIER_METHOD_VERIFIER_H_
+#include <memory>
#include <set>
#include <vector>
@@ -33,7 +34,6 @@
#include "reg_type_cache-inl.h"
#include "register_line.h"
#include "safe_map.h"
-#include "UniquePtrCompat.h"
namespace art {
@@ -126,7 +126,7 @@
}
private:
- UniquePtr<RegisterLine*[]> register_lines_;
+ std::unique_ptr<RegisterLine*[]> register_lines_;
size_t size_;
};
@@ -617,14 +617,14 @@
PcToRegisterLineTable reg_table_;
// Storage for the register status we're currently working on.
- UniquePtr<RegisterLine> work_line_;
+ std::unique_ptr<RegisterLine> work_line_;
// The address of the instruction we're currently working on, note that this is in 2 byte
// quantities
uint32_t work_insn_idx_;
// Storage for the register status we're saving for later.
- UniquePtr<RegisterLine> saved_line_;
+ std::unique_ptr<RegisterLine> saved_line_;
const uint32_t dex_method_idx_; // The method we're working on.
// Its object representation if known.
@@ -640,7 +640,7 @@
const DexFile::CodeItem* const code_item_; // The code item containing the code for the method.
const RegType* declaring_class_; // Lazily computed reg type of the method's declaring class.
// Instruction widths and flags, one entry per code unit.
- UniquePtr<InstructionFlags[]> insn_flags_;
+ std::unique_ptr<InstructionFlags[]> insn_flags_;
// The dex PC of a FindLocksAtDexPc request, -1 otherwise.
uint32_t interesting_dex_pc_;
// The container into which FindLocksAtDexPc should write the registers containing held locks,
diff --git a/runtime/verifier/method_verifier_test.cc b/runtime/verifier/method_verifier_test.cc
index 2bcf3e0..9ac04d7 100644
--- a/runtime/verifier/method_verifier_test.cc
+++ b/runtime/verifier/method_verifier_test.cc
@@ -17,8 +17,8 @@
#include "method_verifier.h"
#include <stdio.h>
+#include <memory>
-#include "UniquePtrCompat.h"
#include "class_linker.h"
#include "common_runtime_test.h"
#include "dex_file.h"
diff --git a/runtime/verifier/register_line.h b/runtime/verifier/register_line.h
index f9f3e31..dade203 100644
--- a/runtime/verifier/register_line.h
+++ b/runtime/verifier/register_line.h
@@ -17,12 +17,12 @@
#ifndef ART_RUNTIME_VERIFIER_REGISTER_LINE_H_
#define ART_RUNTIME_VERIFIER_REGISTER_LINE_H_
+#include <memory>
#include <vector>
#include "dex_instruction.h"
#include "reg_type.h"
#include "safe_map.h"
-#include "UniquePtrCompat.h"
namespace art {
namespace verifier {