protected override bool Merge( AbstractStackState <VariabilityInfo> a, AbstractStackState <VariabilityInfo> b, out AbstractStackState <VariabilityInfo> m) { List <VariabilityInfo> stack = new List <VariabilityInfo>(); bool changed = Merge(i => a[i], i => b[i], stack, a.Depth); List <VariabilityInfo> locals = new List <VariabilityInfo>(); if (Merge(i => a.GetLocal(i), i => b.GetLocal(i), locals, a.NumLocals)) { changed = true; } List <VariabilityInfo> args = new List <VariabilityInfo>(); if (Merge(i => a.GetArgument(i), i => b.GetArgument(i), args, a.NumArguments)) { changed = true; } if (a.HasUniqueSuccessor() != b.HasUniqueSuccessor()) { changed = true; } m = new IndependentStackState(stack, locals, args, a.HasUniqueSuccessor() && b.HasUniqueSuccessor()); return(changed); }
private AbstractStackState <VariabilityInfo> HandleLdloc(ILInstruction ili, AbstractStackState <VariabilityInfo> pre, int index) { Contract.Requires <ArgumentNullException>(pre != null); Contract.Requires <ArgumentException>(index >= 0); return(pre.Push(pre.GetLocal(index)).UniqueSuccessor()); }
public override TElem GetLocal(int index) { return(Pre.GetLocal(index)); }