mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 20:12:21 +02:00
Improved emit embeds for method entry/exit
This commit is contained in:
parent
6a8bbd1240
commit
b9a9a4bfac
4 changed files with 41 additions and 3 deletions
|
@ -238,9 +238,7 @@ namespace Beefy.widgets
|
||||||
mNewDraggingWindow = new WidgetWindow(parentWindow, "",
|
mNewDraggingWindow = new WidgetWindow(parentWindow, "",
|
||||||
(int32)(mSrcDraggingWindow.mClientX + rootX - mDragHelper.mMouseDownX), (int32)(mSrcDraggingWindow.mClientY + rootY - mDragHelper.mMouseDownY),
|
(int32)(mSrcDraggingWindow.mClientX + rootX - mDragHelper.mMouseDownX), (int32)(mSrcDraggingWindow.mClientY + rootY - mDragHelper.mMouseDownY),
|
||||||
300, 500,
|
300, 500,
|
||||||
BFWindowBase.Flags.Border | BFWindowBase.Flags.ThickFrame | BFWindowBase.Flags.Resizable | BFWindowBase.Flags.SysMenu |
|
.Border | .ThickFrame | .Resizable | .SysMenu | .Caption | .Minimize | .TopMost | .UseParentMenu | .Maximize,
|
||||||
BFWindowBase.Flags.Caption | BFWindowBase.Flags.Minimize | BFWindowBase.Flags.ToolWindow | BFWindowBase.Flags.TopMost |
|
|
||||||
BFWindowBase.Flags.UseParentMenu | BFWindowBase.Flags.Maximize,
|
|
||||||
subFrame);
|
subFrame);
|
||||||
Dock(subFrame, null, DockingFrame.WidgetAlign.Top);
|
Dock(subFrame, null, DockingFrame.WidgetAlign.Top);
|
||||||
//subFrame.AddDockedWidget(fourthTabbedView, null, DockingFrame.WidgetAlign.Left, false);
|
//subFrame.AddDockedWidget(fourthTabbedView, null, DockingFrame.WidgetAlign.Left, false);
|
||||||
|
|
|
@ -6241,6 +6241,30 @@ namespace IDE.ui
|
||||||
RefreshCollapseRegion(entry, prevAnchorLine, failed);
|
RefreshCollapseRegion(entry, prevAnchorLine, failed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (var embedKV in mEmbeds)
|
||||||
|
{
|
||||||
|
if (var emitEmbed = embedKV.value as EmitEmbed)
|
||||||
|
{
|
||||||
|
int32 anchorIdx = -1;
|
||||||
|
int32 anchorLine = -1;
|
||||||
|
Update(emitEmbed.mAnchorId, ref anchorIdx, ref anchorLine);
|
||||||
|
|
||||||
|
if (anchorLine != embedKV.key)
|
||||||
|
{
|
||||||
|
if (mEmbeds.GetAndRemove(embedKV.key) case .Ok(let val))
|
||||||
|
{
|
||||||
|
if ((anchorLine != -1) && (mEmbeds.TryAdd(anchorLine, var keyPtr, var valuePtr)))
|
||||||
|
{
|
||||||
|
val.value.mLine = anchorLine;
|
||||||
|
*valuePtr = val.value;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
delete val.value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//Debug.WriteLine($"RefreshCollapseRegions Count:{mOrderedCollapseEntries.Count} Time:{sw.ElapsedMilliseconds}ms");
|
//Debug.WriteLine($"RefreshCollapseRegions Count:{mOrderedCollapseEntries.Count} Time:{sw.ElapsedMilliseconds}ms");
|
||||||
sw.Stop();
|
sw.Stop();
|
||||||
|
|
||||||
|
|
|
@ -4813,6 +4813,9 @@ namespace IDE.ui
|
||||||
{
|
{
|
||||||
//Debug.WriteLine("UpdateCharData: {0}", char8Data);
|
//Debug.WriteLine("UpdateCharData: {0}", char8Data);
|
||||||
|
|
||||||
|
if (mEditWidget == null)
|
||||||
|
return;
|
||||||
|
|
||||||
scope AutoBeefPerf("SourceViewPanel.UpdateCharData");
|
scope AutoBeefPerf("SourceViewPanel.UpdateCharData");
|
||||||
|
|
||||||
charIdData.Prepare();
|
charIdData.Prepare();
|
||||||
|
@ -5431,7 +5434,9 @@ namespace IDE.ui
|
||||||
|
|
||||||
bool hasHoverWatchOpen = (mHoverWatch != null) && (mHoverWatch.mListView != null);
|
bool hasHoverWatchOpen = (mHoverWatch != null) && (mHoverWatch.mListView != null);
|
||||||
if (mHoverWatch == null)
|
if (mHoverWatch == null)
|
||||||
|
{
|
||||||
mHoverWatch = new HoverWatch();
|
mHoverWatch = new HoverWatch();
|
||||||
|
}
|
||||||
|
|
||||||
if (debugExpr != null)
|
if (debugExpr != null)
|
||||||
triedShow = true;
|
triedShow = true;
|
||||||
|
|
|
@ -2864,6 +2864,15 @@ void BfModule::DoCEEmit(BfMethodInstance* methodInstance)
|
||||||
if (auto methodDecl = BfNodeDynCast<BfMethodDeclaration>(methodInstance->mMethodDef->mMethodDeclaration))
|
if (auto methodDecl = BfNodeDynCast<BfMethodDeclaration>(methodInstance->mMethodDef->mMethodDeclaration))
|
||||||
bodyNode = methodDecl->mBody;
|
bodyNode = methodDecl->mBody;
|
||||||
|
|
||||||
|
auto _Classify = [&](BfParser* emitParser)
|
||||||
|
{
|
||||||
|
if (emitParser->mSourceClassifier == NULL)
|
||||||
|
return;
|
||||||
|
emitParser->mSourceClassifier->VisitChild(emitParser->mRootNode);
|
||||||
|
emitParser->mSourceClassifier->VisitChild(emitParser->mSidechannelRootNode);
|
||||||
|
emitParser->mSourceClassifier->VisitChild(emitParser->mErrorRootNode);
|
||||||
|
};
|
||||||
|
|
||||||
if (!ceEmitContext.mEmitData.IsEmpty())
|
if (!ceEmitContext.mEmitData.IsEmpty())
|
||||||
{
|
{
|
||||||
SetAndRestoreValue<BfAstNode*> prevCustomAttribute(mCurMethodState->mEmitRefNode, customAttribute.mRef);
|
SetAndRestoreValue<BfAstNode*> prevCustomAttribute(mCurMethodState->mEmitRefNode, customAttribute.mRef);
|
||||||
|
@ -2887,6 +2896,7 @@ void BfModule::DoCEEmit(BfMethodInstance* methodInstance)
|
||||||
bfReducer.mSource = emitParser;
|
bfReducer.mSource = emitParser;
|
||||||
bfReducer.mAlloc = emitParser->mAlloc;
|
bfReducer.mAlloc = emitParser->mAlloc;
|
||||||
bfReducer.HandleBlock(emitParser->mRootNode, false);
|
bfReducer.HandleBlock(emitParser->mRootNode, false);
|
||||||
|
_Classify(emitParser);
|
||||||
Visit(emitParser->mRootNode);
|
Visit(emitParser->mRootNode);
|
||||||
FinishCEParseContext(customAttribute.mRef, typeInstance, &ceParseContext);
|
FinishCEParseContext(customAttribute.mRef, typeInstance, &ceParseContext);
|
||||||
}
|
}
|
||||||
|
@ -2914,6 +2924,7 @@ void BfModule::DoCEEmit(BfMethodInstance* methodInstance)
|
||||||
bfReducer.mSource = emitParser;
|
bfReducer.mSource = emitParser;
|
||||||
bfReducer.mAlloc = emitParser->mAlloc;
|
bfReducer.mAlloc = emitParser->mAlloc;
|
||||||
bfReducer.HandleBlock(emitParser->mRootNode, false);
|
bfReducer.HandleBlock(emitParser->mRootNode, false);
|
||||||
|
_Classify(emitParser);
|
||||||
auto deferredBlock = AddDeferredBlock(emitParser->mRootNode, &mCurMethodState->mHeadScope);
|
auto deferredBlock = AddDeferredBlock(emitParser->mRootNode, &mCurMethodState->mHeadScope);
|
||||||
deferredBlock->mEmitRefNode = customAttribute.mRef;
|
deferredBlock->mEmitRefNode = customAttribute.mRef;
|
||||||
FinishCEParseContext(customAttribute.mRef, typeInstance, &ceParseContext);
|
FinishCEParseContext(customAttribute.mRef, typeInstance, &ceParseContext);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue