-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
…y type to IScopeControlFlowRegion
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using System.Collections.Generic; | ||
using Echo.ControlFlow.Serialization.Dot; | ||
using Echo.Graphing; | ||
using Echo.Graphing.Serialization.Dot; | ||
|
||
namespace Echo.ControlFlow.Analysis.Domination; | ||
|
||
public class DominatorTreeNodeAdorner<TInstruction> : IDotNodeAdorner | ||
Check warning on line 8 in src/Core/Echo.ControlFlow/Analysis/Domination/DominatorTreeNodeAdorner.cs
|
||
where TInstruction : notnull | ||
{ | ||
public DominatorTreeNodeAdorner() | ||
Check warning on line 11 in src/Core/Echo.ControlFlow/Analysis/Domination/DominatorTreeNodeAdorner.cs
|
||
: this(new ControlFlowNodeAdorner<TInstruction>()) | ||
{ | ||
} | ||
|
||
public DominatorTreeNodeAdorner(IDotNodeAdorner nodeAdorner) | ||
Check warning on line 16 in src/Core/Echo.ControlFlow/Analysis/Domination/DominatorTreeNodeAdorner.cs
|
||
{ | ||
NodeAdorner = nodeAdorner; | ||
} | ||
|
||
public IDotNodeAdorner NodeAdorner { get; set; } | ||
Check warning on line 21 in src/Core/Echo.ControlFlow/Analysis/Domination/DominatorTreeNodeAdorner.cs
|
||
|
||
/// <inheritdoc /> | ||
public IDictionary<string, string>? GetNodeAttributes(INode node, long id) | ||
{ | ||
return NodeAdorner.GetNodeAttributes(((DominatorTreeNode<TInstruction>) node).OriginalNode, id); | ||
} | ||
} |