Exemplo 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));
     }
 }
Exemplo 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);
        }
Exemplo 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
             }
         }
         ;
     }
 }
Exemplo 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
Exemplo 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