| 1378 | } |
| 1379 | |
| 1380 | int BfMethodInstance::DbgGetVirtualMethodNum() |
| 1381 | { |
| 1382 | auto module = GetOwner()->mModule; |
| 1383 | |
| 1384 | int vDataVal = -1; |
| 1385 | if (mVirtualTableIdx != -1) |
| 1386 | { |
| 1387 | module->HadSlotCountDependency(); |
| 1388 | |
| 1389 | int vDataIdx = -1; |
| 1390 | vDataIdx = module->mCompiler->GetVDataPrefixDataCount() + module->mCompiler->mMaxInterfaceSlots; |
| 1391 | vDataIdx += module->mCompiler->GetDynCastVDataCount(); |
| 1392 | if ((module->mCompiler->mOptions.mHasVDataExtender) && (module->mCompiler->IsHotCompile())) |
| 1393 | { |
| 1394 | auto typeInst = mMethodInstanceGroup->mOwner; |
| 1395 | |
| 1396 | int extMethodIdx = (mVirtualTableIdx - typeInst->GetImplBaseVTableSize()) - typeInst->GetOrigSelfVTableSize(); |
| 1397 | if (extMethodIdx >= 0) |
| 1398 | { |
| 1399 | // Extension? |
| 1400 | int vExtOfs = typeInst->GetOrigImplBaseVTableSize(); |
| 1401 | vDataVal = ((vDataIdx + vExtOfs + 1) << 20) | (extMethodIdx); |
| 1402 | } |
| 1403 | else |
| 1404 | { |
| 1405 | // Map this new virtual index back to the original index |
| 1406 | vDataIdx += (mVirtualTableIdx - typeInst->GetImplBaseVTableSize()) + typeInst->GetOrigImplBaseVTableSize(); |
| 1407 | } |
| 1408 | } |
| 1409 | else |
| 1410 | { |
| 1411 | vDataIdx += mVirtualTableIdx; |
| 1412 | } |
| 1413 | if (vDataVal == -1) |
| 1414 | vDataVal = vDataIdx; |
| 1415 | } |
| 1416 | return vDataVal; |
| 1417 | } |
| 1418 | |
| 1419 | void BfMethodInstance::GetIRFunctionInfo(BfModule* module, BfIRType& returnType, SizedArrayImpl<BfIRType>& paramTypes, bool forceStatic) |
| 1420 | { |
no test coverage detected