addTaglessMethodTable() public method

public addTaglessMethodTable ( IoState state, IoCFunction table ) : void
state IoState
table IoCFunction
return void
示例#1
0
        // proto finish must be called only before first Sequence proto created

        public IoObject protoFinish(IoState state)
        {
            IoCFunction[] methodTable = new IoCFunction[] {
                new IoCFunction("compare", new IoMethodFunc(IoObject.slotCompare)),
                new IoCFunction("==", new IoMethodFunc(IoObject.slotEquals)),
                new IoCFunction("!=", new IoMethodFunc(IoObject.slotNotEquals)),
                new IoCFunction(">=", new IoMethodFunc(IoObject.slotGreaterThanOrEqual)),
                new IoCFunction("<=", new IoMethodFunc(IoObject.slotLessThanOrEqual)),
                new IoCFunction(">", new IoMethodFunc(IoObject.slotGreaterThan)),
                new IoCFunction("<", new IoMethodFunc(IoObject.slotLessThan)),
                new IoCFunction("-", new IoMethodFunc(IoObject.slotSubstract)),
                new IoCFunction("", new IoMethodFunc(IoObject.slotEevalArg)),
                new IoCFunction("self", new IoMethodFunc(IoObject.slotSelf)),
                new IoCFunction("clone", new IoMethodFunc(IoObject.slotClone)),
                new IoCFunction("return", new IoMethodFunc(IoObject.slotReturn)),
                new IoCFunction("cloneWithoutInit", new IoMethodFunc(IoObject.slotCloneWithoutInit)),
                new IoCFunction("doMessage", new IoMethodFunc(IoObject.slotDoMessage)),
                new IoCFunction("print", new IoMethodFunc(IoObject.slotPrint)),
                new IoCFunction("println", new IoMethodFunc(IoObject.slotPrintln)),
                new IoCFunction("slotNames", new IoMethodFunc(IoObject.slotSlotNames)),
                new IoCFunction("type", new IoMethodFunc(IoObject.slotType)),
                new IoCFunction("evalArg", new IoMethodFunc(IoObject.slotEevalArg)),
                new IoCFunction("evalArgAndReturnSelf", new IoMethodFunc(IoObject.slotEevalArgAndReturnSelf)),
                new IoCFunction("do", new IoMethodFunc(IoObject.slotDo)),
                new IoCFunction("getSlot", new IoMethodFunc(IoObject.slotGetSlot)),
                new IoCFunction("updateSlot", new IoMethodFunc(IoObject.slotUpdateSlot)),
                new IoCFunction("setSlot", new IoMethodFunc(IoObject.slotSetSlot)),
                new IoCFunction("setSlotWithType", new IoMethodFunc(IoObject.slotSetSlotWithType)),
                new IoCFunction("message", new IoMethodFunc(IoObject.slotMessage)),
                new IoCFunction("method", new IoMethodFunc(IoObject.slotMethod)),
                new IoCFunction("block", new IoMethodFunc(IoObject.slotBlock)),
                new IoCFunction("init", new IoMethodFunc(IoObject.slotSelf)),
                new IoCFunction("thisContext", new IoMethodFunc(IoObject.slotSelf)),
                new IoCFunction("thisMessage", new IoMethodFunc(IoObject.slotThisMessage)),
                new IoCFunction("thisLocals", new IoMethodFunc(IoObject.slotThisLocals)),
                new IoCFunction("init", new IoMethodFunc(IoObject.slotSelf)),
                new IoCFunction("if", new IoMethodFunc(IoObject.slotIf)),
                new IoCFunction("yield", new IoMethodFunc(IoObject.slotYield)),
                new IoCFunction("@@", new IoMethodFunc(IoObject.slotAsyncCall)),
                new IoCFunction("yieldingCoros", new IoMethodFunc(IoObject.slotYieldingCoros)),
                new IoCFunction("while", new IoMethodFunc(IoObject.slotWhile))
            };
            IoObject o = state.protoWithInitFunc(name);

            o.addTaglessMethodTable(state, methodTable);
            return(o);
        }