diff options
| author | 2016-03-30 14:01:24 +0000 | |
|---|---|---|
| committer | 2016-03-30 14:01:24 +0000 | |
| commit | 0b92b73c62ab4cc13ca040d4233fa69d182971cc (patch) | |
| tree | df7d6180b13430de8f255884b12f29f191d1468e /compiler/optimizing/code_generator.h | |
| parent | 01098af7a530ca65dcf5a40b3799c5147e49bd64 (diff) | |
| parent | 085055f933d76579c32586488951a4497ffcf10e (diff) | |
Merge "Optimizing: Improve const-string code generation."
am: 085055f
* commit '085055f933d76579c32586488951a4497ffcf10e':
Optimizing: Improve const-string code generation.
Change-Id: Idd5a215e18abba1e2161f1848cb08aefb4719cf0
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, |