OSDN Git Service

Remove obsolete restriction with allocations and dex cache.
authorNicolas Geoffray <ngeoffray@google.com>
Mon, 6 Feb 2017 16:36:24 +0000 (16:36 +0000)
committerNicolas Geoffray <ngeoffray@google.com>
Mon, 6 Feb 2017 16:36:24 +0000 (16:36 +0000)
We used to rely on being in the same dex file for doing allocations,
but not anymore.

Test: ART_TEST_JIT=true test-art-host
Change-Id: Iabc27469dadea6bfe39054e4be305e620818ac99

compiler/optimizing/instruction_builder.cc

index 9a3fd2b..a1c391f 100644 (file)
@@ -934,13 +934,6 @@ bool HInstructionBuilder::BuildInvokePolymorphic(const Instruction& instruction
 
 bool HInstructionBuilder::BuildNewInstance(dex::TypeIndex type_index, uint32_t dex_pc) {
   ScopedObjectAccess soa(Thread::Current());
-  Handle<mirror::DexCache> dex_cache = dex_compilation_unit_->GetDexCache();
-  Handle<mirror::DexCache> outer_dex_cache = outer_compilation_unit_->GetDexCache();
-
-  if (outer_dex_cache.Get() != dex_cache.Get()) {
-    // We currently do not support inlining allocations across dex files.
-    return false;
-  }
 
   HLoadClass* load_class = BuildLoadClass(type_index, dex_pc);