summaryrefslogtreecommitdiff
path: root/runtime/interpreter/unstarted_runtime.cc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/interpreter/unstarted_runtime.cc')
-rw-r--r--runtime/interpreter/unstarted_runtime.cc20
1 files changed, 14 insertions, 6 deletions
diff --git a/runtime/interpreter/unstarted_runtime.cc b/runtime/interpreter/unstarted_runtime.cc
index 85acc71377..f8dd8293ca 100644
--- a/runtime/interpreter/unstarted_runtime.cc
+++ b/runtime/interpreter/unstarted_runtime.cc
@@ -235,6 +235,20 @@ void UnstartedRuntime::UnstartedClassForNameLong(
UnstartedClassForNameCommon(self, shadow_frame, result, arg_offset, true, "Class.forName");
}
+void UnstartedRuntime::UnstartedClassGetPrimitiveClass(
+ Thread* self, ShadowFrame* shadow_frame, JValue* result, size_t arg_offset) {
+ ObjPtr<mirror::String> class_name = GetClassName(self, shadow_frame, arg_offset);
+ ObjPtr<mirror::Class> klass = mirror::Class::GetPrimitiveClass(class_name);
+ if (UNLIKELY(klass == nullptr)) {
+ DCHECK(self->IsExceptionPending());
+ AbortTransactionOrFail(self,
+ "Class.getPrimitiveClass() failed: %s",
+ self->GetException()->GetDetailMessage()->ToModifiedUtf8().c_str());
+ return;
+ }
+ result->SetL(klass);
+}
+
void UnstartedRuntime::UnstartedClassClassForName(
Thread* self, ShadowFrame* shadow_frame, JValue* result, size_t arg_offset) {
UnstartedClassForNameCommon(self, shadow_frame, result, arg_offset, true, "Class.classForName");
@@ -738,12 +752,6 @@ void UnstartedRuntime::UnstartedVmClassLoaderFindLoadedClass(
}
}
-void UnstartedRuntime::UnstartedVoidLookupType(
- Thread* self ATTRIBUTE_UNUSED, ShadowFrame* shadow_frame ATTRIBUTE_UNUSED, JValue* result,
- size_t arg_offset ATTRIBUTE_UNUSED) {
- result->SetL(Runtime::Current()->GetClassLinker()->FindPrimitiveClass('V'));
-}
-
// Arraycopy emulation.
// Note: we can't use any fast copy functions, as they are not available under transaction.