예제 #1
0
 public ReturnTracer(LinqList <SigilTuple <OpCode, Label, int> > branches, LinqDictionary <Label, int> marks, LinqList <int> returns, LinqList <int> throws)
 {
     Branches = branches;
     Marks    = marks;
     Returns  = returns;
     Throws   = throws;
 }
예제 #2
0
        public static LinqDictionary <Key, Value> ToDictionary <T, Key, Value>(IEnumerable <T> e, SigilFunc <T, Key> k, SigilFunc <T, Value> v)
        {
            if (e == null)
            {
                throw new ArgumentNullException("e");
            }
            if (k == null)
            {
                throw new ArgumentNullException("k");
            }
            if (v == null)
            {
                throw new ArgumentNullException("v");
            }

            var ret = new LinqDictionary <Key, Value>();

            using (var i = e.GetEnumerator())
            {
                while (i.MoveNext())
                {
                    ret.Add(k(i.Current), v(i.Current));
                }
            }

            return(ret);
        }
예제 #3
0
        public LinqDictionary(LinqDictionary <K, V> dict)
        {
            var copy = new Dictionary <K, V>(dict.Count());

            foreach (var k in dict.Keys.AsEnumerable())
            {
                copy[k] = dict[k];
            }

            Inner = copy;
        }
예제 #4
0
        public RollingVerifier(Label beginAt, bool strictBranchVerification)
        {
            UsesStrictBranchVerification = strictBranchVerification;

            RestoreOnMark       = new LinqDictionary <Label, LinqList <VerifiableTracker> >();
            RestoreStacksOnMark = new LinqDictionary <Label, LinqList <LinqStack <LinqList <TypeOnStack> > > >();
            VerifyFromLabel     = new LinqDictionary <Label, LinqList <VerifiableTracker> >();

            StacksAtLabels         = new LinqDictionary <Label, SigilTuple <bool, LinqStack <LinqList <TypeOnStack> > > >();
            ExpectedStacksAtLabels = new LinqDictionary <Label, LinqList <SigilTuple <bool, LinqStack <LinqList <TypeOnStack> > > > >();

            MustBeEmptyWhenBranchedTo = new LinqHashSet <Label>();

            EmptyCurrentScope();

            Add(new VerifiableTracker(beginAt), new LinqStack <LinqList <TypeOnStack> >());
        }