Exemplo n.º 1
0
 public ManifestInstance(StandardInstance closClass, object [] slotVector, FuncallHandler onFuncall)
 {
     this.serialNumber = nextSerialNumber++;
     this.closClass    = closClass;
     this.slotVector   = slotVector;
     this.onFuncall    = onFuncall;
 }
Exemplo n.º 2
0
 static StandardInstance CreateInstance(StandardInstance closClass, int nSlots, FuncallHandler method)
 {
     object [] slotVector = null;
     if (nSlots > 0) {
         slotVector = new object [nSlots];
     for (int i = 0; i < nSlots; i++)
         slotVector [i] = UnboundSlotValue;
     }
     return CreateInstance (closClass, nSlots == 0 ? null : slotVector, method);
 }
Exemplo n.º 3
0
 static StandardInstance CreateInstance(StandardInstance closClass, object [] slots, FuncallHandler method)
 {
     StandardInstance answer =
         (StandardInstance) Delegate.CreateDelegate (typeof (StandardInstance),
                                                   new ManifestInstance (closClass, slots, method),
                                                   typeof (ManifestInstance)
                                                      .GetMethod ("DefaultInstanceMethod",
                                                                  System.Reflection.BindingFlags.Instance
                                                                  | System.Reflection.BindingFlags.NonPublic));
     ((ManifestInstance) answer.Target).self = answer;
     return answer;
 }
Exemplo n.º 4
0
 public static StandardInstance CreateFuncallableInstance(StandardInstance closClass, object [] slots, FuncallHandler funcallHandler)
 {
     return CreateInstance (closClass, slots, funcallHandler);
 }
Exemplo n.º 5
0
 public static StandardInstance CreateFuncallableInstance(StandardInstance closClass, int nSlots, FuncallHandler funcallHandler)
 {
     return CreateInstance (closClass, nSlots, funcallHandler);
 }
Exemplo n.º 6
0
 public static StandardInstance CreateFuncallableInstance(FuncallHandler funcallHandler)
 {
     return CreateInstance (null, 0, funcallHandler);
 }
Exemplo n.º 7
0
 public ManifestInstance(StandardInstance closClass, object [] slotVector, FuncallHandler onFuncall)
 {
     this.serialNumber = nextSerialNumber++;
     this.closClass = closClass;
     this.slotVector = slotVector;
     this.onFuncall = onFuncall;
 }
Exemplo n.º 8
0
 public static StandardInstance CreateFuncallableInstance(StandardInstance closClass, object [] slots, FuncallHandler funcallHandler)
 {
     return(CreateInstance(closClass, slots, funcallHandler));
 }
Exemplo n.º 9
0
 public static StandardInstance CreateFuncallableInstance(FuncallHandler funcallHandler)
 {
     return(CreateInstance(null, 0, funcallHandler));
 }
Exemplo n.º 10
0
 static StandardInstance CreateInstance(StandardInstance closClass, int nSlots, FuncallHandler method)
 {
     object [] slotVector = null;
     if (nSlots > 0)
     {
         slotVector = new object [nSlots];
         for (int i = 0; i < nSlots; i++)
         {
             slotVector [i] = UnboundSlotValue;
         }
     }
     return(CreateInstance(closClass, nSlots == 0 ? null : slotVector, method));
 }
Exemplo n.º 11
0
        static StandardInstance CreateInstance(StandardInstance closClass, object [] slots, FuncallHandler method)
        {
            StandardInstance answer =
                (StandardInstance)Delegate.CreateDelegate(typeof(StandardInstance),
                                                          new ManifestInstance(closClass, slots, method),
                                                          typeof(ManifestInstance)
                                                          .GetMethod("DefaultInstanceMethod",
                                                                     System.Reflection.BindingFlags.Instance
                                                                     | System.Reflection.BindingFlags.NonPublic));

            ((ManifestInstance)answer.Target).self = answer;
            return(answer);
        }