Simplify JIT compiler interface usage from the runtime.
Avoid the excessive use of externs and reinterpret_casts.
Test: test.py -b --host --64 --jit
Change-Id: I179656a3a7c4e59d12c8f6d189c937ce07e0f122
diff --git a/compiler/jit/jit_compiler.h b/compiler/jit/jit_compiler.h
index 06315a5..737771f 100644
--- a/compiler/jit/jit_compiler.h
+++ b/compiler/jit/jit_compiler.h
@@ -19,6 +19,8 @@
#include "base/mutex.h"
+#include "jit/jit.h"
+
namespace art {
class ArtMethod;
@@ -31,7 +33,7 @@
class JitLogger;
class JitMemoryRegion;
-class JitCompiler {
+class JitCompiler : public JitCompilerInterface {
public:
static JitCompiler* Create();
virtual ~JitCompiler();
@@ -39,13 +41,17 @@
// Compilation entrypoint. Returns whether the compilation succeeded.
bool CompileMethod(
Thread* self, JitMemoryRegion* region, ArtMethod* method, bool baseline, bool osr)
- REQUIRES_SHARED(Locks::mutator_lock_);
+ REQUIRES_SHARED(Locks::mutator_lock_) override;
const CompilerOptions& GetCompilerOptions() const {
return *compiler_options_.get();
}
- void ParseCompilerOptions();
+ bool GenerateDebugInfo() override;
+
+ void ParseCompilerOptions() override;
+
+ void TypesLoaded(mirror::Class**, size_t count) REQUIRES_SHARED(Locks::mutator_lock_) override;
private:
std::unique_ptr<CompilerOptions> compiler_options_;