public static void InternAll(Interpreter interpreter) { interpreter.InternAndExport("not", new Function(not)); interpreter.InternAndExport("to-bool", new Function(to_bool)); interpreter.InternAndExport("nil?", new Function(nilp)); interpreter.InternAndExport("symbol?", new Function(symbolp)); interpreter.InternAndExport("eqv?", new Function(eqv)); interpreter.InternAndExport("eql?", new Function(eql)); interpreter.InternAndExport("cons", new Function(cons)); interpreter.InternAndExport("cons?", new Function(consp)); interpreter.InternAndExport("atom?", new Function(atomp)); interpreter.InternAndExport("first", new Function(first)); interpreter.InternAndExport("rest", new Function(rest)); interpreter.InternAndExport("set-first", new Function(setfirst)); interpreter.InternAndExport("set-rest", new Function(setrest)); interpreter.InternAndExport("second", new Function(second)); interpreter.InternAndExport("third", new Function(third)); interpreter.InternAndExport("fourth", new Function(fourth)); interpreter.InternAndExport("reverse", new Function(reverse)); interpreter.InternAndExport("list?", new Function(listp)); interpreter.InternAndExport("len", new Function(listlength)); interpreter.InternAndExport("nth", new Function(nth)); interpreter.InternAndExport("nth-rest", new Function(nthrest)); interpreter.InternAndExport("append", new Function(append)); interpreter.InternAndExport("concat!", new Function(concat_d)); interpreter.InternAndExport("type-of", new Function(type_of)); interpreter.InternAndExport("is?", new Function(isp)); interpreter.InternAndExport("even?", new Function(evenp)); interpreter.InternAndExport("macroexpand-1", new Function(macroexpand_1)); interpreter.InternAndExport("vector", new Function(vector)); interpreter.InternAndExport("vector-of", new Function(vector_of)); interpreter.InternAndExport("throw", new Function(throwfun)); interpreter.InternAndExport("try-catch-finally", new Function(try_catch_finally)); interpreter.InternAndExport("<i", new Function(lti)); interpreter.InternAndExport("addi", new Function(addints)); BinOp addop = new BinOp(); addop.AddMethod(typeof(Int32), typeof(Int32), new Function(addints)); addop.AddMethod(typeof(Int32), typeof(Object), new Function(addobjs)); addop.AddMethod(typeof(Object), typeof(Object), new Function(addobjs)); interpreter.InternAndExport("add", addop); BinOp subtractop = new BinOp(); subtractop.AddMethod(typeof(Int32), typeof(Int32), new Function(subtractints)); subtractop.AddMethod(typeof(Int32), typeof(Object), new Function(subtractobjs)); subtractop.AddMethod(typeof(Object), typeof(Object), new Function(subtractobjs)); interpreter.InternAndExport("subtract", subtractop); BinOp multiplyop = new BinOp(); multiplyop.AddMethod(typeof(Int32), typeof(Int32), new Function(multiplyints)); multiplyop.AddMethod(typeof(Int32), typeof(Object), new Function(multiplyobjs)); multiplyop.AddMethod(typeof(Object), typeof(Object), new Function(multiplyobjs)); interpreter.InternAndExport("multiply", multiplyop); BinOp divideop = new BinOp(); divideop.AddMethod(typeof(Int32), typeof(Int32), new Function(divideints)); divideop.AddMethod(typeof(Int32), typeof(Object), new Function(divideobjs)); divideop.AddMethod(typeof(Object), typeof(Object), new Function(divideobjs)); interpreter.InternAndExport("divide", divideop); BinOp modop = new BinOp(); modop.AddMethod(typeof(Int32), typeof(Int32), new Function(modints)); interpreter.InternAndExport("mod", modop); BinOp compareop = new BinOp(); compareop.AddMethod(typeof(Int32), typeof(Int32), new Function(subtractints)); compareop.AddMethod(typeof(Int32), typeof(Object), new Function(compareobjs)); compareop.AddMethod(typeof(Object), typeof(Object), new Function(compareobjs)); interpreter.InternAndExport("compare", compareop); BinOp bitorop = new BinOp(); bitorop.AddMethod(typeof(Enum), typeof(Enum), new Function(bitorenum)); bitorop.AddMethod(typeof(Object), typeof(Object), new Function(bitor)); interpreter.InternAndExport("bit-or", bitorop); BinOp bitandop = new BinOp(); bitandop.AddMethod(typeof(Enum), typeof(Enum), new Function(bitandenum)); bitandop.AddMethod(typeof(Object), typeof(Object), new Function(bitand)); interpreter.InternAndExport("bit-and", bitandop); BinOp bitxorop = new BinOp(); bitxorop.AddMethod(typeof(Enum), typeof(Enum), new Function(bitxorenum)); bitxorop.AddMethod(typeof(Object), typeof(Object), new Function(bitxor)); interpreter.InternAndExport("bit-xor", bitxorop); SimpleGenericFunction bitnotgf = new SimpleGenericFunction(); bitnotgf.AddMethod(typeof(Enum), new Function(bitnotenum)); bitnotgf.AddMethod(typeof(Object), new Function(bitnot)); interpreter.InternAndExport("bit-not", bitnotgf); SimpleGenericFunction get_enum_gf = new SimpleGenericFunction(); get_enum_gf.AddMethod(typeof(IEnumerator), new Function(get_enum_IEnumerator)); get_enum_gf.AddMethod(typeof(IEnumerable), new Function(get_enum_IEnumerable)); get_enum_gf.AddMethod(null, new Function(get_enum_nil)); interpreter.InternAndExport("get-enum", get_enum_gf); SimpleGenericFunction strgf = new SimpleGenericFunction(); strgf.AddMethod(null, new Function(strnil)); strgf.AddMethod(typeof(Object), new Function(strobj)); interpreter.InternAndExport("str", strgf); }