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
diff --git a/compiler/dex/mir_method_info.cc b/compiler/dex/mir_method_info.cc
index 0c84b82..5654604 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 @@
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 @@
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;
+ }
}
}