コード例 #1
0
ファイル: ReturnTracer.cs プロジェクト: 5l1v3r1/Sigil-1
 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
ファイル: RollingVerifier.cs プロジェクト: 5l1v3r1/Sigil-1
        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> >());
        }