public virtual IoObject proto(IoState state) { IoObject pro = new IoObject(); pro.state = state; pro.createSlots(); pro.createProtos(); pro.uniqueId = 0; state.registerProtoWithFunc(name, new IoStateProto(pro.name, pro, new IoStateProtoFunc(pro.proto))); return(pro); }
public virtual IoObject clone(IoState state) { IoObject proto = state.protoWithInitFunc(name); IoObject o = Activator.CreateInstance(this.GetType()) as IoObject; uniqueIdCounter++; o.uniqueId = uniqueIdCounter; o.state = proto.state; o.createSlots(); o.createProtos(); o.protos.Add(proto); cloneSpecific(this, o); return(o); }
// Call Public Raw Methods public override IoObject activate(IoObject sender, IoObject target, IoObject locals, IoMessage m, IoObject slotContext) { IoState state = sender.state; IoBlock self = sender as IoBlock; IoObjectArrayList argNames = self.argNames; IoObject scope = self.scope; IoObject blockLocals = state.localsProto.clone(state); IoObject result = null; IoObject callObject = null; blockLocals.isLocals = true; if (scope == null) { scope = target; } blockLocals.createSlots(); callObject = IoCall.with(state, locals, target, m, slotContext, self, null /*state.currentCoroutine*/); IoSeqObjectHashtable bslots = blockLocals.slots; bslots["call"] = callObject; bslots["self"] = scope; bslots["updateSlot"] = state.localsUpdateSlotCFunc; if (argNames != null) { for (int i = 0; i < argNames.Count; i++) { IoSeq name = argNames[i] as IoSeq; IoObject arg = m.localsValueArgAt(locals, i); blockLocals.slots[name] = arg; } } if (self.containedMessage != null) { result = self.containedMessage.localsPerformOn(blockLocals, blockLocals); } if (self.passStops == IoCallStatus.MESSAGE_STOP_STATUS_NORMAL) { } return(result); }
public virtual IoObject proto(IoState state) { IoObject pro = new IoObject(); pro.state = state; pro.createSlots(); pro.createProtos(); pro.uniqueId = 0; state.registerProtoWithFunc(name, new IoStateProto(pro.name, pro, new IoStateProtoFunc(pro.proto))); return pro; }