diff options
| author | 2015-10-21 10:00:34 +0000 | |
|---|---|---|
| committer | 2015-10-21 10:00:34 +0000 | |
| commit | 66e33f1906be899f140d5fe2a657db4e3993106e (patch) | |
| tree | eaef317e550fb4aa0612ba5d7a56ea42bc32f227 /compiler/driver/compiler_driver.cc | |
| parent | 31e913fbea3d669b2067248f2163332940d8ec45 (diff) | |
| parent | 0c3c2668ef44fdbd18d97f9134a85d1a7d561aa4 (diff) | |
Merge "Use DlMallocSpace for the JIT code cache."
Diffstat (limited to 'compiler/driver/compiler_driver.cc')
| -rw-r--r-- | compiler/driver/compiler_driver.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc index 8324bf30d6..b9565846ce 100644 --- a/compiler/driver/compiler_driver.cc +++ b/compiler/driver/compiler_driver.cc @@ -594,7 +594,7 @@ static void CompileMethod(Thread* self, } } else if ((access_flags & kAccAbstract) != 0) { // Abstract methods don't have code. - } else { + } else if (Runtime::Current()->IsAotCompiler()) { const VerifiedMethod* verified_method = driver->GetVerificationResults()->GetVerifiedMethod(method_ref); bool compile = compilation_enabled && @@ -633,6 +633,13 @@ static void CompileMethod(Thread* self, ? dex_to_dex_compilation_level : optimizer::DexToDexCompilationLevel::kRequired); } + } else { + // This is for the JIT compiler, which has already ensured the class is verified. + // We can go straight to compiling. + DCHECK(Runtime::Current()->UseJit()); + compiled_method = driver->GetCompiler()->Compile(code_item, access_flags, invoke_type, + class_def_idx, method_idx, class_loader, + dex_file, dex_cache); } if (kTimeCompileMethod) { uint64_t duration_ns = NanoTime() - start_ns; |