summaryrefslogtreecommitdiff
path: root/compiler/dex/mir_method_info.cc
diff options
context:
space:
mode:
author Jeff Hao <jeffhao@google.com> 2014-01-15 13:49:50 -0800
committer Jeff Hao <jeffhao@google.com> 2015-04-27 18:54:52 -0700
commit848f70a3d73833fc1bf3032a9ff6812e429661d9 (patch)
treeb0349b3a40aab5a915af491b100659a5ca9fbbf6 /compiler/dex/mir_method_info.cc
parentd14438f0c5071962be7fab572b54687d32d9d087 (diff)
Replace String CharArray with internal uint16_t array.
Summary of high level changes: - Adds compiler inliner support to identify string init methods - Adds compiler support (quick & optimizing) with new invoke code path that calls method off the thread pointer - Adds thread entrypoints for all string init methods - Adds map to verifier to log when receiver of string init has been copied to other registers. used by compiler and interpreter Change-Id: I797b992a8feb566f9ad73060011ab6f51eb7ce01
Diffstat (limited to 'compiler/dex/mir_method_info.cc')
-rw-r--r--compiler/dex/mir_method_info.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/compiler/dex/mir_method_info.cc b/compiler/dex/mir_method_info.cc
index 0c84b82edd..5654604797 100644
--- a/compiler/dex/mir_method_info.cc
+++ b/compiler/dex/mir_method_info.cc
@@ -16,6 +16,7 @@
# include "mir_method_info.h"
+#include "dex/compiler_ir.h"
#include "dex/quick/dex_file_method_inliner.h"
#include "dex/quick/dex_file_to_method_inliner_map.h"
#include "dex/verified_method.h"
@@ -83,6 +84,13 @@ void MirMethodLoweringInfo::Resolve(CompilerDriver* compiler_driver,
MethodReference* devirt_target = (it->target_dex_file_ != nullptr) ? &devirt_ref : nullptr;
InvokeType invoke_type = it->GetInvokeType();
mirror::ArtMethod* resolved_method = nullptr;
+
+ bool string_init = false;
+ if (default_inliner->IsStringInitMethodIndex(it->MethodIndex())) {
+ string_init = true;
+ invoke_type = kDirect;
+ }
+
if (!it->IsQuickened()) {
it->target_dex_file_ = dex_file;
it->target_method_idx_ = it->MethodIndex();
@@ -170,6 +178,9 @@ void MirMethodLoweringInfo::Resolve(CompilerDriver* compiler_driver,
it->target_dex_file_ = target_method.dex_file;
it->target_method_idx_ = target_method.dex_method_index;
it->stats_flags_ = fast_path_flags;
+ if (string_init) {
+ it->direct_code_ = 0;
+ }
}
}