diff options
author | Mathieu Chartier <mathieuc@google.com> | 2014-11-24 18:29:54 -0800 |
---|---|---|
committer | Mathieu Chartier <mathieuc@google.com> | 2014-11-25 16:02:04 -0800 |
commit | eace45873190a27302b3644c32ec82854b59d299 (patch) | |
tree | 73fbf327839263b6847bdc4359ac1dbea2b897e3 /runtime/interpreter | |
parent | 8ac8d5556fae9c728bcebcc9036a1bbf40087c76 (diff) | |
download | art-eace45873190a27302b3644c32ec82854b59d299.zip art-eace45873190a27302b3644c32ec82854b59d299.tar.gz art-eace45873190a27302b3644c32ec82854b59d299.tar.bz2 |
Move dexCacheStrings from ArtMethod to Class
Adds one load for const strings which are not direct.
Saves >= 60KB of memory avg per app.
Image size: -350KB.
Bug: 17643507
Change-Id: I2d1a3253d9de09682be9bc6b420a29513d592cc8
(cherry picked from commit f521f423b66e952f746885dd9f6cf8ef2788955d)
Diffstat (limited to 'runtime/interpreter')
-rw-r--r-- | runtime/interpreter/interpreter_common.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/runtime/interpreter/interpreter_common.h b/runtime/interpreter/interpreter_common.h index 7f6303a..f88d56a 100644 --- a/runtime/interpreter/interpreter_common.h +++ b/runtime/interpreter/interpreter_common.h @@ -201,10 +201,11 @@ static inline String* ResolveString(Thread* self, ShadowFrame& shadow_frame, uin } } mirror::ArtMethod* method = shadow_frame.GetMethod(); - mirror::String* s = method->GetDexCacheStrings()->Get(string_idx); + mirror::Class* declaring_class = method->GetDeclaringClass(); + mirror::String* s = declaring_class->GetDexCacheStrings()->Get(string_idx); if (UNLIKELY(s == nullptr)) { StackHandleScope<1> hs(self); - Handle<mirror::DexCache> dex_cache(hs.NewHandle(method->GetDexCache())); + Handle<mirror::DexCache> dex_cache(hs.NewHandle(declaring_class->GetDexCache())); s = Runtime::Current()->GetClassLinker()->ResolveString(*method->GetDexFile(), string_idx, dex_cache); } |