summaryrefslogtreecommitdiffstats
path: root/compiler/dex/quick/dex_file_method_inliner.h
diff options
context:
space:
mode:
authorJeff Hao <jeffhao@google.com>2014-01-15 13:49:50 -0800
committerJeff Hao <jeffhao@google.com>2015-04-27 18:54:52 -0700
commit848f70a3d73833fc1bf3032a9ff6812e429661d9 (patch)
treeb0349b3a40aab5a915af491b100659a5ca9fbbf6 /compiler/dex/quick/dex_file_method_inliner.h
parentd14438f0c5071962be7fab572b54687d32d9d087 (diff)
downloadart-848f70a3d73833fc1bf3032a9ff6812e429661d9.tar.gz
art-848f70a3d73833fc1bf3032a9ff6812e429661d9.tar.bz2
art-848f70a3d73833fc1bf3032a9ff6812e429661d9.zip
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/quick/dex_file_method_inliner.h')
-rw-r--r--compiler/dex/quick/dex_file_method_inliner.h44
1 files changed, 43 insertions, 1 deletions
diff --git a/compiler/dex/quick/dex_file_method_inliner.h b/compiler/dex/quick/dex_file_method_inliner.h
index d1e562119c..26b41bf54d 100644
--- a/compiler/dex/quick/dex_file_method_inliner.h
+++ b/compiler/dex/quick/dex_file_method_inliner.h
@@ -96,6 +96,17 @@ class DexFileMethodInliner {
LOCKS_EXCLUDED(lock_);
/**
+ * Gets the thread pointer entrypoint offset for a string init method index and pointer size.
+ */
+ uint32_t GetOffsetForStringInit(uint32_t method_index, size_t pointer_size)
+ LOCKS_EXCLUDED(lock_);
+
+ /**
+ * Check whether a particular method index is a string init.
+ */
+ bool IsStringInitMethodIndex(uint32_t method_index) LOCKS_EXCLUDED(lock_);
+
+ /**
* To avoid multiple lookups of a class by its descriptor, we cache its
* type index in the IndexCache. These are the indexes into the IndexCache
* class_indexes array.
@@ -111,9 +122,15 @@ class DexFileMethodInliner {
kClassCacheFloat,
kClassCacheDouble,
kClassCacheVoid,
+ kClassCacheJavaLangByteArray,
+ kClassCacheJavaLangCharArray,
+ kClassCacheJavaLangIntArray,
kClassCacheJavaLangObject,
kClassCacheJavaLangRefReference,
kClassCacheJavaLangString,
+ kClassCacheJavaLangStringBuffer,
+ kClassCacheJavaLangStringBuilder,
+ kClassCacheJavaLangStringFactory,
kClassCacheJavaLangDouble,
kClassCacheJavaLangFloat,
kClassCacheJavaLangInteger,
@@ -122,10 +139,10 @@ class DexFileMethodInliner {
kClassCacheJavaLangMath,
kClassCacheJavaLangStrictMath,
kClassCacheJavaLangThread,
+ kClassCacheJavaNioCharsetCharset,
kClassCacheLibcoreIoMemory,
kClassCacheSunMiscUnsafe,
kClassCacheJavaLangSystem,
- kClassCacheJavaLangCharArray,
kClassCacheLast
};
@@ -153,9 +170,14 @@ class DexFileMethodInliner {
kNameCacheReferenceGetReferent,
kNameCacheCharAt,
kNameCacheCompareTo,
+ kNameCacheGetCharsNoCheck,
kNameCacheIsEmpty,
kNameCacheIndexOf,
kNameCacheLength,
+ kNameCacheInit,
+ kNameCacheNewStringFromBytes,
+ kNameCacheNewStringFromChars,
+ kNameCacheNewStringFromString,
kNameCacheCurrentThread,
kNameCachePeekByte,
kNameCachePeekIntNative,
@@ -230,6 +252,26 @@ class DexFileMethodInliner {
kProtoCacheObjectJ_Object,
kProtoCacheObjectJObject_V,
kProtoCacheCharArrayICharArrayII_V,
+ kProtoCacheIICharArrayI_V,
+ kProtoCacheByteArrayIII_String,
+ kProtoCacheIICharArray_String,
+ kProtoCacheString_String,
+ kProtoCache_V,
+ kProtoCacheByteArray_V,
+ kProtoCacheByteArrayI_V,
+ kProtoCacheByteArrayII_V,
+ kProtoCacheByteArrayIII_V,
+ kProtoCacheByteArrayIIString_V,
+ kProtoCacheByteArrayString_V,
+ kProtoCacheByteArrayIICharset_V,
+ kProtoCacheByteArrayCharset_V,
+ kProtoCacheCharArray_V,
+ kProtoCacheCharArrayII_V,
+ kProtoCacheIICharArray_V,
+ kProtoCacheIntArrayII_V,
+ kProtoCacheString_V,
+ kProtoCacheStringBuffer_V,
+ kProtoCacheStringBuilder_V,
kProtoCacheLast
};