From 4c8e12e66968929b36fac6a2237ca4b04160161e Mon Sep 17 00:00:00 2001 From: Orion Hodson Date: Fri, 18 May 2018 08:33:20 +0100 Subject: ART: Adds an entrypoint for invoke-custom Add support for the compiler to call into the runtime for invoke-custom bytecodes. Bug: 35337872 Test: art/test.py --host -r -t 952 Test: art/test.py --target --64 -r -t 952 Test: art/test.py --target --32 -r -t 952 Change-Id: I821432e7e5248c91b8e1d36c3112974c34171803 --- compiler/optimizing/instruction_builder.h | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'compiler/optimizing/instruction_builder.h') diff --git a/compiler/optimizing/instruction_builder.h b/compiler/optimizing/instruction_builder.h index 2218a691ea..af7092a0cf 100644 --- a/compiler/optimizing/instruction_builder.h +++ b/compiler/optimizing/instruction_builder.h @@ -173,12 +173,17 @@ class HInstructionBuilder : public ValueObject { // Builds an invocation node for invoke-polymorphic and returns whether the // instruction is supported. - bool BuildInvokePolymorphic(const Instruction& instruction, - uint32_t dex_pc, + bool BuildInvokePolymorphic(uint32_t dex_pc, uint32_t method_idx, dex::ProtoIndex proto_idx, const InstructionOperands& operands); + // Builds an invocation node for invoke-custom and returns whether the + // instruction is supported. + bool BuildInvokeCustom(uint32_t dex_pc, + uint32_t call_site_idx, + const InstructionOperands& operands); + // Builds a new array node and the instructions that fill it. HNewArray* BuildFilledNewArray(uint32_t dex_pc, dex::TypeIndex type_index, @@ -253,19 +258,19 @@ class HInstructionBuilder : public ValueObject { bool SetupInvokeArguments(HInvoke* invoke, const InstructionOperands& operands, - const char* descriptor, + const char* shorty, size_t start_index, size_t* argument_index); bool HandleInvoke(HInvoke* invoke, const InstructionOperands& operands, - const char* descriptor, - HClinitCheck* clinit_check, - bool is_unresolved); + const char* shorty, + bool is_unresolved, + HClinitCheck* clinit_check = nullptr); bool HandleStringInit(HInvoke* invoke, const InstructionOperands& operands, - const char* descriptor); + const char* shorty); void HandleStringInitResult(HInvokeStaticOrDirect* invoke); HClinitCheck* ProcessClinitCheckForInvoke( -- cgit v1.2.3-59-g8ed1b