예제 #1
0
        internal static CilLocal[] DecodeLocalSignature(MethodBodyBlock methodBody, MetadataReader metadataReader, CilTypeProvider provider)
        {
            if (methodBody.LocalSignature.IsNil)
            {
                return(new CilLocal[0]);
            }
            ImmutableArray <CilType> localTypes = SignatureDecoder.DecodeLocalSignature(methodBody.LocalSignature, provider);

            CilLocal[] locals = new CilLocal[localTypes.Length];
            for (int i = 0; i < localTypes.Length; i++)
            {
                string name = "V_" + i;
                locals[i] = new CilLocal(name, localTypes[i].ToString());
            }
            return(locals);
        }
예제 #2
0
 public void Visit(CilLocal local)
 {
     _writer.Write(string.Format("{0} {1}", local.Type, local.Name));
 }
예제 #3
0
 public void Visit(CilLocal local)
 {
     _writer.Write(string.Format("{0} {1}", local.Type, local.Name));
 }
예제 #4
0
 internal static CilLocal[] DecodeLocalSignature(MethodBodyBlock methodBody, MetadataReader metadataReader, CilTypeProvider provider)
 {
     if (methodBody.LocalSignature.IsNil)
     {
         return new CilLocal[0];
     }
     ImmutableArray<CilType> localTypes = SignatureDecoder.DecodeLocalSignature(methodBody.LocalSignature, provider);
     CilLocal[] locals = new CilLocal[localTypes.Length];
     for (int i = 0; i < localTypes.Length; i++)
     {
         string name = "V_" + i;
         locals[i] = new CilLocal(name, localTypes[i].ToString());
     }
     return locals;
 }