| 13478 | } |
| 13479 | |
| 13480 | BfTypedValue BfModule::ToRef(BfTypedValue typedValue, BfRefType* refType) |
| 13481 | { |
| 13482 | if (refType == NULL) |
| 13483 | refType = CreateRefType(typedValue.mType); |
| 13484 | |
| 13485 | if ((refType->mRefKind == BfRefType::RefKind_Mut) && (typedValue.mType->IsObjectOrInterface())) |
| 13486 | { |
| 13487 | return LoadValue(typedValue); |
| 13488 | } |
| 13489 | |
| 13490 | if (refType->mRefKind == BfRefType::RefKind_Mut) |
| 13491 | refType = CreateRefType(typedValue.mType); |
| 13492 | |
| 13493 | if (!typedValue.mType->IsValuelessNonOpaqueType()) |
| 13494 | typedValue = MakeAddressable(typedValue, false, true); |
| 13495 | return BfTypedValue(typedValue.mValue, refType); |
| 13496 | } |
| 13497 | |
| 13498 | BfTypedValue BfModule::LoadValue(BfTypedValue typedValue, BfAstNode* refNode, bool isVolatile) |
| 13499 | { |
no test coverage detected