| 3333 | } |
| 3334 | |
| 3335 | void BfContext::RemapObject() |
| 3336 | { |
| 3337 | if (mCompiler->mBfObjectTypeDef == NULL) |
| 3338 | return; |
| 3339 | |
| 3340 | // There are several types that get their LLVM type mapped to Object, so make sure to remap that |
| 3341 | // for when Object itself gets recreated |
| 3342 | |
| 3343 | auto objectType = mScratchModule->ResolveTypeDef(mCompiler->mBfObjectTypeDef, BfPopulateType_Declaration); |
| 3344 | auto objectTypeInst = objectType->ToTypeInstance(); |
| 3345 | if (objectTypeInst->mRevision == mMappedObjectRevision) |
| 3346 | return; |
| 3347 | mMappedObjectRevision = objectTypeInst->mRevision; |
| 3348 | |
| 3349 | for (int paramKind = 0; paramKind < 2; paramKind++) |
| 3350 | { |
| 3351 | for (int paramIdx = 0; paramIdx < (int)mGenericParamTypes[paramKind].size(); paramIdx++) |
| 3352 | { |
| 3353 | auto genericParam = mGenericParamTypes[paramKind][paramIdx]; |
| 3354 | genericParam->mSize = objectType->mSize; |
| 3355 | genericParam->mAlign = objectType->mAlign; |
| 3356 | } |
| 3357 | } |
| 3358 | |
| 3359 | auto varType = mScratchModule->GetPrimitiveType(BfTypeCode_Var); |
| 3360 | varType->mSize = objectType->mSize; |
| 3361 | varType->mAlign = objectType->mAlign; |
| 3362 | } |
| 3363 | |
| 3364 | void BfContext::CheckSpecializedErrorData() |
| 3365 | { |
no test coverage detected