| 19733 | } |
| 19734 | |
| 19735 | void BfModule::EmitIteratorBlock(bool& skipBody) |
| 19736 | { |
| 19737 | auto methodInstance = mCurMethodInstance; |
| 19738 | auto methodDef = methodInstance->mMethodDef; |
| 19739 | auto methodDeclaration = methodDef->GetMethodDeclaration(); |
| 19740 | auto typeDef = mCurTypeInstance->mTypeDef; |
| 19741 | |
| 19742 | BfType* innerRetType = NULL; |
| 19743 | BfTypeInstance* usingInterface = NULL; |
| 19744 | |
| 19745 | auto retTypeInst = mCurMethodInstance->mReturnType->ToGenericTypeInstance(); |
| 19746 | if (retTypeInst != NULL) |
| 19747 | { |
| 19748 | if ((retTypeInst->IsInstanceOf(mCompiler->mGenericIEnumerableTypeDef)) || |
| 19749 | (retTypeInst->IsInstanceOf(mCompiler->mGenericIEnumeratorTypeDef))) |
| 19750 | { |
| 19751 | innerRetType = retTypeInst->mGenericTypeInfo->mTypeGenericArguments[0]; |
| 19752 | } |
| 19753 | } |
| 19754 | |
| 19755 | if (innerRetType == NULL) |
| 19756 | { |
| 19757 | Fail("Methods with yields must return either System.IEnumerable<T> or System.IEnumerator<T>", methodDeclaration->mReturnType); |
| 19758 | return; |
| 19759 | } |
| 19760 | |
| 19761 | auto blockBody = BfNodeDynCast<BfBlock>(methodDeclaration->mBody); |
| 19762 | if (blockBody == NULL) |
| 19763 | return; |
| 19764 | } |
| 19765 | |
| 19766 | void BfModule::EmitGCMarkAppended(BfTypedValue markVal) |
| 19767 | { |
nothing calls this directly
no test coverage detected