diff options
author | 2018-05-24 11:09:38 +0100 | |
---|---|---|
committer | 2018-05-25 11:32:31 +0100 | |
commit | b4eb1b19e1dd35d12a408358656c1421f507d231 (patch) | |
tree | 03ba65d206b5e6222dcca0f62a973bcbb1bf8a50 /runtime/interpreter/unstarted_runtime_test.cc | |
parent | ff7ff426e136aa8fd6e33d873f6259311982f6bb (diff) |
Refactor ClassRoot/GetClassRoot().
Move it outside the ClassLinker, into its own header file,
and add retrieval based on a mirror class template argument.
Keep the SetClassRoot() as a private member of ClassLinker.
Make the new GetClassRoot()s return ObjPtr<>.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Bug: 31113334
Change-Id: Icbc6b62b41f6ffd65b437297a21eadbb0454e2b7
Diffstat (limited to 'runtime/interpreter/unstarted_runtime_test.cc')
-rw-r--r-- | runtime/interpreter/unstarted_runtime_test.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/runtime/interpreter/unstarted_runtime_test.cc b/runtime/interpreter/unstarted_runtime_test.cc index 860de2c28b..98fe8b271b 100644 --- a/runtime/interpreter/unstarted_runtime_test.cc +++ b/runtime/interpreter/unstarted_runtime_test.cc @@ -23,6 +23,7 @@ #include "base/enums.h" #include "base/memory_tool.h" #include "class_linker.h" +#include "class_root.h" #include "common_runtime_test.h" #include "dex/descriptors_names.h" #include "dex/dex_instruction.h" @@ -1370,7 +1371,7 @@ TEST_F(UnstartedRuntimeTest, ConstructorNewInstance0) { Handle<mirror::ObjectArray<mirror::Object>> args = hs.NewHandle( mirror::ObjectArray<mirror::Object>::Alloc( - self, class_linker_->GetClassRoot(ClassLinker::ClassRoot::kObjectArrayClass), 1)); + self, GetClassRoot<mirror::ObjectArray<mirror::Object>>(class_linker_), 1)); ASSERT_TRUE(args != nullptr); args->Set(0, input.Get()); |