summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author David Sehr <sehr@google.com> 2018-03-19 08:39:26 -0700
committer David Sehr <sehr@google.com> 2018-03-19 11:02:48 -0700
commit312f3b2fd0094c028a7d243b116947a35a745806 (patch)
tree3d7ec049ded98c489098c87250c75e3f711f8290
parent0a3d5eb2ff9e70fa5785638da938439835d0337e (diff)
Move some remaining dex utilities
There were several utilities related to building/walking/testing dex files that were not in libdexfile. This change consolidates these. Bug: 22322814 Test: make -j 50 test-art-host Change-Id: Id76e9179d03b8ec7d67f7e0f267121f54f0ec2e0
-rw-r--r--compiler/Android.bp2
-rw-r--r--compiler/dex/dex_to_dex_compiler.cc2
-rw-r--r--compiler/dex/dex_to_dex_compiler.h2
-rw-r--r--compiler/dex/inline_method_analyser.h2
-rw-r--r--compiler/dex/verification_results.h4
-rw-r--r--compiler/dex/verified_method.h2
-rw-r--r--compiler/driver/compiler_driver.h4
-rw-r--r--compiler/linker/arm/relative_patcher_arm_base.h2
-rw-r--r--compiler/linker/linker_patch.h2
-rw-r--r--compiler/linker/relative_patcher.h2
-rw-r--r--compiler/linker/relative_patcher_test.h4
-rw-r--r--compiler/optimizing/block_builder.cc2
-rw-r--r--compiler/optimizing/code_generator.cc2
-rw-r--r--compiler/optimizing/code_generator.h4
-rw-r--r--compiler/optimizing/code_generator_arm64.h4
-rw-r--r--compiler/optimizing/code_generator_arm_vixl.h4
-rw-r--r--compiler/optimizing/code_generator_mips.h4
-rw-r--r--compiler/optimizing/code_generator_mips64.h2
-rw-r--r--compiler/optimizing/instruction_builder.cc2
-rw-r--r--compiler/optimizing/nodes.h2
-rw-r--r--compiler/optimizing/ssa_builder.cc2
-rw-r--r--compiler/utils/atomic_dex_ref_map-inl.h6
-rw-r--r--compiler/utils/atomic_dex_ref_map_test.cc2
-rw-r--r--dex2oat/dex2oat_image_test.cc2
-rw-r--r--dex2oat/dex2oat_test.cc2
-rw-r--r--dex2oat/linker/multi_oat_relative_patcher.h2
-rw-r--r--dex2oat/linker/oat_writer.h8
-rw-r--r--dex2oat/linker/oat_writer_test.cc2
-rw-r--r--libdexfile/Android.bp3
-rw-r--r--libdexfile/dex/bytecode_utils.h (renamed from runtime/bytecode_utils.h)8
-rw-r--r--libdexfile/dex/class_reference.h (renamed from runtime/class_reference.h)6
-rw-r--r--libdexfile/dex/method_reference.h (renamed from runtime/method_reference.h)6
-rw-r--r--libdexfile/dex/string_reference.h (renamed from runtime/string_reference.h)6
-rw-r--r--libdexfile/dex/string_reference_test.cc (renamed from compiler/utils/string_reference_test.cc)2
-rw-r--r--libdexfile/dex/test_dex_file_builder.h (renamed from compiler/utils/test_dex_file_builder.h)10
-rw-r--r--libdexfile/dex/test_dex_file_builder_test.cc (renamed from compiler/utils/test_dex_file_builder_test.cc)1
-rw-r--r--libdexfile/dex/type_reference.h (renamed from runtime/type_reference.h)8
-rw-r--r--oatdump/oatdump.cc2
-rw-r--r--profman/boot_image_profile.cc4
-rw-r--r--profman/profman.cc4
-rw-r--r--runtime/aot_class_linker.cc2
-rw-r--r--runtime/compiler_callbacks.h2
-rw-r--r--runtime/dex_to_dex_decompiler.cc2
-rw-r--r--runtime/entrypoints/quick/quick_trampoline_entrypoints.cc2
-rw-r--r--runtime/jit/jit_code_cache.h2
-rw-r--r--runtime/jit/profile_compilation_info.h4
-rw-r--r--runtime/jit/profile_compilation_info_test.cc4
-rw-r--r--runtime/jit/profile_saver.h2
-rw-r--r--runtime/runtime_callbacks_test.cc2
-rw-r--r--runtime/verifier/method_verifier.h2
-rw-r--r--test/595-profile-saving/profile-saving.cc2
-rw-r--r--test/664-aget-verifier/aget-verifier.cc2
52 files changed, 83 insertions, 85 deletions
diff --git a/compiler/Android.bp b/compiler/Android.bp
index c4d538fc88..e42261c556 100644
--- a/compiler/Android.bp
+++ b/compiler/Android.bp
@@ -359,9 +359,7 @@ art_cc_test {
"utils/atomic_dex_ref_map_test.cc",
"utils/dedupe_set_test.cc",
"utils/intrusive_forward_list_test.cc",
- "utils/string_reference_test.cc",
"utils/swap_space_test.cc",
- "utils/test_dex_file_builder_test.cc",
"verifier_deps_test.cc",
"jni/jni_cfi_test.cc",
diff --git a/compiler/dex/dex_to_dex_compiler.cc b/compiler/dex/dex_to_dex_compiler.cc
index 0caf1b14a6..be8641fd86 100644
--- a/compiler/dex/dex_to_dex_compiler.cc
+++ b/compiler/dex/dex_to_dex_compiler.cc
@@ -24,8 +24,8 @@
#include "base/logging.h" // For VLOG
#include "base/macros.h"
#include "base/mutex.h"
-#include "bytecode_utils.h"
#include "compiled_method.h"
+#include "dex/bytecode_utils.h"
#include "dex/dex_file-inl.h"
#include "dex/dex_instruction-inl.h"
#include "dex_to_dex_decompiler.h"
diff --git a/compiler/dex/dex_to_dex_compiler.h b/compiler/dex/dex_to_dex_compiler.h
index 7df09f140c..7536c3126a 100644
--- a/compiler/dex/dex_to_dex_compiler.h
+++ b/compiler/dex/dex_to_dex_compiler.h
@@ -24,8 +24,8 @@
#include "base/bit_vector.h"
#include "dex/dex_file.h"
#include "dex/invoke_type.h"
+#include "dex/method_reference.h"
#include "handle.h"
-#include "method_reference.h"
#include "quicken_info.h"
namespace art {
diff --git a/compiler/dex/inline_method_analyser.h b/compiler/dex/inline_method_analyser.h
index 837cc85456..e1d652a642 100644
--- a/compiler/dex/inline_method_analyser.h
+++ b/compiler/dex/inline_method_analyser.h
@@ -21,7 +21,7 @@
#include "base/mutex.h"
#include "dex/dex_file.h"
#include "dex/dex_instruction.h"
-#include "method_reference.h"
+#include "dex/method_reference.h"
/*
* NOTE: This code is part of the quick compiler. It lives in the runtime
diff --git a/compiler/dex/verification_results.h b/compiler/dex/verification_results.h
index 9e4192a0fa..56f00309c0 100644
--- a/compiler/dex/verification_results.h
+++ b/compiler/dex/verification_results.h
@@ -24,8 +24,8 @@
#include "base/macros.h"
#include "base/mutex.h"
#include "base/safe_map.h"
-#include "class_reference.h"
-#include "method_reference.h"
+#include "dex/class_reference.h"
+#include "dex/method_reference.h"
#include "utils/atomic_dex_ref_map.h"
namespace art {
diff --git a/compiler/dex/verified_method.h b/compiler/dex/verified_method.h
index ecbeed3ccf..f04392d44e 100644
--- a/compiler/dex/verified_method.h
+++ b/compiler/dex/verified_method.h
@@ -22,7 +22,7 @@
#include "base/mutex.h"
#include "base/safe_map.h"
#include "dex/dex_file.h"
-#include "method_reference.h"
+#include "dex/method_reference.h"
namespace art {
diff --git a/compiler/driver/compiler_driver.h b/compiler/driver/compiler_driver.h
index 8db892bf18..fffa3b345f 100644
--- a/compiler/driver/compiler_driver.h
+++ b/compiler/driver/compiler_driver.h
@@ -33,14 +33,14 @@
#include "base/quasi_atomic.h"
#include "base/safe_map.h"
#include "base/timing_logger.h"
-#include "class_reference.h"
#include "class_status.h"
#include "compiler.h"
+#include "dex/class_reference.h"
#include "dex/dex_file.h"
#include "dex/dex_file_types.h"
#include "dex/dex_to_dex_compiler.h"
+#include "dex/method_reference.h"
#include "driver/compiled_method_storage.h"
-#include "method_reference.h"
#include "thread_pool.h"
#include "utils/atomic_dex_ref_map.h"
#include "utils/dex_cache_arrays_layout.h"
diff --git a/compiler/linker/arm/relative_patcher_arm_base.h b/compiler/linker/arm/relative_patcher_arm_base.h
index b0064d1554..ee09bf96b3 100644
--- a/compiler/linker/arm/relative_patcher_arm_base.h
+++ b/compiler/linker/arm/relative_patcher_arm_base.h
@@ -21,8 +21,8 @@
#include <vector>
#include "base/safe_map.h"
+#include "dex/method_reference.h"
#include "linker/relative_patcher.h"
-#include "method_reference.h"
namespace art {
namespace linker {
diff --git a/compiler/linker/linker_patch.h b/compiler/linker/linker_patch.h
index 36051d2726..710d8a690a 100644
--- a/compiler/linker/linker_patch.h
+++ b/compiler/linker/linker_patch.h
@@ -23,7 +23,7 @@
#include <android-base/logging.h>
#include "base/bit_utils.h"
-#include "method_reference.h"
+#include "dex/method_reference.h"
namespace art {
diff --git a/compiler/linker/relative_patcher.h b/compiler/linker/relative_patcher.h
index 548e12896a..b58e3dffbd 100644
--- a/compiler/linker/relative_patcher.h
+++ b/compiler/linker/relative_patcher.h
@@ -23,7 +23,7 @@
#include "arch/instruction_set_features.h"
#include "base/array_ref.h"
#include "base/macros.h"
-#include "method_reference.h"
+#include "dex/method_reference.h"
namespace art {
diff --git a/compiler/linker/relative_patcher_test.h b/compiler/linker/relative_patcher_test.h
index 9e9d14af9e..d21f2795b9 100644
--- a/compiler/linker/relative_patcher_test.h
+++ b/compiler/linker/relative_patcher_test.h
@@ -23,15 +23,15 @@
#include "base/macros.h"
#include "compiled_method-inl.h"
#include "dex/verification_results.h"
+#include "dex/method_reference.h"
+#include "dex/string_reference.h"
#include "driver/compiler_driver.h"
#include "driver/compiler_options.h"
#include "globals.h"
#include "gtest/gtest.h"
#include "linker/relative_patcher.h"
-#include "method_reference.h"
#include "oat.h"
#include "oat_quick_method_header.h"
-#include "string_reference.h"
#include "vector_output_stream.h"
namespace art {
diff --git a/compiler/optimizing/block_builder.cc b/compiler/optimizing/block_builder.cc
index 2b568bcffd..95f2e98ac6 100644
--- a/compiler/optimizing/block_builder.cc
+++ b/compiler/optimizing/block_builder.cc
@@ -17,7 +17,7 @@
#include "block_builder.h"
#include "base/logging.h" // FOR VLOG.
-#include "bytecode_utils.h"
+#include "dex/bytecode_utils.h"
#include "dex/code_item_accessors-inl.h"
#include "dex/dex_file_exception_helpers.h"
#include "quicken_info.h"
diff --git a/compiler/optimizing/code_generator.cc b/compiler/optimizing/code_generator.cc
index 0fcc9c6d05..c2ae7646b5 100644
--- a/compiler/optimizing/code_generator.cc
+++ b/compiler/optimizing/code_generator.cc
@@ -44,9 +44,9 @@
#include "base/bit_utils_iterator.h"
#include "base/casts.h"
#include "base/leb128.h"
-#include "bytecode_utils.h"
#include "class_linker.h"
#include "compiled_method.h"
+#include "dex/bytecode_utils.h"
#include "dex/code_item_accessors-inl.h"
#include "dex/verified_method.h"
#include "driver/compiler_driver.h"
diff --git a/compiler/optimizing/code_generator.h b/compiler/optimizing/code_generator.h
index 7031483a77..a4873202b2 100644
--- a/compiler/optimizing/code_generator.h
+++ b/compiler/optimizing/code_generator.h
@@ -24,6 +24,8 @@
#include "base/bit_field.h"
#include "base/bit_utils.h"
#include "base/enums.h"
+#include "dex/string_reference.h"
+#include "dex/type_reference.h"
#include "globals.h"
#include "graph_visualizer.h"
#include "locations.h"
@@ -33,8 +35,6 @@
#include "read_barrier_option.h"
#include "stack.h"
#include "stack_map.h"
-#include "string_reference.h"
-#include "type_reference.h"
#include "utils/label.h"
namespace art {
diff --git a/compiler/optimizing/code_generator_arm64.h b/compiler/optimizing/code_generator_arm64.h
index b59ccd9034..a8a9802f9a 100644
--- a/compiler/optimizing/code_generator_arm64.h
+++ b/compiler/optimizing/code_generator_arm64.h
@@ -21,11 +21,11 @@
#include "code_generator.h"
#include "common_arm64.h"
#include "dex/dex_file_types.h"
+#include "dex/string_reference.h"
+#include "dex/type_reference.h"
#include "driver/compiler_options.h"
#include "nodes.h"
#include "parallel_move_resolver.h"
-#include "string_reference.h"
-#include "type_reference.h"
#include "utils/arm64/assembler_arm64.h"
// TODO(VIXL): Make VIXL compile with -Wshadow.
diff --git a/compiler/optimizing/code_generator_arm_vixl.h b/compiler/optimizing/code_generator_arm_vixl.h
index 2d8f6a6c78..6a07e36022 100644
--- a/compiler/optimizing/code_generator_arm_vixl.h
+++ b/compiler/optimizing/code_generator_arm_vixl.h
@@ -20,11 +20,11 @@
#include "base/enums.h"
#include "code_generator.h"
#include "common_arm.h"
+#include "dex/string_reference.h"
+#include "dex/type_reference.h"
#include "driver/compiler_options.h"
#include "nodes.h"
#include "parallel_move_resolver.h"
-#include "string_reference.h"
-#include "type_reference.h"
#include "utils/arm/assembler_arm_vixl.h"
// TODO(VIXL): make vixl clean wrt -Wshadow.
diff --git a/compiler/optimizing/code_generator_mips.h b/compiler/optimizing/code_generator_mips.h
index d90689695b..1f1743ff9e 100644
--- a/compiler/optimizing/code_generator_mips.h
+++ b/compiler/optimizing/code_generator_mips.h
@@ -19,11 +19,11 @@
#include "code_generator.h"
#include "dex/dex_file_types.h"
+#include "dex/string_reference.h"
+#include "dex/type_reference.h"
#include "driver/compiler_options.h"
#include "nodes.h"
#include "parallel_move_resolver.h"
-#include "string_reference.h"
-#include "type_reference.h"
#include "utils/mips/assembler_mips.h"
namespace art {
diff --git a/compiler/optimizing/code_generator_mips64.h b/compiler/optimizing/code_generator_mips64.h
index d1da1cec15..74c947e5d5 100644
--- a/compiler/optimizing/code_generator_mips64.h
+++ b/compiler/optimizing/code_generator_mips64.h
@@ -18,10 +18,10 @@
#define ART_COMPILER_OPTIMIZING_CODE_GENERATOR_MIPS64_H_
#include "code_generator.h"
+#include "dex/type_reference.h"
#include "driver/compiler_options.h"
#include "nodes.h"
#include "parallel_move_resolver.h"
-#include "type_reference.h"
#include "utils/mips64/assembler_mips64.h"
namespace art {
diff --git a/compiler/optimizing/instruction_builder.cc b/compiler/optimizing/instruction_builder.cc
index a38e2717cf..c7aef3779d 100644
--- a/compiler/optimizing/instruction_builder.cc
+++ b/compiler/optimizing/instruction_builder.cc
@@ -20,9 +20,9 @@
#include "base/arena_bit_vector.h"
#include "base/bit_vector-inl.h"
#include "block_builder.h"
-#include "bytecode_utils.h"
#include "class_linker.h"
#include "data_type-inl.h"
+#include "dex/bytecode_utils.h"
#include "dex/dex_instruction-inl.h"
#include "driver/compiler_driver-inl.h"
#include "driver/dex_compilation_unit.h"
diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h
index cbf748d4fd..a8fcea2097 100644
--- a/compiler/optimizing/nodes.h
+++ b/compiler/optimizing/nodes.h
@@ -34,12 +34,12 @@
#include "dex/dex_file.h"
#include "dex/dex_file_types.h"
#include "dex/invoke_type.h"
+#include "dex/method_reference.h"
#include "entrypoints/quick/quick_entrypoints_enum.h"
#include "handle.h"
#include "handle_scope.h"
#include "intrinsics_enum.h"
#include "locations.h"
-#include "method_reference.h"
#include "mirror/class.h"
#include "offsets.h"
#include "utils/intrusive_forward_list.h"
diff --git a/compiler/optimizing/ssa_builder.cc b/compiler/optimizing/ssa_builder.cc
index cb384768b7..dd54468217 100644
--- a/compiler/optimizing/ssa_builder.cc
+++ b/compiler/optimizing/ssa_builder.cc
@@ -16,8 +16,8 @@
#include "ssa_builder.h"
-#include "bytecode_utils.h"
#include "data_type-inl.h"
+#include "dex/bytecode_utils.h"
#include "mirror/class-inl.h"
#include "nodes.h"
#include "reference_type_propagation.h"
diff --git a/compiler/utils/atomic_dex_ref_map-inl.h b/compiler/utils/atomic_dex_ref_map-inl.h
index 7023b9a0e8..7977e8201f 100644
--- a/compiler/utils/atomic_dex_ref_map-inl.h
+++ b/compiler/utils/atomic_dex_ref_map-inl.h
@@ -21,10 +21,10 @@
#include <type_traits>
-#include "class_reference.h"
+#include "dex/class_reference.h"
#include "dex/dex_file-inl.h"
-#include "method_reference.h"
-#include "type_reference.h"
+#include "dex/method_reference.h"
+#include "dex/type_reference.h"
namespace art {
diff --git a/compiler/utils/atomic_dex_ref_map_test.cc b/compiler/utils/atomic_dex_ref_map_test.cc
index d58d60b4f3..4e1ef1248d 100644
--- a/compiler/utils/atomic_dex_ref_map_test.cc
+++ b/compiler/utils/atomic_dex_ref_map_test.cc
@@ -20,7 +20,7 @@
#include "common_runtime_test.h"
#include "dex/dex_file-inl.h"
-#include "method_reference.h"
+#include "dex/method_reference.h"
#include "scoped_thread_state_change-inl.h"
namespace art {
diff --git a/dex2oat/dex2oat_image_test.cc b/dex2oat/dex2oat_image_test.cc
index d8952826b3..6f1224916f 100644
--- a/dex2oat/dex2oat_image_test.cc
+++ b/dex2oat/dex2oat_image_test.cc
@@ -33,8 +33,8 @@
#include "dex/art_dex_file_loader.h"
#include "dex/dex_file-inl.h"
#include "dex/dex_file_loader.h"
+#include "dex/method_reference.h"
#include "jit/profile_compilation_info.h"
-#include "method_reference.h"
#include "runtime.h"
namespace art {
diff --git a/dex2oat/dex2oat_test.cc b/dex2oat/dex2oat_test.cc
index 09ff14e4ba..5590c8b3ab 100644
--- a/dex2oat/dex2oat_test.cc
+++ b/dex2oat/dex2oat_test.cc
@@ -30,9 +30,9 @@
#include "base/macros.h"
#include "base/mutex-inl.h"
#include "base/utils.h"
-#include "bytecode_utils.h"
#include "dex/art_dex_file_loader.h"
#include "dex/base64_test_util.h"
+#include "dex/bytecode_utils.h"
#include "dex/code_item_accessors-inl.h"
#include "dex/dex_file-inl.h"
#include "dex/dex_file_loader.h"
diff --git a/dex2oat/linker/multi_oat_relative_patcher.h b/dex2oat/linker/multi_oat_relative_patcher.h
index 2413c6e881..bd33b95318 100644
--- a/dex2oat/linker/multi_oat_relative_patcher.h
+++ b/dex2oat/linker/multi_oat_relative_patcher.h
@@ -20,7 +20,7 @@
#include "arch/instruction_set.h"
#include "base/safe_map.h"
#include "debug/method_debug_info.h"
-#include "method_reference.h"
+#include "dex/method_reference.h"
#include "linker/relative_patcher.h"
namespace art {
diff --git a/dex2oat/linker/oat_writer.h b/dex2oat/linker/oat_writer.h
index 120ea568d4..7b7bd13c18 100644
--- a/dex2oat/linker/oat_writer.h
+++ b/dex2oat/linker/oat_writer.h
@@ -27,15 +27,15 @@
#include "base/os.h"
#include "base/safe_map.h"
#include "compiler.h"
-#include "dex/compact_dex_level.h"
#include "debug/debug_info.h"
+#include "dex/compact_dex_level.h"
+#include "dex/method_reference.h"
+#include "dex/string_reference.h"
+#include "dex/type_reference.h"
#include "linker/relative_patcher.h" // For RelativePatcherTargetProvider.
#include "mem_map.h"
-#include "method_reference.h"
#include "mirror/class.h"
#include "oat.h"
-#include "string_reference.h"
-#include "type_reference.h"
namespace art {
diff --git a/dex2oat/linker/oat_writer_test.cc b/dex2oat/linker/oat_writer_test.cc
index 6cd901372b..6e95393e80 100644
--- a/dex2oat/linker/oat_writer_test.cc
+++ b/dex2oat/linker/oat_writer_test.cc
@@ -28,6 +28,7 @@
#include "debug/method_debug_info.h"
#include "dex/dex_file_loader.h"
#include "dex/quick_compiler_callbacks.h"
+#include "dex/test_dex_file_builder.h"
#include "dex/verification_results.h"
#include "driver/compiler_driver.h"
#include "driver/compiler_options.h"
@@ -45,7 +46,6 @@
#include "oat_file-inl.h"
#include "oat_writer.h"
#include "scoped_thread_state_change-inl.h"
-#include "utils/test_dex_file_builder.h"
#include "vdex_file.h"
namespace art {
diff --git a/libdexfile/Android.bp b/libdexfile/Android.bp
index 988ee03b55..3fd61ee251 100644
--- a/libdexfile/Android.bp
+++ b/libdexfile/Android.bp
@@ -84,6 +84,7 @@ gensrcs {
"dex/dex_instruction.h",
"dex/dex_instruction_utils.h",
"dex/invoke_type.h",
+ "dex/method_reference.h",
],
output_extension: "operator_out.cc",
}
@@ -116,10 +117,12 @@ art_cc_test {
"dex/compact_dex_file_test.cc",
"dex/compact_offset_table_test.cc",
"dex/descriptors_names_test.cc",
+ "dex/test_dex_file_builder_test.cc",
"dex/dex_file_loader_test.cc",
"dex/dex_file_verifier_test.cc",
"dex/dex_instruction_test.cc",
"dex/primitive_test.cc",
+ "dex/string_reference_test.cc",
"dex/utf_test.cc",
],
shared_libs: [
diff --git a/runtime/bytecode_utils.h b/libdexfile/dex/bytecode_utils.h
index a7e0abf4e3..3f1d524286 100644
--- a/runtime/bytecode_utils.h
+++ b/libdexfile/dex/bytecode_utils.h
@@ -14,10 +14,10 @@
* limitations under the License.
*/
-#ifndef ART_RUNTIME_BYTECODE_UTILS_H_
-#define ART_RUNTIME_BYTECODE_UTILS_H_
+#ifndef ART_LIBDEXFILE_DEX_BYTECODE_UTILS_H_
+#define ART_LIBDEXFILE_DEX_BYTECODE_UTILS_H_
-#include "base/arena_object.h"
+#include "base/value_object.h"
#include "dex/dex_file-inl.h"
#include "dex/dex_file.h"
#include "dex/dex_instruction-inl.h"
@@ -144,4 +144,4 @@ inline bool IsThrowingDexInstruction(const Instruction& instruction) {
} // namespace art
-#endif // ART_RUNTIME_BYTECODE_UTILS_H_
+#endif // ART_LIBDEXFILE_DEX_BYTECODE_UTILS_H_
diff --git a/runtime/class_reference.h b/libdexfile/dex/class_reference.h
index e8e668e169..c056213de4 100644
--- a/runtime/class_reference.h
+++ b/libdexfile/dex/class_reference.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_RUNTIME_CLASS_REFERENCE_H_
-#define ART_RUNTIME_CLASS_REFERENCE_H_
+#ifndef ART_LIBDEXFILE_DEX_CLASS_REFERENCE_H_
+#define ART_LIBDEXFILE_DEX_CLASS_REFERENCE_H_
#include <stdint.h>
#include <utility>
@@ -39,4 +39,4 @@ class ClassReference : public DexFileReference {
} // namespace art
-#endif // ART_RUNTIME_CLASS_REFERENCE_H_
+#endif // ART_LIBDEXFILE_DEX_CLASS_REFERENCE_H_
diff --git a/runtime/method_reference.h b/libdexfile/dex/method_reference.h
index 50b6d6eb68..266582b059 100644
--- a/runtime/method_reference.h
+++ b/libdexfile/dex/method_reference.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_RUNTIME_METHOD_REFERENCE_H_
-#define ART_RUNTIME_METHOD_REFERENCE_H_
+#ifndef ART_LIBDEXFILE_DEX_METHOD_REFERENCE_H_
+#define ART_LIBDEXFILE_DEX_METHOD_REFERENCE_H_
#include <stdint.h>
#include <string>
@@ -88,4 +88,4 @@ struct MethodReferenceValueComparator {
} // namespace art
-#endif // ART_RUNTIME_METHOD_REFERENCE_H_
+#endif // ART_LIBDEXFILE_DEX_METHOD_REFERENCE_H_
diff --git a/runtime/string_reference.h b/libdexfile/dex/string_reference.h
index 1ee5d6d53a..92095f4d2f 100644
--- a/runtime/string_reference.h
+++ b/libdexfile/dex/string_reference.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_RUNTIME_STRING_REFERENCE_H_
-#define ART_RUNTIME_STRING_REFERENCE_H_
+#ifndef ART_LIBDEXFILE_DEX_STRING_REFERENCE_H_
+#define ART_LIBDEXFILE_DEX_STRING_REFERENCE_H_
#include <stdint.h>
@@ -68,4 +68,4 @@ struct StringReferenceValueComparator {
} // namespace art
-#endif // ART_RUNTIME_STRING_REFERENCE_H_
+#endif // ART_LIBDEXFILE_DEX_STRING_REFERENCE_H_
diff --git a/compiler/utils/string_reference_test.cc b/libdexfile/dex/string_reference_test.cc
index 4b07e65771..b9cbf48978 100644
--- a/compiler/utils/string_reference_test.cc
+++ b/libdexfile/dex/string_reference_test.cc
@@ -19,8 +19,8 @@
#include <memory>
#include "dex/dex_file_types.h"
+#include "dex/test_dex_file_builder.h"
#include "gtest/gtest.h"
-#include "utils/test_dex_file_builder.h"
namespace art {
diff --git a/compiler/utils/test_dex_file_builder.h b/libdexfile/dex/test_dex_file_builder.h
index 58f1ec7b08..2d8a0bbfe4 100644
--- a/compiler/utils/test_dex_file_builder.h
+++ b/libdexfile/dex/test_dex_file_builder.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_COMPILER_UTILS_TEST_DEX_FILE_BUILDER_H_
-#define ART_COMPILER_UTILS_TEST_DEX_FILE_BUILDER_H_
+#ifndef ART_LIBDEXFILE_DEX_TEST_DEX_FILE_BUILDER_H_
+#define ART_LIBDEXFILE_DEX_TEST_DEX_FILE_BUILDER_H_
#include <zlib.h>
@@ -26,8 +26,6 @@
#include <android-base/logging.h>
-#include "base/bit_utils.h"
-#include "dex/art_dex_file_loader.h"
#include "dex/dex_file_loader.h"
#include "dex/standard_dex_file.h"
@@ -234,7 +232,7 @@ class TestDexFileBuilder {
static constexpr bool kVerify = false;
static constexpr bool kVerifyChecksum = false;
std::string error_msg;
- const ArtDexFileLoader dex_file_loader;
+ const DexFileLoader dex_file_loader;
std::unique_ptr<const DexFile> dex_file(dex_file_loader.Open(
&dex_file_data_[0],
dex_file_data_.size(),
@@ -399,4 +397,4 @@ class TestDexFileBuilder {
} // namespace art
-#endif // ART_COMPILER_UTILS_TEST_DEX_FILE_BUILDER_H_
+#endif // ART_LIBDEXFILE_DEX_TEST_DEX_FILE_BUILDER_H_
diff --git a/compiler/utils/test_dex_file_builder_test.cc b/libdexfile/dex/test_dex_file_builder_test.cc
index 788afd8e1a..11e073a8a1 100644
--- a/compiler/utils/test_dex_file_builder_test.cc
+++ b/libdexfile/dex/test_dex_file_builder_test.cc
@@ -16,7 +16,6 @@
#include "test_dex_file_builder.h"
-#include "base/utils.h"
#include "dex/dex_file-inl.h"
#include "gtest/gtest.h"
diff --git a/runtime/type_reference.h b/libdexfile/dex/type_reference.h
index 2b0b99f75e..9e7b8805af 100644
--- a/runtime/type_reference.h
+++ b/libdexfile/dex/type_reference.h
@@ -14,15 +14,15 @@
* limitations under the License.
*/
-#ifndef ART_RUNTIME_TYPE_REFERENCE_H_
-#define ART_RUNTIME_TYPE_REFERENCE_H_
+#ifndef ART_LIBDEXFILE_DEX_TYPE_REFERENCE_H_
+#define ART_LIBDEXFILE_DEX_TYPE_REFERENCE_H_
#include <stdint.h>
#include <android-base/logging.h>
#include "dex/dex_file_types.h"
-#include "string_reference.h"
+#include "dex/string_reference.h"
namespace art {
@@ -52,4 +52,4 @@ struct TypeReferenceValueComparator {
} // namespace art
-#endif // ART_RUNTIME_TYPE_REFERENCE_H_
+#endif // ART_LIBDEXFILE_DEX_TYPE_REFERENCE_H_
diff --git a/oatdump/oatdump.cc b/oatdump/oatdump.cc
index 10da2eaa83..433ed9aaee 100644
--- a/oatdump/oatdump.cc
+++ b/oatdump/oatdump.cc
@@ -48,6 +48,7 @@
#include "dex/descriptors_names.h"
#include "dex/dex_file-inl.h"
#include "dex/dex_instruction-inl.h"
+#include "dex/string_reference.h"
#include "disassembler.h"
#include "gc/accounting/space_bitmap-inl.h"
#include "gc/space/image_space.h"
@@ -73,7 +74,6 @@
#include "scoped_thread_state_change-inl.h"
#include "stack.h"
#include "stack_map.h"
-#include "string_reference.h"
#include "thread_list.h"
#include "type_lookup_table.h"
#include "vdex_file.h"
diff --git a/profman/boot_image_profile.cc b/profman/boot_image_profile.cc
index 3d003a7f06..60238e2082 100644
--- a/profman/boot_image_profile.cc
+++ b/profman/boot_image_profile.cc
@@ -19,9 +19,9 @@
#include "boot_image_profile.h"
#include "dex/dex_file-inl.h"
+#include "dex/method_reference.h"
+#include "dex/type_reference.h"
#include "jit/profile_compilation_info.h"
-#include "method_reference.h"
-#include "type_reference.h"
namespace art {
diff --git a/profman/profman.cc b/profman/profman.cc
index d1cc56389a..90e342d16a 100644
--- a/profman/profman.cc
+++ b/profman/profman.cc
@@ -41,16 +41,16 @@
#include "base/unix_file/fd_file.h"
#include "base/utils.h"
#include "boot_image_profile.h"
-#include "bytecode_utils.h"
#include "dex/art_dex_file_loader.h"
+#include "dex/bytecode_utils.h"
#include "dex/code_item_accessors-inl.h"
#include "dex/dex_file.h"
#include "dex/dex_file_loader.h"
#include "dex/dex_file_types.h"
+#include "dex/type_reference.h"
#include "jit/profile_compilation_info.h"
#include "profile_assistant.h"
#include "runtime.h"
-#include "type_reference.h"
#include "zip_archive.h"
namespace art {
diff --git a/runtime/aot_class_linker.cc b/runtime/aot_class_linker.cc
index 93e02eff69..c810b417fd 100644
--- a/runtime/aot_class_linker.cc
+++ b/runtime/aot_class_linker.cc
@@ -16,9 +16,9 @@
#include "aot_class_linker.h"
-#include "class_reference.h"
#include "class_status.h"
#include "compiler_callbacks.h"
+#include "dex/class_reference.h"
#include "handle_scope-inl.h"
#include "mirror/class-inl.h"
#include "runtime.h"
diff --git a/runtime/compiler_callbacks.h b/runtime/compiler_callbacks.h
index 8395966404..6855dcdb2b 100644
--- a/runtime/compiler_callbacks.h
+++ b/runtime/compiler_callbacks.h
@@ -18,7 +18,7 @@
#define ART_RUNTIME_COMPILER_CALLBACKS_H_
#include "base/mutex.h"
-#include "class_reference.h"
+#include "dex/class_reference.h"
#include "class_status.h"
namespace art {
diff --git a/runtime/dex_to_dex_decompiler.cc b/runtime/dex_to_dex_decompiler.cc
index 7887191713..a5248e67f1 100644
--- a/runtime/dex_to_dex_decompiler.cc
+++ b/runtime/dex_to_dex_decompiler.cc
@@ -20,7 +20,7 @@
#include "base/macros.h"
#include "base/mutex.h"
-#include "bytecode_utils.h"
+#include "dex/bytecode_utils.h"
#include "dex/code_item_accessors-inl.h"
#include "dex/dex_file-inl.h"
#include "dex/dex_instruction-inl.h"
diff --git a/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc b/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc
index b33587204b..7a0850d4b8 100644
--- a/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc
+++ b/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc
@@ -23,6 +23,7 @@
#include "dex/dex_file-inl.h"
#include "dex/dex_file_types.h"
#include "dex/dex_instruction-inl.h"
+#include "dex/method_reference.h"
#include "entrypoints/entrypoint_utils-inl.h"
#include "entrypoints/runtime_asm_entrypoints.h"
#include "gc/accounting/card_table-inl.h"
@@ -34,7 +35,6 @@
#include "jit/jit.h"
#include "linear_alloc.h"
#include "method_handles.h"
-#include "method_reference.h"
#include "mirror/class-inl.h"
#include "mirror/dex_cache-inl.h"
#include "mirror/method.h"
diff --git a/runtime/jit/jit_code_cache.h b/runtime/jit/jit_code_cache.h
index 16335c6911..dfa7ac0970 100644
--- a/runtime/jit/jit_code_cache.h
+++ b/runtime/jit/jit_code_cache.h
@@ -25,8 +25,8 @@
#include "base/macros.h"
#include "base/mutex.h"
#include "base/safe_map.h"
+#include "dex/method_reference.h"
#include "gc_root.h"
-#include "method_reference.h"
namespace art {
diff --git a/runtime/jit/profile_compilation_info.h b/runtime/jit/profile_compilation_info.h
index a0f6bf8dd6..6c56db9f49 100644
--- a/runtime/jit/profile_compilation_info.h
+++ b/runtime/jit/profile_compilation_info.h
@@ -28,9 +28,9 @@
#include "dex/dex_cache_resolved_classes.h"
#include "dex/dex_file.h"
#include "dex/dex_file_types.h"
-#include "method_reference.h"
+#include "dex/method_reference.h"
+#include "dex/type_reference.h"
#include "mem_map.h"
-#include "type_reference.h"
namespace art {
diff --git a/runtime/jit/profile_compilation_info_test.cc b/runtime/jit/profile_compilation_info_test.cc
index e6917956ae..4e3774e389 100644
--- a/runtime/jit/profile_compilation_info_test.cc
+++ b/runtime/jit/profile_compilation_info_test.cc
@@ -23,14 +23,14 @@
#include "common_runtime_test.h"
#include "dex/dex_file.h"
#include "dex/dex_file_loader.h"
+#include "dex/method_reference.h"
+#include "dex/type_reference.h"
#include "handle_scope-inl.h"
#include "jit/profile_compilation_info.h"
#include "linear_alloc.h"
-#include "method_reference.h"
#include "mirror/class-inl.h"
#include "mirror/class_loader.h"
#include "scoped_thread_state_change-inl.h"
-#include "type_reference.h"
#include "ziparchive/zip_writer.h"
namespace art {
diff --git a/runtime/jit/profile_saver.h b/runtime/jit/profile_saver.h
index e5cd11bae8..afbb3c122d 100644
--- a/runtime/jit/profile_saver.h
+++ b/runtime/jit/profile_saver.h
@@ -19,8 +19,8 @@
#include "base/mutex.h"
#include "base/safe_map.h"
+#include "dex/method_reference.h"
#include "jit_code_cache.h"
-#include "method_reference.h"
#include "profile_compilation_info.h"
#include "profile_saver_options.h"
diff --git a/runtime/runtime_callbacks_test.cc b/runtime/runtime_callbacks_test.cc
index 0b69851a55..5603526177 100644
--- a/runtime/runtime_callbacks_test.cc
+++ b/runtime/runtime_callbacks_test.cc
@@ -30,8 +30,8 @@
#include "art_method-inl.h"
#include "base/mutex.h"
#include "class_linker.h"
-#include "class_reference.h"
#include "common_runtime_test.h"
+#include "dex/class_reference.h"
#include "handle.h"
#include "handle_scope-inl.h"
#include "mem_map.h"
diff --git a/runtime/verifier/method_verifier.h b/runtime/verifier/method_verifier.h
index 4c9518b0ec..9237a8b44b 100644
--- a/runtime/verifier/method_verifier.h
+++ b/runtime/verifier/method_verifier.h
@@ -28,9 +28,9 @@
#include "dex/code_item_accessors.h"
#include "dex/dex_file.h"
#include "dex/dex_file_types.h"
+#include "dex/method_reference.h"
#include "handle.h"
#include "instruction_flags.h"
-#include "method_reference.h"
#include "reg_type_cache.h"
#include "register_line.h"
#include "verifier_enums.h"
diff --git a/test/595-profile-saving/profile-saving.cc b/test/595-profile-saving/profile-saving.cc
index b2af91e49f..bb9ab84fb5 100644
--- a/test/595-profile-saving/profile-saving.cc
+++ b/test/595-profile-saving/profile-saving.cc
@@ -17,10 +17,10 @@
#include "dex/dex_file.h"
#include "art_method-inl.h"
+#include "dex/method_reference.h"
#include "jit/profile_compilation_info.h"
#include "jit/profile_saver.h"
#include "jni.h"
-#include "method_reference.h"
#include "mirror/class-inl.h"
#include "mirror/executable.h"
#include "nativehelper/ScopedUtfChars.h"
diff --git a/test/664-aget-verifier/aget-verifier.cc b/test/664-aget-verifier/aget-verifier.cc
index 4a263fae7a..2b48fff910 100644
--- a/test/664-aget-verifier/aget-verifier.cc
+++ b/test/664-aget-verifier/aget-verifier.cc
@@ -17,8 +17,8 @@
#include "dex/dex_file.h"
#include "art_method-inl.h"
+#include "dex/method_reference.h"
#include "jni.h"
-#include "method_reference.h"
#include "mirror/class-inl.h"
#include "mirror/executable.h"
#include "scoped_thread_state_change-inl.h"