diff --git a/IDE/mintest/mintest2/src/main4.bf b/IDE/mintest/mintest2/src/main4.bf index bff2ea10..f4c8827e 100644 --- a/IDE/mintest/mintest2/src/main4.bf +++ b/IDE/mintest/mintest2/src/main4.bf @@ -1,7 +1,15 @@ using System; // Zapples -class Mintest2 + +static +{ + + + +} + +/*class Mintest2 { public static void Main() @@ -29,4 +37,4 @@ class Mintest2 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1; } -} \ No newline at end of file +}*/ \ No newline at end of file diff --git a/IDE/mintest/src/main3.bf b/IDE/mintest/src/main3.bf index cb9e196c..8c1e5ef0 100644 --- a/IDE/mintest/src/main3.bf +++ b/IDE/mintest/src/main3.bf @@ -92,11 +92,20 @@ class Bloozer int mA; } + + + class Blurg { delegate void() mFuncA; delegate void() mFuncB; - + + + void TestIt(int a, int b, int c) + { + + } + public static void Hey() { int a = 123; @@ -113,6 +122,9 @@ class Blurg PrintF("YoB!\n"); }; + blurg.TestIt(1, 2, 3); + blurg.[Friend]TestIt(1, 2, 3); + while (true) { blurg.mFuncA(); @@ -129,4 +141,5 @@ class CustomAlloc //return Internal.Malloc(size); return null; } -} \ No newline at end of file +} + diff --git a/IDEHelper/Compiler/BfAutoComplete.cpp b/IDEHelper/Compiler/BfAutoComplete.cpp index 7eb6dbc5..c357890a 100644 --- a/IDEHelper/Compiler/BfAutoComplete.cpp +++ b/IDEHelper/Compiler/BfAutoComplete.cpp @@ -1440,7 +1440,7 @@ bool BfAutoComplete::CheckMemberReference(BfAstNode* target, BfAstNode* dotToken } if (memberName != NULL) - isAutocompletingName = IsAutocompleteNode(dotToken, memberName); + isAutocompletingName = IsAutocompleteNode(dotToken, memberName, 0, 1); if ((IsAutocompleteNode(dotToken, 0, 1)) || (isAutocompletingName)) { @@ -1773,6 +1773,9 @@ void BfAutoComplete::CheckInvocation(BfAstNode* invocationNode, BfTokenNode* ope target = qualifiedTypeRef->mRight; else if (auto qualifiedNameNode = BfNodeDynCast(target)) target = qualifiedNameNode->mRight; + + if (auto attributedMember = BfNodeDynCast(target)) + target = attributedMember->mIdentifier; } bool doCapture = (bfParser->mCursorIdx >= openParen->GetSrcStart()); diff --git a/IDEHelper/Compiler/BfDefBuilder.cpp b/IDEHelper/Compiler/BfDefBuilder.cpp index 77eee6dc..1634ebb4 100644 --- a/IDEHelper/Compiler/BfDefBuilder.cpp +++ b/IDEHelper/Compiler/BfDefBuilder.cpp @@ -1106,7 +1106,7 @@ void BfDefBuilder::Visit(BfTypeDeclaration* typeDeclaration) isAutoCompleteTempType = (mResolvePassData->mAutoComplete != NULL); int cursorIdx = mResolvePassData->mParser->mCursorIdx; - if (typeDeclaration->Contains(cursorIdx)) + if (typeDeclaration->Contains(cursorIdx, 1, 0)) { // Within bounds } diff --git a/IDEHelper/Compiler/BfModule.cpp b/IDEHelper/Compiler/BfModule.cpp index 19cc23cf..b00319cb 100644 --- a/IDEHelper/Compiler/BfModule.cpp +++ b/IDEHelper/Compiler/BfModule.cpp @@ -12607,7 +12607,9 @@ BfMethodInstance* BfModule::GetDelegateInvokeMethod(BfTypeInstance* typeInstance void BfModule::CreateDelegateInvokeMethod() { // Clear out debug loc - otherwise we'll single step onto the delegate type declaration - mBfIRBuilder->ClearDebugLocation(); + //mBfIRBuilder->ClearDebugLocation(); + + SetIllegalSrcPos(); auto typeInstance = mCurTypeInstance; auto memberFuncType = mBfIRBuilder->MapMethod(mCurMethodInstance); diff --git a/IDEHelper/DbgModule.cpp b/IDEHelper/DbgModule.cpp index 56105196..ce530901 100644 --- a/IDEHelper/DbgModule.cpp +++ b/IDEHelper/DbgModule.cpp @@ -99,6 +99,18 @@ DbgSrcFile* DbgSubprogram::GetLineSrcFile(const DbgLineData& lineData) return inlineRoot->mLineInfo->mContexts[lineData.mCtxIdx].mSrcFile; } +bool DbgSubprogram::HasValidLines() +{ + auto inlineRoot = GetRootInlineParent(); + for (int lineIdx = 0; lineIdx < (int)inlineRoot->mLineInfo->mLines.size(); lineIdx++) + { + auto& lineInfo = inlineRoot->mLineInfo->mLines[lineIdx]; + if (lineInfo.mColumn >= 0) + return true; + } + return false; +} + void DbgSubprogram::PopulateSubprogram() { if (mDeferredInternalsSize == 0) diff --git a/IDEHelper/DbgModule.h b/IDEHelper/DbgModule.h index a1170c91..45fd5626 100644 --- a/IDEHelper/DbgModule.h +++ b/IDEHelper/DbgModule.h @@ -459,6 +459,7 @@ public: addr_target GetLineAddr(const DbgLineData& lineData); DbgSubprogram* GetLineInlinee(const DbgLineData& lineData); DbgSrcFile* GetLineSrcFile(const DbgLineData& lineData); + bool HasValidLines(); void PopulateSubprogram(); }; diff --git a/IDEHelper/WinDebugger.cpp b/IDEHelper/WinDebugger.cpp index 4a6d007f..aa7fe564 100644 --- a/IDEHelper/WinDebugger.cpp +++ b/IDEHelper/WinDebugger.cpp @@ -2033,6 +2033,13 @@ bool WinDebugger::DoUpdate() break; } + if ((dwLineData->mColumn == -1) && (!dwSubprogram->HasValidLines())) + { + // This is a method we don't actually want to be in, it has no valid lines! + SetupStep(StepType_StepOut); + break; + } + if ((dwSubprogram != NULL) && (dwSubprogram->mInlineeInfo != NULL) && (pcAddress == dwSubprogram->mBlock.mLowPC)) { // We've stepped out, but right into the start of an inlined method, so step out of this inlined method now...