mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 12:32:20 +02:00
Added (partially-working) '-deterministic' debug cmd line param
This commit is contained in:
parent
5ac1bbf63f
commit
4678dcb9e5
3 changed files with 25 additions and 4 deletions
|
@ -676,7 +676,7 @@ namespace IDE.Compiler
|
|||
{
|
||||
if ([Friend]mThreadWorker.mThreadRunning)
|
||||
{
|
||||
if (mNativeBfCompiler != null)
|
||||
if ((mNativeBfCompiler != null) && (!gApp.mDeterministic))
|
||||
BfCompiler_Cancel(mNativeBfCompiler);
|
||||
}
|
||||
}
|
||||
|
@ -685,7 +685,7 @@ namespace IDE.Compiler
|
|||
{
|
||||
if ([Friend]mThreadWorker.mThreadRunning || [Friend]mThreadWorkerHi.mThreadRunning)
|
||||
{
|
||||
if (mNativeBfCompiler != null)
|
||||
if ((mNativeBfCompiler != null) && (!gApp.mDeterministic))
|
||||
BfCompiler_RequestFastFinish(mNativeBfCompiler);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -254,6 +254,7 @@ namespace IDE
|
|||
// The Beef resolve system is up-to-date with the projects' files,
|
||||
// but the Clang resolver only has open files in it
|
||||
public bool mNoResolve = false;
|
||||
public bool mDeterministic = false;
|
||||
public BfSystem mBfResolveSystem ~ delete _;
|
||||
public BfCompiler mBfResolveCompiler;
|
||||
public BfResolveHelper mBfResolveHelper ~ delete _;
|
||||
|
@ -6992,6 +6993,8 @@ namespace IDE
|
|||
case "-forceSafe":
|
||||
mSafeMode = true;
|
||||
mNoResolve = true;
|
||||
case "-deterministic":
|
||||
mDeterministic = true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -948,6 +948,24 @@ namespace IDE.ui
|
|||
if (!mIsSourceCode)
|
||||
return true;
|
||||
|
||||
if (gApp.mDeterministic)
|
||||
{
|
||||
//return false;
|
||||
|
||||
if (resolveType == .GetCurrentLocation)
|
||||
return false;
|
||||
if (resolveType == .GetSymbolInfo)
|
||||
return true;
|
||||
|
||||
while ((BfResolveCompiler.mResolveAllWait != 0) ||
|
||||
(BfResolveCompiler.mThreadYieldCount != 0))
|
||||
{
|
||||
BfResolveCompiler.Update();
|
||||
}
|
||||
|
||||
BfResolveCompiler.WaitForBackground();
|
||||
}
|
||||
|
||||
if (resolveParams != null)
|
||||
resolveParams.mResolveType = resolveType;
|
||||
|
||||
|
@ -4947,7 +4965,7 @@ namespace IDE.ui
|
|||
{
|
||||
if (mHoverResolveTask == null)
|
||||
{
|
||||
if ((!handlingHoverResolveTask) && (ResolveCompiler != null) && (!ResolveCompiler.mThreadWorkerHi.mThreadRunning) && (gApp.mSettings.mEditorSettings.mHiliteCursorReferences))
|
||||
if ((!handlingHoverResolveTask) && (ResolveCompiler != null) && (!ResolveCompiler.mThreadWorkerHi.mThreadRunning) && (gApp.mSettings.mEditorSettings.mHiliteCursorReferences) && (!gApp.mDeterministic))
|
||||
{
|
||||
ResolveParams resolveParams = new .();
|
||||
resolveParams.mOverrideCursorPos = (int32)textIdx;
|
||||
|
@ -5921,7 +5939,7 @@ namespace IDE.ui
|
|||
if (BFApp.sApp.mIsUpdateBatchStart)
|
||||
sourceEditWidgetContent.mCursorStillTicks++;
|
||||
|
||||
if ((gApp.mSettings.mEditorSettings.mHiliteCursorReferences) && (HasFocus(true)) && (mProjectSource != null) /*&& (IDEApp.sApp.mSymbolReferenceHelper == null)*/)
|
||||
if ((gApp.mSettings.mEditorSettings.mHiliteCursorReferences) && (!gApp.mDeterministic) && (HasFocus(true)) && (mProjectSource != null) /*&& (IDEApp.sApp.mSymbolReferenceHelper == null)*/)
|
||||
{
|
||||
if ((mEditWidget.mHasFocus) && (mIsBeefSource) && (sourceEditWidgetContent.mCursorStillTicks == 10) && (!sourceEditWidgetContent.mCursorImplicitlyMoved) && (!sourceEditWidgetContent.mVirtualCursorPos.HasValue))
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue