Beispiel #1
0
        public T this[int index]
        {
            get
            {
                var size      = global::cflat.Marshal.SizeOf <T> .size;
                var marshaler = new MemoryReadMarshaler(vm, headAddress + size * index);
                var value     = default(T);
                value.Marshal(ref marshaler);
                return(value);
            }

            set
            {
                var size      = global::cflat.Marshal.SizeOf <T> .size;
                var marshaler = new MemoryWriteMarshaler(vm, headAddress + size * index);
                value.Marshal(ref marshaler);
            }
        }
Beispiel #2
0
 public FunctionInterface(VirtualMachine vm, int stackTop)
 {
     reader = new MemoryReadMarshaler(vm, stackTop);
 }