本文整理汇总了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");
}
示例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");
}
示例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");
}