diff options
author | Mathieu Chartier <mathieuc@google.com> | 2014-02-13 18:02:13 -0800 |
---|---|---|
committer | Mathieu Chartier <mathieuc@google.com> | 2014-02-18 10:45:12 -0800 |
commit | 815873ecc312b1d231acce71e1a16f42cdaf09f2 (patch) | |
tree | 18ba2fa951775e60b240271bfe975e6e2cfc654c /runtime/intern_table.cc | |
parent | 2befd09cf4fe89a18a655f3e1dd310831bfa769f (diff) | |
download | art-815873ecc312b1d231acce71e1a16f42cdaf09f2.zip art-815873ecc312b1d231acce71e1a16f42cdaf09f2.tar.gz art-815873ecc312b1d231acce71e1a16f42cdaf09f2.tar.bz2 |
Change root visitor to use Object**.
Simplifies code and improves the performance of root visiting since
we usually don't need to check to see if the object moved.
Change-Id: Iba998f5a15ae1fa1b53ca5226dd2168a411196cf
Diffstat (limited to 'runtime/intern_table.cc')
-rw-r--r-- | runtime/intern_table.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/runtime/intern_table.cc b/runtime/intern_table.cc index cc49d67..660efe4 100644 --- a/runtime/intern_table.cc +++ b/runtime/intern_table.cc @@ -48,9 +48,8 @@ void InternTable::VisitRoots(RootCallback* callback, void* arg, MutexLock mu(Thread::Current(), *Locks::intern_table_lock_); if (!only_dirty || is_dirty_) { for (auto& strong_intern : strong_interns_) { - strong_intern.second = - down_cast<mirror::String*>(callback(strong_intern.second, arg, 0, - kRootInternedString)); + callback(reinterpret_cast<mirror::Object**>(&strong_intern.second), arg, 0, + kRootInternedString); DCHECK(strong_intern.second != nullptr); } if (clean_dirty) { |