diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2015-03-23 17:52:58 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2015-03-23 17:52:59 +0000 |
commit | d24ba2c44c76a2b2dd13aafe8f7981c15be31a98 (patch) | |
tree | 0e1d0813c1d8d1c7239a900c1653296975713df0 /compiler/optimizing/builder.cc | |
parent | 90d480c26f7524f35323a11d6ba2880ff3db789a (diff) | |
parent | 7e4c3508e4f5512650b63c41f7872a749e99aee9 (diff) | |
download | art-d24ba2c44c76a2b2dd13aafe8f7981c15be31a98.tar.gz art-d24ba2c44c76a2b2dd13aafe8f7981c15be31a98.tar.bz2 art-d24ba2c44c76a2b2dd13aafe8f7981c15be31a98.zip |
Merge "Inline across dex files."
Diffstat (limited to 'compiler/optimizing/builder.cc')
-rw-r--r-- | compiler/optimizing/builder.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/compiler/optimizing/builder.cc b/compiler/optimizing/builder.cc index ec7fd62975..cbb41b1837 100644 --- a/compiler/optimizing/builder.cc +++ b/compiler/optimizing/builder.cc @@ -616,8 +616,8 @@ bool HGraphBuilder::BuildInvoke(const Instruction& instruction, DCHECK((optimized_invoke_type == invoke_type) || (optimized_invoke_type != kDirect) || compiler_driver_->GetCompilerOptions().GetCompilePic()); bool is_recursive = - (target_method.dex_method_index == outer_compilation_unit_->GetDexMethodIndex()); - DCHECK(!is_recursive || (target_method.dex_file == outer_compilation_unit_->GetDexFile())); + (target_method.dex_method_index == dex_compilation_unit_->GetDexMethodIndex()); + DCHECK(!is_recursive || (target_method.dex_file == dex_compilation_unit_->GetDexFile())); invoke = new (arena_) HInvokeStaticOrDirect( arena_, number_of_arguments, return_type, dex_pc, target_method.dex_method_index, is_recursive, optimized_invoke_type); @@ -711,7 +711,7 @@ bool HGraphBuilder::BuildStaticFieldAccess(const Instruction& instruction, uint16_t field_index = instruction.VRegB_21c(); ScopedObjectAccess soa(Thread::Current()); - StackHandleScope<4> hs(soa.Self()); + StackHandleScope<5> hs(soa.Self()); Handle<mirror::DexCache> dex_cache(hs.NewHandle( dex_compilation_unit_->GetClassLinker()->FindDexCache(*dex_compilation_unit_->GetDexFile()))); Handle<mirror::ClassLoader> class_loader(hs.NewHandle( @@ -724,8 +724,10 @@ bool HGraphBuilder::BuildStaticFieldAccess(const Instruction& instruction, return false; } + Handle<mirror::DexCache> outer_dex_cache(hs.NewHandle( + outer_compilation_unit_->GetClassLinker()->FindDexCache(*outer_compilation_unit_->GetDexFile()))); Handle<mirror::Class> referrer_class(hs.NewHandle(compiler_driver_->ResolveCompilingMethodsClass( - soa, dex_cache, class_loader, outer_compilation_unit_))); + soa, outer_dex_cache, class_loader, outer_compilation_unit_))); // The index at which the field's class is stored in the DexCache's type array. uint32_t storage_index; @@ -738,7 +740,7 @@ bool HGraphBuilder::BuildStaticFieldAccess(const Instruction& instruction, // TODO: find out why this check is needed. bool is_in_dex_cache = compiler_driver_->CanAssumeTypeIsPresentInDexCache( - *outer_compilation_unit_->GetDexFile(), storage_index); + *dex_compilation_unit_->GetDexFile(), storage_index); bool is_initialized = resolved_field->GetDeclaringClass()->IsInitialized() && is_in_dex_cache; bool is_referrer_class = (referrer_class.Get() == resolved_field->GetDeclaringClass()); |