mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 19:48:20 +02:00
Marking default ctors as illegal src positions
This commit is contained in:
parent
034a9faf97
commit
3da6535ef5
1 changed files with 12 additions and 0 deletions
|
@ -2291,6 +2291,7 @@ void BfModule::UpdateExprSrcPos(BfAstNode* astNode, BfSrcPosFlags flags)
|
||||||
void BfModule::UseDefaultSrcPos(BfSrcPosFlags flags, int debugLocOffset)
|
void BfModule::UseDefaultSrcPos(BfSrcPosFlags flags, int debugLocOffset)
|
||||||
{
|
{
|
||||||
UpdateSrcPos(mCompiler->mBfObjectTypeDef->mTypeDeclaration, flags, debugLocOffset);
|
UpdateSrcPos(mCompiler->mBfObjectTypeDef->mTypeDeclaration, flags, debugLocOffset);
|
||||||
|
SetIllegalSrcPos();
|
||||||
}
|
}
|
||||||
|
|
||||||
void BfModule::SetIllegalSrcPos(BfSrcPosFlags flags)
|
void BfModule::SetIllegalSrcPos(BfSrcPosFlags flags)
|
||||||
|
@ -14200,6 +14201,11 @@ void BfModule::EmitCtorBody(bool& skipBody)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mCurTypeInstance->IsDelegate())
|
||||||
|
{
|
||||||
|
NOP;
|
||||||
|
}
|
||||||
|
|
||||||
BfAstNode* baseCtorNode = NULL;
|
BfAstNode* baseCtorNode = NULL;
|
||||||
if ((ctorDeclaration != NULL) && (ctorDeclaration->mInitializer != NULL) && (ctorDeclaration->mInitializer->mTarget != NULL))
|
if ((ctorDeclaration != NULL) && (ctorDeclaration->mInitializer != NULL) && (ctorDeclaration->mInitializer->mTarget != NULL))
|
||||||
baseCtorNode = ctorDeclaration->mInitializer->mTarget;
|
baseCtorNode = ctorDeclaration->mInitializer->mTarget;
|
||||||
|
@ -14300,6 +14306,10 @@ void BfModule::EmitCtorBody(bool& skipBody)
|
||||||
if ((mBfIRBuilder->DbgHasInfo()) && (!mCurTypeInstance->IsUnspecializedType()) && (mHasFullDebugInfo))
|
if ((mBfIRBuilder->DbgHasInfo()) && (!mCurTypeInstance->IsUnspecializedType()) && (mHasFullDebugInfo))
|
||||||
{
|
{
|
||||||
UpdateSrcPos(baseCtorNode);
|
UpdateSrcPos(baseCtorNode);
|
||||||
|
|
||||||
|
if (methodDef->mBody == NULL)
|
||||||
|
SetIllegalSrcPos();
|
||||||
|
|
||||||
// NOP so we step onto the open paren of the method so we can choose to set into the field initializers or step over them
|
// NOP so we step onto the open paren of the method so we can choose to set into the field initializers or step over them
|
||||||
EmitEnsureInstructionAt();
|
EmitEnsureInstructionAt();
|
||||||
|
|
||||||
|
@ -14416,6 +14426,8 @@ void BfModule::EmitCtorBody(bool& skipBody)
|
||||||
if (baseCtorNode != NULL)
|
if (baseCtorNode != NULL)
|
||||||
{
|
{
|
||||||
UpdateSrcPos(baseCtorNode);
|
UpdateSrcPos(baseCtorNode);
|
||||||
|
if (methodDef->mBody == NULL)
|
||||||
|
SetIllegalSrcPos();
|
||||||
}
|
}
|
||||||
if ((ctorDeclaration != NULL) && (ctorDeclaration->mInitializer != NULL))
|
if ((ctorDeclaration != NULL) && (ctorDeclaration->mInitializer != NULL))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue