summaryrefslogtreecommitdiff
path: root/runtime/interpreter/unstarted_runtime_test.cc
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2022-07-13 18:06:50 +0100
committer Nicolas Geoffray <ngeoffray@google.com> 2022-07-19 08:54:54 +0000
commit16032a421a08fb6396de8e8f168a62fe29a0f7ad (patch)
tree584c7bf4038538139ecf3b319699d723b23a43b4 /runtime/interpreter/unstarted_runtime_test.cc
parentcca4c6e6ad7bf54604eb516d54441c414be6ca53 (diff)
Use the thread local cache in interpreter / unresolved entrypoints
Refactor and cleanup how we lookup the method to invoke. Also remove old mterp related code. Test: test.py Change-Id: I135b38c45612c5266b51c0eb39a67ac988541ae7
Diffstat (limited to 'runtime/interpreter/unstarted_runtime_test.cc')
-rw-r--r--runtime/interpreter/unstarted_runtime_test.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/runtime/interpreter/unstarted_runtime_test.cc b/runtime/interpreter/unstarted_runtime_test.cc
index 75a692e48d..70948b8565 100644
--- a/runtime/interpreter/unstarted_runtime_test.cc
+++ b/runtime/interpreter/unstarted_runtime_test.cc
@@ -420,11 +420,13 @@ TEST_F(UnstartedRuntimeTest, StringInit) {
shadow_frame->SetVRegReference(0, reference_empty_string.Get());
shadow_frame->SetVRegReference(1, string_arg.Get());
- interpreter::DoCall<false, false>(method,
+ ArtMethod* factory = WellKnownClasses::StringInitToStringFactory(method);
+ interpreter::DoCall<false, false>(factory,
self,
*shadow_frame,
Instruction::At(inst_data),
inst_data[0],
+ /* string_init= */ true,
&result);
ObjPtr<mirror::String> string_result = down_cast<mirror::String*>(result.GetL());
EXPECT_EQ(string_arg->GetLength(), string_result->GetLength());
@@ -1024,6 +1026,7 @@ TEST_F(UnstartedRuntimeTest, FloatConversion) {
*shadow_frame,
Instruction::At(inst_data),
inst_data[0],
+ /* string_init= */ false,
&result);
ObjPtr<mirror::String> string_result = down_cast<mirror::String*>(result.GetL());
ASSERT_TRUE(string_result != nullptr);
@@ -1179,6 +1182,7 @@ class UnstartedClassForNameTest : public UnstartedRuntimeTest {
*shadow_frame,
Instruction::At(inst_data),
inst_data[0],
+ /* string_init= */ false,
&result);
CHECK(!self->IsExceptionPending());
}