summaryrefslogtreecommitdiff
path: root/compiler/dex/compiler_ir.cc
diff options
context:
space:
mode:
author Andreas Gampe <agampe@google.com> 2015-01-22 20:39:27 -0800
committer Andreas Gampe <agampe@google.com> 2015-01-26 14:30:40 -0800
commit0b9203e7996ee1856f620f95d95d8a273c43a3df (patch)
treea9715986cfdbb21e4d64f72b56fac255cc8b9309 /compiler/dex/compiler_ir.cc
parent4dfe58d8f2d398963f31831a57fbd12e282e1196 (diff)
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
Diffstat (limited to 'compiler/dex/compiler_ir.cc')
-rw-r--r--compiler/dex/compiler_ir.cc17
1 files changed, 9 insertions, 8 deletions
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),