1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-19 08:30:25 +02:00

Improved emit embeds for method entry/exit

This commit is contained in:
Brian Fiete 2022-04-17 12:44:31 -07:00
parent 6a8bbd1240
commit b9a9a4bfac
4 changed files with 41 additions and 3 deletions

View file

@ -6241,6 +6241,30 @@ namespace IDE.ui
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");
sw.Stop();