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/runtime/runtime.h b/runtime/runtime.h
index c35f4ca..348d5c6 100644
--- a/runtime/runtime.h
+++ b/runtime/runtime.h
@@ -31,6 +31,7 @@
#include "gc_root.h"
#include "instrumentation.h"
#include "jobject_comparator.h"
+#include "method_reference.h"
#include "object_callbacks.h"
#include "offsets.h"
#include "profiler_options.h"
@@ -86,6 +87,8 @@
class Transaction;
typedef std::vector<std::pair<std::string, const void*>> RuntimeOptions;
+typedef SafeMap<MethodReference, SafeMap<uint32_t, std::set<uint32_t>>,
+ MethodReferenceComparator> MethodRefToStringInitRegMap;
// Not all combinations of flags are valid. You may not visit all roots as well as the new roots
// (no logical reason to do this). You also may not start logging new roots and stop logging new
@@ -558,6 +561,10 @@
return jit_options_.get();
}
+ MethodRefToStringInitRegMap& GetStringInitMap() {
+ return method_ref_string_init_reg_map_;
+ }
+
private:
static void InitPlatformSignalHandlers();
@@ -737,6 +744,8 @@
// zygote.
uint32_t zygote_max_failed_boots_;
+ MethodRefToStringInitRegMap method_ref_string_init_reg_map_;
+
DISALLOW_COPY_AND_ASSIGN(Runtime);
};
std::ostream& operator<<(std::ostream& os, const Runtime::CalleeSaveType& rhs);