summaryrefslogtreecommitdiffstats
path: root/runtime/verifier
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2014-05-19 16:49:03 -0700
committerIan Rogers <irogers@google.com>2014-05-19 22:27:39 -0700
commit700a402244a1a423da4f3ba8032459f4b65fa18f (patch)
tree4c22fcda04d271bd55a37aff30650214af17a90c /runtime/verifier
parent047c11adcbcbc0bcf210defdfcbada763961ffee (diff)
downloadart-700a402244a1a423da4f3ba8032459f4b65fa18f.tar.gz
art-700a402244a1a423da4f3ba8032459f4b65fa18f.tar.bz2
art-700a402244a1a423da4f3ba8032459f4b65fa18f.zip
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
Diffstat (limited to 'runtime/verifier')
-rw-r--r--runtime/verifier/method_verifier.cc6
-rw-r--r--runtime/verifier/method_verifier.h10
-rw-r--r--runtime/verifier/method_verifier_test.cc2
-rw-r--r--runtime/verifier/register_line.h2
4 files changed, 10 insertions, 10 deletions
diff --git a/runtime/verifier/method_verifier.cc b/runtime/verifier/method_verifier.cc
index 0a31f63b74..4863b8367b 100644
--- a/runtime/verifier/method_verifier.cc
+++ b/runtime/verifier/method_verifier.cc
@@ -1433,8 +1433,8 @@ bool MethodVerifier::CodeFlowVerifyInstruction(uint32_t* start_guess) {
// 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 @@ bool MethodVerifier::UpdateRegisters(uint32_t next_insn, const RegisterLine* mer
}
}
} 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 14200f755f..495d3c5353 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 @@ class PcToRegisterLineTable {
}
private:
- UniquePtr<RegisterLine*[]> register_lines_;
+ std::unique_ptr<RegisterLine*[]> register_lines_;
size_t size_;
};
@@ -617,14 +617,14 @@ class MethodVerifier {
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 @@ class MethodVerifier {
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 2bcf3e0c14..9ac04d7067 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 f9f3e31861..dade203c6b 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 {