From 0b9203e7996ee1856f620f95d95d8a273c43a3df Mon Sep 17 00:00:00 2001 From: Andreas Gampe Date: Thu, 22 Jan 2015 20:39:27 -0800 Subject: ART: Some Quick cleanup Make several fields const in CompilationUnit. May benefit some Mir2Lir code that repeats tests, and in general immutability is good. Remove compiler_internals.h and refactor some other headers to reduce overly broad imports (and thus forced recompiles on changes). Change-Id: I898405907c68923581373b5981d8a85d2e5d185a --- compiler/dex/compiler_ir.cc | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'compiler/dex/compiler_ir.cc') diff --git a/compiler/dex/compiler_ir.cc b/compiler/dex/compiler_ir.cc index a2b3fe432f..0cfa966e25 100644 --- a/compiler/dex/compiler_ir.cc +++ b/compiler/dex/compiler_ir.cc @@ -16,16 +16,19 @@ #include "compiler_ir.h" +#include "arch/instruction_set_features.h" #include "base/dumpable.h" #include "backend.h" -#include "frontend.h" +#include "dex_flags.h" +#include "driver/compiler_driver.h" #include "mir_graph.h" namespace art { -CompilationUnit::CompilationUnit(ArenaPool* pool) - : compiler_driver(nullptr), - class_linker(nullptr), +CompilationUnit::CompilationUnit(ArenaPool* pool, InstructionSet isa, CompilerDriver* driver, + ClassLinker* linker) + : compiler_driver(driver), + class_linker(linker), dex_file(nullptr), class_loader(nullptr), class_def_idx(0), @@ -36,10 +39,8 @@ CompilationUnit::CompilationUnit(ArenaPool* pool) disable_opt(0), enable_debug(0), verbose(false), - compiler(nullptr), - instruction_set(kNone), - target64(false), - compiler_flip_match(false), + instruction_set(isa), + target64(Is64BitInstructionSet(isa)), arena(pool), arena_stack(pool), mir_graph(nullptr), -- cgit v1.2.3-59-g8ed1b