From 4db0bf9c4db6a09716c3388b7d2f88d534470339 Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Mon, 23 Nov 2015 09:35:04 +0000 Subject: Don't use the compiler driver for method resolution. The compiler driver makes assumptions that don't hold for the optimizing compiler, and will for example always go to slow path for an invoke-super when there's no verified method. Also fix GenerateInvokeVirtual in the presence of intrinsics. Next change will address some of the TODOs in sharpening.cc. Change-Id: I2b0e543ee9b9bebcadb2d26de29e850c59ad58b9 --- compiler/optimizing/builder.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'compiler/optimizing/builder.h') diff --git a/compiler/optimizing/builder.h b/compiler/optimizing/builder.h index 5ada93f684..c3979f3dd1 100644 --- a/compiler/optimizing/builder.h +++ b/compiler/optimizing/builder.h @@ -305,8 +305,10 @@ class HGraphBuilder : public ValueObject { HClinitCheck* ProcessClinitCheckForInvoke( uint32_t dex_pc, + ArtMethod* method, uint32_t method_idx, - HInvokeStaticOrDirect::ClinitCheckRequirement* clinit_check_requirement); + HInvokeStaticOrDirect::ClinitCheckRequirement* clinit_check_requirement) + SHARED_REQUIRES(Locks::mutator_lock_); // Build a HNewInstance instruction. bool BuildNewInstance(uint16_t type_index, uint32_t dex_pc); @@ -315,6 +317,10 @@ class HGraphBuilder : public ValueObject { bool IsInitialized(Handle cls) const SHARED_REQUIRES(Locks::mutator_lock_); + // Try to resolve a method using the class linker. Return null if a method could + // not be resolved. + ArtMethod* ResolveMethod(uint16_t method_idx, InvokeType invoke_type); + ArenaAllocator* const arena_; // A list of the size of the dex code holding block information for -- cgit v1.2.3-59-g8ed1b