From 3f1dcd39e134d994ac88dcc4f30ec8cabcd8decf Mon Sep 17 00:00:00 2001 From: Andreas Gampe Date: Fri, 28 Dec 2018 09:39:56 -0800 Subject: ART: Move dex structs into own header Separating out the structs from DexFile allows them to be forward- declared, which reduces the need to include the dex_file header. Bug: 119869270 Test: m Change-Id: I32dde5a632884bca7435cd584b4a81883de2e7b4 --- compiler/compiler.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'compiler/compiler.h') diff --git a/compiler/compiler.h b/compiler/compiler.h index 8c07773f4c..8a67724de0 100644 --- a/compiler/compiler.h +++ b/compiler/compiler.h @@ -19,10 +19,13 @@ #include "base/mutex.h" #include "base/os.h" -#include "dex/dex_file.h" +#include "dex/invoke_type.h" namespace art { +namespace dex { +struct CodeItem; +} // namespace dex namespace jit { class JitCodeCache; class JitLogger; @@ -35,6 +38,7 @@ class DexCache; class ArtMethod; class CompilerDriver; class CompiledMethod; +class DexFile; template class Handle; class OatWriter; class Thread; @@ -54,7 +58,7 @@ class Compiler { virtual bool CanCompileMethod(uint32_t method_idx, const DexFile& dex_file) const = 0; - virtual CompiledMethod* Compile(const DexFile::CodeItem* code_item, + virtual CompiledMethod* Compile(const dex::CodeItem* code_item, uint32_t access_flags, InvokeType invoke_type, uint16_t class_def_idx, @@ -102,7 +106,7 @@ class Compiler { // Returns whether the method to compile is such a pathological case that // it's not worth compiling. - static bool IsPathologicalCase(const DexFile::CodeItem& code_item, + static bool IsPathologicalCase(const dex::CodeItem& code_item, uint32_t method_idx, const DexFile& dex_file); -- cgit v1.2.3-59-g8ed1b