public override IoObject clone(IoState state) { IoCLRObject proto = state.protoWithInitFunc(name) as IoCLRObject; IoCLRObject result = new IoCLRObject(); result.isActivatable = true; uniqueIdCounter++; result.uniqueId = uniqueIdCounter; result.state = state; result.createProtos(); result.createSlots(); result.protos.Add(proto); return result; }
public override IoObject proto(IoState state) { IoCLRObject pro = new IoCLRObject(); pro.state = state; pro.uniqueId = 0; pro.createSlots(); pro.createProtos(); pro.isActivatable = true; state.registerProtoWithFunc(pro.name, new IoStateProto(pro.name, pro, new IoStateProtoFunc(pro.proto))); pro.protos.Add(state.protoWithInitFunc("Object")); IoCFunction[] methodTable = new IoCFunction[] { new IoCFunction("type", new IoMethodFunc(IoObject.slotType)) }; pro.addTaglessMethodTable(state, methodTable); return pro; }