From e4b183e2ad0ae959c30b41fae7ac9ce0a6d78dd7 Mon Sep 17 00:00:00 2001 From: Rich Hickey Date: Mon, 25 Sep 2006 19:08:25 +0000 Subject: dropped some deprecated classes --- src/cli/runtime/Accessor.cs | 142 -------------------------------------------- src/cli/runtime/RestFn0.cs | 65 -------------------- src/cli/runtime/RestFn1.cs | 69 --------------------- src/cli/runtime/RestFn2.cs | 69 --------------------- src/cli/runtime/RestFn3.cs | 71 ---------------------- src/cli/runtime/RestFn4.cs | 74 ----------------------- src/cli/runtime/RestFn5.cs | 77 ------------------------ 7 files changed, 567 deletions(-) delete mode 100644 src/cli/runtime/Accessor.cs delete mode 100644 src/cli/runtime/RestFn0.cs delete mode 100644 src/cli/runtime/RestFn1.cs delete mode 100644 src/cli/runtime/RestFn2.cs delete mode 100644 src/cli/runtime/RestFn3.cs delete mode 100644 src/cli/runtime/RestFn4.cs delete mode 100644 src/cli/runtime/RestFn5.cs (limited to 'src/cli/runtime') diff --git a/src/cli/runtime/Accessor.cs b/src/cli/runtime/Accessor.cs deleted file mode 100644 index 785dcb2e..00000000 --- a/src/cli/runtime/Accessor.cs +++ /dev/null @@ -1,142 +0,0 @@ -/** - * Copyright (c) Rich Hickey. All rights reserved. - * The use and distribution terms for this software are covered by the - * Common Public License 1.0 (http://opensource.org/licenses/cpl.php) - * which can be found in the file CPL.TXT at the root of this distribution. - * By using this software in any fashion, you are agreeing to be bound by - * the terms of this license. - * You must not remove this notice, or any other, from this software. - **/ - -using System; - -namespace clojure.lang -{ -public class Accessor :Symbol, IFn - { - String memberName; internal Accessor(String name) :base(name) { memberName = name.Substring(1); } - -public Object invoke() /**/ { - return AFn.throwArity(); - } /** * Indexer implements IFn for attr access * This single arg version is the getter * @param tld * @param obj - must be AMap * @return the value of the attr or nil if not found * @ */ public Object invoke( Object obj) // { - - return Reflector.invokeInstanceMember(memberName, obj); } /** * Indexer implements IFn for attr access * This two arg version is the setter * @param tld * @param obj - must be AMap * @param val * @return val * @ */ public Object invoke( Object obj, Object val) // { return Reflector.invokeInstanceMember(memberName,obj,val); } public Object invoke(Object arg1, Object arg2, Object arg3) { - return Reflector.invokeInstanceMember(memberName, arg1, arg2, arg3); -} - -public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4) { - return Reflector.invokeInstanceMember(memberName, arg1, arg2, arg3, arg4); -} - -public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5) { - return Reflector.invokeInstanceMember(memberName, arg1, arg2, arg3, arg4, arg5); -} - -public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6) { - return Reflector.invokeInstanceMember(memberName, arg1, arg2, arg3, arg4, arg5, arg6); -} - -public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7) - { - return Reflector.invokeInstanceMember(memberName, arg1, arg2, arg3, arg4, arg5, arg6, arg7); -} - -public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, - Object arg8) { - return Reflector.invokeInstanceMember(memberName, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); -} - -public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, - Object arg8, Object arg9) { - return Reflector.invokeInstanceMember(memberName, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); -} - -public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, - Object arg8, Object arg9, Object arg10) { - return Reflector.invokeInstanceMember(memberName, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10); -} - -public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, - Object arg8, Object arg9, Object arg10, Object arg11) { - return Reflector - .invokeInstanceMember(memberName, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11); -} - -public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, - Object arg8, Object arg9, Object arg10, Object arg11, Object arg12) { - return Reflector.invokeInstanceMember(memberName, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, - arg11, arg12); -} - -public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, - Object arg8, Object arg9, Object arg10, Object arg11, Object arg12, Object arg13) - { - return Reflector.invokeInstanceMember(memberName, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, - arg11, arg12, arg13); -} - -public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, - Object arg8, Object arg9, Object arg10, Object arg11, Object arg12, Object arg13, Object arg14) - { - return Reflector.invokeInstanceMember(memberName, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, - arg11, arg12, arg13, arg14); -} - -public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, - Object arg8, Object arg9, Object arg10, Object arg11, Object arg12, Object arg13, Object arg14, - Object arg15) { - return Reflector.invokeInstanceMember(memberName, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, - arg11, arg12, arg13, arg14, arg15); -} - -public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, - Object arg8, Object arg9, Object arg10, Object arg11, Object arg12, Object arg13, Object arg14, - Object arg15, Object arg16) { - return Reflector.invokeInstanceMember(memberName, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, - arg11, arg12, arg13, arg14, arg15, arg16); -} - -public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, - Object arg8, Object arg9, Object arg10, Object arg11, Object arg12, Object arg13, Object arg14, - Object arg15, Object arg16, Object arg17) { - return Reflector.invokeInstanceMember(memberName, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, - arg11, arg12, arg13, arg14, arg15, arg16, arg17); -} - -public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, - Object arg8, Object arg9, Object arg10, Object arg11, Object arg12, Object arg13, Object arg14, - Object arg15, Object arg16, Object arg17, Object arg18) { - return Reflector.invokeInstanceMember(memberName, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, - arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18); -} - -public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, - Object arg8, Object arg9, Object arg10, Object arg11, Object arg12, Object arg13, Object arg14, - Object arg15, Object arg16, Object arg17, Object arg18, Object arg19) { - return Reflector.invokeInstanceMember(memberName, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, - arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19); -} - -public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, - Object arg8, Object arg9, Object arg10, Object arg11, Object arg12, Object arg13, Object arg14, - Object arg15, Object arg16, Object arg17, Object arg18, Object arg19, Object arg20) - { - return Reflector.invokeInstanceMember(memberName, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, - arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20); -} - - -public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, - Object arg8, Object arg9, Object arg10, Object arg11, Object arg12, Object arg13, Object arg14, - Object arg15, Object arg16, Object arg17, Object arg18, Object arg19, Object arg20 - , params Object[] args) - { - throw new InvalidOperationException("Can't call functions of more than 20 arguments"); -} - - -public Object applyTo( ISeq arglist) /**/ { - return AFn.applyToHelper(this, arglist); - } - } -} diff --git a/src/cli/runtime/RestFn0.cs b/src/cli/runtime/RestFn0.cs deleted file mode 100644 index d440d924..00000000 --- a/src/cli/runtime/RestFn0.cs +++ /dev/null @@ -1,65 +0,0 @@ -/** - * Copyright (c) Rich Hickey. All rights reserved. - * The use and distribution terms for this software are covered by the - * Common Public License 1.0 (http://opensource.org/licenses/cpl.php) - * which can be found in the file CPL.TXT at the root of this distribution. - * By using this software in any fashion, you are agreeing to be bound by - * the terms of this license. - * You must not remove this notice, or any other, from this software. - **/ - -/* rich Mar 27, 2006 7:34:25 PM */ - -using System; - -namespace clojure.lang -{ - -public abstract class RestFn0 : AFn - { - -public abstract Object doInvoke( ISeq rest) /*throws Exception*/; - -override public Object applyTo( ISeq arglist) /*throws Exception*/ - { - return doInvoke( arglist); - } - -override public Object invoke() /*throws Exception*/ - { - return doInvoke( null); - } - -override public Object invoke( Object arg1) /*throws Exception*/ - { - return doInvoke( RT.list(arg1)); - } - -override public Object invoke( Object arg1, Object arg2) /*throws Exception*/ - { - return doInvoke( RT.list(arg1, arg2)); - } - -override public Object invoke( Object arg1, Object arg2, Object arg3) /*throws Exception*/ - { - return doInvoke( RT.list(arg1, arg2, arg3)); - } - -override public Object invoke( Object arg1, Object arg2, Object arg3, Object arg4) /*throws Exception*/ - { - return doInvoke( RT.list(arg1, arg2, arg3, arg4)); - } - -override public Object invoke( Object arg1, Object arg2, Object arg3, Object arg4, Object arg5) - /*throws Exception*/ - { - return doInvoke( RT.list(arg1, arg2, arg3, arg4, arg5)); - } - -override public Object invoke( Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, params Object[] args) - /*throws Exception*/ - { - return doInvoke( RT.listStar(arg1, arg2, arg3, arg4, arg5, RT.seq(args))); - } -} -} \ No newline at end of file diff --git a/src/cli/runtime/RestFn1.cs b/src/cli/runtime/RestFn1.cs deleted file mode 100644 index 4a86be0b..00000000 --- a/src/cli/runtime/RestFn1.cs +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (c) Rich Hickey. All rights reserved. - * The use and distribution terms for this software are covered by the - * Common Public License 1.0 (http://opensource.org/licenses/cpl.php) - * which can be found in the file CPL.TXT at the root of this distribution. - * By using this software in any fashion, you are agreeing to be bound by - * the terms of this license. - * You must not remove this notice, or any other, from this software. - **/ - -/* rich Mar 27, 2006 8:00:28 PM */ - -using System; - -namespace clojure.lang -{ - -public abstract class RestFn1 : AFn{ - -public abstract Object doInvoke( Object arg1, ISeq rest) /*throws Exception*/; - -override public Object applyTo( ISeq arglist) /*throws Exception*/ - { - switch (RT.boundedLength(arglist, 1)) - { - case 0: - return invoke(); - case 1: - return invoke( arglist.first()); - default: - return doInvoke( arglist.first() - , arglist.rest()); - } - } - -override public Object invoke( Object arg1) /*throws Exception*/ - { - return doInvoke( arg1, null); - } - -override public Object invoke( Object arg1, Object arg2) /*throws Exception*/ - { - return doInvoke( arg1, RT.list(arg2)); - } - -override public Object invoke( Object arg1, Object arg2, Object arg3) /*throws Exception*/ - { - return doInvoke( arg1, RT.list(arg2, arg3)); - } - -override public Object invoke( Object arg1, Object arg2, Object arg3, Object arg4) /*throws Exception*/ - { - return doInvoke( arg1, RT.list(arg2, arg3, arg4)); - } - -override public Object invoke( Object arg1, Object arg2, Object arg3, Object arg4, Object arg5) - /*throws Exception*/ - { - return doInvoke( arg1, RT.list(arg2, arg3, arg4, arg5)); - } - -override public Object invoke( Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, params Object[] args) - /*throws Exception*/ - { - return doInvoke( arg1, RT.listStar(arg2, arg3, arg4, arg5, RT.seq(args))); - } -} - -} \ No newline at end of file diff --git a/src/cli/runtime/RestFn2.cs b/src/cli/runtime/RestFn2.cs deleted file mode 100644 index dcaf6400..00000000 --- a/src/cli/runtime/RestFn2.cs +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (c) Rich Hickey. All rights reserved. - * The use and distribution terms for this software are covered by the - * Common Public License 1.0 (http://opensource.org/licenses/cpl.php) - * which can be found in the file CPL.TXT at the root of this distribution. - * By using this software in any fashion, you are agreeing to be bound by - * the terms of this license. - * You must not remove this notice, or any other, from this software. - **/ - -/* rich Mar 27, 2006 8:05:10 PM */ - -using System; - -namespace clojure.lang -{ - -public abstract class RestFn2 : AFn{ - - public abstract Object doInvoke( Object arg1, Object arg2, ISeq rest) /*throws Exception*/; - -override public Object applyTo( ISeq arglist) /*throws Exception*/ - { - switch (RT.boundedLength(arglist, 2)) - { - case 0: - return invoke(); - case 1: - return invoke( arglist.first()); - case 2: - return invoke( arglist.first() - , (arglist = arglist.rest()).first() - ); - default: - return doInvoke( arglist.first() - , (arglist = arglist.rest()).first() - , arglist.rest()); - - } - } - -override public Object invoke( Object arg1, Object arg2) /*throws Exception*/ - { - return doInvoke( arg1, arg2, null); - } - -override public Object invoke( Object arg1, Object arg2, Object arg3) /*throws Exception*/ - { - return doInvoke( arg1, arg2, RT.list(arg3)); - } - -override public Object invoke( Object arg1, Object arg2, Object arg3, Object arg4) /*throws Exception*/ - { - return doInvoke( arg1, arg2, RT.list(arg3, arg4)); - } - -override public Object invoke( Object arg1, Object arg2, Object arg3, Object arg4, Object arg5) - /*throws Exception*/ - { - return doInvoke( arg1, arg2, RT.list(arg3, arg4, arg5)); - } - -override public Object invoke( Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, params Object[] args) - /*throws Exception*/ - { - return doInvoke( arg1, arg2, RT.listStar(arg3, arg4, arg5, RT.seq(args))); - } -} -} diff --git a/src/cli/runtime/RestFn3.cs b/src/cli/runtime/RestFn3.cs deleted file mode 100644 index 3775e997..00000000 --- a/src/cli/runtime/RestFn3.cs +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Copyright (c) Rich Hickey. All rights reserved. - * The use and distribution terms for this software are covered by the - * Common Public License 1.0 (http://opensource.org/licenses/cpl.php) - * which can be found in the file CPL.TXT at the root of this distribution. - * By using this software in any fashion, you are agreeing to be bound by - * the terms of this license. - * You must not remove this notice, or any other, from this software. - **/ - -/* rich Mar 27, 2006 8:19:54 PM */ - -using System; - -namespace clojure.lang -{ - -public abstract class RestFn3 : AFn{ - - public abstract Object doInvoke( Object arg1, Object arg2, Object arg3, ISeq rest) /*throws Exception*/; - -override public Object applyTo( ISeq arglist) /*throws Exception*/ - { - switch (RT.boundedLength(arglist, 3)) - { - case 0: - return invoke(); - case 1: - return invoke( arglist.first()); - case 2: - return invoke( arglist.first() - , (arglist = arglist.rest()).first() - ); - case 3: - return invoke( arglist.first() - , (arglist = arglist.rest()).first() - , (arglist = arglist.rest()).first() - ); - default: - return doInvoke( arglist.first() - , (arglist = arglist.rest()).first() - , (arglist = arglist.rest()).first() - , arglist.rest()); - - } - } - - -override public Object invoke( Object arg1, Object arg2, Object arg3) /*throws Exception*/ - { - return doInvoke( arg1, arg2, arg3,null); - } - -override public Object invoke( Object arg1, Object arg2, Object arg3, Object arg4) /*throws Exception*/ - { - return doInvoke( arg1, arg2, arg3, RT.list(arg4)); - } - -override public Object invoke( Object arg1, Object arg2, Object arg3, Object arg4, Object arg5) - /*throws Exception*/ - { - return doInvoke( arg1, arg2, arg3, RT.list(arg4, arg5)); - } - -override public Object invoke( Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, params Object[] args) - /*throws Exception*/ - { - return doInvoke( arg1, arg2, arg3, RT.listStar(arg4, arg5, RT.seq(args))); - } -} -} \ No newline at end of file diff --git a/src/cli/runtime/RestFn4.cs b/src/cli/runtime/RestFn4.cs deleted file mode 100644 index 7e534ca9..00000000 --- a/src/cli/runtime/RestFn4.cs +++ /dev/null @@ -1,74 +0,0 @@ -/** - * Copyright (c) Rich Hickey. All rights reserved. - * The use and distribution terms for this software are covered by the - * Common Public License 1.0 (http://opensource.org/licenses/cpl.php) - * which can be found in the file CPL.TXT at the root of this distribution. - * By using this software in any fashion, you are agreeing to be bound by - * the terms of this license. - * You must not remove this notice, or any other, from this software. - **/ - -/* rich Mar 27, 2006 8:21:51 PM */ - -using System; - -namespace clojure.lang -{ - -public abstract class RestFn4 : AFn{ - - public abstract Object doInvoke( Object arg1, Object arg2, Object arg3, Object arg4, ISeq rest) - /*throws Exception*/; - -override public Object applyTo( ISeq arglist) /*throws Exception*/ - { - switch (RT.boundedLength(arglist, 4)) - { - case 0: - return invoke(); - case 1: - return invoke( arglist.first()); - case 2: - return invoke( arglist.first() - , (arglist = arglist.rest()).first() - ); - case 3: - return invoke( arglist.first() - , (arglist = arglist.rest()).first() - , (arglist = arglist.rest()).first() - ); - case 4: - return invoke( arglist.first() - , (arglist = arglist.rest()).first() - , (arglist = arglist.rest()).first() - , (arglist = arglist.rest()).first() - ); - default: - return doInvoke( arglist.first() - , (arglist = arglist.rest()).first() - , (arglist = arglist.rest()).first() - , (arglist = arglist.rest()).first() - , arglist.rest()); - - } - } - -override public Object invoke( Object arg1, Object arg2, Object arg3, Object arg4) /*throws Exception*/ - { - return doInvoke( arg1, arg2, arg3, arg4, null); - } - -override public Object invoke( Object arg1, Object arg2, Object arg3, Object arg4, Object arg5) - /*throws Exception*/ - { - return doInvoke( arg1, arg2, arg3, arg4, RT.list(arg5)); - } - -override public Object invoke( Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, params Object[] args) - /*throws Exception*/ - { - return doInvoke( arg1, arg2, arg3, arg4, RT.listStar(arg5, RT.seq(args))); - } -} -} - diff --git a/src/cli/runtime/RestFn5.cs b/src/cli/runtime/RestFn5.cs deleted file mode 100644 index bd3dcc67..00000000 --- a/src/cli/runtime/RestFn5.cs +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Copyright (c) Rich Hickey. All rights reserved. - * The use and distribution terms for this software are covered by the - * Common Public License 1.0 (http://opensource.org/licenses/cpl.php) - * which can be found in the file CPL.TXT at the root of this distribution. - * By using this software in any fashion, you are agreeing to be bound by - * the terms of this license. - * You must not remove this notice, or any other, from this software. - **/ - -/* rich Mar 27, 2006 8:24:31 PM */ - -using System; - -namespace clojure.lang -{ - -public abstract class RestFn5 : AFn{ - - public abstract Object doInvoke( Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, - ISeq rest) - /*throws Exception*/; - -override public Object applyTo( ISeq arglist) /*throws Exception*/ - { - switch (RT.boundedLength(arglist, 5)) - { - case 0: - return invoke(); - case 1: - return invoke( arglist.first()); - case 2: - return invoke( arglist.first() - , (arglist = arglist.rest()).first() - ); - case 3: - return invoke( arglist.first() - , (arglist = arglist.rest()).first() - , (arglist = arglist.rest()).first() - ); - case 4: - return invoke( arglist.first() - , (arglist = arglist.rest()).first() - , (arglist = arglist.rest()).first() - , (arglist = arglist.rest()).first() - ); - case 5: - return invoke( arglist.first() - , (arglist = arglist.rest()).first() - , (arglist = arglist.rest()).first() - , (arglist = arglist.rest()).first() - , (arglist = arglist.rest()).first() - ); - default: - return doInvoke( arglist.first() - , (arglist = arglist.rest()).first() - , (arglist = arglist.rest()).first() - , (arglist = arglist.rest()).first() - , (arglist = arglist.rest()).first() - , arglist.rest()); - - } - } - -override public Object invoke( Object arg1, Object arg2, Object arg3, Object arg4, Object arg5) - /*throws Exception*/ - { - return doInvoke( arg1, arg2, arg3, arg4, arg5, null); - } - -override public Object invoke( Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, params Object[] args) - /*throws Exception*/ - { - return doInvoke( arg1, arg2, arg3, arg4, arg5, RT.seq(args)); - } -} -} -- cgit v1.2.3-70-g09d2