MCPcopy Create free account
hub / github.com/ReadyTalk/avian / makeThread

Method makeThread

src/compile.cpp:8371–8450  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8369 }
8370
8371 virtual Thread* makeThread(Machine* m, GcThread* javaThread, Thread* parent)
8372 {
8373 MyThread* t = new (m->heap->allocate(sizeof(MyThread))) MyThread(
8374 m, javaThread, static_cast<MyThread*>(parent), useNativeFeatures);
8375
8376 t->heapImage = heapImage;
8377 t->codeImage = codeImage;
8378 t->thunkTable = thunkTable;
8379
8380#if TARGET_BYTES_PER_WORD == BYTES_PER_WORD
8381
8382 int mismatches
8383 = checkConstant(t,
8384 TARGET_THREAD_EXCEPTION,
8385 &Thread::exception,
8386 "TARGET_THREAD_EXCEPTION")
8387 + checkConstant(t,
8388 TARGET_THREAD_EXCEPTIONSTACKADJUSTMENT,
8389 &MyThread::exceptionStackAdjustment,
8390 "TARGET_THREAD_EXCEPTIONSTACKADJUSTMENT")
8391 + checkConstant(t,
8392 TARGET_THREAD_EXCEPTIONOFFSET,
8393 &MyThread::exceptionOffset,
8394 "TARGET_THREAD_EXCEPTIONOFFSET")
8395 + checkConstant(t,
8396 TARGET_THREAD_EXCEPTIONHANDLER,
8397 &MyThread::exceptionHandler,
8398 "TARGET_THREAD_EXCEPTIONHANDLER")
8399 + checkConstant(
8400 t, TARGET_THREAD_IP, &MyThread::ip, "TARGET_THREAD_IP")
8401 + checkConstant(
8402 t, TARGET_THREAD_STACK, &MyThread::stack, "TARGET_THREAD_STACK")
8403 + checkConstant(t,
8404 TARGET_THREAD_NEWSTACK,
8405 &MyThread::newStack,
8406 "TARGET_THREAD_NEWSTACK")
8407 + checkConstant(t,
8408 TARGET_THREAD_TAILADDRESS,
8409 &MyThread::tailAddress,
8410 "TARGET_THREAD_TAILADDRESS")
8411 + checkConstant(t,
8412 TARGET_THREAD_VIRTUALCALLTARGET,
8413 &MyThread::virtualCallTarget,
8414 "TARGET_THREAD_VIRTUALCALLTARGET")
8415 + checkConstant(t,
8416 TARGET_THREAD_VIRTUALCALLINDEX,
8417 &MyThread::virtualCallIndex,
8418 "TARGET_THREAD_VIRTUALCALLINDEX")
8419 + checkConstant(t,
8420 TARGET_THREAD_HEAPIMAGE,
8421 &MyThread::heapImage,
8422 "TARGET_THREAD_HEAPIMAGE")
8423 + checkConstant(t,
8424 TARGET_THREAD_CODEIMAGE,
8425 &MyThread::codeImage,
8426 "TARGET_THREAD_CODEIMAGE")
8427 + checkConstant(t,
8428 TARGET_THREAD_THUNKTABLE,

Callers 7

doCollectFunction · 0.45
bootFunction · 0.45
JNI_CreateJavaVMFunction · 0.45
mainFunction · 0.45
startThreadFunction · 0.45
initAttachedThreadFunction · 0.45
attachThreadFunction · 0.45

Calls 5

checkConstantFunction · 0.85
expectFunction · 0.85
allocateMethod · 0.65
abortFunction · 0.50
initMethod · 0.45

Tested by

no test coverage detected