Give Compiler a back reference to the driver.
The compiler driver is a single object delegating work to the compiler, rather
than passing it through to every Compiler call make it a member of Compiler so
that it maybe queried. This simplifies the Compiler API and makes the
relationship to CompilerDriver more explicit.
Remove reference arguments that contravene code style.
Change-Id: Iba47f2e3cbda679a7ec7588f26188d77643aa2c6
diff --git a/compiler/compiled_method.h b/compiler/compiled_method.h
index 90ae6ee..844b53c 100644
--- a/compiler/compiled_method.h
+++ b/compiler/compiled_method.h
@@ -102,7 +102,7 @@
class CompiledMethod : public CompiledCode {
public:
// Constructs a CompiledMethod for the non-LLVM compilers.
- CompiledMethod(CompilerDriver& driver,
+ CompiledMethod(CompilerDriver* driver,
InstructionSet instruction_set,
const std::vector<uint8_t>& quick_code,
const size_t frame_size_in_bytes,
@@ -114,7 +114,7 @@
const std::vector<uint8_t>* cfi_info);
// Constructs a CompiledMethod for the QuickJniCompiler.
- CompiledMethod(CompilerDriver& driver,
+ CompiledMethod(CompilerDriver* driver,
InstructionSet instruction_set,
const std::vector<uint8_t>& quick_code,
const size_t frame_size_in_bytes,
@@ -122,11 +122,11 @@
const uint32_t fp_spill_mask);
// Constructs a CompiledMethod for the Portable compiler.
- CompiledMethod(CompilerDriver& driver, InstructionSet instruction_set, const std::string& code,
+ CompiledMethod(CompilerDriver* driver, InstructionSet instruction_set, const std::string& code,
const std::vector<uint8_t>& gc_map, const std::string& symbol);
// Constructs a CompiledMethod for the Portable JniCompiler.
- CompiledMethod(CompilerDriver& driver, InstructionSet instruction_set, const std::string& code,
+ CompiledMethod(CompilerDriver* driver, InstructionSet instruction_set, const std::string& code,
const std::string& symbol);
~CompiledMethod() {}