public Assignment FindAssignment(LocalValue local) { foreach (var b in Blocks) { foreach (var a in b.AllAssignments) { if (ReferenceEquals(a.Result, local.Symbol)) { return(a); } } } return(null); }
public Assignment GetAssignment(LocalValue local) { foreach (var b in Blocks) { foreach (var a in b.AllAssignments) { if (ReferenceEquals(a.Result, local.Symbol)) { return(a); } } } throw new KeyNotFoundException($"Undeclared local {local} in `{Symbol}`"); }