diff options
author | 2016-03-30 13:47:59 +0000 | |
---|---|---|
committer | 2016-03-30 13:48:00 +0000 | |
commit | 085055f933d76579c32586488951a4497ffcf10e (patch) | |
tree | df7d6180b13430de8f255884b12f29f191d1468e /compiler/optimizing/code_generator.h | |
parent | a1eff4f279253bbc90d2697d7c15390bcab65d1e (diff) | |
parent | cac5a7e871f1f346b317894359ad06fa7bd67fba (diff) |
Merge "Optimizing: Improve const-string code generation."
Diffstat (limited to 'compiler/optimizing/code_generator.h')
-rw-r--r-- | compiler/optimizing/code_generator.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/compiler/optimizing/code_generator.h b/compiler/optimizing/code_generator.h index e56323ff0f..cad55296bc 100644 --- a/compiler/optimizing/code_generator.h +++ b/compiler/optimizing/code_generator.h @@ -443,6 +443,11 @@ class CodeGenerator { uint32_t dex_pc, SlowPathCode* slow_path) = 0; + // Check if the desired_string_load_kind is supported. If it is, return it, + // otherwise return a fall-back info that should be used instead. + virtual HLoadString::LoadKind GetSupportedLoadStringKind( + HLoadString::LoadKind desired_string_load_kind) = 0; + // Check if the desired_dispatch_info is supported. If it is, return it, // otherwise return a fall-back info that should be used instead. virtual HInvokeStaticOrDirect::DispatchInfo GetSupportedInvokeStaticOrDirectDispatch( @@ -471,6 +476,18 @@ class CodeGenerator { LabelType label; }; + // String patch info used for recording locations of required linker patches and + // target strings. The actual string address can be absolute or PC-relative. + template <typename LabelType> + struct StringPatchInfo { + StringPatchInfo(const DexFile& df, uint32_t index) + : dex_file(df), string_index(index), label() { } + + const DexFile& dex_file; + uint32_t string_index; + LabelType label; + }; + CodeGenerator(HGraph* graph, size_t number_of_core_registers, size_t number_of_fpu_registers, |