summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compiler/cfi_test.h3
-rw-r--r--compiler/common_compiler_test.cc2
-rw-r--r--compiler/common_compiler_test.h6
-rw-r--r--compiler/compiler.cc2
-rw-r--r--compiler/compiler.h9
-rw-r--r--compiler/compiler_reflection_test.cc3
-rw-r--r--compiler/dex/inline_method_analyser.cc2
-rw-r--r--compiler/dex/inline_method_analyser.h2
-rw-r--r--compiler/driver/compiled_code_storage.h3
-rw-r--r--compiler/driver/compiler_options.cc2
-rw-r--r--compiler/driver/compiler_options.h16
-rw-r--r--compiler/driver/compiler_options_map-inl.h2
-rw-r--r--compiler/driver/compiler_options_map.h3
-rw-r--r--compiler/driver/dex_compilation_unit.cc2
-rw-r--r--compiler/driver/dex_compilation_unit.h3
-rw-r--r--compiler/driver/simple_compiler_options_map.h3
-rw-r--r--compiler/exception_test.cc3
-rw-r--r--compiler/jit/jit_compiler.cc4
-rw-r--r--compiler/jit/jit_compiler.h3
-rw-r--r--compiler/jit/jit_logger.cc2
-rw-r--r--compiler/jit/jit_logger.h3
-rw-r--r--compiler/linker/linker_patch.h5
-rw-r--r--compiler/linker/linker_patch_test.cc3
-rw-r--r--compiler/linker/output_stream_test.cc2
-rw-r--r--compiler/trampolines/trampoline_compiler.cc2
-rw-r--r--compiler/trampolines/trampoline_compiler.h13
26 files changed, 58 insertions, 45 deletions
diff --git a/compiler/cfi_test.h b/compiler/cfi_test.h
index 9755ef12d0..e65bee8e2e 100644
--- a/compiler/cfi_test.h
+++ b/compiler/cfi_test.h
@@ -23,6 +23,7 @@
#include "arch/instruction_set.h"
#include "base/enums.h"
+#include "base/macros.h"
#include "debug/dwarf/dwarf_test.h"
#include "disassembler.h"
#include "dwarf/dwarf_constants.h"
@@ -30,7 +31,7 @@
#include "gtest/gtest.h"
#include "thread.h"
-namespace art {
+namespace art HIDDEN {
class CFITest : public dwarf::DwarfTest {
public:
diff --git a/compiler/common_compiler_test.cc b/compiler/common_compiler_test.cc
index 24872d33c5..442b96e5fa 100644
--- a/compiler/common_compiler_test.cc
+++ b/compiler/common_compiler_test.cc
@@ -42,7 +42,7 @@
#include "thread-current-inl.h"
#include "utils/atomic_dex_ref_map-inl.h"
-namespace art {
+namespace art HIDDEN {
class CommonCompilerTestImpl::CodeAndMetadata {
public:
diff --git a/compiler/common_compiler_test.h b/compiler/common_compiler_test.h
index 11755224d1..f3cd13296c 100644
--- a/compiler/common_compiler_test.h
+++ b/compiler/common_compiler_test.h
@@ -24,11 +24,12 @@
#include "arch/instruction_set.h"
#include "arch/instruction_set_features.h"
+#include "base/macros.h"
#include "common_runtime_test.h"
#include "compiler.h"
#include "oat_file.h"
-namespace art {
+namespace art HIDDEN {
namespace mirror {
class ClassLoader;
} // namespace mirror
@@ -40,7 +41,8 @@ class TimingLogger;
template<class T> class Handle;
-class CommonCompilerTestImpl {
+// Export all symbols in `CommonCompilerTestImpl` for dex2oat tests.
+class EXPORT CommonCompilerTestImpl {
public:
static std::unique_ptr<CompilerOptions> CreateCompilerOptions(InstructionSet instruction_set,
const std::string& variant);
diff --git a/compiler/compiler.cc b/compiler/compiler.cc
index 727b9dde78..e2587c1253 100644
--- a/compiler/compiler.cc
+++ b/compiler/compiler.cc
@@ -25,7 +25,7 @@
#include "oat.h"
#include "optimizing/optimizing_compiler.h"
-namespace art {
+namespace art HIDDEN {
Compiler* Compiler::Create(const CompilerOptions& compiler_options,
CompiledCodeStorage* storage,
diff --git a/compiler/compiler.h b/compiler/compiler.h
index 6115d0231a..ce785bb769 100644
--- a/compiler/compiler.h
+++ b/compiler/compiler.h
@@ -17,12 +17,13 @@
#ifndef ART_COMPILER_COMPILER_H_
#define ART_COMPILER_COMPILER_H_
+#include "base/macros.h"
#include "base/mutex.h"
#include "base/os.h"
#include "compilation_kind.h"
#include "dex/invoke_type.h"
-namespace art {
+namespace art HIDDEN {
namespace dex {
struct CodeItem;
@@ -52,9 +53,9 @@ class Compiler {
kOptimizing
};
- static Compiler* Create(const CompilerOptions& compiler_options,
- CompiledCodeStorage* storage,
- Kind kind);
+ EXPORT static Compiler* Create(const CompilerOptions& compiler_options,
+ CompiledCodeStorage* storage,
+ Kind kind);
virtual bool CanCompileMethod(uint32_t method_idx, const DexFile& dex_file) const = 0;
diff --git a/compiler/compiler_reflection_test.cc b/compiler/compiler_reflection_test.cc
index 3b7b8b7369..f3c07db136 100644
--- a/compiler/compiler_reflection_test.cc
+++ b/compiler/compiler_reflection_test.cc
@@ -16,6 +16,7 @@
#include "reflection.h"
+#include "base/macros.h"
#include "class_linker.h"
#include "common_compiler_test.h"
#include "handle_scope-inl.h"
@@ -23,7 +24,7 @@
#include "mirror/class.h"
#include "mirror/class_loader.h"
-namespace art {
+namespace art HIDDEN {
class CompilerReflectionTest : public CommonCompilerTest {};
diff --git a/compiler/dex/inline_method_analyser.cc b/compiler/dex/inline_method_analyser.cc
index 32019657d3..381db3d21d 100644
--- a/compiler/dex/inline_method_analyser.cc
+++ b/compiler/dex/inline_method_analyser.cc
@@ -33,7 +33,7 @@
* only to allow the debugger to check whether a method has been inlined.
*/
-namespace art {
+namespace art HIDDEN {
namespace { // anonymous namespace
diff --git a/compiler/dex/inline_method_analyser.h b/compiler/dex/inline_method_analyser.h
index e1d652a642..99d07c6152 100644
--- a/compiler/dex/inline_method_analyser.h
+++ b/compiler/dex/inline_method_analyser.h
@@ -28,7 +28,7 @@
* only to allow the debugger to check whether a method has been inlined.
*/
-namespace art {
+namespace art HIDDEN {
class CodeItemDataAccessor;
diff --git a/compiler/driver/compiled_code_storage.h b/compiler/driver/compiled_code_storage.h
index dfabeb49c5..cef7398ec1 100644
--- a/compiler/driver/compiled_code_storage.h
+++ b/compiler/driver/compiled_code_storage.h
@@ -20,8 +20,9 @@
#include <string>
#include "base/array_ref.h"
+#include "base/macros.h"
-namespace art {
+namespace art HIDDEN {
namespace linker {
class LinkerPatch;
diff --git a/compiler/driver/compiler_options.cc b/compiler/driver/compiler_options.cc
index 8c2c8f30f9..603596f3bc 100644
--- a/compiler/driver/compiler_options.cc
+++ b/compiler/driver/compiler_options.cc
@@ -35,7 +35,7 @@
#include "scoped_thread_state_change-inl.h"
#include "simple_compiler_options_map.h"
-namespace art {
+namespace art HIDDEN {
CompilerOptions::CompilerOptions()
: compiler_filter_(CompilerFilter::kDefaultCompilerFilter),
diff --git a/compiler/driver/compiler_options.h b/compiler/driver/compiler_options.h
index 1afa2c5d34..1cc9f2d7e2 100644
--- a/compiler/driver/compiler_options.h
+++ b/compiler/driver/compiler_options.h
@@ -30,7 +30,7 @@
#include "base/utils.h"
#include "optimizing/register_allocator.h"
-namespace art {
+namespace art HIDDEN {
namespace jit {
class JitCompiler;
@@ -83,8 +83,8 @@ class CompilerOptions final {
kAppImage, // Creating app image.
};
- CompilerOptions();
- ~CompilerOptions();
+ EXPORT CompilerOptions();
+ EXPORT ~CompilerOptions();
CompilerFilter::Filter GetCompilerFilter() const {
return compiler_filter_;
@@ -298,11 +298,11 @@ class CompilerOptions final {
return image_classes_;
}
- bool IsImageClass(const char* descriptor) const;
+ EXPORT bool IsImageClass(const char* descriptor) const;
// Returns whether the given `pretty_descriptor` is in the list of preloaded
// classes. `pretty_descriptor` should be the result of calling `PrettyDescriptor`.
- bool IsPreloadedClass(const char* pretty_descriptor) const;
+ EXPORT bool IsPreloadedClass(const char* pretty_descriptor) const;
bool ParseCompilerOptions(const std::vector<std::string>& options,
bool ignore_unrecognized,
@@ -389,11 +389,11 @@ class CompilerOptions final {
// initialized at compile-time, or won't be initialized by the zygote, add
// initialization checks at entry. This will avoid the need of trampolines
// which at runtime we will need to dirty after initialization.
- bool ShouldCompileWithClinitCheck(ArtMethod* method) const;
+ EXPORT bool ShouldCompileWithClinitCheck(ArtMethod* method) const;
private:
- bool ParseDumpInitFailures(const std::string& option, std::string* error_msg);
- bool ParseRegisterAllocationStrategy(const std::string& option, std::string* error_msg);
+ EXPORT bool ParseDumpInitFailures(const std::string& option, std::string* error_msg);
+ EXPORT bool ParseRegisterAllocationStrategy(const std::string& option, std::string* error_msg);
CompilerFilter::Filter compiler_filter_;
size_t huge_method_threshold_;
diff --git a/compiler/driver/compiler_options_map-inl.h b/compiler/driver/compiler_options_map-inl.h
index fcbc0f2f5c..6733a81d8a 100644
--- a/compiler/driver/compiler_options_map-inl.h
+++ b/compiler/driver/compiler_options_map-inl.h
@@ -29,7 +29,7 @@
#include "cmdline_parser.h"
#include "compiler_options.h"
-namespace art {
+namespace art HIDDEN {
template <>
struct CmdlineType<CompilerFilter::Filter> : CmdlineTypeParser<CompilerFilter::Filter> {
diff --git a/compiler/driver/compiler_options_map.h b/compiler/driver/compiler_options_map.h
index 7e2f8466e0..b2dd57d00e 100644
--- a/compiler/driver/compiler_options_map.h
+++ b/compiler/driver/compiler_options_map.h
@@ -21,10 +21,11 @@
#include <vector>
#include "base/compiler_filter.h"
+#include "base/macros.h"
#include "base/variant_map.h"
#include "cmdline_types.h"
-namespace art {
+namespace art HIDDEN {
enum class ProfileMethodsCheck : uint8_t;
diff --git a/compiler/driver/dex_compilation_unit.cc b/compiler/driver/dex_compilation_unit.cc
index 0d0f074917..ccebfa9c07 100644
--- a/compiler/driver/dex_compilation_unit.cc
+++ b/compiler/driver/dex_compilation_unit.cc
@@ -25,7 +25,7 @@
#include "mirror/dex_cache.h"
#include "scoped_thread_state_change-inl.h"
-namespace art {
+namespace art HIDDEN {
DexCompilationUnit::DexCompilationUnit(Handle<mirror::ClassLoader> class_loader,
ClassLinker* class_linker,
diff --git a/compiler/driver/dex_compilation_unit.h b/compiler/driver/dex_compilation_unit.h
index def90fa4e1..d595c0a4b2 100644
--- a/compiler/driver/dex_compilation_unit.h
+++ b/compiler/driver/dex_compilation_unit.h
@@ -20,11 +20,12 @@
#include <stdint.h>
#include "base/arena_object.h"
+#include "base/macros.h"
#include "dex/code_item_accessors.h"
#include "dex/dex_file.h"
#include "handle.h"
-namespace art {
+namespace art HIDDEN {
namespace mirror {
class Class;
class ClassLoader;
diff --git a/compiler/driver/simple_compiler_options_map.h b/compiler/driver/simple_compiler_options_map.h
index e7a51a4995..6663c0c509 100644
--- a/compiler/driver/simple_compiler_options_map.h
+++ b/compiler/driver/simple_compiler_options_map.h
@@ -23,9 +23,10 @@
#include <memory>
#include "compiler_options_map-inl.h"
+#include "base/macros.h"
#include "base/variant_map.h"
-namespace art {
+namespace art HIDDEN {
template <typename TValue>
struct SimpleParseArgumentMapKey : VariantMapKey<TValue> {
diff --git a/compiler/exception_test.cc b/compiler/exception_test.cc
index 66045223b0..82c4998217 100644
--- a/compiler/exception_test.cc
+++ b/compiler/exception_test.cc
@@ -24,6 +24,7 @@
#include "base/callee_save_type.h"
#include "base/enums.h"
#include "base/leb128.h"
+#include "base/macros.h"
#include "base/malloc_arena_pool.h"
#include "class_linker.h"
#include "common_runtime_test.h"
@@ -44,7 +45,7 @@
#include "scoped_thread_state_change-inl.h"
#include "thread.h"
-namespace art {
+namespace art HIDDEN {
class ExceptionTest : public CommonRuntimeTest {
protected:
diff --git a/compiler/jit/jit_compiler.cc b/compiler/jit/jit_compiler.cc
index f12a3ad52b..d2f5aa6799 100644
--- a/compiler/jit/jit_compiler.cc
+++ b/compiler/jit/jit_compiler.cc
@@ -34,7 +34,7 @@
#include "jit/jit_code_cache.h"
#include "jit/jit_logger.h"
-namespace art {
+namespace art HIDDEN {
namespace jit {
JitCompiler* JitCompiler::Create() {
@@ -125,7 +125,7 @@ void JitCompiler::ParseCompilerOptions() {
}
}
-extern "C" JitCompilerInterface* jit_load() {
+EXPORT extern "C" JitCompilerInterface* jit_load() {
VLOG(jit) << "Create jit compiler";
auto* const jit_compiler = JitCompiler::Create();
CHECK(jit_compiler != nullptr);
diff --git a/compiler/jit/jit_compiler.h b/compiler/jit/jit_compiler.h
index 8cd6b5aae0..5a919fb612 100644
--- a/compiler/jit/jit_compiler.h
+++ b/compiler/jit/jit_compiler.h
@@ -17,12 +17,13 @@
#ifndef ART_COMPILER_JIT_JIT_COMPILER_H_
#define ART_COMPILER_JIT_JIT_COMPILER_H_
+#include "base/macros.h"
#include "base/mutex.h"
#include "compilation_kind.h"
#include "jit/jit.h"
-namespace art {
+namespace art HIDDEN {
class ArtMethod;
class Compiler;
diff --git a/compiler/jit/jit_logger.cc b/compiler/jit/jit_logger.cc
index 6b9453f525..32845260f3 100644
--- a/compiler/jit/jit_logger.cc
+++ b/compiler/jit/jit_logger.cc
@@ -24,7 +24,7 @@
#include "jit/jit_code_cache.h"
#include "oat_file-inl.h"
-namespace art {
+namespace art HIDDEN {
namespace jit {
#ifdef ART_TARGET_ANDROID
diff --git a/compiler/jit/jit_logger.h b/compiler/jit/jit_logger.h
index 61a4dcf4d8..9d1f3073fa 100644
--- a/compiler/jit/jit_logger.h
+++ b/compiler/jit/jit_logger.h
@@ -19,10 +19,11 @@
#include <memory>
+#include "base/macros.h"
#include "base/mutex.h"
#include "base/os.h"
-namespace art {
+namespace art HIDDEN {
class ArtMethod;
diff --git a/compiler/linker/linker_patch.h b/compiler/linker/linker_patch.h
index 7da1e82d91..8ed7fce0ff 100644
--- a/compiler/linker/linker_patch.h
+++ b/compiler/linker/linker_patch.h
@@ -23,9 +23,10 @@
#include <android-base/logging.h>
#include "base/bit_utils.h"
+#include "base/macros.h"
#include "dex/method_reference.h"
-namespace art {
+namespace art HIDDEN {
class DexFile;
@@ -328,7 +329,7 @@ class LinkerPatch {
friend bool operator==(const LinkerPatch& lhs, const LinkerPatch& rhs);
friend bool operator<(const LinkerPatch& lhs, const LinkerPatch& rhs);
};
-std::ostream& operator<<(std::ostream& os, LinkerPatch::Type type);
+EXPORT std::ostream& operator<<(std::ostream& os, LinkerPatch::Type type);
inline bool operator==(const LinkerPatch& lhs, const LinkerPatch& rhs) {
return lhs.literal_offset_ == rhs.literal_offset_ &&
diff --git a/compiler/linker/linker_patch_test.cc b/compiler/linker/linker_patch_test.cc
index 997418c4f7..1c46da15e1 100644
--- a/compiler/linker/linker_patch_test.cc
+++ b/compiler/linker/linker_patch_test.cc
@@ -16,9 +16,10 @@
#include <gtest/gtest.h>
+#include "base/macros.h"
#include "linker_patch.h"
-namespace art {
+namespace art HIDDEN {
namespace linker {
TEST(LinkerPatch, LinkerPatchOperators) {
diff --git a/compiler/linker/output_stream_test.cc b/compiler/linker/output_stream_test.cc
index 31a8516f9e..22b174fce6 100644
--- a/compiler/linker/output_stream_test.cc
+++ b/compiler/linker/output_stream_test.cc
@@ -23,7 +23,7 @@
#include "stream/file_output_stream.h"
#include "stream/vector_output_stream.h"
-namespace art {
+namespace art HIDDEN {
namespace linker {
class OutputStreamTest : public CommonArtTest {
diff --git a/compiler/trampolines/trampoline_compiler.cc b/compiler/trampolines/trampoline_compiler.cc
index 0aaeaa5b4f..5e7ac83b7d 100644
--- a/compiler/trampolines/trampoline_compiler.cc
+++ b/compiler/trampolines/trampoline_compiler.cc
@@ -38,7 +38,7 @@
#define __ assembler.
-namespace art {
+namespace art HIDDEN {
#ifdef ART_ENABLE_CODEGEN_arm
namespace arm {
diff --git a/compiler/trampolines/trampoline_compiler.h b/compiler/trampolines/trampoline_compiler.h
index f0086b58d5..32e35ae1d6 100644
--- a/compiler/trampolines/trampoline_compiler.h
+++ b/compiler/trampolines/trampoline_compiler.h
@@ -22,9 +22,10 @@
#include <vector>
#include "arch/instruction_set.h"
+#include "base/macros.h"
#include "offsets.h"
-namespace art {
+namespace art HIDDEN {
enum EntryPointCallingConvention {
// ABI of invocations to a method's interpreter entry point.
@@ -36,12 +37,10 @@ enum EntryPointCallingConvention {
};
// Create code that will invoke the function held in thread local storage.
-std::unique_ptr<const std::vector<uint8_t>> CreateTrampoline32(InstructionSet isa,
- EntryPointCallingConvention abi,
- ThreadOffset32 entry_point_offset);
-std::unique_ptr<const std::vector<uint8_t>> CreateTrampoline64(InstructionSet isa,
- EntryPointCallingConvention abi,
- ThreadOffset64 entry_point_offset);
+EXPORT std::unique_ptr<const std::vector<uint8_t>> CreateTrampoline32(
+ InstructionSet isa, EntryPointCallingConvention abi, ThreadOffset32 entry_point_offset);
+EXPORT std::unique_ptr<const std::vector<uint8_t>> CreateTrampoline64(
+ InstructionSet isa, EntryPointCallingConvention abi, ThreadOffset64 entry_point_offset);
} // namespace art