当前位置: 首页>>代码示例>>C#>>正文


C# TraitCollector.VisitAssignment方法代码示例

本文整理汇总了C#中TraitCollector.VisitAssignment方法的典型用法代码示例。如果您正苦于以下问题:C# TraitCollector.VisitAssignment方法的具体用法?C# TraitCollector.VisitAssignment怎么用?C# TraitCollector.VisitAssignment使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TraitCollector的用法示例。


在下文中一共展示了TraitCollector.VisitAssignment方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: TvrReplaceInMem

        public void TvrReplaceInMem()
        {
            var id1 = new Identifier("pptr", PrimitiveType.Word32, null);
            var id2 = new Identifier("ptr", PrimitiveType.Word32, null);
            var id3 = new Identifier("v", PrimitiveType.Word32, null);
            var ass1 = new Assignment(id2, MemLoad(id1, 0, PrimitiveType.Word32));
            var ass2 = new Assignment(id3, MemLoad(id2, 0, PrimitiveType.Word32));
            eqb.VisitAssignment(ass1);
            eqb.VisitAssignment(ass2);

            var prog = new Program();
            prog.Architecture = new FakeArchitecture();
            prog.Platform = new DefaultPlatform(null, prog.Architecture);
            trco = new TraitCollector(factory, store, dtb, prog);
            trco.VisitAssignment(ass1);
            trco.VisitAssignment(ass2);
            dtb.BuildEquivalenceClassDataTypes();

            var tvr = new TypeVariableReplacer(store);
            tvr.ReplaceTypeVariables();
            Verify("Typing/TvrReplaceInMem.txt");
        }
开发者ID:nemerle,项目名称:reko,代码行数:22,代码来源:TypeVarReplacerTests.cs

示例2: DtbSameMemFetch

        public void DtbSameMemFetch()
        {
            Identifier foo = new Identifier("foo", PrimitiveType.Word32, null);
            Identifier bar = new Identifier("bar", PrimitiveType.Word16, null);
            Identifier baz = new Identifier("baz", PrimitiveType.Word16, null);
            Assignment ass1 = new Assignment(bar, MemLoad(foo, 4, PrimitiveType.Word16));
            Assignment ass2 = new Assignment(baz, MemLoad(foo, 4, PrimitiveType.Word16));
            ass1.Accept(eqb);
            ass2.Accept(eqb);
            TraitCollector trco = new TraitCollector(factory, store, dtb, prog);
            trco.VisitAssignment(ass1);
            trco.VisitAssignment(ass2);
            dtb.BuildEquivalenceClassDataTypes();

            Verify("Typing/DtbSameMemFetch.txt");
        }
开发者ID:killbug2004,项目名称:reko,代码行数:16,代码来源:DataTypeBuilderTests.cs

示例3: DtbRepeatedLoads

        public void DtbRepeatedLoads()
        {
            Identifier pfoo = new Identifier("pfoo", PrimitiveType.Word32, null);
            Identifier x = new Identifier("x", PrimitiveType.Word32, null);
            Assignment ass1 = new Assignment(x, MemLoad(pfoo, 4, PrimitiveType.Word32));
            Assignment ass2 = new Assignment(x, MemLoad(pfoo, 4, PrimitiveType.Word32));
            ass1.Accept(eqb);
            ass2.Accept(eqb);
            TraitCollector trco = new TraitCollector(factory, store, dtb, prog);
            trco.VisitAssignment(ass1);
            trco.VisitAssignment(ass2);
            dtb.BuildEquivalenceClassDataTypes();

            Verify("Typing/DtbRepeatedLoads.txt");
        }
开发者ID:killbug2004,项目名称:reko,代码行数:15,代码来源:DataTypeBuilderTests.cs


注:本文中的TraitCollector.VisitAssignment方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。