From 5d01db1aa7634a012109d43e6403451b76de1daa Mon Sep 17 00:00:00 2001 From: Calin Juravle Date: Tue, 25 Aug 2015 15:02:42 +0100 Subject: BuildInvoke refactor: extract String.init in its own code path This makes it clear that we special handle String init. Getting rid of all `if (is_string_init)` improves readability into what we actually do and expect for strings. Change-Id: I9b4fba4c3ea89e0003c0704335cbe80e874d0e15 --- compiler/optimizing/builder.h | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) (limited to 'compiler/optimizing/builder.h') diff --git a/compiler/optimizing/builder.h b/compiler/optimizing/builder.h index b0238dc5f8..ae452f2589 100644 --- a/compiler/optimizing/builder.h +++ b/compiler/optimizing/builder.h @@ -270,13 +270,29 @@ class HGraphBuilder : public ValueObject { uintptr_t direct_method, uintptr_t direct_code); - bool SetupArgumentsAndAddInvoke(HInvoke* invoke, - uint32_t number_of_vreg_arguments, - uint32_t* args, - uint32_t register_index, - bool is_range, - const char* descriptor, - HClinitCheck* clinit_check); + bool SetupInvokeArguments(HInvoke* invoke, + uint32_t number_of_vreg_arguments, + uint32_t* args, + uint32_t register_index, + bool is_range, + const char* descriptor, + size_t start_index, + size_t* argument_index); + + bool HandleInvoke(HInvoke* invoke, + uint32_t number_of_vreg_arguments, + uint32_t* args, + uint32_t register_index, + bool is_range, + const char* descriptor, + HClinitCheck* clinit_check); + + bool HandleStringInit(HInvoke* invoke, + uint32_t number_of_vreg_arguments, + uint32_t* args, + uint32_t register_index, + bool is_range, + const char* descriptor); HClinitCheck* ProcessClinitCheckForInvoke( uint32_t dex_pc, -- cgit v1.2.3-59-g8ed1b