diff options
author | Ian Rogers <irogers@google.com> | 2014-05-19 16:49:03 -0700 |
---|---|---|
committer | Ian Rogers <irogers@google.com> | 2014-05-19 22:27:39 -0700 |
commit | 700a402244a1a423da4f3ba8032459f4b65fa18f (patch) | |
tree | 4c22fcda04d271bd55a37aff30650214af17a90c /compiler/driver | |
parent | 047c11adcbcbc0bcf210defdfcbada763961ffee (diff) | |
download | android_art-700a402244a1a423da4f3ba8032459f4b65fa18f.tar.gz android_art-700a402244a1a423da4f3ba8032459f4b65fa18f.tar.bz2 android_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 'compiler/driver')
-rw-r--r-- | compiler/driver/compiler_driver.cc | 12 | ||||
-rw-r--r-- | compiler/driver/compiler_driver.h | 8 | ||||
-rw-r--r-- | compiler/driver/compiler_driver_test.cc | 2 |
3 files changed, 11 insertions, 11 deletions
diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc index 93feb2934e..eb62f1b577 100644 --- a/compiler/driver/compiler_driver.cc +++ b/compiler/driver/compiler_driver.cc @@ -502,7 +502,7 @@ void CompilerDriver::CompileAll(jobject class_loader, const std::vector<const DexFile*>& dex_files, TimingLogger* timings) { DCHECK(!Runtime::Current()->IsStarted()); - UniquePtr<ThreadPool> thread_pool(new ThreadPool("Compiler driver thread pool", thread_count_ - 1)); + std::unique_ptr<ThreadPool> thread_pool(new ThreadPool("Compiler driver thread pool", thread_count_ - 1)); PreCompile(class_loader, dex_files, thread_pool.get(), timings); Compile(class_loader, dex_files, thread_pool.get(), timings); if (dump_stats_) { @@ -568,7 +568,7 @@ void CompilerDriver::CompileOne(mirror::ArtMethod* method, TimingLogger* timings std::vector<const DexFile*> dex_files; dex_files.push_back(dex_file); - UniquePtr<ThreadPool> thread_pool(new ThreadPool("Compiler driver thread pool", 0U)); + std::unique_ptr<ThreadPool> thread_pool(new ThreadPool("Compiler driver thread pool", 0U)); PreCompile(jclass_loader, dex_files, thread_pool.get(), timings); // Can we run DEX-to-DEX compiler on this class ? @@ -626,7 +626,7 @@ bool CompilerDriver::IsImageClass(const char* descriptor) const { } static void ResolveExceptionsForMethod(MethodHelper* mh, - std::set<std::pair<uint16_t, const DexFile*> >& exceptions_to_resolve) + std::set<std::pair<uint16_t, const DexFile*>>& exceptions_to_resolve) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { const DexFile::CodeItem* code_item = mh->GetCodeItem(); if (code_item == NULL) { @@ -665,8 +665,8 @@ static void ResolveExceptionsForMethod(MethodHelper* mh, static bool ResolveCatchBlockExceptionsClassVisitor(mirror::Class* c, void* arg) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { - std::set<std::pair<uint16_t, const DexFile*> >* exceptions_to_resolve = - reinterpret_cast<std::set<std::pair<uint16_t, const DexFile*> >*>(arg); + std::set<std::pair<uint16_t, const DexFile*>>* exceptions_to_resolve = + reinterpret_cast<std::set<std::pair<uint16_t, const DexFile*>>*>(arg); MethodHelper mh; for (size_t i = 0; i < c->NumVirtualMethods(); ++i) { mirror::ArtMethod* m = c->GetVirtualMethod(i); @@ -720,7 +720,7 @@ void CompilerDriver::LoadImageClasses(TimingLogger* timings) // Resolve exception classes referenced by the loaded classes. The catch logic assumes // exceptions are resolved by the verifier when there is a catch block in an interested method. // Do this here so that exception classes appear to have been specified image classes. - std::set<std::pair<uint16_t, const DexFile*> > unresolved_exception_types; + std::set<std::pair<uint16_t, const DexFile*>> unresolved_exception_types; StackHandleScope<1> hs(self); Handle<mirror::Class> java_lang_Throwable( hs.NewHandle(class_linker->FindSystemClass(self, "Ljava/lang/Throwable;"))); diff --git a/compiler/driver/compiler_driver.h b/compiler/driver/compiler_driver.h index f3db41fb53..abca659cce 100644 --- a/compiler/driver/compiler_driver.h +++ b/compiler/driver/compiler_driver.h @@ -688,7 +688,7 @@ class CompilerDriver { VerificationResults* const verification_results_; DexFileToMethodInlinerMap* const method_inliner_map_; - UniquePtr<Compiler> compiler_; + std::unique_ptr<Compiler> compiler_; const InstructionSet instruction_set_; const InstructionSetFeatures instruction_set_features_; @@ -712,13 +712,13 @@ class CompilerDriver { // If image_ is true, specifies the classes that will be included in // the image. Note if image_classes_ is NULL, all classes are // included in the image. - UniquePtr<DescriptorSet> image_classes_; + std::unique_ptr<DescriptorSet> image_classes_; size_t thread_count_; uint64_t start_ns_; class AOTCompilationStats; - UniquePtr<AOTCompilationStats> stats_; + std::unique_ptr<AOTCompilationStats> stats_; bool dump_stats_; const bool dump_passes_; @@ -755,7 +755,7 @@ class CompilerDriver { bool support_boot_image_fixup_; // Call Frame Information, which might be generated to help stack tracebacks. - UniquePtr<std::vector<uint8_t> > cfi_info_; + std::unique_ptr<std::vector<uint8_t>> cfi_info_; // DeDuplication data structures, these own the corresponding byte arrays. class DedupeHashFunc { diff --git a/compiler/driver/compiler_driver_test.cc b/compiler/driver/compiler_driver_test.cc index fe3a4e62b0..4efd27d476 100644 --- a/compiler/driver/compiler_driver_test.cc +++ b/compiler/driver/compiler_driver_test.cc @@ -18,8 +18,8 @@ #include <stdint.h> #include <stdio.h> +#include <memory> -#include "UniquePtrCompat.h" #include "class_linker.h" #include "common_compiler_test.h" #include "dex_file.h" |