EmitLoadToken() 공개 메소드

Loads RuntimeMethodHandle of given method.
public EmitLoadToken ( MethodSymbol method, Microsoft.CodeAnalysis.SyntaxNode syntaxNodeOpt ) : TypeSymbol
method Pchp.CodeAnalysis.Symbols.MethodSymbol
syntaxNodeOpt Microsoft.CodeAnalysis.SyntaxNode
리턴 TypeSymbol
예제 #1
0
 internal override void BuildCallsiteCreate(CodeGenerator cg, TypeSymbol returntype)
 {
     cg.EmitLoadToken(_typeRef.ResolvedType, null);      // type
     cg.Builder.EmitStringConstant(CallsiteName);        // name
     cg.EmitLoadToken(cg.CallerType, null);              // class context
     cg.EmitLoadToken(returntype, null);                 // return type
     cg.Builder.EmitIntConstant(0);                      // generic params count
     cg.EmitCall(ILOpCode.Call, cg.CoreMethods.Dynamic.CallBinderFactory_StaticFunction);
 }
예제 #2
0
 internal override void BuildCallsiteCreate(CodeGenerator cg, TypeSymbol returntype)
 {
     cg.Builder.EmitStringConstant(CallsiteName);
     cg.Builder.EmitStringConstant(_nameOpt.HasValue ? _nameOpt.Value.ToString() : null);
     cg.EmitLoadToken(returntype, null);
     cg.Builder.EmitIntConstant(0);
     cg.EmitCall(ILOpCode.Call, cg.CoreMethods.Dynamic.CallBinderFactory_Function);
 }