diff options
author | Ian Rogers <irogers@google.com> | 2014-05-06 16:20:11 -0700 |
---|---|---|
committer | Ian Rogers <irogers@google.com> | 2014-05-06 16:23:19 -0700 |
commit | 72d32629303f8f39362a4099481f48646aed042f (patch) | |
tree | 0ff613168c3bf2e12799594c9211f9a1694119e2 /compiler/jni/quick/jni_compiler.cc | |
parent | 47ebd77a6d249403a34d242908749b7446da2a82 (diff) | |
download | art-72d32629303f8f39362a4099481f48646aed042f.zip art-72d32629303f8f39362a4099481f48646aed042f.tar.gz art-72d32629303f8f39362a4099481f48646aed042f.tar.bz2 |
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
Diffstat (limited to 'compiler/jni/quick/jni_compiler.cc')
-rw-r--r-- | compiler/jni/quick/jni_compiler.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/jni/quick/jni_compiler.cc b/compiler/jni/quick/jni_compiler.cc index 9f439eb..5a22170 100644 --- a/compiler/jni/quick/jni_compiler.cc +++ b/compiler/jni/quick/jni_compiler.cc @@ -52,7 +52,7 @@ static void SetNativeParameter(Assembler* jni_asm, // registers, a reference to the method object is supplied as part of this // convention. // -CompiledMethod* ArtJniCompileMethodInternal(CompilerDriver& compiler, +CompiledMethod* ArtJniCompileMethodInternal(CompilerDriver* driver, uint32_t access_flags, uint32_t method_idx, const DexFile& dex_file) { const bool is_native = (access_flags & kAccNative) != 0; @@ -60,7 +60,7 @@ CompiledMethod* ArtJniCompileMethodInternal(CompilerDriver& compiler, const bool is_static = (access_flags & kAccStatic) != 0; const bool is_synchronized = (access_flags & kAccSynchronized) != 0; const char* shorty = dex_file.GetMethodShorty(dex_file.GetMethodId(method_idx)); - InstructionSet instruction_set = compiler.GetInstructionSet(); + InstructionSet instruction_set = driver->GetInstructionSet(); if (instruction_set == kThumb2) { instruction_set = kArm; } @@ -423,7 +423,7 @@ CompiledMethod* ArtJniCompileMethodInternal(CompilerDriver& compiler, std::vector<uint8_t> managed_code(cs); MemoryRegion code(&managed_code[0], managed_code.size()); __ FinalizeInstructions(code); - return new CompiledMethod(compiler, + return new CompiledMethod(driver, instruction_set, managed_code, frame_size, @@ -536,7 +536,7 @@ static void SetNativeParameter(Assembler* jni_asm, } // namespace art -extern "C" art::CompiledMethod* ArtQuickJniCompileMethod(art::CompilerDriver& compiler, +extern "C" art::CompiledMethod* ArtQuickJniCompileMethod(art::CompilerDriver* compiler, uint32_t access_flags, uint32_t method_idx, const art::DexFile& dex_file) { return ArtJniCompileMethodInternal(compiler, access_flags, method_idx, dex_file); |