From 0795f23920ee9aabf28e45c63cd592dcccf00216 Mon Sep 17 00:00:00 2001 From: Mathieu Chartier Date: Tue, 27 Sep 2016 18:43:30 -0700 Subject: Clean up ScopedThreadStateChange to use ObjPtr Also fixed inclusion of -inl.h files in .h files by adding scoped_object_access-inl.h and scoped_fast_natvie_object_access-inl.h Changed AddLocalReference / Decode to use ObjPtr. Changed libartbenchmark to be debug to avoid linkage errors. Bug: 31113334 Test: test-art-host Change-Id: I4d2e160483a29d21e1e0e440585ed328b9811483 --- compiler/optimizing/inliner.cc | 2 +- compiler/optimizing/instruction_builder.cc | 10 +++++----- compiler/optimizing/instruction_simplifier.cc | 2 +- compiler/optimizing/intrinsics.cc | 2 +- compiler/optimizing/nodes.cc | 2 +- compiler/optimizing/optimizing_compiler.cc | 2 +- compiler/optimizing/optimizing_unit_test.h | 2 +- compiler/optimizing/reference_type_propagation.cc | 2 +- compiler/optimizing/sharpening.cc | 2 +- 9 files changed, 13 insertions(+), 13 deletions(-) (limited to 'compiler/optimizing') diff --git a/compiler/optimizing/inliner.cc b/compiler/optimizing/inliner.cc index f21dc0e7e4..31d1704a8a 100644 --- a/compiler/optimizing/inliner.cc +++ b/compiler/optimizing/inliner.cc @@ -41,7 +41,7 @@ #include "sharpening.h" #include "ssa_builder.h" #include "ssa_phi_elimination.h" -#include "scoped_thread_state_change.h" +#include "scoped_thread_state_change-inl.h" #include "thread.h" namespace art { diff --git a/compiler/optimizing/instruction_builder.cc b/compiler/optimizing/instruction_builder.cc index 3b08d9f989..f7d67db5b2 100644 --- a/compiler/optimizing/instruction_builder.cc +++ b/compiler/optimizing/instruction_builder.cc @@ -22,7 +22,7 @@ #include "dex_instruction-inl.h" #include "driver/compiler_options.h" #include "imtable-inl.h" -#include "scoped_thread_state_change.h" +#include "scoped_thread_state_change-inl.h" namespace art { @@ -675,7 +675,7 @@ ArtMethod* HInstructionBuilder::ResolveMethod(uint16_t method_idx, InvokeType in ClassLinker* class_linker = dex_compilation_unit_->GetClassLinker(); Handle class_loader(hs.NewHandle( - soa.Decode(dex_compilation_unit_->GetClassLoader()))); + soa.Decode(dex_compilation_unit_->GetClassLoader()))); Handle compiling_class(hs.NewHandle(GetCompilingClass())); // We fetch the referenced class eagerly (that is, the class pointed by in the MethodId // at method_idx), as `CanAccessResolvedMethod` expects it be be in the dex cache. @@ -1284,7 +1284,7 @@ static mirror::Class* GetClassFrom(CompilerDriver* driver, ScopedObjectAccess soa(Thread::Current()); StackHandleScope<1> hs(soa.Self()); Handle class_loader(hs.NewHandle( - soa.Decode(compilation_unit.GetClassLoader()))); + soa.Decode(compilation_unit.GetClassLoader()))); Handle dex_cache = compilation_unit.GetDexCache(); return driver->ResolveCompilingMethodsClass(soa, dex_cache, class_loader, &compilation_unit); @@ -1303,7 +1303,7 @@ bool HInstructionBuilder::IsOutermostCompilingClass(uint16_t type_index) const { StackHandleScope<3> hs(soa.Self()); Handle dex_cache = dex_compilation_unit_->GetDexCache(); Handle class_loader(hs.NewHandle( - soa.Decode(dex_compilation_unit_->GetClassLoader()))); + soa.Decode(dex_compilation_unit_->GetClassLoader()))); Handle cls(hs.NewHandle(compiler_driver_->ResolveClass( soa, dex_cache, class_loader, type_index, dex_compilation_unit_))); Handle outer_class(hs.NewHandle(GetOutermostCompilingClass())); @@ -1344,7 +1344,7 @@ bool HInstructionBuilder::BuildStaticFieldAccess(const Instruction& instruction, StackHandleScope<3> hs(soa.Self()); Handle dex_cache = dex_compilation_unit_->GetDexCache(); Handle class_loader(hs.NewHandle( - soa.Decode(dex_compilation_unit_->GetClassLoader()))); + soa.Decode(dex_compilation_unit_->GetClassLoader()))); ArtField* resolved_field = compiler_driver_->ResolveField( soa, dex_cache, class_loader, dex_compilation_unit_, field_index, true); diff --git a/compiler/optimizing/instruction_simplifier.cc b/compiler/optimizing/instruction_simplifier.cc index ff829af4c2..3bb1c1dc21 100644 --- a/compiler/optimizing/instruction_simplifier.cc +++ b/compiler/optimizing/instruction_simplifier.cc @@ -18,7 +18,7 @@ #include "intrinsics.h" #include "mirror/class-inl.h" -#include "scoped_thread_state_change.h" +#include "scoped_thread_state_change-inl.h" namespace art { diff --git a/compiler/optimizing/intrinsics.cc b/compiler/optimizing/intrinsics.cc index 4d4bbcf616..2131279e79 100644 --- a/compiler/optimizing/intrinsics.cc +++ b/compiler/optimizing/intrinsics.cc @@ -25,7 +25,7 @@ #include "mirror/dex_cache-inl.h" #include "nodes.h" #include "quick/inline_method_analyser.h" -#include "scoped_thread_state_change.h" +#include "scoped_thread_state_change-inl.h" #include "thread-inl.h" #include "utils.h" diff --git a/compiler/optimizing/nodes.cc b/compiler/optimizing/nodes.cc index 9cfa89b7d0..ef9bf23a17 100644 --- a/compiler/optimizing/nodes.cc +++ b/compiler/optimizing/nodes.cc @@ -25,7 +25,7 @@ #include "base/stl_util.h" #include "intrinsics.h" #include "mirror/class-inl.h" -#include "scoped_thread_state_change.h" +#include "scoped_thread_state_change-inl.h" namespace art { diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc index c5d761183a..84356e884e 100644 --- a/compiler/optimizing/optimizing_compiler.cc +++ b/compiler/optimizing/optimizing_compiler.cc @@ -899,7 +899,7 @@ CodeGenerator* OptimizingCompiler::TryCompile(ArenaAllocator* arena, ScopedObjectAccess soa(Thread::Current()); StackHandleScope<1> hs(soa.Self()); Handle loader(hs.NewHandle( - soa.Decode(class_loader))); + soa.Decode(class_loader))); method = compiler_driver->ResolveMethod( soa, dex_cache, loader, &dex_compilation_unit, method_idx, invoke_type); } diff --git a/compiler/optimizing/optimizing_unit_test.h b/compiler/optimizing/optimizing_unit_test.h index dd5cb1c9bb..2a23c92f1f 100644 --- a/compiler/optimizing/optimizing_unit_test.h +++ b/compiler/optimizing/optimizing_unit_test.h @@ -22,7 +22,7 @@ #include "common_compiler_test.h" #include "dex_file.h" #include "dex_instruction.h" -#include "handle_scope-inl.h" +#include "handle_scope.h" #include "scoped_thread_state_change.h" #include "ssa_builder.h" #include "ssa_liveness_analysis.h" diff --git a/compiler/optimizing/reference_type_propagation.cc b/compiler/optimizing/reference_type_propagation.cc index 4289cf7e0f..5a47df1a0d 100644 --- a/compiler/optimizing/reference_type_propagation.cc +++ b/compiler/optimizing/reference_type_propagation.cc @@ -20,7 +20,7 @@ #include "class_linker-inl.h" #include "mirror/class-inl.h" #include "mirror/dex_cache.h" -#include "scoped_thread_state_change.h" +#include "scoped_thread_state_change-inl.h" namespace art { diff --git a/compiler/optimizing/sharpening.cc b/compiler/optimizing/sharpening.cc index abec55f25c..a4a3e0695d 100644 --- a/compiler/optimizing/sharpening.cc +++ b/compiler/optimizing/sharpening.cc @@ -31,7 +31,7 @@ #include "mirror/string.h" #include "nodes.h" #include "runtime.h" -#include "scoped_thread_state_change.h" +#include "scoped_thread_state_change-inl.h" namespace art { -- cgit v1.2.3-59-g8ed1b