public override IoObject clone(IoState state) { IoSeq proto = state.protoWithInitFunc(name) as IoSeq; IoSeq result = new IoSeq(); result.state = state; result.value = proto.value; result.createProtos(); result.createSlots(); result.protos.Add(proto); return(result); }
public override IoObject proto(IoState state) { IoSeq pro = new IoSeq(); pro.state = state; // pro.tag.cloneFunc = new IoTagCloneFunc(this.clone); // pro.tag.compareFunc = new IoTagCompareFunc(this.compare); pro.createSlots(); pro.createProtos(); state.registerProtoWithFunc(name, new IoStateProto(name, pro, new IoStateProtoFunc(this.proto))); pro.protos.Add(state.protoWithInitFunc("Object")); IoCFunction[] methodTable = new IoCFunction[] { new IoCFunction("appendSeq", new IoMethodFunc(IoSeq.slotAppendSeq)), new IoCFunction("at", new IoMethodFunc(IoSeq.slotAt)), new IoCFunction("reverse", new IoMethodFunc(IoSeq.slotReverse)), }; pro.addTaglessMethodTable(state, methodTable); return(pro); }
public override IoObject proto(IoState state) { IoSeq pro = new IoSeq(); pro.state = state; // pro.tag.cloneFunc = new IoTagCloneFunc(this.clone); // pro.tag.compareFunc = new IoTagCompareFunc(this.compare); pro.createSlots(); pro.createProtos(); state.registerProtoWithFunc(name, new IoStateProto(name, pro, new IoStateProtoFunc(this.proto))); pro.protos.Add(state.protoWithInitFunc("Object")); IoCFunction[] methodTable = new IoCFunction[] { new IoCFunction("appendSeq", new IoMethodFunc(IoSeq.slotAppendSeq)), new IoCFunction("at", new IoMethodFunc(IoSeq.slotAt)), new IoCFunction("reverse", new IoMethodFunc(IoSeq.slotReverse)), }; pro.addTaglessMethodTable(state, methodTable); return pro; }
public override IoObject clone(IoState state) { IoSeq proto = state.protoWithInitFunc(name) as IoSeq; IoSeq result = new IoSeq(); result.state = state; result.value = proto.value; result.createProtos(); result.createSlots(); result.protos.Add(proto); return result; }