ART: Some runtime cleanup
Use an enum for the compiler-callback mode.
Refactor and remove some unnecessary includes in runtime.h.
Change-Id: If2245fa470171311b8e05b677cf6bb28f209585a
diff --git a/runtime/runtime.h b/runtime/runtime.h
index 7181097..085335f 100644
--- a/runtime/runtime.h
+++ b/runtime/runtime.h
@@ -27,10 +27,7 @@
#include <vector>
#include "arch/instruction_set.h"
-#include "base/allocator.h"
-#include "base/arena_allocator.h"
#include "base/macros.h"
-#include "compiler_callbacks.h"
#include "gc_root.h"
#include "instrumentation.h"
#include "jobject_comparator.h"
@@ -43,6 +40,9 @@
namespace art {
+class ArenaPool;
+class CompilerCallbacks;
+
namespace gc {
class Heap;
namespace collector {
@@ -112,9 +112,10 @@
return compiler_callbacks_ != nullptr;
}
- bool CanRelocate() const {
- return !IsAotCompiler() || compiler_callbacks_->IsRelocationPossible();
- }
+ // If a compiler, are we compiling a boot image?
+ bool IsCompilingBootImage() const;
+
+ bool CanRelocate() const;
bool ShouldRelocate() const {
return must_relocate_ && CanRelocate();