public GetMemberCallSite AddGetMemberCallSite(String fieldName) { GetMemberCallSite csr = new GetMemberCallSite(CallSiteReferences.Count, fieldName, this); CallSiteReferences.Add(csr); return(csr); }
protected override void InstrospectiveFieldInvocation(Expression node, string memberName, Object obj) { InheritedAttributes ia = (InheritedAttributes)obj; GetMemberCallSite callSite = GetCallSiteContainer(ia.CurrentMethod).AddGetMemberCallSite(memberName); this.codeGenerator.pop(indent); this.codeGenerator.WriteLine(indent, "ldsfld class " + callSite.CallSiteType + " " + callSite.FullName); this.codeGenerator.WriteLine(indent, "ldfld !0 class " + callSite.CallSiteType + "::Target"); this.codeGenerator.WriteLine(indent, "ldsfld class " + callSite.CallSiteType + " " + callSite.FullName); node.Accept(this, obj); this.codeGenerator.WriteLine(indent, "callvirt instance !2 class " + callSite.CallSiteSubType + "::Invoke(!0,!1)"); }