Lines Matching refs:soa
96 void BuildArgArrayFromVarArgs(const ScopedObjectAccessAlreadyRunnable& soa,
116 Append(soa.Decode<mirror::Object*>(va_arg(ap, jobject)));
132 void BuildArgArrayFromJValues(const ScopedObjectAccessAlreadyRunnable& soa,
158 Append(soa.Decode<mirror::Object*>(args[args_offset].l));
431 static void InvokeWithArgArray(const ScopedObjectAccessAlreadyRunnable& soa,
436 if (UNLIKELY(soa.Env()->check_jni)) {
437 CheckMethodArguments(soa.Vm(), method->GetInterfaceMethodIfProxy(sizeof(void*)), args);
439 method->Invoke(soa.Self(), args, arg_array->GetNumBytes(), result, shorty);
442 JValue InvokeWithVarArgs(const ScopedObjectAccessAlreadyRunnable& soa, jobject obj, jmethodID mid,
448 if (UNLIKELY(__builtin_frame_address(0) < soa.Self()->GetStackEnd())) {
449 ThrowStackOverflowError(soa.Self());
453 ArtMethod* method = soa.DecodeMethod(mid);
457 method = soa.DecodeMethod(WellKnownClasses::StringInitToStringFactoryMethodID(mid));
459 mirror::Object* receiver = method->IsStatic() ? nullptr : soa.Decode<mirror::Object*>(obj);
464 arg_array.BuildArgArrayFromVarArgs(soa, receiver, args);
465 InvokeWithArgArray(soa, method, &arg_array, &result, shorty);
468 UpdateReference(soa.Self(), obj, result.GetL());
473 JValue InvokeWithJValues(const ScopedObjectAccessAlreadyRunnable& soa, jobject obj, jmethodID mid,
478 if (UNLIKELY(__builtin_frame_address(0) < soa.Self()->GetStackEnd())) {
479 ThrowStackOverflowError(soa.Self());
483 ArtMethod* method = soa.DecodeMethod(mid);
487 method = soa.DecodeMethod(WellKnownClasses::StringInitToStringFactoryMethodID(mid));
489 mirror::Object* receiver = method->IsStatic() ? nullptr : soa.Decode<mirror::Object*>(obj);
494 arg_array.BuildArgArrayFromJValues(soa, receiver, args);
495 InvokeWithArgArray(soa, method, &arg_array, &result, shorty);
498 UpdateReference(soa.Self(), obj, result.GetL());
503 JValue InvokeVirtualOrInterfaceWithJValues(const ScopedObjectAccessAlreadyRunnable& soa,
508 if (UNLIKELY(__builtin_frame_address(0) < soa.Self()->GetStackEnd())) {
509 ThrowStackOverflowError(soa.Self());
513 mirror::Object* receiver = soa.Decode<mirror::Object*>(obj);
514 ArtMethod* method = FindVirtualMethod(receiver, soa.DecodeMethod(mid));
518 method = soa.DecodeMethod(WellKnownClasses::StringInitToStringFactoryMethodID(mid));
525 arg_array.BuildArgArrayFromJValues(soa, receiver, args);
526 InvokeWithArgArray(soa, method, &arg_array, &result, shorty);
529 UpdateReference(soa.Self(), obj, result.GetL());
534 JValue InvokeVirtualOrInterfaceWithVarArgs(const ScopedObjectAccessAlreadyRunnable& soa,
539 if (UNLIKELY(__builtin_frame_address(0) < soa.Self()->GetStackEnd())) {
540 ThrowStackOverflowError(soa.Self());
544 mirror::Object* receiver = soa.Decode<mirror::Object*>(obj);
545 ArtMethod* method = FindVirtualMethod(receiver, soa.DecodeMethod(mid));
549 method = soa.DecodeMethod(WellKnownClasses::StringInitToStringFactoryMethodID(mid));
556 arg_array.BuildArgArrayFromVarArgs(soa, receiver, args);
557 InvokeWithArgArray(soa, method, &arg_array, &result, shorty);
560 UpdateReference(soa.Self(), obj, result.GetL());
565 jobject InvokeMethod(const ScopedObjectAccessAlreadyRunnable& soa, jobject javaMethod,
571 soa.Self()->GetStackEndForInterpreter(true))) {
572 ThrowStackOverflowError(soa.Self());
576 auto* abstract_method = soa.Decode<mirror::AbstractMethod*>(javaMethod);
582 StackHandleScope<1> hs(soa.Self());
584 if (!Runtime::Current()->GetClassLinker()->EnsureInitialized(soa.Self(), h_class, true, true)) {
594 jmethodID mid = soa.EncodeMethod(m);
595 m = soa.DecodeMethod(WellKnownClasses::StringInitToStringFactoryMethodID(mid));
599 receiver = soa.Decode<mirror::Object*>(javaReceiver);
610 auto* objects = soa.Decode<mirror::ObjectArray<mirror::Object>*>(javaArgs);
623 if (!accessible && !VerifyAccess(soa.Self(), receiver, declaring_class, m->GetAccessFlags(),
641 CHECK(soa.Self()->IsExceptionPending());
645 InvokeWithArgArray(soa, m, &arg_array, &result, shorty);
648 if (soa.Self()->IsExceptionPending()) {
650 jthrowable th = soa.Env()->ExceptionOccurred();
651 soa.Self()->ClearException();
652 jclass exception_class = soa.Env()->FindClass("java/lang/reflect/InvocationTargetException");
654 soa.Self()->AssertPendingOOMException();
657 jmethodID mid = soa.Env()->GetMethodID(exception_class, "<init>", "(Ljava/lang/Throwable;)V");
659 jobject exception_instance = soa.Env()->NewObject(exception_class, mid, th);
661 soa.Self()->AssertPendingOOMException();
664 soa.Env()->Throw(reinterpret_cast<jthrowable>(exception_instance));
669 return soa.AddLocalReference<jobject>(BoxPrimitive(Primitive::GetType(shorty[0]), result));
721 ScopedObjectAccessUnchecked soa(Thread::Current());
722 DCHECK_EQ(soa.Self()->GetState(), kRunnable);
732 soa.DecodeMethod(m)->Invoke(soa.Self(), arg_array.GetArray(), arg_array.GetNumBytes(),