Lines Matching full:thread
38 void ThrowException(const LanguageContext &ctx, ManagedThread *thread, const uint8_t *mutf8_name, in ThrowException() argument
41 ctx.ThrowException(thread, mutf8_name, mutf8_msg); in ThrowException()
44 static LanguageContext GetLanguageContext(ManagedThread *thread) in GetLanguageContext() argument
46 ASSERT(thread != nullptr); in GetLanguageContext()
47 return thread->GetVM()->GetLanguageContext(); in GetLanguageContext()
52 auto *thread = ManagedThread::GetCurrent(); in ThrowNullPointerException() local
53 auto ctx = GetLanguageContext(thread); in ThrowNullPointerException()
54 ThrowNullPointerException(ctx, thread); in ThrowNullPointerException()
57 void ThrowNullPointerException(const LanguageContext &ctx, ManagedThread *thread) in ThrowNullPointerException() argument
59 ThrowException(ctx, thread, ctx.GetNullPointerExceptionClassDescriptor(), nullptr); in ThrowNullPointerException()
62 void ThrowStackOverflowException(ManagedThread *thread) in ThrowStackOverflowException() argument
64 auto ctx = GetLanguageContext(thread); in ThrowStackOverflowException()
65 ctx.ThrowStackOverflowException(thread); in ThrowStackOverflowException()
70 auto *thread = ManagedThread::GetCurrent(); in ThrowArrayIndexOutOfBoundsException() local
71 auto ctx = GetLanguageContext(thread); in ThrowArrayIndexOutOfBoundsException()
72 ThrowArrayIndexOutOfBoundsException(idx, length, ctx, thread); in ThrowArrayIndexOutOfBoundsException()
76 const LanguageContext &ctx, ManagedThread *thread) in ThrowArrayIndexOutOfBoundsException() argument
81 ThrowException(ctx, thread, ctx.GetArrayIndexOutOfBoundsExceptionClassDescriptor(), in ThrowArrayIndexOutOfBoundsException()
87 auto *thread = ManagedThread::GetCurrent(); in ThrowIndexOutOfBoundsException() local
88 auto ctx = GetLanguageContext(thread); in ThrowIndexOutOfBoundsException()
93 …ThrowException(ctx, thread, ctx.GetIndexOutOfBoundsExceptionClassDescriptor(), utf::CStringAsMutf8… in ThrowIndexOutOfBoundsException()
98 auto *thread = ManagedThread::GetCurrent(); in ThrowIllegalStateException() local
99 auto ctx = GetLanguageContext(thread); in ThrowIllegalStateException()
100 …ThrowException(ctx, thread, ctx.GetIllegalStateExceptionClassDescriptor(), utf::CStringAsMutf8(msg… in ThrowIllegalStateException()
105 auto *thread = ManagedThread::GetCurrent(); in ThrowStringIndexOutOfBoundsException() local
106 auto ctx = GetLanguageContext(thread); in ThrowStringIndexOutOfBoundsException()
111 ThrowException(ctx, thread, ctx.GetStringIndexOutOfBoundsExceptionClassDescriptor(), in ThrowStringIndexOutOfBoundsException()
117 auto *thread = ManagedThread::GetCurrent(); in ThrowNegativeArraySizeException() local
118 auto ctx = GetLanguageContext(thread); in ThrowNegativeArraySizeException()
123 …ThrowException(ctx, thread, ctx.GetNegativeArraySizeExceptionClassDescriptor(), utf::CStringAsMutf… in ThrowNegativeArraySizeException()
128 auto *thread = ManagedThread::GetCurrent(); in ThrowNegativeArraySizeException() local
129 auto ctx = GetLanguageContext(thread); in ThrowNegativeArraySizeException()
130 …ThrowException(ctx, thread, ctx.GetNegativeArraySizeExceptionClassDescriptor(), utf::CStringAsMutf… in ThrowNegativeArraySizeException()
135 auto *thread = ManagedThread::GetCurrent(); in ThrowArithmeticException() local
136 auto ctx = GetLanguageContext(thread); in ThrowArithmeticException()
137 …ThrowException(ctx, thread, ctx.GetArithmeticExceptionClassDescriptor(), utf::CStringAsMutf8("/ by… in ThrowArithmeticException()
142 auto *thread = ManagedThread::GetCurrent(); in ThrowClassCastException() local
143 auto ctx = GetLanguageContext(thread); in ThrowClassCastException()
148 …ThrowException(ctx, thread, ctx.GetClassCastExceptionClassDescriptor(), utf::CStringAsMutf8(msg.c_… in ThrowClassCastException()
153 auto *thread = ManagedThread::GetCurrent(); in ThrowAbstractMethodError() local
154 auto ctx = GetLanguageContext(thread); in ThrowAbstractMethodError()
161 …ThrowException(ctx, thread, ctx.GetAbstractMethodErrorClassDescriptor(), utf::CStringAsMutf8(msg.c… in ThrowAbstractMethodError()
166 auto *thread = ManagedThread::GetCurrent(); in ThrowIncompatibleClassChangeErrorForMethodConflict() local
167 auto ctx = GetLanguageContext(thread); in ThrowIncompatibleClassChangeErrorForMethodConflict()
174 …ThrowException(ctx, thread, ctx.GetIncompatibleClassChangeErrorDescriptor(), utf::CStringAsMutf8(m… in ThrowIncompatibleClassChangeErrorForMethodConflict()
186 auto *thread = ManagedThread::GetCurrent(); in ThrowArrayStoreException() local
187 auto ctx = GetLanguageContext(thread); in ThrowArrayStoreException()
189 …ThrowException(ctx, thread, ctx.GetArrayStoreExceptionClassDescriptor(), utf::CStringAsMutf8(msg.c… in ThrowArrayStoreException()
194 auto *thread = ManagedThread::GetCurrent(); in ThrowRuntimeException() local
195 auto ctx = GetLanguageContext(thread); in ThrowRuntimeException()
197 …ThrowException(ctx, thread, ctx.GetRuntimeExceptionClassDescriptor(), utf::CStringAsMutf8(msg.c_st… in ThrowRuntimeException()
202 auto *thread = ManagedThread::GetCurrent(); in ThrowIllegalArgumentException() local
203 auto ctx = GetLanguageContext(thread); in ThrowIllegalArgumentException()
205 …ThrowException(ctx, thread, ctx.GetIllegalArgumentExceptionClassDescriptor(), utf::CStringAsMutf8(… in ThrowIllegalArgumentException()
210 auto *thread = ManagedThread::GetCurrent(); in ThrowClassCircularityError() local
212 …ThrowException(ctx, thread, ctx.GetClassCircularityErrorDescriptor(), utf::CStringAsMutf8(msg.c_st… in ThrowClassCircularityError()
216 * The function finds the corresponding catch block for the exception in the thread.
217 * The function uses thread as an exception storage because:
218 * 1. thread's exception is a GC root
222 NO_ADDRESS_SANITIZE void FindCatchBlockInCFrames(ManagedThread *thread, StackWalker *stack, Frame *… in FindCatchBlockInCFrames() argument
231 uint32_t pc_offset = method->FindCatchBlock(thread->GetException()->ClassAddr<Class>(), pc); in FindCatchBlockInCFrames()
244 thread->GetVM()->HandleReturnFrame(); in FindCatchBlockInCFrames()
250 thread->SetCurrentFrame(next_frame.GetIFrame()); in FindCatchBlockInCFrames()
293 …LOG(DEBUG, INTEROP) << "Exception " << thread->GetException()->ClassAddr<Class>()->GetName() << " … in FindCatchBlockInCFrames()
295 thread->RecordMethodExit()); in FindCatchBlockInCFrames()
296 thread->GetVM()->HandleReturnFrame(); in FindCatchBlockInCFrames()
303 * The function finds the corresponding catch block for the exception in the thread.
304 * The function uses thread as an exception storage because:
305 * 1. thread's exception is a GC root
308 NO_ADDRESS_SANITIZE void FindCatchBlockInCallStack(ManagedThread *thread) in FindCatchBlockInCallStack() argument
310 auto stack = StackWalker::Create(thread); in FindCatchBlockInCallStack()
325 FindCatchBlockInCFrames(thread, &stack, orig_frame); in FindCatchBlockInCallStack()
330 auto *thread = ManagedThread::GetCurrent(); in ThrowFileNotFoundException() local
331 auto ctx = GetLanguageContext(thread); in ThrowFileNotFoundException()
333 …ThrowException(ctx, thread, ctx.GetFileNotFoundExceptionClassDescriptor(), utf::CStringAsMutf8(msg… in ThrowFileNotFoundException()
338 auto *thread = ManagedThread::GetCurrent(); in ThrowIOException() local
339 auto ctx = GetLanguageContext(thread); in ThrowIOException()
341 …ThrowException(ctx, thread, ctx.GetIOExceptionClassDescriptor(), utf::CStringAsMutf8(msg.c_str())); in ThrowIOException()
346 auto *thread = ManagedThread::GetCurrent(); in ThrowIllegalAccessException() local
347 auto ctx = GetLanguageContext(thread); in ThrowIllegalAccessException()
349 …ThrowException(ctx, thread, ctx.GetIllegalAccessExceptionClassDescriptor(), utf::CStringAsMutf8(ms… in ThrowIllegalAccessException()
352 void ThrowOutOfMemoryError(ManagedThread *thread, const PandaString &msg) in ThrowOutOfMemoryError() argument
354 auto ctx = GetLanguageContext(thread); in ThrowOutOfMemoryError()
356 if (thread->IsThrowingOOM()) { in ThrowOutOfMemoryError()
357 thread->SetUsePreAllocObj(true); in ThrowOutOfMemoryError()
360 thread->SetThrowingOOM(true); in ThrowOutOfMemoryError()
361 …ThrowException(ctx, thread, ctx.GetOutOfMemoryErrorClassDescriptor(), utf::CStringAsMutf8(msg.c_st… in ThrowOutOfMemoryError()
362 thread->SetThrowingOOM(false); in ThrowOutOfMemoryError()
367 auto *thread = ManagedThread::GetCurrent(); in ThrowOutOfMemoryError() local
368 ThrowOutOfMemoryError(thread, msg); in ThrowOutOfMemoryError()
373 auto *thread = ManagedThread::GetCurrent(); in ThrowUnsupportedOperationException() local
374 auto ctx = GetLanguageContext(thread); in ThrowUnsupportedOperationException()
375 ThrowException(ctx, thread, ctx.GetUnsupportedOperationExceptionClassDescriptor(), nullptr); in ThrowUnsupportedOperationException()
380 auto *thread = ManagedThread::GetCurrent(); in ThrowVerificationException() local
381 auto ctx = GetLanguageContext(thread); in ThrowVerificationException()
383 …ThrowException(ctx, thread, ctx.GetVerifyErrorClassDescriptor(), utf::CStringAsMutf8(msg.c_str())); in ThrowVerificationException()
388 auto *thread = ManagedThread::GetCurrent(); in ThrowVerificationException() local
390 …ThrowException(ctx, thread, ctx.GetVerifyErrorClassDescriptor(), utf::CStringAsMutf8(msg.c_str())); in ThrowVerificationException()
395 auto *thread = ManagedThread::GetCurrent(); in ThrowInstantiationError() local
396 auto ctx = GetLanguageContext(thread); in ThrowInstantiationError()
398 …ThrowException(ctx, thread, ctx.GetInstantiationErrorDescriptor(), utf::CStringAsMutf8(msg.c_str()… in ThrowInstantiationError()
403 auto *thread = ManagedThread::GetCurrent(); in ThrowNoClassDefFoundError() local
404 auto ctx = GetLanguageContext(thread); in ThrowNoClassDefFoundError()
406 …ThrowException(ctx, thread, ctx.GetNoClassDefFoundErrorDescriptor(), utf::CStringAsMutf8(msg.c_str… in ThrowNoClassDefFoundError()
411 auto *thread = ManagedThread::GetCurrent(); in ThrowTypedErrorDyn() local
412 auto ctx = GetLanguageContext(thread); in ThrowTypedErrorDyn()
413 ThrowException(ctx, thread, ctx.GetTypedErrorDescriptor(), utf::CStringAsMutf8(msg.c_str())); in ThrowTypedErrorDyn()
418 auto *thread = ManagedThread::GetCurrent(); in ThrowReferenceErrorDyn() local
419 auto ctx = GetLanguageContext(thread); in ThrowReferenceErrorDyn()
420 … ThrowException(ctx, thread, ctx.GetReferenceErrorDescriptor(), utf::CStringAsMutf8(msg.c_str())); in ThrowReferenceErrorDyn()
425 auto *thread = ManagedThread::GetCurrent(); in ThrowIllegalMonitorStateException() local
426 auto ctx = GetLanguageContext(thread); in ThrowIllegalMonitorStateException()
428 …ThrowException(ctx, thread, ctx.GetIllegalMonitorStateExceptionDescriptor(), utf::CStringAsMutf8(m… in ThrowIllegalMonitorStateException()
433 auto *thread = ManagedThread::GetCurrent(); in ThrowCloneNotSupportedException() local
434 auto ctx = GetLanguageContext(thread); in ThrowCloneNotSupportedException()
436 …ThrowException(ctx, thread, ctx.GetCloneNotSupportedExceptionDescriptor(), utf::CStringAsMutf8(msg… in ThrowCloneNotSupportedException()