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);
        }
示例#2
0
 public override TElem GetArgument(int index)
 {
     return(Pre.GetArgument(index));
 }