Esempio n. 1
0
 public IEnumerable <TypedCH> GetCHs(OPCode opcode)
 {
     D.Assert(opcode.GetType() == opcode_type);
     foreach (var fi in CH_FIs)
     {
         yield return((TypedCH)fi.GetValue(opcode));
     }
 }
Esempio n. 2
0
        public static JsonObject conv(OPCode opc)
        {
            var J_opc = new JsonObject();

            J_opc["kind"] = "opcode";
            J_opc["id"]   = ID(opc);
            J_opc["name"] = opc.GetType().Name;

            return(J_opc);
        }
Esempio n. 3
0
     public IEnumerable <CH_Edge> GetCH_edges(OPCode opcode)
     {
         D.Assert(opcode.GetType() == opcode_type);
         foreach (var fi in CH_FIs)
         {
             yield return new CH_Edge {
                        CH = (TypedCH)fi.GetValue(opcode), fieldname = fi.Name
             }
         }
         ;
     }
 }
Esempio n. 4
0
 public static IEnumerable <CH_Edge> OP2CH_edge(OPCode op) => new OPC_reflector(op.GetType()).GetCH_edges(op);         // todo cache the reflectors per type somewhere
Esempio n. 5
0
        // evilish and reflectiony because i don't want to put additional demands on the base types
        // ... at least yet

        public static IEnumerable <TypedCH> OP2CHs(OPCode op) => new OPC_reflector(op.GetType()).GetCHs(op);         // todo cache the reflectors per type somewhere