MCPcopy Create free account
hub / github.com/beefytech/Beef / EmitCtorCalcAppend

Method EmitCtorCalcAppend

IDEHelper/Compiler/BfModule.cpp:17832–17854  ·  view source on GitHub ↗

This method never throws errors - it relies on the proper ctor actually throwing the errors

Source from the content-addressed store, hash-verified

17830
17831// This method never throws errors - it relies on the proper ctor actually throwing the errors
17832void BfModule::EmitCtorCalcAppend()
17833{
17834 if ((mCompiler->mIsResolveOnly) && (!mIsComptimeModule))
17835 return;
17836
17837 auto methodDef = mCurMethodInstance->mMethodDef;
17838 auto methodDecl = methodDef->GetMethodDeclaration();
17839
17840 Array<BfAstNode*> deferredNodeList;
17841
17842 auto methodDeclBlock = BfNodeDynCast<BfBlock>(methodDecl->mBody);
17843 if (methodDeclBlock == NULL)
17844 return;
17845
17846 AppendAllocVisitor appendAllocVisitor;
17847 auto baseCalcAppend = CallBaseCtorCalc(false);
17848 if (baseCalcAppend)
17849 {
17850 mBfIRBuilder->CreateStore(baseCalcAppend.mValue, mCurMethodState->mRetVal.mValue);
17851 }
17852 appendAllocVisitor.mModule = this;
17853 appendAllocVisitor.VisitChild(methodDecl->mBody);
17854}
17855
17856void BfModule::CreateStaticCtor()
17857{

Callers

nothing calls this directly

Calls 3

GetMethodDeclarationMethod · 0.80
CreateStoreMethod · 0.45
VisitChildMethod · 0.45

Tested by

no test coverage detected