diff options
| author | 2016-02-18 10:37:33 +0000 | |
|---|---|---|
| committer | 2016-02-18 10:37:33 +0000 | |
| commit | 7d9ddcc909e3a76ce516649c93a8d854b1cf2fb4 (patch) | |
| tree | aa15b4398290918e5eb5227781b5aef5ecff9e0b /compiler/dex/quick/quick_compiler.cc | |
| parent | a1f65135cd2315159ac302f904ba0c5ba0d7fd0e (diff) | |
| parent | 98e6ce44c700abd9375fe17f0aa31fea1e1e938b (diff) | |
Merge "Remove string init map."
Diffstat (limited to 'compiler/dex/quick/quick_compiler.cc')
| -rw-r--r-- | compiler/dex/quick/quick_compiler.cc | 12 | 
1 files changed, 10 insertions, 2 deletions
diff --git a/compiler/dex/quick/quick_compiler.cc b/compiler/dex/quick/quick_compiler.cc index 027290f9b1..49768ded46 100644 --- a/compiler/dex/quick/quick_compiler.cc +++ b/compiler/dex/quick/quick_compiler.cc @@ -509,7 +509,8 @@ static bool CanCompileShorty(const char* shorty, InstructionSet instruction_set)  }  bool QuickCompiler::CanCompileInstruction(const MIR* mir, -                                          const DexFile& dex_file) const { +                                          const DexFile& dex_file, +                                          CompilationUnit* cu) const {    switch (mir->dalvikInsn.opcode) {      // Quick compiler won't support new instruction semantics to invoke-super into an interface      // method @@ -522,6 +523,13 @@ bool QuickCompiler::CanCompileInstruction(const MIR* mir,        // False if we are an interface i.e. !(java_access_flags & kAccInterface)        return class_def != nullptr && ((class_def->GetJavaAccessFlags() & kAccInterface) == 0);      } +    case Instruction::NEW_INSTANCE: { +      uint32_t type_idx = mir->dalvikInsn.vB; +      if (cu->compiler_driver->IsStringTypeIndex(type_idx, cu->dex_file)) { +        return false; +      } +      return true; +    }      default:        return true;    } @@ -567,7 +575,7 @@ bool QuickCompiler::CanCompileMethod(uint32_t method_idx,                << MIRGraph::extended_mir_op_names_[opcode - kMirOpFirst];          }          return false; -      } else if (!CanCompileInstruction(mir, dex_file)) { +      } else if (!CanCompileInstruction(mir, dex_file, cu)) {          VLOG(compiler) << "Cannot compile dalvik opcode : " << mir->dalvikInsn.opcode;          return false;        }  |