Make out arguments non-reference types.
Also, tidy some portable related code.
Change-Id: I67c8aa52eef8b556ca117ecda1b1e75465ba06a5
diff --git a/compiler/dex/compiler_ir.h b/compiler/dex/compiler_ir.h
index 8447d23..b9a26d6 100644
--- a/compiler/dex/compiler_ir.h
+++ b/compiler/dex/compiler_ir.h
@@ -64,7 +64,7 @@
const CompilerBackend* compiler_backend;
InstructionSet instruction_set;
- const InstructionSetFeatures& GetInstructionSetFeatures() {
+ InstructionSetFeatures GetInstructionSetFeatures() {
return compiler_driver->GetInstructionSetFeatures();
}
// TODO: much of this info available elsewhere. Go to the original source?
diff --git a/compiler/dex/frontend.cc b/compiler/dex/frontend.cc
index 6800f7b..2619258 100644
--- a/compiler/dex/frontend.cc
+++ b/compiler/dex/frontend.cc
@@ -128,7 +128,7 @@
}
}
-static CompiledMethod* CompileMethod(CompilerDriver& compiler,
+static CompiledMethod* CompileMethod(CompilerDriver& driver,
CompilerBackend* compiler_backend,
const DexFile::CodeItem* code_item,
uint32_t access_flags, InvokeType invoke_type,
@@ -143,11 +143,11 @@
}
ClassLinker* class_linker = Runtime::Current()->GetClassLinker();
- CompilationUnit cu(&compiler.GetArenaPool());
+ CompilationUnit cu(driver.GetArenaPool());
- cu.compiler_driver = &compiler;
+ cu.compiler_driver = &driver;
cu.class_linker = class_linker;
- cu.instruction_set = compiler.GetInstructionSet();
+ cu.instruction_set = driver.GetInstructionSet();
cu.compiler_backend = compiler_backend;
DCHECK((cu.instruction_set == kThumb2) ||
(cu.instruction_set == kX86) ||
@@ -216,8 +216,8 @@
}
/* Create the pass driver and launch it */
- PassDriver driver(&cu);
- driver.Launch();
+ PassDriver pass_driver(&cu);
+ pass_driver.Launch();
if (cu.enable_debug & (1 << kDebugDumpCheckStats)) {
cu.mir_graph->DumpCheckStats();
@@ -257,9 +257,9 @@
}
cu.EndTiming();
- compiler.GetTimingsLogger().Start();
- compiler.GetTimingsLogger().AddLogger(cu.timings);
- compiler.GetTimingsLogger().End();
+ driver.GetTimingsLogger()->Start();
+ driver.GetTimingsLogger()->AddLogger(cu.timings);
+ driver.GetTimingsLogger()->End();
return result;
}