summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Hickey <richhickey@gmail.com>2011-03-21 11:17:22 -0400
committerRich Hickey <richhickey@gmail.com>2011-03-21 11:17:22 -0400
commit8fda34e4c77cac079b711da59d5fe49b74605553 (patch)
tree89a78cbc7980cdf33f8d5412e0868fac43039398
parent0245f15c9c7bd2d043f0f6e59fff0a692d7466b1 (diff)
get rid of checked exceptions
-rw-r--r--src/jvm/clojure/lang/AFn.java52
-rw-r--r--src/jvm/clojure/lang/AFunction.java4
-rw-r--r--src/jvm/clojure/lang/AMapEntry.java4
-rw-r--r--src/jvm/clojure/lang/APersistentMap.java4
-rw-r--r--src/jvm/clojure/lang/APersistentSet.java2
-rw-r--r--src/jvm/clojure/lang/APersistentVector.java6
-rw-r--r--src/jvm/clojure/lang/ARef.java6
-rw-r--r--src/jvm/clojure/lang/AReference.java2
-rw-r--r--src/jvm/clojure/lang/ASeq.java516
-rw-r--r--src/jvm/clojure/lang/ATransientMap.java4
-rw-r--r--src/jvm/clojure/lang/ATransientSet.java6
-rw-r--r--src/jvm/clojure/lang/Agent.java12
-rw-r--r--src/jvm/clojure/lang/ArrayChunk.java2
-rw-r--r--src/jvm/clojure/lang/ArraySeq.java32
-rw-r--r--src/jvm/clojure/lang/Atom.java8
-rw-r--r--src/jvm/clojure/lang/Compile.java2
-rw-r--r--src/jvm/clojure/lang/Compiler.java525
-rw-r--r--src/jvm/clojure/lang/Delay.java4
-rw-r--r--src/jvm/clojure/lang/FnLoaderThunk.java19
-rw-r--r--src/jvm/clojure/lang/IBlockingDeref.java2
-rw-r--r--src/jvm/clojure/lang/IChunk.java2
-rw-r--r--src/jvm/clojure/lang/IChunkedSeq.java6
-rw-r--r--src/jvm/clojure/lang/IDeref.java2
-rw-r--r--src/jvm/clojure/lang/IFn.java46
-rw-r--r--src/jvm/clojure/lang/IPersistentMap.java46
-rw-r--r--src/jvm/clojure/lang/IPersistentSet.java2
-rw-r--r--src/jvm/clojure/lang/IReduce.java4
-rw-r--r--src/jvm/clojure/lang/IReference.java2
-rw-r--r--src/jvm/clojure/lang/ITransientSet.java2
-rw-r--r--src/jvm/clojure/lang/Keyword.java50
-rw-r--r--src/jvm/clojure/lang/LazySeq.java2
-rw-r--r--src/jvm/clojure/lang/LispReader.java186
-rw-r--r--src/jvm/clojure/lang/LockingTransaction.java14
-rw-r--r--src/jvm/clojure/lang/MultiFn.java66
-rw-r--r--src/jvm/clojure/lang/Namespace.java4
-rw-r--r--src/jvm/clojure/lang/Numbers.java16
-rw-r--r--src/jvm/clojure/lang/PersistentArrayMap.java4
-rw-r--r--src/jvm/clojure/lang/PersistentHashMap.java4
-rw-r--r--src/jvm/clojure/lang/PersistentHashSet.java2
-rw-r--r--src/jvm/clojure/lang/PersistentList.java6
-rw-r--r--src/jvm/clojure/lang/PersistentStructMap.java12
-rw-r--r--src/jvm/clojure/lang/PersistentTreeMap.java6
-rw-r--r--src/jvm/clojure/lang/PersistentTreeSet.java4
-rw-r--r--src/jvm/clojure/lang/PersistentVector.java4
-rw-r--r--src/jvm/clojure/lang/RT.java87
-rw-r--r--src/jvm/clojure/lang/Range.java4
-rw-r--r--src/jvm/clojure/lang/Ref.java58
-rw-r--r--src/jvm/clojure/lang/Reflector.java110
-rw-r--r--src/jvm/clojure/lang/Repl.java2
-rw-r--r--src/jvm/clojure/lang/RestFn.java1906
-rw-r--r--src/jvm/clojure/lang/Reversible.java2
-rw-r--r--src/jvm/clojure/lang/Script.java2
-rw-r--r--src/jvm/clojure/lang/Settable.java4
-rw-r--r--src/jvm/clojure/lang/Symbol.java4
-rw-r--r--src/jvm/clojure/lang/TransactionalHashMap.java10
-rw-r--r--src/jvm/clojure/lang/Util.java14
-rw-r--r--src/jvm/clojure/lang/Var.java79
-rw-r--r--src/jvm/clojure/main.java6
58 files changed, 2066 insertions, 1926 deletions
diff --git a/src/jvm/clojure/lang/AFn.java b/src/jvm/clojure/lang/AFn.java
index 11a17305..f2d530a3 100644
--- a/src/jvm/clojure/lang/AFn.java
+++ b/src/jvm/clojure/lang/AFn.java
@@ -14,7 +14,7 @@ package clojure.lang;
public abstract class AFn implements IFn {
-public Object call() throws Exception{
+public Object call() {
return invoke();
}
@@ -25,116 +25,116 @@ public void run(){
}
catch(Exception e)
{
- throw new RuntimeException(e);
+ throw Util.runtimeException(e);
}
}
-public Object invoke() throws Exception{
+public Object invoke() {
return throwArity(0);
}
-public Object invoke(Object arg1) throws Exception{
+public Object invoke(Object arg1) {
return throwArity(1);
}
-public Object invoke(Object arg1, Object arg2) throws Exception{
+public Object invoke(Object arg1, Object arg2) {
return throwArity(2);
}
-public Object invoke(Object arg1, Object arg2, Object arg3) throws Exception{
+public Object invoke(Object arg1, Object arg2, Object arg3) {
return throwArity(3);
}
-public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4) throws Exception{
+public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4) {
return throwArity(4);
}
-public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5) throws Exception{
+public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5) {
return throwArity(5);
}
-public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6) throws Exception{
+public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6) {
return throwArity(6);
}
public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7)
- throws Exception{
+ {
return throwArity(7);
}
public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7,
- Object arg8) throws Exception{
+ Object arg8) {
return throwArity(8);
}
public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7,
- Object arg8, Object arg9) throws Exception{
+ Object arg8, Object arg9) {
return throwArity(9);
}
public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7,
- Object arg8, Object arg9, Object arg10) throws Exception{
+ Object arg8, Object arg9, Object arg10) {
return throwArity(10);
}
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) throws Exception{
+ Object arg8, Object arg9, Object arg10, Object arg11) {
return throwArity(11);
}
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) throws Exception{
+ Object arg8, Object arg9, Object arg10, Object arg11, Object arg12) {
return throwArity(12);
}
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)
- throws Exception{
+ {
return throwArity(13);
}
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)
- throws Exception{
+ {
return throwArity(14);
}
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) throws Exception{
+ Object arg15) {
return throwArity(15);
}
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) throws Exception{
+ Object arg15, Object arg16) {
return throwArity(16);
}
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) throws Exception{
+ Object arg15, Object arg16, Object arg17) {
return throwArity(17);
}
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) throws Exception{
+ Object arg15, Object arg16, Object arg17, Object arg18) {
return throwArity(18);
}
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) throws Exception{
+ Object arg15, Object arg16, Object arg17, Object arg18, Object arg19) {
return throwArity(19);
}
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)
- throws Exception{
+ {
return throwArity(20);
}
@@ -143,15 +143,15 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
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,
Object... args)
- throws Exception{
+ {
return throwArity(21);
}
-public Object applyTo(ISeq arglist) throws Exception{
+public Object applyTo(ISeq arglist) {
return applyToHelper(this, Util.ret1(arglist,arglist = null));
}
-static public Object applyToHelper(IFn ifn, ISeq arglist) throws Exception{
+static public Object applyToHelper(IFn ifn, ISeq arglist) {
switch(RT.boundedLength(arglist, 20))
{
case 0:
diff --git a/src/jvm/clojure/lang/AFunction.java b/src/jvm/clojure/lang/AFunction.java
index 908d2c38..d797102d 100644
--- a/src/jvm/clojure/lang/AFunction.java
+++ b/src/jvm/clojure/lang/AFunction.java
@@ -25,7 +25,7 @@ public IPersistentMap meta(){
public IObj withMeta(final IPersistentMap meta){
return new RestFn(){
- protected Object doInvoke(Object args) throws Exception{
+ protected Object doInvoke(Object args) {
return AFunction.this.applyTo((ISeq) args);
}
@@ -60,7 +60,7 @@ public int compare(Object o1, Object o2){
}
catch(Exception e)
{
- throw new RuntimeException(e);
+ throw Util.runtimeException(e);
}
}
}
diff --git a/src/jvm/clojure/lang/AMapEntry.java b/src/jvm/clojure/lang/AMapEntry.java
index 7b7d7507..f9e02467 100644
--- a/src/jvm/clojure/lang/AMapEntry.java
+++ b/src/jvm/clojure/lang/AMapEntry.java
@@ -78,7 +78,7 @@ public String toString(){
catch(Exception e)
{
//checked exceptions stink!
- throw new RuntimeException(e);
+ throw Util.runtimeException(e);
}
return sw.toString();
}
@@ -141,7 +141,7 @@ public Object peek(){
}
-public ISeq rseq() throws Exception{
+public ISeq rseq() {
return asVector().rseq();
}
*/
diff --git a/src/jvm/clojure/lang/APersistentMap.java b/src/jvm/clojure/lang/APersistentMap.java
index d27dcb0f..4b911c2e 100644
--- a/src/jvm/clojure/lang/APersistentMap.java
+++ b/src/jvm/clojure/lang/APersistentMap.java
@@ -173,11 +173,11 @@ static public class ValSeq extends ASeq{
}
-public Object invoke(Object arg1) throws Exception{
+public Object invoke(Object arg1) {
return valAt(arg1);
}
-public Object invoke(Object arg1, Object notFound) throws Exception{
+public Object invoke(Object arg1, Object notFound) {
return valAt(arg1, notFound);
}
diff --git a/src/jvm/clojure/lang/APersistentSet.java b/src/jvm/clojure/lang/APersistentSet.java
index 80415151..5bae4484 100644
--- a/src/jvm/clojure/lang/APersistentSet.java
+++ b/src/jvm/clojure/lang/APersistentSet.java
@@ -45,7 +45,7 @@ public ISeq seq(){
return RT.keys(impl);
}
-public Object invoke(Object arg1) throws Exception{
+public Object invoke(Object arg1) {
return get(arg1);
}
diff --git a/src/jvm/clojure/lang/APersistentVector.java b/src/jvm/clojure/lang/APersistentVector.java
index 442c2ac6..16ed10f7 100644
--- a/src/jvm/clojure/lang/APersistentVector.java
+++ b/src/jvm/clojure/lang/APersistentVector.java
@@ -244,7 +244,7 @@ public boolean addAll(int i, Collection c){
}
-public Object invoke(Object arg1) throws Exception{
+public Object invoke(Object arg1) {
if(Util.isInteger(arg1))
return nth(((Number) arg1).intValue());
throw new IllegalArgumentException("Key must be integer");
@@ -445,14 +445,14 @@ public int compareTo(Object o){
return new APersistentVector.Seq(meta, v, i);
}
- public Object reduce(IFn f) throws Exception{
+ public Object reduce(IFn f) {
Object ret = v.nth(i);
for(int x = i + 1; x < v.count(); x++)
ret = f.invoke(ret, v.nth(x));
return ret;
}
- public Object reduce(IFn f, Object start) throws Exception{
+ public Object reduce(IFn f, Object start) {
Object ret = f.invoke(start, v.nth(i));
for(int x = i + 1; x < v.count(); x++)
ret = f.invoke(ret, v.nth(x));
diff --git a/src/jvm/clojure/lang/ARef.java b/src/jvm/clojure/lang/ARef.java
index 99c8c692..e9235c02 100644
--- a/src/jvm/clojure/lang/ARef.java
+++ b/src/jvm/clojure/lang/ARef.java
@@ -53,7 +53,7 @@ public void setValidator(IFn vf){
}
catch(Exception e)
{
- throw new RuntimeException(e);
+ throw Util.runtimeException(e);
}
validator = vf;
}
@@ -78,7 +78,7 @@ synchronized public IRef removeWatch(Object key){
}
catch(Exception e)
{
- throw new RuntimeException(e);
+ throw Util.runtimeException(e);
}
return this;
@@ -99,7 +99,7 @@ public void notifyWatches(Object oldval, Object newval){
}
catch(Exception e1)
{
- throw new RuntimeException(e1);
+ throw Util.runtimeException(e1);
}
}
}
diff --git a/src/jvm/clojure/lang/AReference.java b/src/jvm/clojure/lang/AReference.java
index 246ba96b..fba59674 100644
--- a/src/jvm/clojure/lang/AReference.java
+++ b/src/jvm/clojure/lang/AReference.java
@@ -27,7 +27,7 @@ public class AReference implements IReference {
return _meta;
}
- synchronized public IPersistentMap alterMeta(IFn alter, ISeq args) throws Exception {
+ synchronized public IPersistentMap alterMeta(IFn alter, ISeq args) {
_meta = (IPersistentMap) alter.applyTo(new Cons(_meta, args));
return _meta;
}
diff --git a/src/jvm/clojure/lang/ASeq.java b/src/jvm/clojure/lang/ASeq.java
index 286f767a..4e8522ac 100644
--- a/src/jvm/clojure/lang/ASeq.java
+++ b/src/jvm/clojure/lang/ASeq.java
@@ -1,259 +1,259 @@
-/**
- * Copyright (c) Rich Hickey. All rights reserved.
- * The use and distribution terms for this software are covered by the
- * Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
- * which can be found in the file epl-v10.html 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.
- **/
-
-package clojure.lang;
-
-import java.io.Serializable;
-import java.util.*;
-
+/**
+ * Copyright (c) Rich Hickey. All rights reserved.
+ * The use and distribution terms for this software are covered by the
+ * Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
+ * which can be found in the file epl-v10.html 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.
+ **/
+
+package clojure.lang;
+
+import java.io.Serializable;
+import java.util.*;
+
public abstract class ASeq extends Obj implements ISeq, Sequential, List, Serializable {
-transient int _hash = -1;
-
-public String toString(){
- return RT.printString(this);
-}
-
-public IPersistentCollection empty(){
- return PersistentList.EMPTY;
-}
-
-protected ASeq(IPersistentMap meta){
- super(meta);
-}
-
-
-protected ASeq(){
-}
-
-public boolean equiv(Object obj){
-
- if(!(obj instanceof Sequential || obj instanceof List))
- return false;
- ISeq ms = RT.seq(obj);
- for(ISeq s = seq(); s != null; s = s.next(), ms = ms.next())
- {
- if(ms == null || !Util.equiv(s.first(), ms.first()))
- return false;
- }
- return ms == null;
-
-}
-
-public boolean equals(Object obj){
- if(this == obj) return true;
- if(!(obj instanceof Sequential || obj instanceof List))
- return false;
- ISeq ms = RT.seq(obj);
- for(ISeq s = seq(); s != null; s = s.next(), ms = ms.next())
- {
- if(ms == null || !Util.equals(s.first(), ms.first()))
- return false;
- }
- return ms == null;
-
-}
-
-public int hashCode(){
- if(_hash == -1)
- {
- int hash = 1;
- for(ISeq s = seq(); s != null; s = s.next())
- {
- hash = 31 * hash + (s.first() == null ? 0 : s.first().hashCode());
- }
- this._hash = hash;
- }
- return _hash;
-}
-
-
-//public Object reduce(IFn f) throws Exception{
-// Object ret = first();
-// for(ISeq s = rest(); s != null; s = s.rest())
-// ret = f.invoke(ret, s.first());
-// return ret;
-//}
-//
-//public Object reduce(IFn f, Object start) throws Exception{
-// Object ret = f.invoke(start, first());
-// for(ISeq s = rest(); s != null; s = s.rest())
-// ret = f.invoke(ret, s.first());
-// return ret;
-//}
-
-//public Object peek(){
-// return first();
-//}
-//
-//public IPersistentList pop(){
-// return rest();
-//}
-
-public int count(){
- int i = 1;
- for(ISeq s = next(); s != null; s = s.next(), i++)
- if(s instanceof Counted)
- return i + s.count();
- return i;
-}
-
-final public ISeq seq(){
- return this;
-}
-
-public ISeq cons(Object o){
- return new Cons(o, this);
-}
-
-public ISeq more(){
- ISeq s = next();
- if(s == null)
- return PersistentList.EMPTY;
- return s;
-}
-
-//final public ISeq rest(){
-// Seqable m = more();
-// if(m == null)
-// return null;
-// return m.seq();
-//}
-
-// java.util.Collection implementation
-
-public Object[] toArray(){
- return RT.seqToArray(seq());
-}
-
-public boolean add(Object o){
- throw new UnsupportedOperationException();
-}
-
-public boolean remove(Object o){
- throw new UnsupportedOperationException();
-}
-
-public boolean addAll(Collection c){
- throw new UnsupportedOperationException();
-}
-
-public void clear(){
- throw new UnsupportedOperationException();
-}
-
-public boolean retainAll(Collection c){
- throw new UnsupportedOperationException();
-}
-
-public boolean removeAll(Collection c){
- throw new UnsupportedOperationException();
-}
-
-public boolean containsAll(Collection c){
- for(Object o : c)
- {
- if(!contains(o))
- return false;
- }
- return true;
-}
-
-public Object[] toArray(Object[] a){
- if(a.length >= count())
- {
- ISeq s = seq();
- for(int i = 0; s != null; ++i, s = s.next())
- {
- a[i] = s.first();
- }
- if(a.length > count())
- a[count()] = null;
- return a;
- }
- else
- return toArray();
-}
-
-public int size(){
- return count();
-}
-
-public boolean isEmpty(){
- return seq() == null;
-}
-
-public boolean contains(Object o){
- for(ISeq s = seq(); s != null; s = s.next())
- {
- if(Util.equiv(s.first(), o))
- return true;
- }
- return false;
-}
-
-
-public Iterator iterator(){
- return new SeqIterator(this);
-}
-
-
-
-//////////// List stuff /////////////////
-private List reify(){
- return Collections.unmodifiableList(new ArrayList(this));
-}
-
-public List subList(int fromIndex, int toIndex){
- return reify().subList(fromIndex, toIndex);
-}
-
-public Object set(int index, Object element){
- throw new UnsupportedOperationException();
-}
-
-public Object remove(int index){
- throw new UnsupportedOperationException();
-}
-
-public int indexOf(Object o){
- ISeq s = seq();
- for(int i = 0; s != null; s = s.next(), i++)
- {
- if(Util.equiv(s.first(), o))
- return i;
- }
- return -1;
-}
-
-public int lastIndexOf(Object o){
- return reify().lastIndexOf(o);
-}
-
-public ListIterator listIterator(){
- return reify().listIterator();
-}
-
-public ListIterator listIterator(int index){
- return reify().listIterator(index);
-}
-
-public Object get(int index){
- return RT.nth(this, index);
-}
-
-public void add(int index, Object element){
- throw new UnsupportedOperationException();
-}
-
-public boolean addAll(int index, Collection c){
- throw new UnsupportedOperationException();
-}
-
-}
+transient int _hash = -1;
+
+public String toString(){
+ return RT.printString(this);
+}
+
+public IPersistentCollection empty(){
+ return PersistentList.EMPTY;
+}
+
+protected ASeq(IPersistentMap meta){
+ super(meta);
+}
+
+
+protected ASeq(){
+}
+
+public boolean equiv(Object obj){
+
+ if(!(obj instanceof Sequential || obj instanceof List))
+ return false;
+ ISeq ms = RT.seq(obj);
+ for(ISeq s = seq(); s != null; s = s.next(), ms = ms.next())
+ {
+ if(ms == null || !Util.equiv(s.first(), ms.first()))
+ return false;
+ }
+ return ms == null;
+
+}
+
+public boolean equals(Object obj){
+ if(this == obj) return true;
+ if(!(obj instanceof Sequential || obj instanceof List))
+ return false;
+ ISeq ms = RT.seq(obj);
+ for(ISeq s = seq(); s != null; s = s.next(), ms = ms.next())
+ {
+ if(ms == null || !Util.equals(s.first(), ms.first()))
+ return false;
+ }
+ return ms == null;
+
+}
+
+public int hashCode(){
+ if(_hash == -1)
+ {
+ int hash = 1;
+ for(ISeq s = seq(); s != null; s = s.next())
+ {
+ hash = 31 * hash + (s.first() == null ? 0 : s.first().hashCode());
+ }
+ this._hash = hash;
+ }
+ return _hash;
+}
+
+
+//public Object reduce(IFn f) {
+// Object ret = first();
+// for(ISeq s = rest(); s != null; s = s.rest())
+// ret = f.invoke(ret, s.first());
+// return ret;
+//}
+//
+//public Object reduce(IFn f, Object start) {
+// Object ret = f.invoke(start, first());
+// for(ISeq s = rest(); s != null; s = s.rest())
+// ret = f.invoke(ret, s.first());
+// return ret;
+//}
+
+//public Object peek(){
+// return first();
+//}
+//
+//public IPersistentList pop(){
+// return rest();
+//}
+
+public int count(){
+ int i = 1;
+ for(ISeq s = next(); s != null; s = s.next(), i++)
+ if(s instanceof Counted)
+ return i + s.count();
+ return i;
+}
+
+final public ISeq seq(){
+ return this;
+}
+
+public ISeq cons(Object o){
+ return new Cons(o, this);
+}
+
+public ISeq more(){
+ ISeq s = next();
+ if(s == null)
+ return PersistentList.EMPTY;
+ return s;
+}
+
+//final public ISeq rest(){
+// Seqable m = more();
+// if(m == null)
+// return null;
+// return m.seq();
+//}
+
+// java.util.Collection implementation
+
+public Object[] toArray(){
+ return RT.seqToArray(seq());
+}
+
+public boolean add(Object o){
+ throw new UnsupportedOperationException();
+}
+
+public boolean remove(Object o){
+ throw new UnsupportedOperationException();
+}
+
+public boolean addAll(Collection c){
+ throw new UnsupportedOperationException();
+}
+
+public void clear(){
+ throw new UnsupportedOperationException();
+}
+
+public boolean retainAll(Collection c){
+ throw new UnsupportedOperationException();
+}
+
+public boolean removeAll(Collection c){
+ throw new UnsupportedOperationException();
+}
+
+public boolean containsAll(Collection c){
+ for(Object o : c)
+ {
+ if(!contains(o))
+ return false;
+ }
+ return true;
+}
+
+public Object[] toArray(Object[] a){
+ if(a.length >= count())
+ {
+ ISeq s = seq();
+ for(int i = 0; s != null; ++i, s = s.next())
+ {
+ a[i] = s.first();
+ }
+ if(a.length > count())
+ a[count()] = null;
+ return a;
+ }
+ else
+ return toArray();
+}
+
+public int size(){
+ return count();
+}
+
+public boolean isEmpty(){
+ return seq() == null;
+}
+
+public boolean contains(Object o){
+ for(ISeq s = seq(); s != null; s = s.next())
+ {
+ if(Util.equiv(s.first(), o))
+ return true;
+ }
+ return false;
+}
+
+
+public Iterator iterator(){
+ return new SeqIterator(this);
+}
+
+
+
+//////////// List stuff /////////////////
+private List reify(){
+ return Collections.unmodifiableList(new ArrayList(this));
+}
+
+public List subList(int fromIndex, int toIndex){
+ return reify().subList(fromIndex, toIndex);
+}
+
+public Object set(int index, Object element){
+ throw new UnsupportedOperationException();
+}
+
+public Object remove(int index){
+ throw new UnsupportedOperationException();
+}
+
+public int indexOf(Object o){
+ ISeq s = seq();
+ for(int i = 0; s != null; s = s.next(), i++)
+ {
+ if(Util.equiv(s.first(), o))
+ return i;
+ }
+ return -1;
+}
+
+public int lastIndexOf(Object o){
+ return reify().lastIndexOf(o);
+}
+
+public ListIterator listIterator(){
+ return reify().listIterator();
+}
+
+public ListIterator listIterator(int index){
+ return reify().listIterator(index);
+}
+
+public Object get(int index){
+ return RT.nth(this, index);
+}
+
+public void add(int index, Object element){
+ throw new UnsupportedOperationException();
+}
+
+public boolean addAll(int index, Collection c){
+ throw new UnsupportedOperationException();
+}
+
+}
diff --git a/src/jvm/clojure/lang/ATransientMap.java b/src/jvm/clojure/lang/ATransientMap.java
index 0f17ba6f..6b21f6f5 100644
--- a/src/jvm/clojure/lang/ATransientMap.java
+++ b/src/jvm/clojure/lang/ATransientMap.java
@@ -47,11 +47,11 @@ abstract class ATransientMap extends AFn implements ITransientMap {
return ret;
}
- public final Object invoke(Object arg1) throws Exception{
+ public final Object invoke(Object arg1) {
return valAt(arg1);
}
- public final Object invoke(Object arg1, Object notFound) throws Exception{
+ public final Object invoke(Object arg1, Object notFound) {
return valAt(arg1, notFound);
}
diff --git a/src/jvm/clojure/lang/ATransientSet.java b/src/jvm/clojure/lang/ATransientSet.java
index 6eec807a..93d23eb7 100644
--- a/src/jvm/clojure/lang/ATransientSet.java
+++ b/src/jvm/clojure/lang/ATransientSet.java
@@ -33,7 +33,7 @@ public abstract class ATransientSet extends AFn implements ITransientSet{
return this != impl.valAt(key, this);
}
- public ITransientSet disjoin(Object key) throws Exception {
+ public ITransientSet disjoin(Object key) {
ITransientMap m = impl.without(key);
if (m != impl) this.impl = m;
return this;
@@ -43,11 +43,11 @@ public abstract class ATransientSet extends AFn implements ITransientSet{
return impl.valAt(key);
}
- public Object invoke(Object key, Object notFound) throws Exception {
+ public Object invoke(Object key, Object notFound) {
return impl.valAt(key, notFound);
}
- public Object invoke(Object key) throws Exception {
+ public Object invoke(Object key) {
return impl.valAt(key);
}
diff --git a/src/jvm/clojure/lang/Agent.java b/src/jvm/clojure/lang/Agent.java
index a540c935..e63d060b 100644
--- a/src/jvm/clojure/lang/Agent.java
+++ b/src/jvm/clojure/lang/Agent.java
@@ -166,23 +166,23 @@ static class Action implements Runnable{
}
}
-public Agent(Object state) throws Exception{
+public Agent(Object state) {
this(state,null);
}
-public Agent(Object state, IPersistentMap meta) throws Exception {
+public Agent(Object state, IPersistentMap meta) {
super(meta);
setState(state);
}
-boolean setState(Object newState) throws Exception{
+boolean setState(Object newState) {
validate(newState);
boolean ret = state != newState;
state = newState;
return ret;
}
-public Object deref() throws Exception{
+public Object deref() {
return state;
}
@@ -209,7 +209,7 @@ public IFn getErrorHandler(){
synchronized public Object restart(Object newState, boolean clearActions){
if(getError() == null)
{
- throw new RuntimeException("Agent does not need a restart");
+ throw Util.runtimeException("Agent does not need a restart");
}
validate(newState);
state = newState;
@@ -237,7 +237,7 @@ public Object dispatch(IFn fn, ISeq args, boolean solo) {
Throwable error = getError();
if(error != null)
{
- throw new RuntimeException("Agent is failed, needs restart", error);
+ throw Util.runtimeException("Agent is failed, needs restart", error);
}
Action action = new Action(this, fn, args, solo);
dispatchAction(action);
diff --git a/src/jvm/clojure/lang/ArrayChunk.java b/src/jvm/clojure/lang/ArrayChunk.java
index 88129a95..76e818c6 100644
--- a/src/jvm/clojure/lang/ArrayChunk.java
+++ b/src/jvm/clojure/lang/ArrayChunk.java
@@ -54,7 +54,7 @@ public IChunk dropFirst(){
return new ArrayChunk(array, off + 1, end);
}
-public Object reduce(IFn f, Object start) throws Exception{
+public Object reduce(IFn f, Object start) {
Object ret = f.invoke(start, array[off]);
for(int x = off + 1; x < end; x++)
ret = f.invoke(ret, array[x]);
diff --git a/src/jvm/clojure/lang/ArraySeq.java b/src/jvm/clojure/lang/ArraySeq.java
index 08f1af70..f6f0dd72 100644
--- a/src/jvm/clojure/lang/ArraySeq.java
+++ b/src/jvm/clojure/lang/ArraySeq.java
@@ -102,7 +102,7 @@ public ArraySeq withMeta(IPersistentMap meta){
return new ArraySeq(meta, array, i);
}
-public Object reduce(IFn f) throws Exception{
+public Object reduce(IFn f) {
if(oa != null)
{
Object ret = oa[i];
@@ -117,7 +117,7 @@ public Object reduce(IFn f) throws Exception{
return ret;
}
-public Object reduce(IFn f, Object start) throws Exception{
+public Object reduce(IFn f, Object start) {
if(oa != null)
{
Object ret = f.invoke(start, oa[i]);
@@ -198,14 +198,14 @@ static public class ArraySeq_int extends ASeq implements IndexedSeq, IReduce{
return new ArraySeq_int(meta, array, i);
}
- public Object reduce(IFn f) throws Exception{
+ public Object reduce(IFn f) {
Object ret = array[i];
for(int x = i + 1; x < array.length; x++)
ret = f.invoke(ret, array[x]);
return ret;
}
- public Object reduce(IFn f, Object start) throws Exception{
+ public Object reduce(IFn f, Object start) {
Object ret = f.invoke(start, array[i]);
for(int x = i + 1; x < array.length; x++)
ret = f.invoke(ret, array[x]);
@@ -266,14 +266,14 @@ static public class ArraySeq_float extends ASeq implements IndexedSeq, IReduce{
return new ArraySeq_float(meta, array, i);
}
- public Object reduce(IFn f) throws Exception{
+ public Object reduce(IFn f) {
Object ret = Numbers.num(array[i]);
for(int x = i + 1; x < array.length; x++)
ret = f.invoke(ret, Numbers.num(array[x]));
return ret;
}
- public Object reduce(IFn f, Object start) throws Exception{
+ public Object reduce(IFn f, Object start) {
Object ret = f.invoke(start, Numbers.num(array[i]));
for(int x = i + 1; x < array.length; x++)
ret = f.invoke(ret, Numbers.num(array[x]));
@@ -331,14 +331,14 @@ static public class ArraySeq_double extends ASeq implements IndexedSeq, IReduce{
return new ArraySeq_double(meta, array, i);
}
- public Object reduce(IFn f) throws Exception{
+ public Object reduce(IFn f) {
Object ret = array[i];
for(int x = i + 1; x < array.length; x++)
ret = f.invoke(ret, array[x]);
return ret;
}
- public Object reduce(IFn f, Object start) throws Exception{
+ public Object reduce(IFn f, Object start) {
Object ret = f.invoke(start, array[i]);
for(int x = i + 1; x < array.length; x++)
ret = f.invoke(ret, array[x]);
@@ -398,14 +398,14 @@ static public class ArraySeq_long extends ASeq implements IndexedSeq, IReduce{
return new ArraySeq_long(meta, array, i);
}
- public Object reduce(IFn f) throws Exception{
+ public Object reduce(IFn f) {
Object ret = Numbers.num(array[i]);
for(int x = i + 1; x < array.length; x++)
ret = f.invoke(ret, Numbers.num(array[x]));
return ret;
}
- public Object reduce(IFn f, Object start) throws Exception{
+ public Object reduce(IFn f, Object start) {
Object ret = f.invoke(start, Numbers.num(array[i]));
for(int x = i + 1; x < array.length; x++)
ret = f.invoke(ret, Numbers.num(array[x]));
@@ -465,14 +465,14 @@ static public class ArraySeq_byte extends ASeq implements IndexedSeq, IReduce{
return new ArraySeq_byte(meta, array, i);
}
- public Object reduce(IFn f) throws Exception{
+ public Object reduce(IFn f) {
Object ret = array[i];
for(int x = i + 1; x < array.length; x++)
ret = f.invoke(ret, array[x]);
return ret;
}
- public Object reduce(IFn f, Object start) throws Exception{
+ public Object reduce(IFn f, Object start) {
Object ret = f.invoke(start, array[i]);
for(int x = i + 1; x < array.length; x++)
ret = f.invoke(ret, array[x]);
@@ -540,14 +540,14 @@ static public class ArraySeq_char extends ASeq implements IndexedSeq, IReduce{
return new ArraySeq_char(meta, array, i);
}
- public Object reduce(IFn f) throws Exception{
+ public Object reduce(IFn f) {
Object ret = array[i];
for(int x = i + 1; x < array.length; x++)
ret = f.invoke(ret, array[x]);
return ret;
}
- public Object reduce(IFn f, Object start) throws Exception{
+ public Object reduce(IFn f, Object start) {
Object ret = f.invoke(start, array[i]);
for(int x = i + 1; x < array.length; x++)
ret = f.invoke(ret, array[x]);
@@ -615,14 +615,14 @@ static public class ArraySeq_boolean extends ASeq implements IndexedSeq, IReduce
return new ArraySeq_boolean(meta, array, i);
}
- public Object reduce(IFn f) throws Exception{
+ public Object reduce(IFn f) {
Object ret = array[i];
for(int x = i + 1; x < array.length; x++)
ret = f.invoke(ret, array[x]);
return ret;
}
- public Object reduce(IFn f, Object start) throws Exception{
+ public Object reduce(IFn f, Object start) {
Object ret = f.invoke(start, array[i]);
for(int x = i + 1; x < array.length; x++)
ret = f.invoke(ret, array[x]);
diff --git a/src/jvm/clojure/lang/Atom.java b/src/jvm/clojure/lang/Atom.java
index eebe1d98..5033d135 100644
--- a/src/jvm/clojure/lang/Atom.java
+++ b/src/jvm/clojure/lang/Atom.java
@@ -30,7 +30,7 @@ public Object deref(){
return state.get();
}
-public Object swap(IFn f) throws Exception{
+public Object swap(IFn f) {
for(; ;)
{
Object v = deref();
@@ -44,7 +44,7 @@ public Object swap(IFn f) throws Exception{
}
}
-public Object swap(IFn f, Object arg) throws Exception{
+public Object swap(IFn f, Object arg) {
for(; ;)
{
Object v = deref();
@@ -58,7 +58,7 @@ public Object swap(IFn f, Object arg) throws Exception{
}
}
-public Object swap(IFn f, Object arg1, Object arg2) throws Exception{
+public Object swap(IFn f, Object arg1, Object arg2) {
for(; ;)
{
Object v = deref();
@@ -72,7 +72,7 @@ public Object swap(IFn f, Object arg1, Object arg2) throws Exception{
}
}
-public Object swap(IFn f, Object x, Object y, ISeq args) throws Exception{
+public Object swap(IFn f, Object x, Object y, ISeq args) {
for(; ;)
{
Object v = deref();
diff --git a/src/jvm/clojure/lang/Compile.java b/src/jvm/clojure/lang/Compile.java
index 6c9c600b..0e5c01a4 100644
--- a/src/jvm/clojure/lang/Compile.java
+++ b/src/jvm/clojure/lang/Compile.java
@@ -30,7 +30,7 @@ private static final Var compile = RT.var("clojure.core", "compile");
private static final Var warn_on_reflection = RT.var("clojure.core", "*warn-on-reflection*");
private static final Var unchecked_math = RT.var("clojure.core", "*unchecked-math*");
-public static void main(String[] args) throws Exception{
+public static void main(String[] args) throws IOException{
OutputStreamWriter out = (OutputStreamWriter) RT.OUT.deref();
PrintWriter err = RT.errPrintWriter();
diff --git a/src/jvm/clojure/lang/Compiler.java b/src/jvm/clojure/lang/Compiler.java
index 4800124a..a63ecc07 100644
--- a/src/jvm/clojure/lang/Compiler.java
+++ b/src/jvm/clojure/lang/Compiler.java
@@ -28,6 +28,7 @@ import org.objectweb.asm.util.CheckClassAdapter;
//*/
import java.io.*;
+import java.lang.reflect.InvocationTargetException;
import java.util.*;
import java.lang.reflect.Constructor;
import java.lang.reflect.Modifier;
@@ -152,7 +153,8 @@ final static Type IPERSISTENTMAP_TYPE = Type.getType(IPersistentMap.class);
final static Type IOBJ_TYPE = Type.getType(IObj.class);
private static final Type[][] ARG_TYPES;
-private static final Type[] EXCEPTION_TYPES = {Type.getType(Exception.class)};
+//private static final Type[] EXCEPTION_TYPES = {Type.getType(Exception.class)};
+private static final Type[] EXCEPTION_TYPES = {};
static
{
@@ -273,13 +275,13 @@ static final public Var CLEAR_SITES = Var.create(null).setDynamic();
}
interface Expr{
- Object eval() throws Exception;
+ Object eval() ;
void emit(C context, ObjExpr objx, GeneratorAdapter gen);
- boolean hasJavaClass() throws Exception;
+ boolean hasJavaClass() ;
- Class getJavaClass() throws Exception;
+ Class getJavaClass() ;
}
public static abstract class UntypedExpr implements Expr{
@@ -294,7 +296,7 @@ public static abstract class UntypedExpr implements Expr{
}
interface IParser{
- Expr parse(C context, Object form) throws Exception;
+ Expr parse(C context, Object form) ;
}
static boolean isSpecial(Object sym){
@@ -362,7 +364,7 @@ static class DefExpr implements Expr{
return false;
}
- public Object eval() throws Exception{
+ public Object eval() {
try
{
if(initProvided)
@@ -431,7 +433,7 @@ static class DefExpr implements Expr{
}
static class Parser implements IParser{
- public Expr parse(C context, Object form) throws Exception{
+ public Expr parse(C context, Object form) {
//(def x) or (def x initexpr) or (def x "docstring" initexpr)
String docstring = null;
if(RT.count(form) == 4 && (RT.third(form) instanceof String)) {
@@ -439,23 +441,23 @@ static class DefExpr implements Expr{
form = RT.list(RT.first(form), RT.second(form), RT.fourth(form));
}
if(RT.count(form) > 3)
- throw new Exception("Too many arguments to def");
+ throw Util.runtimeException("Too many arguments to def");
else if(RT.count(form) < 2)
- throw new Exception("Too few arguments to def");
+ throw Util.runtimeException("Too few arguments to def");
else if(!(RT.second(form) instanceof Symbol))
- throw new Exception("First argument to def must be a Symbol");
+ throw Util.runtimeException("First argument to def must be a Symbol");
Symbol sym = (Symbol) RT.second(form);
Var v = lookupVar(sym, true);
if(v == null)
- throw new Exception("Can't refer to qualified var that doesn't exist");
+ throw Util.runtimeException("Can't refer to qualified var that doesn't exist");
if(!v.ns.equals(currentNS()))
{
if(sym.ns == null)
v = currentNS().intern(sym);
-// throw new Exception("Name conflict, can't def " + sym + " because namespace: " + currentNS().name +
+// throw Util.runtimeException("Name conflict, can't def " + sym + " because namespace: " + currentNS().name +
// " refers to:" + v);
else
- throw new Exception("Can't create defs outside of current ns");
+ throw Util.runtimeException("Can't create defs outside of current ns");
}
IPersistentMap mm = sym.meta();
boolean isDynamic = RT.booleanCast(RT.get(mm,dynamicKey));
@@ -504,7 +506,7 @@ public static class AssignExpr implements Expr{
this.val = val;
}
- public Object eval() throws Exception{
+ public Object eval() {
return target.evalAssign(val);
}
@@ -512,16 +514,16 @@ public static class AssignExpr implements Expr{
target.emitAssign(context, objx, gen, val);
}
- public boolean hasJavaClass() throws Exception{
+ public boolean hasJavaClass() {
return val.hasJavaClass();
}
- public Class getJavaClass() throws Exception{
+ public Class getJavaClass() {
return val.getJavaClass();
}
static class Parser implements IParser{
- public Expr parse(C context, Object frm) throws Exception{
+ public Expr parse(C context, Object frm) {
ISeq form = (ISeq) frm;
if(RT.length(form) != 3)
throw new IllegalArgumentException("Malformed assignment, expecting (set! target val)");
@@ -544,7 +546,7 @@ public static class VarExpr implements Expr, AssignableExpr{
this.tag = tag != null ? tag : var.getTag();
}
- public Object eval() throws Exception{
+ public Object eval() {
return var.deref();
}
@@ -560,11 +562,11 @@ public static class VarExpr implements Expr, AssignableExpr{
return tag != null;
}
- public Class getJavaClass() throws Exception{
+ public Class getJavaClass() {
return HostExpr.tagToClass(tag);
}
- public Object evalAssign(Expr val) throws Exception{
+ public Object evalAssign(Expr val) {
return var.set(val.eval());
}
@@ -585,7 +587,7 @@ public static class TheVarExpr implements Expr{
this.var = var;
}
- public Object eval() throws Exception{
+ public Object eval() {
return var;
}
@@ -599,17 +601,17 @@ public static class TheVarExpr implements Expr{
return true;
}
- public Class getJavaClass() throws ClassNotFoundException{
+ public Class getJavaClass() {
return Var.class;
}
static class Parser implements IParser{
- public Expr parse(C context, Object form) throws Exception{
+ public Expr parse(C context, Object form) {
Symbol sym = (Symbol) RT.second(form);
Var v = lookupVar(sym, false);
if(v != null)
return new TheVarExpr(v);
- throw new Exception("Unable to resolve var: " + sym + " in this context");
+ throw Util.runtimeException("Unable to resolve var: " + sym + " in this context");
}
}
}
@@ -640,7 +642,7 @@ public static class KeywordExpr extends LiteralExpr{
return true;
}
- public Class getJavaClass() throws ClassNotFoundException{
+ public Class getJavaClass() {
return Keyword.class;
}
}
@@ -655,7 +657,7 @@ public static class ImportExpr implements Expr{
this.c = c;
}
- public Object eval() throws Exception{
+ public Object eval() {
Namespace ns = (Namespace) RT.CURRENT_NS.deref();
ns.importClass(RT.classForName(c));
return null;
@@ -676,12 +678,12 @@ public static class ImportExpr implements Expr{
return false;
}
- public Class getJavaClass() throws ClassNotFoundException{
+ public Class getJavaClass() {
throw new IllegalArgumentException("ImportExpr has no Java class");
}
static class Parser implements IParser{
- public Expr parse(C context, Object form) throws Exception{
+ public Expr parse(C context, Object form) {
return new ImportExpr((String) RT.second(form));
}
}
@@ -696,7 +698,7 @@ public static abstract class LiteralExpr implements Expr{
}
static interface AssignableExpr{
- Object evalAssign(Expr val) throws Exception;
+ Object evalAssign(Expr val) ;
void emitAssign(C context, ObjExpr objx, GeneratorAdapter gen, Expr val);
}
@@ -854,7 +856,7 @@ static public abstract class HostExpr implements Expr, MaybePrimitiveExpr{
}
static class Parser implements IParser{
- public Expr parse(C context, Object frm) throws Exception{
+ public Expr parse(C context, Object frm) {
ISeq form = (ISeq) frm;
//(. x fieldname-sym) or
//(. x 0-ary-method)
@@ -911,7 +913,7 @@ static public abstract class HostExpr implements Expr, MaybePrimitiveExpr{
}
}
- private static Class maybeClass(Object form, boolean stringOk) throws Exception{
+ private static Class maybeClass(Object form, boolean stringOk) {
if(form instanceof Class)
return (Class) form;
Class c = null;
@@ -968,7 +970,7 @@ static public abstract class HostExpr implements Expr, MaybePrimitiveExpr{
return className;
}
*/
- static Class tagToClass(Object tag) throws Exception{
+ static Class tagToClass(Object tag) {
Class c = maybeClass(tag, true);
if(tag instanceof Symbol)
{
@@ -1015,7 +1017,7 @@ static class InstanceFieldExpr extends FieldExpr implements AssignableExpr{
final static Method setInstanceFieldMethod = Method.getMethod("Object setInstanceField(Object,String,Object)");
- public InstanceFieldExpr(int line, Expr target, String fieldName, Symbol tag) throws Exception{
+ public InstanceFieldExpr(int line, Expr target, String fieldName, Symbol tag) {
this.target = target;
this.targetClass = target.hasJavaClass() ? target.getJavaClass() : null;
this.field = targetClass != null ? Reflector.getField(targetClass, fieldName, false) : null;
@@ -1030,7 +1032,7 @@ static class InstanceFieldExpr extends FieldExpr implements AssignableExpr{
}
}
- public Object eval() throws Exception{
+ public Object eval() {
return Reflector.invokeNoArgInstanceMember(target.eval(), fieldName);
}
@@ -1075,15 +1077,15 @@ static class InstanceFieldExpr extends FieldExpr implements AssignableExpr{
}
}
- public boolean hasJavaClass() throws Exception{
+ public boolean hasJavaClass() {
return field != null || tag != null;
}
- public Class getJavaClass() throws Exception{
+ public Class getJavaClass() {
return tag != null ? HostExpr.tagToClass(tag) : field.getType();
}
- public Object evalAssign(Expr val) throws Exception{
+ public Object evalAssign(Expr val) {
return Reflector.setInstanceField(target.eval(), fieldName, val.eval());
}
@@ -1121,17 +1123,24 @@ static class StaticFieldExpr extends FieldExpr implements AssignableExpr{
// final static Method setStaticFieldMethod = Method.getMethod("Object setStaticField(String,String,Object)");
final int line;
- public StaticFieldExpr(int line, Class c, String fieldName, Symbol tag) throws Exception{
+ public StaticFieldExpr(int line, Class c, String fieldName, Symbol tag) {
//this.className = className;
this.fieldName = fieldName;
this.line = line;
//c = Class.forName(className);
this.c = c;
- field = c.getField(fieldName);
+ try
+ {
+ field = c.getField(fieldName);
+ }
+ catch(NoSuchFieldException e)
+ {
+ throw Util.runtimeException(e);
+ }
this.tag = tag;
}
- public Object eval() throws Exception{
+ public Object eval() {
return Reflector.getStaticField(c, fieldName);
}
@@ -1163,13 +1172,13 @@ static class StaticFieldExpr extends FieldExpr implements AssignableExpr{
return true;
}
- public Class getJavaClass() throws Exception{
+ public Class getJavaClass() {
//Class c = Class.forName(className);
//java.lang.reflect.Field field = c.getField(fieldName);
return tag != null ? HostExpr.tagToClass(tag) : field.getType();
}
- public Object evalAssign(Expr val) throws Exception{
+ public Object evalAssign(Expr val) {
return Reflector.setStaticField(c, fieldName, val.eval());
}
@@ -1199,7 +1208,7 @@ static Class maybePrimitiveType(Expr e){
}
catch(Exception ex)
{
- throw new RuntimeException(ex);
+ throw Util.runtimeException(ex);
}
return null;
}
@@ -1285,7 +1294,7 @@ static class InstanceMethodExpr extends MethodExpr{
public InstanceMethodExpr(String source, int line, Symbol tag, Expr target, String methodName, IPersistentVector args)
- throws Exception{
+ {
this.source = source;
this.line = line;
this.args = args;
@@ -1334,7 +1343,7 @@ static class InstanceMethodExpr extends MethodExpr{
}
}
- public Object eval() throws Exception{
+ public Object eval() {
try
{
Object targetval = target.eval();
@@ -1428,7 +1437,7 @@ static class InstanceMethodExpr extends MethodExpr{
return method != null || tag != null;
}
- public Class getJavaClass() throws Exception{
+ public Class getJavaClass() {
return tag != null ? HostExpr.tagToClass(tag) : method.getReturnType();
}
}
@@ -1449,7 +1458,7 @@ static class StaticMethodExpr extends MethodExpr{
public StaticMethodExpr(String source, int line, Symbol tag, Class c, String methodName, IPersistentVector args)
- throws Exception{
+ {
this.c = c;
this.methodName = methodName;
this.args = args;
@@ -1483,7 +1492,7 @@ static class StaticMethodExpr extends MethodExpr{
}
}
- public Object eval() throws Exception{
+ public Object eval() {
try
{
Object[] argvals = new Object[args.count()];
@@ -1578,7 +1587,7 @@ static class StaticMethodExpr extends MethodExpr{
return method != null || tag != null;
}
- public Class getJavaClass() throws Exception{
+ public Class getJavaClass() {
return tag != null ? HostExpr.tagToClass(tag) : method.getReturnType();
}
}
@@ -1594,7 +1603,7 @@ static class UnresolvedVarExpr implements Expr{
return false;
}
- public Class getJavaClass() throws Exception{
+ public Class getJavaClass() {
throw new IllegalArgumentException(
"UnresolvedVarExpr has no Java class");
}
@@ -1602,7 +1611,7 @@ static class UnresolvedVarExpr implements Expr{
public void emit(C context, ObjExpr objx, GeneratorAdapter gen){
}
- public Object eval() throws Exception{
+ public Object eval() {
throw new IllegalArgumentException(
"UnresolvedVarExpr cannot be evalled");
}
@@ -1630,7 +1639,7 @@ static class NumberExpr extends LiteralExpr implements MaybePrimitiveExpr{
}
}
- public boolean hasJavaClass() throws Exception{
+ public boolean hasJavaClass() {
return true;
}
@@ -1705,7 +1714,7 @@ static class ConstantExpr extends LiteralExpr{
//return false;
}
- public Class getJavaClass() throws Exception{
+ public Class getJavaClass() {
return v.getClass();
//throw new IllegalArgumentException("Has no Java class");
}
@@ -1748,7 +1757,7 @@ static class NilExpr extends LiteralExpr{
return true;
}
- public Class getJavaClass() throws Exception{
+ public Class getJavaClass() {
return null;
}
}
@@ -1782,7 +1791,7 @@ static class BooleanExpr extends LiteralExpr{
return true;
}
- public Class getJavaClass() throws Exception{
+ public Class getJavaClass() {
return Boolean.class;
}
}
@@ -1810,7 +1819,7 @@ static class StringExpr extends LiteralExpr{
return true;
}
- public Class getJavaClass() throws Exception{
+ public Class getJavaClass() {
return String.class;
}
}
@@ -1823,7 +1832,7 @@ static class MonitorEnterExpr extends UntypedExpr{
this.target = target;
}
- public Object eval() throws Exception{
+ public Object eval() {
throw new UnsupportedOperationException("Can't eval monitor-enter");
}
@@ -1834,7 +1843,7 @@ static class MonitorEnterExpr extends UntypedExpr{
}
static class Parser implements IParser{
- public Expr parse(C context, Object form) throws Exception{
+ public Expr parse(C context, Object form) {
return new MonitorEnterExpr(analyze(C.EXPRESSION, RT.second(form)));
}
}
@@ -1847,7 +1856,7 @@ static class MonitorExitExpr extends UntypedExpr{
this.target = target;
}
- public Object eval() throws Exception{
+ public Object eval() {
throw new UnsupportedOperationException("Can't eval monitor-exit");
}
@@ -1858,7 +1867,7 @@ static class MonitorExitExpr extends UntypedExpr{
}
static class Parser implements IParser{
- public Expr parse(C context, Object form) throws Exception{
+ public Expr parse(C context, Object form) {
return new MonitorExitExpr(analyze(C.EXPRESSION, RT.second(form)));
}
}
@@ -1896,7 +1905,7 @@ public static class TryExpr implements Expr{
this.finallyLocal = finallyLocal;
}
- public Object eval() throws Exception{
+ public Object eval() {
throw new UnsupportedOperationException("Can't eval try");
}
@@ -1973,17 +1982,17 @@ public static class TryExpr implements Expr{
}
}
- public boolean hasJavaClass() throws Exception{
+ public boolean hasJavaClass() {
return tryExpr.hasJavaClass();
}
- public Class getJavaClass() throws Exception{
+ public Class getJavaClass() {
return tryExpr.getJavaClass();
}
static class Parser implements IParser{
- public Expr parse(C context, Object frm) throws Exception{
+ public Expr parse(C context, Object frm) {
ISeq form = (ISeq) frm;
// if(context == C.EVAL || context == C.EXPRESSION)
if(context != C.RETURN)
@@ -2008,7 +2017,7 @@ public static class TryExpr implements Expr{
if(!Util.equals(op, CATCH) && !Util.equals(op, FINALLY))
{
if(caught)
- throw new Exception("Only catch or finally clause can follow catch in try expression");
+ throw Util.runtimeException("Only catch or finally clause can follow catch in try expression");
body = body.cons(f);
}
else
@@ -2030,7 +2039,7 @@ public static class TryExpr implements Expr{
"Bad binding form, expected symbol, got: " + RT.third(f));
Symbol sym = (Symbol) RT.third(f);
if(sym.getNamespace() != null)
- throw new Exception("Can't bind qualified name:" + sym);
+ throw Util.runtimeException("Can't bind qualified name:" + sym);
IPersistentMap dynamicBindings = RT.map(LOCAL_ENV, LOCAL_ENV.deref(),
NEXT_LOCAL_NUM, NEXT_LOCAL_NUM.deref(),
@@ -2054,7 +2063,7 @@ public static class TryExpr implements Expr{
else //finally
{
if(fs.next() != null)
- throw new Exception("finally clause must be last in try expression");
+ throw Util.runtimeException("finally clause must be last in try expression");
try
{
Var.pushThreadBindings(RT.map(IN_CATCH_FINALLY, RT.T));
@@ -2095,7 +2104,7 @@ public static class TryExpr implements Expr{
// this.finallyExpr = finallyExpr;
// }
//
-// public Object eval() throws Exception{
+// public Object eval() {
// throw new UnsupportedOperationException("Can't eval try");
// }
//
@@ -2117,16 +2126,16 @@ public static class TryExpr implements Expr{
// gen.mark(end);
// }
//
-// public boolean hasJavaClass() throws Exception{
+// public boolean hasJavaClass() {
// return tryExpr.hasJavaClass();
// }
//
-// public Class getJavaClass() throws Exception{
+// public Class getJavaClass() {
// return tryExpr.getJavaClass();
// }
//
// static class Parser implements IParser{
-// public Expr parse(C context, Object frm) throws Exception{
+// public Expr parse(C context, Object frm) {
// ISeq form = (ISeq) frm;
// //(try-finally try-expr finally-expr)
// if(form.count() != 3)
@@ -2150,8 +2159,8 @@ static class ThrowExpr extends UntypedExpr{
}
- public Object eval() throws Exception{
- throw new Exception("Can't eval throw");
+ public Object eval() {
+ throw Util.runtimeException("Can't eval throw");
}
public void emit(C context, ObjExpr objx, GeneratorAdapter gen){
@@ -2161,7 +2170,7 @@ static class ThrowExpr extends UntypedExpr{
}
static class Parser implements IParser{
- public Expr parse(C context, Object form) throws Exception{
+ public Expr parse(C context, Object form) {
if(context == C.EVAL)
return analyze(context, RT.list(RT.list(FN, PersistentVector.EMPTY, form)));
return new ThrowExpr(analyze(C.EXPRESSION, RT.second(form)));
@@ -2191,7 +2200,7 @@ static public boolean subsumes(Class[] c1, Class[] c2){
static int getMatchingParams(String methodName, ArrayList<Class[]> paramlists, IPersistentVector argexprs,
List<Class> rets)
- throws Exception{
+ {
//presumes matching lengths
int matchIdx = -1;
boolean tied = false;
@@ -2254,7 +2263,7 @@ public static class NewExpr implements Expr{
final static Method forNameMethod = Method.getMethod("Class forName(String)");
- public NewExpr(Class c, IPersistentVector args, int line) throws Exception{
+ public NewExpr(Class c, IPersistentVector args, int line) {
this.args = args;
this.c = c;
Constructor[] allctors = c.getConstructors();
@@ -2289,13 +2298,20 @@ public static class NewExpr implements Expr{
}
}
- public Object eval() throws Exception{
+ public Object eval() {
Object[] argvals = new Object[args.count()];
for(int i = 0; i < args.count(); i++)
argvals[i] = ((Expr) args.nth(i)).eval();
if(this.ctor != null)
{
- return ctor.newInstance(Reflector.boxArgs(ctor.getParameterTypes(), argvals));
+ try
+ {
+ return ctor.newInstance(Reflector.boxArgs(ctor.getParameterTypes(), argvals));
+ }
+ catch(Exception e)
+ {
+ throw Util.runtimeException(e);
+ }
}
return Reflector.invokeConstructor(c, argvals);
}
@@ -2334,17 +2350,17 @@ public static class NewExpr implements Expr{
return true;
}
- public Class getJavaClass() throws Exception{
+ public Class getJavaClass() {
return c;
}
static class Parser implements IParser{
- public Expr parse(C context, Object frm) throws Exception{
+ public Expr parse(C context, Object frm) {
int line = (Integer) LINE.deref();
ISeq form = (ISeq) frm;
//(new Classname args...)
if(form.count() < 2)
- throw new Exception("wrong number of arguments, expecting: (new Classname args...)");
+ throw Util.runtimeException("wrong number of arguments, expecting: (new Classname args...)");
Class c = HostExpr.maybeClass(RT.second(form), false);
if(c == null)
throw new IllegalArgumentException("Unable to resolve classname: " + RT.second(form));
@@ -2369,7 +2385,7 @@ public static class MetaExpr implements Expr{
this.meta = meta;
}
- public Object eval() throws Exception{
+ public Object eval() {
return ((IObj) expr.eval()).withMeta((IPersistentMap) meta.eval());
}
@@ -2385,11 +2401,11 @@ public static class MetaExpr implements Expr{
}
}
- public boolean hasJavaClass() throws Exception{
+ public boolean hasJavaClass() {
return expr.hasJavaClass();
}
- public Class getJavaClass() throws Exception{
+ public Class getJavaClass() {
return expr.getJavaClass();
}
}
@@ -2408,7 +2424,7 @@ public static class IfExpr implements Expr, MaybePrimitiveExpr{
this.line = line;
}
- public Object eval() throws Exception{
+ public Object eval() {
Object t = testExpr.eval();
if(t != null && t != Boolean.FALSE)
return thenExpr.eval();
@@ -2448,7 +2464,7 @@ public static class IfExpr implements Expr, MaybePrimitiveExpr{
}
catch(Exception e)
{
- throw new RuntimeException(e);
+ throw Util.runtimeException(e);
}
if(emitUnboxed)
((MaybePrimitiveExpr)thenExpr).emitUnboxed(context, objx, gen);
@@ -2465,7 +2481,7 @@ public static class IfExpr implements Expr, MaybePrimitiveExpr{
gen.mark(endLabel);
}
- public boolean hasJavaClass() throws Exception{
+ public boolean hasJavaClass() {
return thenExpr.hasJavaClass()
&& elseExpr.hasJavaClass()
&&
@@ -2489,7 +2505,7 @@ public static class IfExpr implements Expr, MaybePrimitiveExpr{
}
}
- public Class getJavaClass() throws Exception{
+ public Class getJavaClass() {
Class thenClass = thenExpr.getJavaClass();
if(thenClass != null)
return thenClass;
@@ -2497,13 +2513,13 @@ public static class IfExpr implements Expr, MaybePrimitiveExpr{
}
static class Parser implements IParser{
- public Expr parse(C context, Object frm) throws Exception{
+ public Expr parse(C context, Object frm) {
ISeq form = (ISeq) frm;
//(if test then) or (if test then else)
if(form.count() > 4)
- throw new Exception("Too many arguments to if");
+ throw Util.runtimeException("Too many arguments to if");
else if(form.count() < 3)
- throw new Exception("Too few arguments to if");
+ throw Util.runtimeException("Too few arguments to if");
PathNode branch = new PathNode(PATHTYPE.BRANCH, (PathNode) CLEAR_PATH.get());
Expr testexpr = analyze(context == C.EVAL ? context : C.EXPRESSION, RT.second(form));
Expr thenexpr, elseexpr;
@@ -2584,7 +2600,7 @@ public static class EmptyExpr implements Expr{
this.coll = coll;
}
- public Object eval() throws Exception{
+ public Object eval() {
return coll;
}
@@ -2605,11 +2621,11 @@ public static class EmptyExpr implements Expr{
}
}
- public boolean hasJavaClass() throws Exception{
+ public boolean hasJavaClass() {
return true;
}
- public Class getJavaClass() throws Exception{
+ public Class getJavaClass() {
if(coll instanceof IPersistentList)
return IPersistentList.class;
else if(coll instanceof IPersistentVector)
@@ -2632,7 +2648,7 @@ public static class ListExpr implements Expr{
this.args = args;
}
- public Object eval() throws Exception{
+ public Object eval() {
IPersistentVector ret = PersistentVector.EMPTY;
for(int i = 0; i < args.count(); i++)
ret = (IPersistentVector) ret.cons(((Expr) args.nth(i)).eval());
@@ -2646,11 +2662,11 @@ public static class ListExpr implements Expr{
gen.pop();
}
- public boolean hasJavaClass() throws Exception{
+ public boolean hasJavaClass() {
return true;
}
- public Class getJavaClass() throws Exception{
+ public Class getJavaClass() {
return IPersistentList.class;
}
@@ -2665,7 +2681,7 @@ public static class MapExpr implements Expr{
this.keyvals = keyvals;
}
- public Object eval() throws Exception{
+ public Object eval() {
Object[] ret = new Object[keyvals.count()];
for(int i = 0; i < keyvals.count(); i++)
ret[i] = ((Expr) keyvals.nth(i)).eval();
@@ -2679,16 +2695,16 @@ public static class MapExpr implements Expr{
gen.pop();
}
- public boolean hasJavaClass() throws Exception{
+ public boolean hasJavaClass() {
return true;
}
- public Class getJavaClass() throws Exception{
+ public Class getJavaClass() {
return IPersistentMap.class;
}
- static public Expr parse(C context, IPersistentMap form) throws Exception{
+ static public Expr parse(C context, IPersistentMap form) {
IPersistentVector keyvals = PersistentVector.EMPTY;
boolean constant = true;
for(ISeq s = RT.seq(form); s != null; s = s.next())
@@ -2730,7 +2746,7 @@ public static class SetExpr implements Expr{
this.keys = keys;
}
- public Object eval() throws Exception{
+ public Object eval() {
Object[] ret = new Object[keys.count()];
for(int i = 0; i < keys.count(); i++)
ret[i] = ((Expr) keys.nth(i)).eval();
@@ -2744,16 +2760,16 @@ public static class SetExpr implements Expr{
gen.pop();
}
- public boolean hasJavaClass() throws Exception{
+ public boolean hasJavaClass() {
return true;
}
- public Class getJavaClass() throws Exception{
+ public Class getJavaClass() {
return IPersistentSet.class;
}
- static public Expr parse(C context, IPersistentSet form) throws Exception{
+ static public Expr parse(C context, IPersistentSet form) {
IPersistentVector keys = PersistentVector.EMPTY;
boolean constant = true;
@@ -2794,7 +2810,7 @@ public static class VectorExpr implements Expr{
this.args = args;
}
- public Object eval() throws Exception{
+ public Object eval() {
IPersistentVector ret = PersistentVector.EMPTY;
for(int i = 0; i < args.count(); i++)
ret = (IPersistentVector) ret.cons(((Expr) args.nth(i)).eval());
@@ -2808,15 +2824,15 @@ public static class VectorExpr implements Expr{
gen.pop();
}
- public boolean hasJavaClass() throws Exception{
+ public boolean hasJavaClass() {
return true;
}
- public Class getJavaClass() throws Exception{
+ public Class getJavaClass() {
return IPersistentVector.class;
}
- static public Expr parse(C context, IPersistentVector form) throws Exception{
+ static public Expr parse(C context, IPersistentVector form) {
boolean constant = true;
IPersistentVector args = PersistentVector.EMPTY;
@@ -2866,7 +2882,7 @@ static class KeywordInvokeExpr implements Expr{
this.siteIndex = registerKeywordCallsite(kw.k);
}
- public Object eval() throws Exception{
+ public Object eval() {
try
{
return kw.k.invoke(target.eval());
@@ -2913,11 +2929,11 @@ static class KeywordInvokeExpr implements Expr{
gen.pop();
}
- public boolean hasJavaClass() throws Exception{
+ public boolean hasJavaClass() {
return tag != null;
}
- public Class getJavaClass() throws Exception{
+ public Class getJavaClass() {
return HostExpr.tagToClass(tag);
}
@@ -2937,7 +2953,7 @@ static class KeywordInvokeExpr implements Expr{
// this.tag = tag;
// }
//
-// public Object eval() throws Exception{
+// public Object eval() {
// try
// {
// KeywordCallSite s = (KeywordCallSite) site.eval();
@@ -2965,11 +2981,11 @@ static class KeywordInvokeExpr implements Expr{
// gen.pop();
// }
//
-// public boolean hasJavaClass() throws Exception{
+// public boolean hasJavaClass() {
// return tag != null;
// }
//
-// public Class getJavaClass() throws Exception{
+// public Class getJavaClass() {
// return HostExpr.tagToClass(tag);
// }
//
@@ -2984,7 +3000,7 @@ public static class InstanceOfExpr implements Expr, MaybePrimitiveExpr{
this.c = c;
}
- public Object eval() throws Exception{
+ public Object eval() {
if(c.isInstance(expr.eval()))
return RT.T;
return RT.F;
@@ -3006,11 +3022,11 @@ public static class InstanceOfExpr implements Expr, MaybePrimitiveExpr{
gen.pop();
}
- public boolean hasJavaClass() throws Exception{
+ public boolean hasJavaClass() {
return true;
}
- public Class getJavaClass() throws Exception{
+ public Class getJavaClass() {
return Boolean.TYPE;
}
@@ -3036,7 +3052,7 @@ static class StaticInvokeExpr implements Expr, MaybePrimitiveExpr{
this.tag = tag;
}
- public Object eval() throws Exception{
+ public Object eval() {
throw new UnsupportedOperationException("Can't eval StaticInvokeExpr");
}
@@ -3053,11 +3069,11 @@ static class StaticInvokeExpr implements Expr, MaybePrimitiveExpr{
}
}
- public boolean hasJavaClass() throws Exception{
+ public boolean hasJavaClass() {
return true;
}
- public Class getJavaClass() throws Exception{
+ public Class getJavaClass() {
return tag != null ? HostExpr.tagToClass(tag) : retClass;
}
@@ -3086,7 +3102,7 @@ static class StaticInvokeExpr implements Expr, MaybePrimitiveExpr{
}
catch(Exception ex)
{
- throw new RuntimeException(ex);
+ throw Util.runtimeException(ex);
}
}
IPersistentVector restArgs = RT.subvec(args,paramclasses.length - 1,args.count());
@@ -3103,7 +3119,7 @@ static class StaticInvokeExpr implements Expr, MaybePrimitiveExpr{
return Type.getType(retClass);
}
- public static Expr parse(Var v, ISeq args, Symbol tag) throws Exception{
+ public static Expr parse(Var v, ISeq args, Symbol tag) {
IPersistentCollection paramlists = (IPersistentCollection) RT.get(v.meta(), arglistsKey);
if(paramlists == null)
throw new IllegalStateException("Can't call static fn with no arglists: " + v);
@@ -3187,7 +3203,7 @@ static class InvokeExpr implements Expr{
static Keyword onKey = Keyword.intern("on");
static Keyword methodMapKey = Keyword.intern("method-map");
- public InvokeExpr(String source, int line, Symbol tag, Expr fexpr, IPersistentVector args) throws Exception{
+ public InvokeExpr(String source, int line, Symbol tag, Expr fexpr, IPersistentVector args) {
this.source = source;
this.fexpr = fexpr;
this.args = args;
@@ -3225,7 +3241,7 @@ static class InvokeExpr implements Expr{
this.tag = tag != null ? tag : (fexpr instanceof VarExpr ? ((VarExpr) fexpr).tag : null);
}
- public Object eval() throws Exception{
+ public Object eval() {
try
{
IFn fn = (IFn) fexpr.eval();
@@ -3336,15 +3352,15 @@ static class InvokeExpr implements Expr{
args.count())]));
}
- public boolean hasJavaClass() throws Exception{
+ public boolean hasJavaClass() {
return tag != null;
}
- public Class getJavaClass() throws Exception{
+ public Class getJavaClass() {
return HostExpr.tagToClass(tag);
}
- static public Expr parse(C context, ISeq form) throws Exception{
+ static public Expr parse(C context, ISeq form) {
if(context != C.EVAL)
context = C.EXPRESSION;
Expr fexpr = analyze(context, form.first());
@@ -3433,7 +3449,7 @@ static public class FnExpr extends ObjExpr{
super(tag);
}
- public boolean hasJavaClass() throws Exception{
+ public boolean hasJavaClass() {
return true;
}
@@ -3441,7 +3457,7 @@ static public class FnExpr extends ObjExpr{
return hasMeta;
}
- public Class getJavaClass() throws Exception{
+ public Class getJavaClass() {
return AFunction.class;
}
@@ -3467,7 +3483,7 @@ static public class FnExpr extends ObjExpr{
}
}
- static Expr parse(C context, ISeq form, String name) throws Exception{
+ static Expr parse(C context, ISeq form, String name) {
ISeq origForm = form;
FnExpr fn = new FnExpr(tagOf(form));
fn.src = form;
@@ -3530,12 +3546,12 @@ static public class FnExpr extends ObjExpr{
if(variadicMethod == null)
variadicMethod = f;
else
- throw new Exception("Can't have more than 1 variadic overload");
+ throw Util.runtimeException("Can't have more than 1 variadic overload");
}
else if(methodArray[f.reqParms.count()] == null)
methodArray[f.reqParms.count()] = f;
else
- throw new Exception("Can't have 2 overloads with same arity");
+ throw Util.runtimeException("Can't have 2 overloads with same arity");
if(f.prim != null)
prims.add(f.prim);
}
@@ -3543,7 +3559,7 @@ static public class FnExpr extends ObjExpr{
{
for(int i = variadicMethod.reqParms.count() + 1; i <= MAX_POSITIONAL_ARITY; i++)
if(methodArray[i] != null)
- throw new Exception(
+ throw Util.runtimeException(
"Can't have fixed arity function with more params than variadic function");
}
@@ -3580,11 +3596,18 @@ static public class FnExpr extends ObjExpr{
fn.hasMeta = RT.count(fmeta) > 0;
- fn.compile(fn.isVariadic() ? "clojure/lang/RestFn" : "clojure/lang/AFunction",
- (prims.size() == 0)?
- null
- :prims.toArray(new String[prims.size()]),
- fn.onceOnly);
+ try
+ {
+ fn.compile(fn.isVariadic() ? "clojure/lang/RestFn" : "clojure/lang/AFunction",
+ (prims.size() == 0)?
+ null
+ :prims.toArray(new String[prims.size()]),
+ fn.onceOnly);
+ }
+ catch(IOException e)
+ {
+ throw Util.runtimeException(e);
+ }
fn.getCompiledClass();
if(fn.supportsMeta())
@@ -3757,7 +3780,7 @@ static public class ObjExpr implements Expr{
return ret;
}
- void compile(String superName, String[] interfaceNames, boolean oneTimeUse) throws Exception{
+ void compile(String superName, String[] interfaceNames, boolean oneTimeUse) throws IOException{
//create bytecode for a class
//with name current_ns.defname[$letname]+
//anonymous fns get names fn__id
@@ -4201,7 +4224,7 @@ static public class ObjExpr implements Expr{
else if ( cc == int.class ) bt = Type.getType(Integer.class);
else if ( cc == long.class ) bt = Type.getType(Long.class);
else if ( cc == short.class ) bt = Type.getType(Short.class);
- else throw new RuntimeException(
+ else throw Util.runtimeException(
"Can't embed unknown primitive in code: " + value);
gen.getStatic( bt, "TYPE", Type.getType(Class.class) );
}
@@ -4293,16 +4316,16 @@ static public class ObjExpr implements Expr{
}
catch(Exception e)
{
- throw new RuntimeException(
+ throw Util.runtimeException(
"Can't embed object in code, maybe print-dup not defined: " +
value);
}
if(cs.length() == 0)
- throw new RuntimeException(
+ throw Util.runtimeException(
"Can't embed unreadable object in code: " + value);
if(cs.startsWith("#<"))
- throw new RuntimeException(
+ throw Util.runtimeException(
"Can't embed unreadable object in code: " + cs);
gen.push(cs);
@@ -4389,15 +4412,22 @@ static public class ObjExpr implements Expr{
}
catch(Exception e)
{
- throw new RuntimeException(e);
+ throw Util.runtimeException(e);
}
return compiledClass;
}
- public Object eval() throws Exception{
+ public Object eval() {
if(isDeftype())
return null;
- return getCompiledClass().newInstance();
+ try
+ {
+ return getCompiledClass().newInstance();
+ }
+ catch(Exception e)
+ {
+ throw Util.runtimeException(e);
+ }
}
public void emitLetFnInits(GeneratorAdapter gen, ObjExpr objx, IPersistentSet letFnLocals){
@@ -4456,11 +4486,11 @@ static public class ObjExpr implements Expr{
gen.pop();
}
- public boolean hasJavaClass() throws Exception{
+ public boolean hasJavaClass() {
return true;
}
- public Class getJavaClass() throws Exception{
+ public Class getJavaClass() {
return (compiledClass != null) ? compiledClass
: (tag != null) ? HostExpr.tagToClass(tag)
: IFn.class;
@@ -4722,7 +4752,7 @@ public static class FnMethod extends ObjMethod{
throw new IllegalArgumentException("Only long and double primitives are supported");
}
- static public String primInterface(IPersistentVector arglist) throws Exception{
+ static public String primInterface(IPersistentVector arglist) {
StringBuilder sb = new StringBuilder();
for(int i=0;i<arglist.count();i++)
sb.append(classChar(tagOf(arglist.nth(i))));
@@ -4736,7 +4766,7 @@ public static class FnMethod extends ObjMethod{
return null;
}
- static FnMethod parse(ObjExpr objx, ISeq form, boolean isStatic) throws Exception{
+ static FnMethod parse(ObjExpr objx, ISeq form, boolean isStatic) {
//([args] body...)
IPersistentVector parms = (IPersistentVector) RT.first(form);
ISeq body = RT.next(form);
@@ -4786,15 +4816,15 @@ public static class FnMethod extends ObjMethod{
throw new IllegalArgumentException("fn params must be Symbols");
Symbol p = (Symbol) parms.nth(i);
if(p.getNamespace() != null)
- throw new Exception("Can't use qualified name as parameter: " + p);
+ throw Util.runtimeException("Can't use qualified name as parameter: " + p);
if(p.equals(_AMP_))
{
// if(isStatic)
-// throw new Exception("Variadic fns cannot be static");
+// throw Util.runtimeException("Variadic fns cannot be static");
if(state == PSTATE.REQ)
state = PSTATE.REST;
else
- throw new Exception("Invalid parameter list");
+ throw Util.runtimeException("Invalid parameter list");
}
else
@@ -4805,14 +4835,14 @@ public static class FnMethod extends ObjMethod{
// pc = Object.class;
// p = (Symbol) ((IObj) p).withMeta((IPersistentMap) RT.assoc(RT.meta(p), RT.TAG_KEY, null));
// }
-// throw new Exception("Non-static fn can't have primitive parameter: " + p);
+// throw Util.runtimeException("Non-static fn can't have primitive parameter: " + p);
if(pc.isPrimitive() && !(pc == double.class || pc == long.class))
throw new IllegalArgumentException("Only long and double primitives are supported: " + p);
if(state == PSTATE.REST && tagOf(p) != null)
- throw new Exception("& arg cannot have type hint");
+ throw Util.runtimeException("& arg cannot have type hint");
if(state == PSTATE.REST && method.prim != null)
- throw new Exception("fns taking primitives cannot be variadic");
+ throw Util.runtimeException("fns taking primitives cannot be variadic");
if(state == PSTATE.REST)
pc = ISeq.class;
@@ -4833,12 +4863,12 @@ public static class FnMethod extends ObjMethod{
break;
default:
- throw new Exception("Unexpected parameter");
+ throw Util.runtimeException("Unexpected parameter");
}
}
}
if(method.reqParms.count() > MAX_POSITIONAL_ARITY)
- throw new Exception("Can't specify more than " + MAX_POSITIONAL_ARITY + " params");
+ throw Util.runtimeException("Can't specify more than " + MAX_POSITIONAL_ARITY + " params");
LOOP_LOCALS.set(argLocals);
method.argLocals = argLocals;
// if(isStatic)
@@ -4896,7 +4926,7 @@ public static class FnMethod extends ObjMethod{
}
catch(Exception e)
{
- throw new RuntimeException(e);
+ throw Util.runtimeException(e);
}
finally
{
@@ -4960,7 +4990,7 @@ public static class FnMethod extends ObjMethod{
}
catch(Exception e)
{
- throw new RuntimeException(e);
+ throw Util.runtimeException(e);
}
finally
{
@@ -5146,7 +5176,7 @@ abstract public static class ObjMethod{
this.objx = objx;
}
- static void emitBody(ObjExpr objx, GeneratorAdapter gen, Class retClass, Expr body) throws Exception{
+ static void emitBody(ObjExpr objx, GeneratorAdapter gen, Class retClass, Expr body) {
MaybePrimitiveExpr be = (MaybePrimitiveExpr) body;
if(Util.isPrimitive(retClass) && be.canEmitPrimitive())
{
@@ -5278,7 +5308,7 @@ public static class LocalBinding{
public boolean recurMistmatch = false;
public LocalBinding(int num, Symbol sym, Symbol tag, Expr init, boolean isArg,PathNode clearPathRoot)
- throws Exception{
+ {
if(maybePrimitiveType(init) != null && tag != null)
throw new UnsupportedOperationException("Can't type hint a local with a primitive initializer");
this.idx = num;
@@ -5290,7 +5320,7 @@ public static class LocalBinding{
name = munge(sym.name);
}
- public boolean hasJavaClass() throws Exception{
+ public boolean hasJavaClass() {
if(init != null && init.hasJavaClass()
&& Util.isPrimitive(init.getJavaClass())
&& !(init instanceof MaybePrimitiveExpr))
@@ -5299,7 +5329,7 @@ public static class LocalBinding{
|| (init != null && init.hasJavaClass());
}
- public Class getJavaClass() throws Exception{
+ public Class getJavaClass() {
return tag != null ? HostExpr.tagToClass(tag)
: init.getJavaClass();
}
@@ -5319,7 +5349,7 @@ public static class LocalBindingExpr implements Expr, MaybePrimitiveExpr, Assign
public LocalBindingExpr(LocalBinding b, Symbol tag)
- throws Exception{
+ {
if(b.getPrimitiveType() != null && tag != null)
throw new UnsupportedOperationException("Can't type hint a primitive local");
this.b = b;
@@ -5357,7 +5387,7 @@ public static class LocalBindingExpr implements Expr, MaybePrimitiveExpr, Assign
}
}
- public Object eval() throws Exception{
+ public Object eval() {
throw new UnsupportedOperationException("Can't eval locals");
}
@@ -5374,7 +5404,7 @@ public static class LocalBindingExpr implements Expr, MaybePrimitiveExpr, Assign
objx.emitLocal(gen, b, shouldClear);
}
- public Object evalAssign(Expr val) throws Exception{
+ public Object evalAssign(Expr val) {
throw new UnsupportedOperationException("Can't eval locals");
}
@@ -5384,11 +5414,11 @@ public static class LocalBindingExpr implements Expr, MaybePrimitiveExpr, Assign
objx.emitLocal(gen, b, false);
}
- public boolean hasJavaClass() throws Exception{
+ public boolean hasJavaClass() {
return tag != null || b.hasJavaClass();
}
- public Class getJavaClass() throws Exception{
+ public Class getJavaClass() {
if(tag != null)
return HostExpr.tagToClass(tag);
return b.getJavaClass();
@@ -5409,7 +5439,7 @@ public static class BodyExpr implements Expr, MaybePrimitiveExpr{
}
static class Parser implements IParser{
- public Expr parse(C context, Object frms) throws Exception{
+ public Expr parse(C context, Object frms) {
ISeq forms = (ISeq) frms;
if(Util.equals(RT.first(forms), DO))
forms = RT.next(forms);
@@ -5429,7 +5459,7 @@ public static class BodyExpr implements Expr, MaybePrimitiveExpr{
}
}
- public Object eval() throws Exception{
+ public Object eval() {
Object ret = null;
for(Object o : exprs)
{
@@ -5463,11 +5493,11 @@ public static class BodyExpr implements Expr, MaybePrimitiveExpr{
last.emit(context, objx, gen);
}
- public boolean hasJavaClass() throws Exception{
+ public boolean hasJavaClass() {
return lastExpr().hasJavaClass();
}
- public Class getJavaClass() throws Exception{
+ public Class getJavaClass() {
return lastExpr().getJavaClass();
}
@@ -5504,7 +5534,7 @@ public static class LetFnExpr implements Expr{
}
static class Parser implements IParser{
- public Expr parse(C context, Object frm) throws Exception{
+ public Expr parse(C context, Object frm) {
ISeq form = (ISeq) frm;
//(letfns* [var (fn [args] body) ...] body...)
if(!(RT.second(form) instanceof IPersistentVector))
@@ -5535,7 +5565,7 @@ public static class LetFnExpr implements Expr{
"Bad binding form, expected symbol, got: " + bindings.nth(i));
Symbol sym = (Symbol) bindings.nth(i);
if(sym.getNamespace() != null)
- throw new Exception("Can't let qualified name: " + sym);
+ throw Util.runtimeException("Can't let qualified name: " + sym);
LocalBinding lb = registerLocal(sym, tagOf(sym), null,false);
lb.canBeCleared = false;
lbs = lbs.cons(lb);
@@ -5559,7 +5589,7 @@ public static class LetFnExpr implements Expr{
}
}
- public Object eval() throws Exception{
+ public Object eval() {
throw new UnsupportedOperationException("Can't eval letfns");
}
@@ -5610,11 +5640,11 @@ public static class LetFnExpr implements Expr{
}
}
- public boolean hasJavaClass() throws Exception{
+ public boolean hasJavaClass() {
return body.hasJavaClass();
}
- public Class getJavaClass() throws Exception{
+ public Class getJavaClass() {
return body.getJavaClass();
}
}
@@ -5631,7 +5661,7 @@ public static class LetExpr implements Expr, MaybePrimitiveExpr{
}
static class Parser implements IParser{
- public Expr parse(C context, Object frm) throws Exception{
+ public Expr parse(C context, Object frm) {
ISeq form = (ISeq) frm;
//(let [var val var2 val2 ...] body...)
boolean isLoop = RT.first(form).equals(LOOP);
@@ -5676,7 +5706,7 @@ public static class LetExpr implements Expr, MaybePrimitiveExpr{
"Bad binding form, expected symbol, got: " + bindings.nth(i));
Symbol sym = (Symbol) bindings.nth(i);
if(sym.getNamespace() != null)
- throw new Exception("Can't let qualified name: " + sym);
+ throw Util.runtimeException("Can't let qualified name: " + sym);
Expr init = analyze(C.EXPRESSION, bindings.nth(i + 1), sym.name);
if(isLoop)
{
@@ -5738,7 +5768,7 @@ public static class LetExpr implements Expr, MaybePrimitiveExpr{
}
}
- public Object eval() throws Exception{
+ public Object eval() {
throw new UnsupportedOperationException("Can't eval let/loop");
}
@@ -5809,11 +5839,11 @@ public static class LetExpr implements Expr, MaybePrimitiveExpr{
}
}
- public boolean hasJavaClass() throws Exception{
+ public boolean hasJavaClass() {
return body.hasJavaClass();
}
- public Class getJavaClass() throws Exception{
+ public Class getJavaClass() {
return body.getJavaClass();
}
@@ -5837,7 +5867,7 @@ public static class RecurExpr implements Expr{
this.source = source;
}
- public Object eval() throws Exception{
+ public Object eval() {
throw new UnsupportedOperationException("Can't eval recur");
}
@@ -5894,7 +5924,7 @@ public static class RecurExpr implements Expr{
}
catch(Exception e)
{
- throw new RuntimeException(e);
+ throw Util.runtimeException(e);
}
}
else
@@ -5921,16 +5951,16 @@ public static class RecurExpr implements Expr{
gen.goTo(loopLabel);
}
- public boolean hasJavaClass() throws Exception{
+ public boolean hasJavaClass() {
return true;
}
- public Class getJavaClass() throws Exception{
+ public Class getJavaClass() {
return null;
}
static class Parser implements IParser{
- public Expr parse(C context, Object frm) throws Exception{
+ public Expr parse(C context, Object frm) {
int line = (Integer) LINE.deref();
String source = (String) SOURCE.deref();
@@ -5993,7 +6023,7 @@ public static class RecurExpr implements Expr{
}
}
-private static LocalBinding registerLocal(Symbol sym, Symbol tag, Expr init, boolean isArg) throws Exception{
+private static LocalBinding registerLocal(Symbol sym, Symbol tag, Expr init, boolean isArg) {
int num = getAndIncLocalNum();
LocalBinding b = new LocalBinding(num, sym, tag, init, isArg, clearPathRoot());
IPersistentMap localsMap = (IPersistentMap) LOCAL_ENV.deref();
@@ -6013,11 +6043,11 @@ private static int getAndIncLocalNum(){
return num;
}
-public static Expr analyze(C context, Object form) throws Exception{
+public static Expr analyze(C context, Object form) {
return analyze(context, form, null);
}
-private static Expr analyze(C context, Object form, String name) throws Exception{
+private static Expr analyze(C context, Object form, String name) {
//todo symbol macro expansion?
try
{
@@ -6074,7 +6104,7 @@ private static Expr analyze(C context, Object form, String name) throws Exceptio
}
}
-static public class CompilerException extends Exception{
+static public class CompilerException extends RuntimeException{
final public String source;
public CompilerException(String source, int line, Throwable cause){
@@ -6087,7 +6117,7 @@ static public class CompilerException extends Exception{
}
}
-static public Var isMacro(Object op) throws Exception{
+static public Var isMacro(Object op) {
//no local macros for now
if(op instanceof Symbol && referenceLocal((Symbol) op) != null)
return null;
@@ -6104,7 +6134,7 @@ static public Var isMacro(Object op) throws Exception{
return null;
}
-static public IFn isInline(Object op, int arity) throws Exception{
+static public IFn isInline(Object op, int arity) {
//no local inlines for now
if(op instanceof Symbol && referenceLocal((Symbol) op) != null)
return null;
@@ -6140,7 +6170,7 @@ public static Object preserveTag(ISeq src, Object dst) {
return dst;
}
-public static Object macroexpand1(Object x) throws Exception{
+public static Object macroexpand1(Object x) {
if(x instanceof ISeq)
{
ISeq form = (ISeq) x;
@@ -6213,14 +6243,14 @@ public static Object macroexpand1(Object x) throws Exception{
return x;
}
-static Object macroexpand(Object form) throws Exception{
+static Object macroexpand(Object form) {
Object exf = macroexpand1(form);
if(exf != form)
return macroexpand(exf);
return form;
}
-private static Expr analyzeSeq(C context, ISeq form, String name) throws Exception{
+private static Expr analyzeSeq(C context, ISeq form, String name) {
Integer line = (Integer) LINE.deref();
if(RT.meta(form) != null && RT.meta(form).containsKey(RT.LINE_KEY))
line = (Integer) RT.meta(form).valAt(RT.LINE_KEY);
@@ -6263,11 +6293,11 @@ static String errorMsg(String source, int line, String s){
return String.format("%s, compiling:(%s:%d)", s, source, line);
}
-public static Object eval(Object form) throws Exception{
+public static Object eval(Object form) {
return eval(form, true);
}
-public static Object eval(Object form, boolean freshLoader) throws Exception{
+public static Object eval(Object form, boolean freshLoader) {
boolean createdLoader = false;
if(true)//!LOADER.isBound())
{
@@ -6307,9 +6337,9 @@ public static Object eval(Object form, boolean freshLoader) throws Exception{
}
catch(Throwable e)
{
- if(!(e instanceof Exception))
- throw new RuntimeException(e);
- throw (Exception)e;
+ if(!(e instanceof RuntimeException))
+ throw Util.runtimeException(e);
+ throw (RuntimeException)e;
}
finally
{
@@ -6414,7 +6444,7 @@ static void addAnnotation(Object visitor, IPersistentMap meta){
}
catch (Exception e)
{
- throw new RuntimeException(e);
+ throw Util.runtimeException(e);
}
}
@@ -6425,11 +6455,11 @@ static void addParameterAnnotation(Object visitor, IPersistentMap meta, int i){
}
catch (Exception e)
{
- throw new RuntimeException(e);
+ throw Util.runtimeException(e);
}
}
-private static Expr analyzeSymbol(Symbol sym) throws Exception{
+private static Expr analyzeSymbol(Symbol sym) {
Symbol tag = tagOf(sym);
if(sym.ns == null) //ns-qualified syms are always Vars
{
@@ -6449,7 +6479,7 @@ private static Expr analyzeSymbol(Symbol sym) throws Exception{
{
if(Reflector.getField(c, sym.name, true) != null)
return new StaticFieldExpr((Integer) LINE.deref(), c, sym.name, tag);
- throw new Exception("Unable to find static field: " + sym.name + " in " + c);
+ throw Util.runtimeException("Unable to find static field: " + sym.name + " in " + c);
}
}
}
@@ -6462,7 +6492,7 @@ private static Expr analyzeSymbol(Symbol sym) throws Exception{
{
Var v = (Var) o;
if(isMacro(v) != null)
- throw new Exception("Can't take value of a macro: " + v);
+ throw Util.runtimeException("Can't take value of a macro: " + v);
registerVar(v);
return new VarExpr(v, tag);
}
@@ -6471,7 +6501,7 @@ private static Expr analyzeSymbol(Symbol sym) throws Exception{
else if(o instanceof Symbol)
return new UnresolvedVarExpr((Symbol) o);
- throw new Exception("Unable to resolve symbol: " + sym + " in this context");
+ throw Util.runtimeException("Unable to resolve symbol: " + sym + " in this context");
}
@@ -6489,11 +6519,11 @@ static Type getType(Class c){
return Type.getType(descriptor);
}
-static Object resolve(Symbol sym, boolean allowPrivate) throws Exception{
+static Object resolve(Symbol sym, boolean allowPrivate) {
return resolveIn(currentNS(), sym, allowPrivate);
}
-static Object resolve(Symbol sym) throws Exception{
+static Object resolve(Symbol sym) {
return resolveIn(currentNS(), sym, false);
}
@@ -6514,17 +6544,17 @@ static Namespace namespaceFor(Namespace inns, Symbol sym){
return ns;
}
-static public Object resolveIn(Namespace n, Symbol sym, boolean allowPrivate) throws Exception{
+static public Object resolveIn(Namespace n, Symbol sym, boolean allowPrivate) {
//note - ns-qualified vars must already exist
if(sym.ns != null)
{
Namespace ns = namespaceFor(n, sym);
if(ns == null)
- throw new Exception("No such namespace: " + sym.ns);
+ throw Util.runtimeException("No such namespace: " + sym.ns);
Var v = ns.findInternedVar(Symbol.intern(sym.name));
if(v == null)
- throw new Exception("No such var: " + sym);
+ throw Util.runtimeException("No such var: " + sym);
else if(v.ns != currentNS() && !v.isPublic() && !allowPrivate)
throw new IllegalStateException("var: " + sym + " is not public");
return v;
@@ -6550,7 +6580,7 @@ static public Object resolveIn(Namespace n, Symbol sym, boolean allowPrivate) th
}
else
{
- throw new Exception("Unable to resolve symbol: " + sym + " in this context");
+ throw Util.runtimeException("Unable to resolve symbol: " + sym + " in this context");
}
}
return o;
@@ -6558,7 +6588,7 @@ static public Object resolveIn(Namespace n, Symbol sym, boolean allowPrivate) th
}
-static public Object maybeResolveIn(Namespace n, Symbol sym) throws Exception{
+static public Object maybeResolveIn(Namespace n, Symbol sym) {
//note - ns-qualified vars must already exist
if(sym.ns != null)
{
@@ -6587,7 +6617,7 @@ static public Object maybeResolveIn(Namespace n, Symbol sym) throws Exception{
}
-static Var lookupVar(Symbol sym, boolean internNew) throws Exception{
+static Var lookupVar(Symbol sym, boolean internNew) {
Var var = null;
//note - ns-qualified vars in other namespaces must already exist
@@ -6596,7 +6626,7 @@ static Var lookupVar(Symbol sym, boolean internNew) throws Exception{
Namespace ns = namespaceFor(sym);
if(ns == null)
return null;
- //throw new Exception("No such namespace: " + sym.ns);
+ //throw Util.runtimeException("No such namespace: " + sym.ns);
Symbol name = Symbol.intern(sym.name);
if(internNew && ns == currentNS())
var = currentNS().intern(name);
@@ -6623,7 +6653,7 @@ static Var lookupVar(Symbol sym, boolean internNew) throws Exception{
}
else
{
- throw new Exception("Expecting var, but " + sym + " is mapped to " + o);
+ throw Util.runtimeException("Expecting var, but " + sym + " is mapped to " + o);
}
}
if(var != null)
@@ -6631,7 +6661,7 @@ static Var lookupVar(Symbol sym, boolean internNew) throws Exception{
return var;
}
-private static void registerVar(Var var) throws Exception{
+private static void registerVar(Var var) {
if(!VARS.isBound())
return;
IPersistentMap varsMap = (IPersistentMap) VARS.deref();
@@ -6664,7 +6694,7 @@ static void closeOver(LocalBinding b, ObjMethod method){
}
-static LocalBinding referenceLocal(Symbol sym) throws Exception{
+static LocalBinding referenceLocal(Symbol sym) {
if(!LOCAL_ENV.isBound())
return null;
LocalBinding b = (LocalBinding) RT.get(LOCAL_ENV.deref(), sym);
@@ -6685,7 +6715,7 @@ private static Symbol tagOf(Object o){
return null;
}
-public static Object loadFile(String file) throws Exception{
+public static Object loadFile(String file) throws IOException{
// File fo = new File(file);
// if(!fo.exists())
// return null;
@@ -6701,11 +6731,11 @@ public static Object loadFile(String file) throws Exception{
}
}
-public static Object load(Reader rdr) throws Exception{
+public static Object load(Reader rdr) {
return load(rdr, null, "NO_SOURCE_FILE");
}
-public static Object load(Reader rdr, String sourcePath, String sourceName) throws Exception{
+public static Object load(Reader rdr, String sourcePath, String sourceName) {
Object EOF = new Object();
Object ret = null;
LineNumberingPushbackReader pushbackReader =
@@ -6747,10 +6777,10 @@ public static Object load(Reader rdr, String sourcePath, String sourceName) thro
return ret;
}
-static public void writeClassFile(String internalName, byte[] bytecode) throws Exception{
+static public void writeClassFile(String internalName, byte[] bytecode) throws IOException{
String genPath = (String) COMPILE_PATH.deref();
if(genPath == null)
- throw new Exception("*compile-path* not set");
+ throw Util.runtimeException("*compile-path* not set");
String[] dirs = internalName.split("/");
String p = genPath;
for(int i = 0; i < dirs.length - 1; i++)
@@ -6790,7 +6820,7 @@ public static ILookupThunk getLookupThunk(Object target, Keyword k){
return null; //To change body of created methods use File | Settings | File Templates.
}
-static void compile1(GeneratorAdapter gen, ObjExpr objx, Object form) throws Exception{
+static void compile1(GeneratorAdapter gen, ObjExpr objx, Object form) {
Integer line = (Integer) LINE.deref();
if(RT.meta(form) != null && RT.meta(form).containsKey(RT.LINE_KEY))
line = (Integer) RT.meta(form).valAt(RT.LINE_KEY);
@@ -6824,9 +6854,9 @@ static void compile1(GeneratorAdapter gen, ObjExpr objx, Object form) throws Exc
}
}
-public static Object compile(Reader rdr, String sourcePath, String sourceName) throws Exception{
+public static Object compile(Reader rdr, String sourcePath, String sourceName) throws IOException{
if(COMPILE_PATH.deref() == null)
- throw new Exception("*compile-path* not set");
+ throw Util.runtimeException("*compile-path* not set");
Object EOF = new Object();
Object ret = null;
@@ -6991,7 +7021,7 @@ static public class NewInstanceExpr extends ObjExpr{
}
static class DeftypeParser implements IParser{
- public Expr parse(C context, final Object frm) throws Exception{
+ public Expr parse(C context, final Object frm) {
ISeq rform = (ISeq) frm;
//(deftype* tagname classname [fields] :implements [interfaces] :tag tagname methods*)
rform = RT.next(rform);
@@ -7015,7 +7045,7 @@ static public class NewInstanceExpr extends ObjExpr{
}
static class ReifyParser implements IParser{
- public Expr parse(C context, Object frm) throws Exception{
+ public Expr parse(C context, Object frm) {
//(reify this-name? [interfaces] (method-name [args] body)*)
ISeq form = (ISeq) frm;
ObjMethod enclosingMethod = (ObjMethod) METHOD.deref();
@@ -7044,7 +7074,7 @@ static public class NewInstanceExpr extends ObjExpr{
static ObjExpr build(IPersistentVector interfaceSyms, IPersistentVector fieldSyms, Symbol thisSym,
String tagName, Symbol className,
- Symbol typeTag, ISeq methodForms, Object frm) throws Exception{
+ Symbol typeTag, ISeq methodForms, Object frm) {
NewInstanceExpr ret = new NewInstanceExpr(null);
ret.src = frm;
@@ -7145,7 +7175,14 @@ static public class NewInstanceExpr extends ObjExpr{
Var.popThreadBindings();
}
- ret.compile(slashname(superClass),inames,false);
+ try
+ {
+ ret.compile(slashname(superClass),inames,false);
+ }
+ catch(IOException e)
+ {
+ throw Util.runtimeException(e);
+ }
ret.getCompiledClass();
return ret;
}
@@ -7381,7 +7418,7 @@ public static class NewInstanceMethod extends ObjMethod{
}
static NewInstanceMethod parse(ObjExpr objx, ISeq form, Symbol thistag,
- Map overrideables) throws Exception{
+ Map overrideables) {
//(methodname [this-name args*] body...)
//this-name might be nil
NewInstanceMethod method = new NewInstanceMethod(objx, (ObjMethod) METHOD.deref());
@@ -7578,7 +7615,7 @@ public static class NewInstanceMethod extends ObjMethod{
}
catch(Exception e)
{
- throw new RuntimeException(e);
+ throw Util.runtimeException(e);
}
finally
{
@@ -7616,7 +7653,7 @@ public static class NewInstanceMethod extends ObjMethod{
return c;
}
- static Class tagClass(Object tag) throws Exception{
+ static Class tagClass(Object tag) {
if(tag == null)
return Object.class;
Class c = null;
@@ -7638,19 +7675,19 @@ static public class MethodParamExpr implements Expr, MaybePrimitiveExpr{
this.c = c;
}
- public Object eval() throws Exception{
- throw new Exception("Can't eval");
+ public Object eval() {
+ throw Util.runtimeException("Can't eval");
}
public void emit(C context, ObjExpr objx, GeneratorAdapter gen){
- throw new RuntimeException("Can't emit");
+ throw Util.runtimeException("Can't emit");
}
- public boolean hasJavaClass() throws Exception{
+ public boolean hasJavaClass() {
return c != null;
}
- public Class getJavaClass() throws Exception{
+ public Class getJavaClass() {
return c;
}
@@ -7659,7 +7696,7 @@ static public class MethodParamExpr implements Expr, MaybePrimitiveExpr{
}
public void emitUnboxed(C context, ObjExpr objx, GeneratorAdapter gen){
- throw new RuntimeException("Can't emit");
+ throw Util.runtimeException("Can't emit");
}
}
@@ -7692,7 +7729,7 @@ public static class CaseExpr extends UntypedExpr{
this.allKeywords = allKeywords;
}
- public Object eval() throws Exception{
+ public Object eval() {
throw new UnsupportedOperationException("Can't eval case");
}
@@ -7752,7 +7789,7 @@ public static class CaseExpr extends UntypedExpr{
//prepared by case macro and presumed correct
//case macro binds actual expr in let so expr is always a local,
//no need to worry about multiple evaluation
- public Expr parse(C context, Object frm) throws Exception{
+ public Expr parse(C context, Object frm) {
ISeq form = (ISeq) frm;
if(context == C.EVAL)
return analyze(context, RT.list(RT.list(FN, PersistentVector.EMPTY, form)));
diff --git a/src/jvm/clojure/lang/Delay.java b/src/jvm/clojure/lang/Delay.java
index 40a939ba..c8227fe1 100644
--- a/src/jvm/clojure/lang/Delay.java
+++ b/src/jvm/clojure/lang/Delay.java
@@ -21,13 +21,13 @@ public Delay(IFn fn){
this.val = null;
}
-static public Object force(Object x) throws Exception{
+static public Object force(Object x) {
return (x instanceof Delay) ?
((Delay) x).deref()
: x;
}
-synchronized public Object deref() throws Exception{
+synchronized public Object deref() {
if(fn != null)
{
val = fn.invoke();
diff --git a/src/jvm/clojure/lang/FnLoaderThunk.java b/src/jvm/clojure/lang/FnLoaderThunk.java
index 2a9af7bd..1c5f2b79 100644
--- a/src/jvm/clojure/lang/FnLoaderThunk.java
+++ b/src/jvm/clojure/lang/FnLoaderThunk.java
@@ -26,30 +26,37 @@ public FnLoaderThunk(Var v, String fnClassName){
fn = null;
}
-public Object invoke(Object arg1) throws Exception{
+public Object invoke(Object arg1) {
load();
return fn.invoke(arg1);
}
-public Object invoke(Object arg1, Object arg2) throws Exception{
+public Object invoke(Object arg1, Object arg2) {
load();
return fn.invoke(arg1,arg2);
}
-public Object invoke(Object arg1, Object arg2, Object arg3) throws Exception{
+public Object invoke(Object arg1, Object arg2, Object arg3) {
load();
return fn.invoke(arg1,arg2,arg3);
}
-protected Object doInvoke(Object args) throws Exception{
+protected Object doInvoke(Object args) {
load();
return fn.applyTo((ISeq) args);
}
-private void load() throws Exception{
+private void load() {
if(fn == null)
{
- fn = (IFn) Class.forName(fnClassName,true,loader).newInstance();
+ try
+ {
+ fn = (IFn) Class.forName(fnClassName,true,loader).newInstance();
+ }
+ catch(Exception e)
+ {
+ throw Util.runtimeException(e);
+ }
v.root = fn;
}
}
diff --git a/src/jvm/clojure/lang/IBlockingDeref.java b/src/jvm/clojure/lang/IBlockingDeref.java
index cc415844..b42bc07c 100644
--- a/src/jvm/clojure/lang/IBlockingDeref.java
+++ b/src/jvm/clojure/lang/IBlockingDeref.java
@@ -13,5 +13,5 @@
package clojure.lang;
public interface IBlockingDeref{
-Object deref(long ms, Object timeoutValue) throws Exception;
+Object deref(long ms, Object timeoutValue) ;
}
diff --git a/src/jvm/clojure/lang/IChunk.java b/src/jvm/clojure/lang/IChunk.java
index fd667161..70d79f87 100644
--- a/src/jvm/clojure/lang/IChunk.java
+++ b/src/jvm/clojure/lang/IChunk.java
@@ -16,5 +16,5 @@ public interface IChunk extends Indexed{
IChunk dropFirst();
-Object reduce(IFn f, Object start) throws Exception;
+Object reduce(IFn f, Object start) ;
}
diff --git a/src/jvm/clojure/lang/IChunkedSeq.java b/src/jvm/clojure/lang/IChunkedSeq.java
index 6f5f2b86..12498319 100644
--- a/src/jvm/clojure/lang/IChunkedSeq.java
+++ b/src/jvm/clojure/lang/IChunkedSeq.java
@@ -14,10 +14,10 @@ package clojure.lang;
public interface IChunkedSeq extends ISeq, Sequential {
-IChunk chunkedFirst() throws Exception;
+IChunk chunkedFirst() ;
-ISeq chunkedNext() throws Exception;
+ISeq chunkedNext() ;
-ISeq chunkedMore() throws Exception;
+ISeq chunkedMore() ;
}
diff --git a/src/jvm/clojure/lang/IDeref.java b/src/jvm/clojure/lang/IDeref.java
index b0865511..3a474615 100644
--- a/src/jvm/clojure/lang/IDeref.java
+++ b/src/jvm/clojure/lang/IDeref.java
@@ -13,5 +13,5 @@
package clojure.lang;
public interface IDeref{
-Object deref() throws Exception;
+Object deref() ;
}
diff --git a/src/jvm/clojure/lang/IFn.java b/src/jvm/clojure/lang/IFn.java
index 72d90ebb..2cea542b 100644
--- a/src/jvm/clojure/lang/IFn.java
+++ b/src/jvm/clojure/lang/IFn.java
@@ -16,77 +16,77 @@ import java.util.concurrent.Callable;
public interface IFn extends Callable, Runnable{
-public Object invoke() throws Exception;
+public Object invoke() ;
-public Object invoke(Object arg1) throws Exception;
+public Object invoke(Object arg1) ;
-public Object invoke(Object arg1, Object arg2) throws Exception;
+public Object invoke(Object arg1, Object arg2) ;
-public Object invoke(Object arg1, Object arg2, Object arg3) throws Exception;
+public Object invoke(Object arg1, Object arg2, Object arg3) ;
-public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4) throws Exception;
+public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4) ;
-public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5) throws Exception;
+public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5) ;
-public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6) throws Exception;
+public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6) ;
public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7)
- throws Exception;
+ ;
public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7,
- Object arg8) throws Exception;
+ Object arg8) ;
public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7,
- Object arg8, Object arg9) throws Exception;
+ Object arg8, Object arg9) ;
public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7,
- Object arg8, Object arg9, Object arg10) throws Exception;
+ Object arg8, Object arg9, Object 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) throws Exception;
+ Object arg8, Object arg9, Object arg10, Object 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) throws Exception;
+ Object arg8, Object arg9, Object arg10, Object arg11, Object 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) throws Exception;
+ Object arg8, Object arg9, Object arg10, Object arg11, Object arg12, Object 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)
- throws Exception;
+ ;
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) throws Exception;
+ Object 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) throws Exception;
+ Object arg15, Object 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) throws Exception;
+ Object arg15, Object arg16, Object 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) throws Exception;
+ Object arg15, Object arg16, Object arg17, Object 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) throws Exception;
+ Object arg15, Object arg16, Object arg17, Object arg18, Object 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)
- throws Exception;
+ ;
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,
Object... args)
- throws Exception;
+ ;
-public Object applyTo(ISeq arglist) throws Exception;
+public Object applyTo(ISeq arglist) ;
static public interface L{long invokePrim();}
static public interface D{double invokePrim();}
diff --git a/src/jvm/clojure/lang/IPersistentMap.java b/src/jvm/clojure/lang/IPersistentMap.java
index 87108155..8a76b287 100644
--- a/src/jvm/clojure/lang/IPersistentMap.java
+++ b/src/jvm/clojure/lang/IPersistentMap.java
@@ -1,23 +1,23 @@
-/**
- * Copyright (c) Rich Hickey. All rights reserved.
- * The use and distribution terms for this software are covered by the
- * Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
- * which can be found in the file epl-v10.html 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.
- */
-
-package clojure.lang;
-
-
-public interface IPersistentMap extends Iterable, Associative, Counted{
-
-
-IPersistentMap assoc(Object key, Object val);
-
-IPersistentMap assocEx(Object key, Object val) throws Exception;
-
-IPersistentMap without(Object key) throws Exception;
-
-}
+/**
+ * Copyright (c) Rich Hickey. All rights reserved.
+ * The use and distribution terms for this software are covered by the
+ * Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
+ * which can be found in the file epl-v10.html 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.
+ */
+
+package clojure.lang;
+
+
+public interface IPersistentMap extends Iterable, Associative, Counted{
+
+
+IPersistentMap assoc(Object key, Object val);
+
+IPersistentMap assocEx(Object key, Object val) ;
+
+IPersistentMap without(Object key) ;
+
+}
diff --git a/src/jvm/clojure/lang/IPersistentSet.java b/src/jvm/clojure/lang/IPersistentSet.java
index 36fa1ead..144d15a3 100644
--- a/src/jvm/clojure/lang/IPersistentSet.java
+++ b/src/jvm/clojure/lang/IPersistentSet.java
@@ -13,7 +13,7 @@
package clojure.lang;
public interface IPersistentSet extends IPersistentCollection, Counted{
- public IPersistentSet disjoin(Object key) throws Exception;
+ public IPersistentSet disjoin(Object key) ;
public boolean contains(Object key);
public Object get(Object key);
}
diff --git a/src/jvm/clojure/lang/IReduce.java b/src/jvm/clojure/lang/IReduce.java
index 54c8ef34..364225b3 100644
--- a/src/jvm/clojure/lang/IReduce.java
+++ b/src/jvm/clojure/lang/IReduce.java
@@ -13,7 +13,7 @@
package clojure.lang;
public interface IReduce{
-Object reduce(IFn f) throws Exception;
+Object reduce(IFn f) ;
-Object reduce(IFn f, Object start) throws Exception;
+Object reduce(IFn f, Object start) ;
}
diff --git a/src/jvm/clojure/lang/IReference.java b/src/jvm/clojure/lang/IReference.java
index e00a6fd4..c6289fd4 100644
--- a/src/jvm/clojure/lang/IReference.java
+++ b/src/jvm/clojure/lang/IReference.java
@@ -13,6 +13,6 @@
package clojure.lang;
public interface IReference extends IMeta {
- IPersistentMap alterMeta(IFn alter, ISeq args) throws Exception;
+ IPersistentMap alterMeta(IFn alter, ISeq args) ;
IPersistentMap resetMeta(IPersistentMap m);
}
diff --git a/src/jvm/clojure/lang/ITransientSet.java b/src/jvm/clojure/lang/ITransientSet.java
index b7a369cb..7d1ec517 100644
--- a/src/jvm/clojure/lang/ITransientSet.java
+++ b/src/jvm/clojure/lang/ITransientSet.java
@@ -13,7 +13,7 @@
package clojure.lang;
public interface ITransientSet extends ITransientCollection, Counted{
- public ITransientSet disjoin(Object key) throws Exception;
+ public ITransientSet disjoin(Object key) ;
public boolean contains(Object key);
public Object get(Object key);
}
diff --git a/src/jvm/clojure/lang/Keyword.java b/src/jvm/clojure/lang/Keyword.java
index 377ee67c..fa90d9e1 100644
--- a/src/jvm/clojure/lang/Keyword.java
+++ b/src/jvm/clojure/lang/Keyword.java
@@ -86,7 +86,7 @@ public Object throwArity(){
+ toString());
}
-public Object call() throws Exception{
+public Object call() {
return throwArity();
}
@@ -94,7 +94,7 @@ public void run(){
throw new UnsupportedOperationException();
}
-public Object invoke() throws Exception{
+public Object invoke() {
return throwArity();
}
@@ -120,112 +120,112 @@ private Object readResolve() throws ObjectStreamException{
*
* @param obj - must be IPersistentMap
* @return the value at the key or nil if not found
- * @throws Exception
+ * @
*/
-final public Object invoke(Object obj) throws Exception{
+final public Object invoke(Object obj) {
if(obj instanceof ILookup)
return ((ILookup)obj).valAt(this);
return RT.get(obj, this);
}
-final public Object invoke(Object obj, Object notFound) throws Exception{
+final public Object invoke(Object obj, Object notFound) {
if(obj instanceof ILookup)
return ((ILookup)obj).valAt(this,notFound);
return RT.get(obj, this, notFound);
}
-public Object invoke(Object arg1, Object arg2, Object arg3) throws Exception{
+public Object invoke(Object arg1, Object arg2, Object arg3) {
return throwArity();
}
-public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4) throws Exception{
+public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4) {
return throwArity();
}
-public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5) throws Exception{
+public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5) {
return throwArity();
}
-public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6) throws Exception{
+public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6) {
return throwArity();
}
public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7)
- throws Exception{
+ {
return throwArity();
}
public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7,
- Object arg8) throws Exception{
+ Object arg8) {
return throwArity();
}
public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7,
- Object arg8, Object arg9) throws Exception{
+ Object arg8, Object arg9) {
return throwArity();
}
public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7,
- Object arg8, Object arg9, Object arg10) throws Exception{
+ Object arg8, Object arg9, Object arg10) {
return throwArity();
}
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) throws Exception{
+ Object arg8, Object arg9, Object arg10, Object arg11) {
return throwArity();
}
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) throws Exception{
+ Object arg8, Object arg9, Object arg10, Object arg11, Object arg12) {
return throwArity();
}
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)
- throws Exception{
+ {
return throwArity();
}
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)
- throws Exception{
+ {
return throwArity();
}
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) throws Exception{
+ Object arg15) {
return throwArity();
}
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) throws Exception{
+ Object arg15, Object arg16) {
return throwArity();
}
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) throws Exception{
+ Object arg15, Object arg16, Object arg17) {
return throwArity();
}
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) throws Exception{
+ Object arg15, Object arg16, Object arg17, Object arg18) {
return throwArity();
}
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) throws Exception{
+ Object arg15, Object arg16, Object arg17, Object arg18, Object arg19) {
return throwArity();
}
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)
- throws Exception{
+ {
return throwArity();
}
@@ -233,12 +233,12 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
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,
Object... args)
- throws Exception{
+ {
return throwArity();
}
-public Object applyTo(ISeq arglist) throws Exception{
+public Object applyTo(ISeq arglist) {
return AFn.applyToHelper(this, arglist);
}
diff --git a/src/jvm/clojure/lang/LazySeq.java b/src/jvm/clojure/lang/LazySeq.java
index 8d4477b4..41e9dfe7 100644
--- a/src/jvm/clojure/lang/LazySeq.java
+++ b/src/jvm/clojure/lang/LazySeq.java
@@ -48,7 +48,7 @@ final synchronized Object sval(){
}
catch(Exception e)
{
- throw new RuntimeException(e);
+ throw Util.runtimeException(e);
}
}
if(sv != null)
diff --git a/src/jvm/clojure/lang/LispReader.java b/src/jvm/clojure/lang/LispReader.java
index 705d5073..17b73e13 100644
--- a/src/jvm/clojure/lang/LispReader.java
+++ b/src/jvm/clojure/lang/LispReader.java
@@ -98,12 +98,19 @@ static boolean isWhitespace(int ch){
return Character.isWhitespace(ch) || ch == ',';
}
-static void unread(PushbackReader r, int ch) throws IOException{
+static void unread(PushbackReader r, int ch) {
if(ch != -1)
- r.unread(ch);
+ try
+ {
+ r.unread(ch);
+ }
+ catch(IOException e)
+ {
+ throw Util.runtimeException(e);
+ }
}
-public static class ReaderException extends Exception{
+public static class ReaderException extends RuntimeException{
final int line;
public ReaderException(int line, Throwable cause){
@@ -112,22 +119,33 @@ public static class ReaderException extends Exception{
}
}
+static public int read1(Reader r){
+ try
+ {
+ return r.read();
+ }
+ catch(IOException e)
+ {
+ throw Util.runtimeException(e);
+ }
+}
+
static public Object read(PushbackReader r, boolean eofIsError, Object eofValue, boolean isRecursive)
- throws Exception{
+ {
try
{
for(; ;)
{
- int ch = r.read();
+ int ch = read1(r);
while(isWhitespace(ch))
- ch = r.read();
+ ch = read1(r);
if(ch == -1)
{
if(eofIsError)
- throw new Exception("EOF while reading");
+ throw Util.runtimeException("EOF while reading");
return eofValue;
}
@@ -153,7 +171,7 @@ static public Object read(PushbackReader r, boolean eofIsError, Object eofValue,
if(ch == '+' || ch == '-')
{
- int ch2 = r.read();
+ int ch2 = read1(r);
if(Character.isDigit(ch2))
{
unread(r, ch2);
@@ -174,20 +192,20 @@ static public Object read(PushbackReader r, boolean eofIsError, Object eofValue,
catch(Exception e)
{
if(isRecursive || !(r instanceof LineNumberingPushbackReader))
- throw e;
+ throw Util.runtimeException(e);
LineNumberingPushbackReader rdr = (LineNumberingPushbackReader) r;
- //throw new Exception(String.format("ReaderError:(%d,1) %s", rdr.getLineNumber(), e.getMessage()), e);
+ //throw Util.runtimeException(String.format("ReaderError:(%d,1) %s", rdr.getLineNumber(), e.getMessage()), e);
throw new ReaderException(rdr.getLineNumber(), e);
}
}
-static private String readToken(PushbackReader r, char initch) throws Exception{
+static private String readToken(PushbackReader r, char initch) {
StringBuilder sb = new StringBuilder();
sb.append(initch);
for(; ;)
{
- int ch = r.read();
+ int ch = read1(r);
if(ch == -1 || isWhitespace(ch) || isTerminatingMacro(ch))
{
unread(r, ch);
@@ -197,13 +215,13 @@ static private String readToken(PushbackReader r, char initch) throws Exception{
}
}
-static private Object readNumber(PushbackReader r, char initch) throws Exception{
+static private Object readNumber(PushbackReader r, char initch) {
StringBuilder sb = new StringBuilder();
sb.append(initch);
for(; ;)
{
- int ch = r.read();
+ int ch = read1(r);
if(ch == -1 || isWhitespace(ch) || isMacro(ch))
{
unread(r, ch);
@@ -219,7 +237,7 @@ static private Object readNumber(PushbackReader r, char initch) throws Exception
return n;
}
-static private int readUnicodeChar(String token, int offset, int length, int base) throws Exception{
+static private int readUnicodeChar(String token, int offset, int length, int base) {
if(token.length() != offset + length)
throw new IllegalArgumentException("Invalid unicode character: \\" + token);
int uc = 0;
@@ -233,14 +251,14 @@ static private int readUnicodeChar(String token, int offset, int length, int bas
return (char) uc;
}
-static private int readUnicodeChar(PushbackReader r, int initch, int base, int length, boolean exact) throws Exception{
+static private int readUnicodeChar(PushbackReader r, int initch, int base, int length, boolean exact) {
int uc = Character.digit(initch, base);
if(uc == -1)
throw new IllegalArgumentException("Invalid digit: " + initch);
int i = 1;
for(; i < length; ++i)
{
- int ch = r.read();
+ int ch = read1(r);
if(ch == -1 || isWhitespace(ch) || isMacro(ch))
{
unread(r, ch);
@@ -256,7 +274,7 @@ static private int readUnicodeChar(PushbackReader r, int initch, int base, int l
return uc;
}
-static private Object interpretToken(String s) throws Exception{
+static private Object interpretToken(String s) {
if(s.equals("nil"))
{
return null;
@@ -283,7 +301,7 @@ static private Object interpretToken(String s) throws Exception{
if(ret != null)
return ret;
- throw new Exception("Invalid token: " + s);
+ throw Util.runtimeException("Invalid token: " + s);
}
@@ -387,19 +405,19 @@ static private boolean isTerminatingMacro(int ch){
public static class RegexReader extends AFn{
static StringReader stringrdr = new StringReader();
- public Object invoke(Object reader, Object doublequote) throws Exception{
+ public Object invoke(Object reader, Object doublequote) {
StringBuilder sb = new StringBuilder();
Reader r = (Reader) reader;
- for(int ch = r.read(); ch != '"'; ch = r.read())
+ for(int ch = read1(r); ch != '"'; ch = read1(r))
{
if(ch == -1)
- throw new Exception("EOF while reading regex");
+ throw Util.runtimeException("EOF while reading regex");
sb.append( (char) ch );
if(ch == '\\') //escape
{
- ch = r.read();
+ ch = read1(r);
if(ch == -1)
- throw new Exception("EOF while reading regex");
+ throw Util.runtimeException("EOF while reading regex");
sb.append( (char) ch ) ;
}
}
@@ -408,19 +426,19 @@ public static class RegexReader extends AFn{
}
public static class StringReader extends AFn{
- public Object invoke(Object reader, Object doublequote) throws Exception{
+ public Object invoke(Object reader, Object doublequote) {
StringBuilder sb = new StringBuilder();
Reader r = (Reader) reader;
- for(int ch = r.read(); ch != '"'; ch = r.read())
+ for(int ch = read1(r); ch != '"'; ch = read1(r))
{
if(ch == -1)
- throw new Exception("EOF while reading string");
+ throw Util.runtimeException("EOF while reading string");
if(ch == '\\') //escape
{
- ch = r.read();
+ ch = read1(r);
if(ch == -1)
- throw new Exception("EOF while reading string");
+ throw Util.runtimeException("EOF while reading string");
switch(ch)
{
case 't':
@@ -444,9 +462,9 @@ public static class StringReader extends AFn{
break;
case 'u':
{
- ch = r.read();
+ ch = read1(r);
if (Character.digit(ch, 16) == -1)
- throw new Exception("Invalid unicode escape: \\u" + (char) ch);
+ throw Util.runtimeException("Invalid unicode escape: \\u" + (char) ch);
ch = readUnicodeChar((PushbackReader) r, ch, 16, 4, true);
break;
}
@@ -456,10 +474,10 @@ public static class StringReader extends AFn{
{
ch = readUnicodeChar((PushbackReader) r, ch, 8, 3, false);
if(ch > 0377)
- throw new Exception("Octal escape sequence must be in range [0, 377].");
+ throw Util.runtimeException("Octal escape sequence must be in range [0, 377].");
}
else
- throw new Exception("Unsupported escape character: \\" + (char) ch);
+ throw Util.runtimeException("Unsupported escape character: \\" + (char) ch);
}
}
}
@@ -470,12 +488,12 @@ public static class StringReader extends AFn{
}
public static class CommentReader extends AFn{
- public Object invoke(Object reader, Object semicolon) throws Exception{
+ public Object invoke(Object reader, Object semicolon) {
Reader r = (Reader) reader;
int ch;
do
{
- ch = r.read();
+ ch = read1(r);
} while(ch != -1 && ch != '\n' && ch != '\r');
return r;
}
@@ -483,7 +501,7 @@ public static class CommentReader extends AFn{
}
public static class DiscardReader extends AFn{
- public Object invoke(Object reader, Object underscore) throws Exception{
+ public Object invoke(Object reader, Object underscore) {
PushbackReader r = (PushbackReader) reader;
read(r, true, null, true);
return r;
@@ -497,7 +515,7 @@ public static class WrappingReader extends AFn{
this.sym = sym;
}
- public Object invoke(Object reader, Object quote) throws Exception{
+ public Object invoke(Object reader, Object quote) {
PushbackReader r = (PushbackReader) reader;
Object o = read(r, true, null, true);
return RT.list(sym, o);
@@ -514,7 +532,7 @@ public static class DeprecatedWrappingReader extends AFn{
this.macro = macro;
}
- public Object invoke(Object reader, Object quote) throws Exception{
+ public Object invoke(Object reader, Object quote) {
System.out.println("WARNING: reader macro " + macro +
" is deprecated; use " + sym.getName() +
" instead");
@@ -526,7 +544,7 @@ public static class DeprecatedWrappingReader extends AFn{
}
public static class VarReader extends AFn{
- public Object invoke(Object reader, Object quote) throws Exception{
+ public Object invoke(Object reader, Object quote) {
PushbackReader r = (PushbackReader) reader;
Object o = read(r, true, null, true);
// if(o instanceof Symbol)
@@ -542,11 +560,11 @@ public static class VarReader extends AFn{
/*
static class DerefReader extends AFn{
- public Object invoke(Object reader, Object quote) throws Exception{
+ public Object invoke(Object reader, Object quote) {
PushbackReader r = (PushbackReader) reader;
- int ch = r.read();
+ int ch = read1(r);
if(ch == -1)
- throw new Exception("EOF while reading character");
+ throw Util.runtimeException("EOF while reading character");
if(ch == '!')
{
Object o = read(r, true, null, true);
@@ -564,13 +582,13 @@ static class DerefReader extends AFn{
*/
public static class DispatchReader extends AFn{
- public Object invoke(Object reader, Object hash) throws Exception{
- int ch = ((Reader) reader).read();
+ public Object invoke(Object reader, Object hash) {
+ int ch = read1((Reader) reader);
if(ch == -1)
- throw new Exception("EOF while reading character");
+ throw Util.runtimeException("EOF while reading character");
IFn fn = dispatchMacros[ch];
if(fn == null)
- throw new Exception(String.format("No dispatch macro for: %c", (char) ch));
+ throw Util.runtimeException(String.format("No dispatch macro for: %c", (char) ch));
return fn.invoke(reader, ch);
}
}
@@ -580,7 +598,7 @@ static Symbol garg(int n){
}
public static class FnReader extends AFn{
- public Object invoke(Object reader, Object lparen) throws Exception{
+ public Object invoke(Object reader, Object lparen) {
PushbackReader r = (PushbackReader) reader;
if(ARG_ENV.deref() != null)
throw new IllegalStateException("Nested #()s are not allowed");
@@ -588,7 +606,7 @@ public static class FnReader extends AFn{
{
Var.pushThreadBindings(
RT.map(ARG_ENV, PersistentTreeMap.EMPTY));
- r.unread('(');
+ unread(r, '(');
Object form = read(r, true, null, true);
PersistentVector args = PersistentVector.EMPTY;
@@ -639,13 +657,13 @@ static Symbol registerArg(int n){
}
static class ArgReader extends AFn{
- public Object invoke(Object reader, Object pct) throws Exception{
+ public Object invoke(Object reader, Object pct) {
PushbackReader r = (PushbackReader) reader;
if(ARG_ENV.deref() == null)
{
return interpretToken(readToken(r, '%'));
}
- int ch = r.read();
+ int ch = read1(r);
unread(r, ch);
//% alone is first arg
if(ch == -1 || isWhitespace(ch) || isTerminatingMacro(ch))
@@ -662,7 +680,7 @@ static class ArgReader extends AFn{
}
public static class MetaReader extends AFn{
- public Object invoke(Object reader, Object caret) throws Exception{
+ public Object invoke(Object reader, Object caret) {
PushbackReader r = (PushbackReader) reader;
int line = -1;
if(r instanceof LineNumberingPushbackReader)
@@ -699,7 +717,7 @@ public static class MetaReader extends AFn{
}
public static class SyntaxQuoteReader extends AFn{
- public Object invoke(Object reader, Object backquote) throws Exception{
+ public Object invoke(Object reader, Object backquote) {
PushbackReader r = (PushbackReader) reader;
try
{
@@ -715,7 +733,7 @@ public static class SyntaxQuoteReader extends AFn{
}
}
- static Object syntaxQuote(Object form) throws Exception{
+ static Object syntaxQuote(Object form) {
Object ret;
if(Compiler.isSpecial(form))
ret = RT.list(Compiler.QUOTE, form);
@@ -809,7 +827,7 @@ public static class SyntaxQuoteReader extends AFn{
return ret;
}
- private static ISeq sqExpandList(ISeq seq) throws Exception{
+ private static ISeq sqExpandList(ISeq seq) {
PersistentVector ret = PersistentVector.EMPTY;
for(; seq != null; seq = seq.next())
{
@@ -846,11 +864,11 @@ static boolean isUnquote(Object form){
}
static class UnquoteReader extends AFn{
- public Object invoke(Object reader, Object comma) throws Exception{
+ public Object invoke(Object reader, Object comma) {
PushbackReader r = (PushbackReader) reader;
- int ch = r.read();
+ int ch = read1(r);
if(ch == -1)
- throw new Exception("EOF while reading character");
+ throw Util.runtimeException("EOF while reading character");
if(ch == '@')
{
Object o = read(r, true, null, true);
@@ -867,11 +885,11 @@ static class UnquoteReader extends AFn{
}
public static class CharacterReader extends AFn{
- public Object invoke(Object reader, Object backslash) throws Exception{
+ public Object invoke(Object reader, Object backslash) {
PushbackReader r = (PushbackReader) reader;
- int ch = r.read();
+ int ch = read1(r);
if(ch == -1)
- throw new Exception("EOF while reading character");
+ throw Util.runtimeException("EOF while reading character");
String token = readToken(r, (char) ch);
if(token.length() == 1)
return Character.valueOf(token.charAt(0));
@@ -891,26 +909,26 @@ public static class CharacterReader extends AFn{
{
char c = (char) readUnicodeChar(token, 1, 4, 16);
if(c >= '\uD800' && c <= '\uDFFF') // surrogate code unit?
- throw new Exception("Invalid character constant: \\u" + Integer.toString(c, 16));
+ throw Util.runtimeException("Invalid character constant: \\u" + Integer.toString(c, 16));
return c;
}
else if(token.startsWith("o"))
{
int len = token.length() - 1;
if(len > 3)
- throw new Exception("Invalid octal escape sequence length: " + len);
+ throw Util.runtimeException("Invalid octal escape sequence length: " + len);
int uc = readUnicodeChar(token, 1, len, 8);
if(uc > 0377)
- throw new Exception("Octal escape sequence must be in range [0, 377].");
+ throw Util.runtimeException("Octal escape sequence must be in range [0, 377].");
return (char) uc;
}
- throw new Exception("Unsupported character: \\" + token);
+ throw Util.runtimeException("Unsupported character: \\" + token);
}
}
public static class ListReader extends AFn{
- public Object invoke(Object reader, Object leftparen) throws Exception{
+ public Object invoke(Object reader, Object leftparen) {
PushbackReader r = (PushbackReader) reader;
int line = -1;
if(r instanceof LineNumberingPushbackReader)
@@ -931,14 +949,14 @@ public static class ListReader extends AFn{
static class CtorReader extends AFn{
static final Symbol cls = Symbol.intern("class");
- public Object invoke(Object reader, Object leftangle) throws Exception{
+ public Object invoke(Object reader, Object leftangle) {
PushbackReader r = (PushbackReader) reader;
// #<class classname>
// #<classname args*>
// #<classname/staticMethod args*>
List list = readDelimitedList('>', r, true);
if(list.isEmpty())
- throw new Exception("Must supply 'class', classname or classname/staticMethod");
+ throw Util.runtimeException("Must supply 'class', classname or classname/staticMethod");
Symbol s = (Symbol) list.get(0);
Object[] args = list.subList(1, list.size()).toArray();
if(s.equals(cls))
@@ -960,10 +978,10 @@ static class CtorReader extends AFn{
}
public static class EvalReader extends AFn{
- public Object invoke(Object reader, Object eq) throws Exception{
+ public Object invoke(Object reader, Object eq) {
if (!RT.booleanCast(RT.READEVAL.deref()))
{
- throw new Exception("EvalReader not allowed when *read-eval* is false.");
+ throw Util.runtimeException("EvalReader not allowed when *read-eval* is false.");
}
PushbackReader r = (PushbackReader) reader;
@@ -995,7 +1013,7 @@ public static class EvalReader extends AFn{
{
return ((IFn) v).applyTo(RT.next(o));
}
- throw new Exception("Can't resolve " + fs);
+ throw Util.runtimeException("Can't resolve " + fs);
}
else
throw new IllegalArgumentException("Unsupported #= form");
@@ -1003,7 +1021,7 @@ public static class EvalReader extends AFn{
}
//static class ArgVectorReader extends AFn{
-// public Object invoke(Object reader, Object leftparen) throws Exception{
+// public Object invoke(Object reader, Object leftparen) {
// PushbackReader r = (PushbackReader) reader;
// return ArgVector.create(readDelimitedList('|', r, true));
// }
@@ -1011,7 +1029,7 @@ public static class EvalReader extends AFn{
//}
public static class VectorReader extends AFn{
- public Object invoke(Object reader, Object leftparen) throws Exception{
+ public Object invoke(Object reader, Object leftparen) {
PushbackReader r = (PushbackReader) reader;
return LazilyPersistentVector.create(readDelimitedList(']', r, true));
}
@@ -1019,18 +1037,18 @@ public static class VectorReader extends AFn{
}
public static class MapReader extends AFn{
- public Object invoke(Object reader, Object leftparen) throws Exception{
+ public Object invoke(Object reader, Object leftparen) {
PushbackReader r = (PushbackReader) reader;
Object[] a = readDelimitedList('}', r, true).toArray();
if((a.length & 1) == 1)
- throw new Exception("Map literal must contain an even number of forms");
+ throw Util.runtimeException("Map literal must contain an even number of forms");
return RT.map(a);
}
}
public static class SetReader extends AFn{
- public Object invoke(Object reader, Object leftbracket) throws Exception{
+ public Object invoke(Object reader, Object leftbracket) {
PushbackReader r = (PushbackReader) reader;
return PersistentHashSet.createWithCheck(readDelimitedList('}', r, true));
}
@@ -1038,19 +1056,19 @@ public static class SetReader extends AFn{
}
public static class UnmatchedDelimiterReader extends AFn{
- public Object invoke(Object reader, Object rightdelim) throws Exception{
- throw new Exception("Unmatched delimiter: " + rightdelim);
+ public Object invoke(Object reader, Object rightdelim) {
+ throw Util.runtimeException("Unmatched delimiter: " + rightdelim);
}
}
public static class UnreadableReader extends AFn{
- public Object invoke(Object reader, Object leftangle) throws Exception{
- throw new Exception("Unreadable form");
+ public Object invoke(Object reader, Object leftangle) {
+ throw Util.runtimeException("Unreadable form");
}
}
-public static List readDelimitedList(char delim, PushbackReader r, boolean isRecursive) throws Exception{
+public static List readDelimitedList(char delim, PushbackReader r, boolean isRecursive) {
final int firstline =
(r instanceof LineNumberingPushbackReader) ?
((LineNumberingPushbackReader) r).getLineNumber() : -1;
@@ -1059,17 +1077,17 @@ public static List readDelimitedList(char delim, PushbackReader r, boolean isRec
for(; ;)
{
- int ch = r.read();
+ int ch = read1(r);
while(isWhitespace(ch))
- ch = r.read();
+ ch = read1(r);
if(ch == -1)
{
if(firstline < 0)
- throw new Exception("EOF while reading");
+ throw Util.runtimeException("EOF while reading");
else
- throw new Exception("EOF while reading, starting at line " + firstline);
+ throw Util.runtimeException("EOF while reading, starting at line " + firstline);
}
if(ch == delim)
diff --git a/src/jvm/clojure/lang/LockingTransaction.java b/src/jvm/clojure/lang/LockingTransaction.java
index ab69e223..44d2de63 100644
--- a/src/jvm/clojure/lang/LockingTransaction.java
+++ b/src/jvm/clojure/lang/LockingTransaction.java
@@ -378,7 +378,7 @@ Object run(Callable fn) throws Exception{
}
}
if(!done)
- throw new Exception("Transaction failed after reaching retry limit");
+ throw Util.runtimeException("Transaction failed after reaching retry limit");
return ret;
}
@@ -456,7 +456,7 @@ void doEnsure(Ref ref){
ensures.add(ref);
}
-Object doCommute(Ref ref, IFn fn, ISeq args) throws Exception{
+Object doCommute(Ref ref, IFn fn, ISeq args) {
if(!info.running())
throw retryex;
if(!vals.containsKey(ref))
@@ -506,7 +506,7 @@ public static void main(String[] args){
}
class Incr extends AFn{
- public Object invoke(Object arg1) throws Exception{
+ public Object invoke(Object arg1) {
Integer i = (Integer) arg1;
return i + 1;
}
@@ -529,7 +529,7 @@ public static void main(String[] args){
this.incr = new Incr();
}
- public Object call() throws Exception{
+ public Object call() {
long nanos = 0;
for(int i = 0; i < niters; i++)
{
@@ -540,7 +540,7 @@ public static void main(String[] args){
return nanos;
}
- public Object invoke() throws Exception{
+ public Object invoke() {
for(Ref tref : items)
{
LockingTransaction.getEx().doCommute(tref, incr);
@@ -564,7 +564,7 @@ public static void main(String[] args){
this.items = items;
}
- public Object call() throws Exception{
+ public Object call() {
long nanos = 0;
for(int i = 0; i < niters; i++)
{
@@ -575,7 +575,7 @@ public static void main(String[] args){
return nanos;
}
- public Object invoke() throws Exception{
+ public Object invoke() {
for(Ref tref : items)
{
//Transaction.get().doTouch(tref);
diff --git a/src/jvm/clojure/lang/MultiFn.java b/src/jvm/clojure/lang/MultiFn.java
index c4891654..1fbfc76d 100644
--- a/src/jvm/clojure/lang/MultiFn.java
+++ b/src/jvm/clojure/lang/MultiFn.java
@@ -29,7 +29,7 @@ static final Var dissoc = RT.var("clojure.core", "dissoc");
static final Var isa = RT.var("clojure.core", "isa?");
static final Var parents = RT.var("clojure.core", "parents");
-public MultiFn(String name, IFn dispatchFn, Object defaultDispatchVal, IRef hierarchy) throws Exception{
+public MultiFn(String name, IFn dispatchFn, Object defaultDispatchVal, IRef hierarchy) {
this.name = name;
this.dispatchFn = dispatchFn;
this.defaultDispatchVal = defaultDispatchVal;
@@ -46,19 +46,19 @@ synchronized public MultiFn reset(){
return this;
}
-synchronized public MultiFn addMethod(Object dispatchVal, IFn method) throws Exception{
+synchronized public MultiFn addMethod(Object dispatchVal, IFn method) {
methodTable = getMethodTable().assoc(dispatchVal, method);
resetCache();
return this;
}
-synchronized public MultiFn removeMethod(Object dispatchVal) throws Exception{
+synchronized public MultiFn removeMethod(Object dispatchVal) {
methodTable = getMethodTable().without(dispatchVal);
resetCache();
return this;
}
-synchronized public MultiFn preferMethod(Object dispatchValX, Object dispatchValY) throws Exception{
+synchronized public MultiFn preferMethod(Object dispatchValX, Object dispatchValY) {
if(prefers(dispatchValY, dispatchValX))
throw new IllegalStateException(
String.format("Preference conflict in multimethod '%s': %s is already preferred to %s",
@@ -71,7 +71,7 @@ synchronized public MultiFn preferMethod(Object dispatchValX, Object dispatchVal
return this;
}
-private boolean prefers(Object x, Object y) throws Exception{
+private boolean prefers(Object x, Object y) {
IPersistentSet xprefs = (IPersistentSet) getPreferTable().valAt(x);
if(xprefs != null && xprefs.contains(y))
return true;
@@ -88,21 +88,21 @@ private boolean prefers(Object x, Object y) throws Exception{
return false;
}
-private boolean isA(Object x, Object y) throws Exception{
+private boolean isA(Object x, Object y) {
return RT.booleanCast(isa.invoke(hierarchy.deref(), x, y));
}
-private boolean dominates(Object x, Object y) throws Exception{
+private boolean dominates(Object x, Object y) {
return prefers(x, y) || isA(x, y);
}
-private IPersistentMap resetCache() throws Exception{
+private IPersistentMap resetCache() {
methodCache = getMethodTable();
cachedHierarchy = hierarchy.deref();
return methodCache;
}
-synchronized public IFn getMethod(Object dispatchVal) throws Exception{
+synchronized public IFn getMethod(Object dispatchVal) {
if(cachedHierarchy != hierarchy.deref())
resetCache();
IFn targetFn = (IFn) methodCache.valAt(dispatchVal);
@@ -115,7 +115,7 @@ synchronized public IFn getMethod(Object dispatchVal) throws Exception{
return targetFn;
}
-private IFn getFn(Object dispatchVal) throws Exception{
+private IFn getFn(Object dispatchVal) {
IFn targetFn = getMethod(dispatchVal);
if(targetFn == null)
throw new IllegalArgumentException(String.format("No method in multimethod '%s' for dispatch value: %s",
@@ -123,7 +123,7 @@ private IFn getFn(Object dispatchVal) throws Exception{
return targetFn;
}
-private IFn findAndCacheBestMethod(Object dispatchVal) throws Exception{
+private IFn findAndCacheBestMethod(Object dispatchVal) {
Map.Entry bestEntry = null;
for(Object o : getMethodTable())
{
@@ -155,25 +155,25 @@ private IFn findAndCacheBestMethod(Object dispatchVal) throws Exception{
}
}
-public Object invoke() throws Exception{
+public Object invoke() {
return getFn(dispatchFn.invoke()).invoke();
}
-public Object invoke(Object arg1) throws Exception{
+public Object invoke(Object arg1) {
return getFn(dispatchFn.invoke(arg1)).invoke(Util.ret1(arg1,arg1=null));
}
-public Object invoke(Object arg1, Object arg2) throws Exception{
+public Object invoke(Object arg1, Object arg2) {
return getFn(dispatchFn.invoke(arg1, arg2)).
invoke(Util.ret1(arg1,arg1=null), Util.ret1(arg2,arg2=null));
}
-public Object invoke(Object arg1, Object arg2, Object arg3) throws Exception{
+public Object invoke(Object arg1, Object arg2, Object arg3) {
return getFn(dispatchFn.invoke(arg1, arg2, arg3)).
invoke(Util.ret1(arg1,arg1=null), Util.ret1(arg2,arg2=null), Util.ret1(arg3,arg3=null));
}
-public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4) throws Exception{
+public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4) {
return getFn(dispatchFn.invoke(arg1, arg2, arg3, arg4)).
invoke(Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -181,7 +181,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4) throws
Util.ret1(arg4,arg4=null));
}
-public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5) throws Exception{
+public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5) {
return getFn(dispatchFn.invoke(arg1, arg2, arg3, arg4, arg5)).
invoke(Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -190,7 +190,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg5,arg5=null));
}
-public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6) throws Exception{
+public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6) {
return getFn(dispatchFn.invoke(arg1, arg2, arg3, arg4, arg5, arg6)).
invoke(Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -201,7 +201,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
}
public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7)
- throws Exception{
+ {
return getFn(dispatchFn.invoke(arg1, arg2, arg3, arg4, arg5, arg6, arg7)).
invoke(Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -213,7 +213,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
}
public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7,
- Object arg8) throws Exception{
+ Object arg8) {
return getFn(dispatchFn.invoke(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8)).
invoke(Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -226,7 +226,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
}
public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7,
- Object arg8, Object arg9) throws Exception{
+ Object arg8, Object arg9) {
return getFn(dispatchFn.invoke(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9)).
invoke(Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -240,7 +240,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
}
public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7,
- Object arg8, Object arg9, Object arg10) throws Exception{
+ Object arg8, Object arg9, Object arg10) {
return getFn(dispatchFn.invoke(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10)).
invoke(Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -255,7 +255,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
}
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) throws Exception{
+ Object arg8, Object arg9, Object arg10, Object arg11) {
return getFn(dispatchFn.invoke(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11)).
invoke(Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -271,7 +271,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
}
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) throws Exception{
+ Object arg8, Object arg9, Object arg10, Object arg11, Object arg12) {
return getFn(dispatchFn.invoke(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12)).
invoke(Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -288,7 +288,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
}
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) throws Exception{
+ Object arg8, Object arg9, Object arg10, Object arg11, Object arg12, Object arg13) {
return getFn(dispatchFn.invoke(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13)).
invoke(Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -307,7 +307,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
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)
- throws Exception{
+ {
return getFn(
dispatchFn.invoke(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14)).
invoke(Util.ret1(arg1,arg1=null),
@@ -328,7 +328,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
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) throws Exception{
+ Object arg15) {
return getFn(
dispatchFn.invoke(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14,
arg15)).
@@ -351,7 +351,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
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) throws Exception{
+ Object arg15, Object arg16) {
return getFn(
dispatchFn.invoke(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14,
arg15, arg16)).
@@ -375,7 +375,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
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) throws Exception{
+ Object arg15, Object arg16, Object arg17) {
return getFn(
dispatchFn.invoke(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14,
arg15, arg16, arg17)).
@@ -400,7 +400,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
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) throws Exception{
+ Object arg15, Object arg16, Object arg17, Object arg18) {
return getFn(
dispatchFn.invoke(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14,
arg15, arg16, arg17, arg18)).
@@ -426,7 +426,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
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) throws Exception{
+ Object arg15, Object arg16, Object arg17, Object arg18, Object arg19) {
return getFn(
dispatchFn.invoke(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14,
arg15, arg16, arg17, arg18, arg19)).
@@ -454,7 +454,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
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)
- throws Exception{
+ {
return getFn(
dispatchFn.invoke(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14,
arg15, arg16, arg17, arg18, arg19, arg20)).
@@ -483,7 +483,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
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, Object... args)
- throws Exception{
+ {
return getFn(
dispatchFn.invoke(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14,
arg15, arg16, arg17, arg18, arg19, arg20, args)).
diff --git a/src/jvm/clojure/lang/Namespace.java b/src/jvm/clojure/lang/Namespace.java
index 19369733..0a4a38df 100644
--- a/src/jvm/clojure/lang/Namespace.java
+++ b/src/jvm/clojure/lang/Namespace.java
@@ -140,7 +140,7 @@ Class referenceClass(Symbol sym, Class val){
throw new IllegalStateException(sym + " already refers to: " + c + " in namespace: " + name);
}
-public void unmap(Symbol sym) throws Exception{
+public void unmap(Symbol sym) {
if(sym.ns != null)
{
throw new IllegalArgumentException("Can't unintern namespace-qualified symbol");
@@ -225,7 +225,7 @@ public void addAlias(Symbol alias, Namespace ns){
+ name + ", aliasing " + map.valAt(alias));
}
-public void removeAlias(Symbol alias) throws Exception{
+public void removeAlias(Symbol alias) {
IPersistentMap map = getAliases();
while(map.containsKey(alias))
{
diff --git a/src/jvm/clojure/lang/Numbers.java b/src/jvm/clojure/lang/Numbers.java
index 494a93f2..8210de7c 100644
--- a/src/jvm/clojure/lang/Numbers.java
+++ b/src/jvm/clojure/lang/Numbers.java
@@ -2338,14 +2338,14 @@ static public class F{
return xs;
}
- static public float[] vmap(IFn fn, float[] x) throws Exception{
+ static public float[] vmap(IFn fn, float[] x) {
float[] xs = x.clone();
for(int i = 0; i < xs.length; i++)
xs[i] = ((Number) fn.invoke(xs[i])).floatValue();
return xs;
}
- static public float[] vmap(IFn fn, float[] x, float[] ys) throws Exception{
+ static public float[] vmap(IFn fn, float[] x, float[] ys) {
float[] xs = x.clone();
for(int i = 0; i < xs.length; i++)
xs[i] = ((Number) fn.invoke(xs[i], ys[i])).floatValue();
@@ -2766,14 +2766,14 @@ static public class D{
return xs;
}
- static public double[] vmap(IFn fn, double[] x) throws Exception{
+ static public double[] vmap(IFn fn, double[] x) {
double[] xs = x.clone();
for(int i = 0; i < xs.length; i++)
xs[i] = ((Number) fn.invoke(xs[i])).doubleValue();
return xs;
}
- static public double[] vmap(IFn fn, double[] x, double[] ys) throws Exception{
+ static public double[] vmap(IFn fn, double[] x, double[] ys) {
double[] xs = x.clone();
for(int i = 0; i < xs.length; i++)
xs[i] = ((Number) fn.invoke(xs[i], ys[i])).doubleValue();
@@ -3193,14 +3193,14 @@ static public class I{
return xs;
}
- static public int[] vmap(IFn fn, int[] x) throws Exception{
+ static public int[] vmap(IFn fn, int[] x) {
int[] xs = x.clone();
for(int i = 0; i < xs.length; i++)
xs[i] = ((Number) fn.invoke(xs[i])).intValue();
return xs;
}
- static public int[] vmap(IFn fn, int[] x, int[] ys) throws Exception{
+ static public int[] vmap(IFn fn, int[] x, int[] ys) {
int[] xs = x.clone();
for(int i = 0; i < xs.length; i++)
xs[i] = ((Number) fn.invoke(xs[i], ys[i])).intValue();
@@ -3622,14 +3622,14 @@ static public class L{
return xs;
}
- static public long[] vmap(IFn fn, long[] x) throws Exception{
+ static public long[] vmap(IFn fn, long[] x) {
long[] xs = x.clone();
for(int i = 0; i < xs.length; i++)
xs[i] = ((Number) fn.invoke(xs[i])).longValue();
return xs;
}
- static public long[] vmap(IFn fn, long[] x, long[] ys) throws Exception{
+ static public long[] vmap(IFn fn, long[] x, long[] ys) {
long[] xs = x.clone();
for(int i = 0; i < xs.length; i++)
xs[i] = ((Number) fn.invoke(xs[i], ys[i])).longValue();
diff --git a/src/jvm/clojure/lang/PersistentArrayMap.java b/src/jvm/clojure/lang/PersistentArrayMap.java
index f2d38348..2446ed68 100644
--- a/src/jvm/clojure/lang/PersistentArrayMap.java
+++ b/src/jvm/clojure/lang/PersistentArrayMap.java
@@ -103,12 +103,12 @@ public IMapEntry entryAt(Object key){
return null;
}
-public IPersistentMap assocEx(Object key, Object val) throws Exception{
+public IPersistentMap assocEx(Object key, Object val) {
int i = indexOf(key);
Object[] newArray;
if(i >= 0)
{
- throw new Exception("Key already present");
+ throw Util.runtimeException("Key already present");
}
else //didn't have key, grow
{
diff --git a/src/jvm/clojure/lang/PersistentHashMap.java b/src/jvm/clojure/lang/PersistentHashMap.java
index b07076bc..7cdd1052 100644
--- a/src/jvm/clojure/lang/PersistentHashMap.java
+++ b/src/jvm/clojure/lang/PersistentHashMap.java
@@ -153,9 +153,9 @@ public Object valAt(Object key){
return valAt(key, null);
}
-public IPersistentMap assocEx(Object key, Object val) throws Exception{
+public IPersistentMap assocEx(Object key, Object val) {
if(containsKey(key))
- throw new Exception("Key already present");
+ throw Util.runtimeException("Key already present");
return assoc(key, val);
}
diff --git a/src/jvm/clojure/lang/PersistentHashSet.java b/src/jvm/clojure/lang/PersistentHashSet.java
index 12170d4b..32332dbb 100644
--- a/src/jvm/clojure/lang/PersistentHashSet.java
+++ b/src/jvm/clojure/lang/PersistentHashSet.java
@@ -87,7 +87,7 @@ PersistentHashSet(IPersistentMap meta, IPersistentMap impl){
this._meta = meta;
}
-public IPersistentSet disjoin(Object key) throws Exception{
+public IPersistentSet disjoin(Object key) {
if(contains(key))
return new PersistentHashSet(meta(),impl.without(key));
return this;
diff --git a/src/jvm/clojure/lang/PersistentList.java b/src/jvm/clojure/lang/PersistentList.java
index 907b310a..1d27d9ef 100644
--- a/src/jvm/clojure/lang/PersistentList.java
+++ b/src/jvm/clojure/lang/PersistentList.java
@@ -24,7 +24,7 @@ public static IFn creator = new RestFn(){
return 0;
}
- final protected Object doInvoke(Object args) throws Exception{
+ final protected Object doInvoke(Object args) {
if(args instanceof ArraySeq)
{
Object[] argsarray = (Object[]) ((ArraySeq) args).array;
@@ -111,14 +111,14 @@ public PersistentList withMeta(IPersistentMap meta){
return this;
}
-public Object reduce(IFn f) throws Exception{
+public Object reduce(IFn f) {
Object ret = first();
for(ISeq s = next(); s != null; s = s.next())
ret = f.invoke(ret, s.first());
return ret;
}
-public Object reduce(IFn f, Object start) throws Exception{
+public Object reduce(IFn f, Object start) {
Object ret = f.invoke(start, first());
for(ISeq s = next(); s != null; s = s.next())
ret = f.invoke(ret, s.first());
diff --git a/src/jvm/clojure/lang/PersistentStructMap.java b/src/jvm/clojure/lang/PersistentStructMap.java
index b015203f..9efb2808 100644
--- a/src/jvm/clojure/lang/PersistentStructMap.java
+++ b/src/jvm/clojure/lang/PersistentStructMap.java
@@ -84,10 +84,10 @@ static public IFn getAccessor(final Def def, Object key){
{
final int i = (Integer) e.getValue();
return new AFn(){
- public Object invoke(Object arg1) throws Exception{
+ public Object invoke(Object arg1) {
PersistentStructMap m = (PersistentStructMap) arg1;
if(m.def != def)
- throw new Exception("Accessor/struct mismatch");
+ throw Util.runtimeException("Accessor/struct mismatch");
return m.vals[i];
}
};
@@ -166,16 +166,16 @@ public Object valAt(Object key, Object notFound){
return ext.valAt(key, notFound);
}
-public IPersistentMap assocEx(Object key, Object val) throws Exception{
+public IPersistentMap assocEx(Object key, Object val) {
if(containsKey(key))
- throw new Exception("Key already present");
+ throw Util.runtimeException("Key already present");
return assoc(key, val);
}
-public IPersistentMap without(Object key) throws Exception{
+public IPersistentMap without(Object key) {
Map.Entry e = def.keyslots.entryAt(key);
if(e != null)
- throw new Exception("Can't remove struct key");
+ throw Util.runtimeException("Can't remove struct key");
IPersistentMap newExt = ext.without(key);
if(newExt == ext)
return this;
diff --git a/src/jvm/clojure/lang/PersistentTreeMap.java b/src/jvm/clojure/lang/PersistentTreeMap.java
index 4fd987f4..fd3cb2c7 100644
--- a/src/jvm/clojure/lang/PersistentTreeMap.java
+++ b/src/jvm/clojure/lang/PersistentTreeMap.java
@@ -94,12 +94,12 @@ public boolean containsKey(Object key){
return entryAt(key) != null;
}
-public PersistentTreeMap assocEx(Object key, Object val) throws Exception{
+public PersistentTreeMap assocEx(Object key, Object val) {
Box found = new Box(null);
Node t = add(tree, key, val, found);
if(t == null) //null == already contains key
{
- throw new Exception("Key already present");
+ throw Util.runtimeException("Key already present");
}
return new PersistentTreeMap(comp, t.blacken(), _count + 1, meta());
}
@@ -141,7 +141,7 @@ public IPersistentCollection empty(){
return new PersistentTreeMap(meta(), comp);
}
-public ISeq rseq() throws Exception{
+public ISeq rseq() {
if(_count > 0)
return Seq.create(tree, false, _count);
return null;
diff --git a/src/jvm/clojure/lang/PersistentTreeSet.java b/src/jvm/clojure/lang/PersistentTreeSet.java
index d55452c7..a5dc8ec6 100644
--- a/src/jvm/clojure/lang/PersistentTreeSet.java
+++ b/src/jvm/clojure/lang/PersistentTreeSet.java
@@ -42,7 +42,7 @@ PersistentTreeSet(IPersistentMap meta, IPersistentMap impl){
this._meta = meta;
}
-public IPersistentSet disjoin(Object key) throws Exception{
+public IPersistentSet disjoin(Object key) {
if(contains(key))
return new PersistentTreeSet(meta(),impl.without(key));
return this;
@@ -58,7 +58,7 @@ public IPersistentCollection empty(){
return new PersistentTreeSet(meta(),(PersistentTreeMap)impl.empty());
}
-public ISeq rseq() throws Exception{
+public ISeq rseq() {
return APersistentMap.KeySeq.create(((Reversible) impl).rseq());
}
diff --git a/src/jvm/clojure/lang/PersistentVector.java b/src/jvm/clojure/lang/PersistentVector.java
index 460a4069..d3d192b7 100644
--- a/src/jvm/clojure/lang/PersistentVector.java
+++ b/src/jvm/clojure/lang/PersistentVector.java
@@ -261,7 +261,7 @@ static public final class ChunkedSeq extends ASeq implements IChunkedSeq{
this.offset = offset;
}
- public IChunk chunkedFirst() throws Exception{
+ public IChunk chunkedFirst() {
return new ArrayChunk(node, offset);
}
@@ -536,7 +536,7 @@ static final class TransientVector extends AFn implements ITransientVector, Coun
return notFound;
}
- public Object invoke(Object arg1) throws Exception{
+ public Object invoke(Object arg1) {
//note - relies on ensureEditable in nth
if(Util.isInteger(arg1))
return nth(((Number) arg1).intValue());
diff --git a/src/jvm/clojure/lang/RT.java b/src/jvm/clojure/lang/RT.java
index 8dc55f2f..65e2bbb3 100644
--- a/src/jvm/clojure/lang/RT.java
+++ b/src/jvm/clojure/lang/RT.java
@@ -12,6 +12,7 @@
package clojure.lang;
+import java.net.MalformedURLException;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.Callable;
import java.util.*;
@@ -218,7 +219,7 @@ static final Var PRINT_INITIALIZED = Var.intern(CLOJURE_NS, Symbol.intern("print
static final Var PR_ON = Var.intern(CLOJURE_NS, Symbol.intern("pr-on"));
//final static Var IMPORTS = Var.intern(CLOJURE_NS, Symbol.intern("*imports*"), DEFAULT_IMPORTS);
final static IFn inNamespace = new AFn(){
- public Object invoke(Object arg1) throws Exception{
+ public Object invoke(Object arg1) {
Symbol nsname = (Symbol) arg1;
Namespace ns = Namespace.findOrCreate(nsname);
CURRENT_NS.set(ns);
@@ -227,7 +228,7 @@ final static IFn inNamespace = new AFn(){
};
final static IFn bootNamespace = new AFn(){
- public Object invoke(Object __form, Object __env,Object arg1) throws Exception{
+ public Object invoke(Object __form, Object __env,Object arg1) {
Symbol nsname = (Symbol) arg1;
Namespace ns = Namespace.findOrCreate(nsname);
CURRENT_NS.set(ns);
@@ -272,7 +273,7 @@ private static final class DefaultComparator implements Comparator, Serializable
static AtomicInteger id = new AtomicInteger(1);
-static public void addURL(Object url) throws Exception{
+static public void addURL(Object url) throws MalformedURLException{
URL u = (url instanceof String) ? (new URL((String) url)) : (URL) url;
ClassLoader ccl = Thread.currentThread().getContextClassLoader();
if(ccl instanceof DynamicClassLoader)
@@ -297,8 +298,15 @@ static{
arglistskw, list(vector(namesym))));
v = Var.intern(CLOJURE_NS, LOAD_FILE,
new AFn(){
- public Object invoke(Object arg1) throws Exception{
- return Compiler.loadFile((String) arg1);
+ public Object invoke(Object arg1) {
+ try
+ {
+ return Compiler.loadFile((String) arg1);
+ }
+ catch(IOException e)
+ {
+ throw Util.runtimeException(e);
+ }
}
});
v.setMeta(map(DOC_KEY, "Sequentially read and evaluate the set of forms contained in the file.",
@@ -307,7 +315,7 @@ static{
doInit();
}
catch(Exception e) {
- throw new RuntimeException(e);
+ throw Util.runtimeException(e);
}
}
@@ -323,23 +331,23 @@ static public Var var(String ns, String name, Object init){
return Var.intern(Namespace.findOrCreate(Symbol.intern(null, ns)), Symbol.intern(null, name), init);
}
-public static void loadResourceScript(String name) throws Exception{
+public static void loadResourceScript(String name) throws IOException{
loadResourceScript(name, true);
}
-public static void maybeLoadResourceScript(String name) throws Exception{
+public static void maybeLoadResourceScript(String name) throws IOException{
loadResourceScript(name, false);
}
-public static void loadResourceScript(String name, boolean failIfNotFound) throws Exception{
+public static void loadResourceScript(String name, boolean failIfNotFound) throws IOException{
loadResourceScript(RT.class, name, failIfNotFound);
}
-public static void loadResourceScript(Class c, String name) throws Exception{
+public static void loadResourceScript(Class c, String name) throws IOException{
loadResourceScript(c, name, true);
}
-public static void loadResourceScript(Class c, String name, boolean failIfNotFound) throws Exception{
+public static void loadResourceScript(Class c, String name, boolean failIfNotFound) throws IOException{
int slash = name.lastIndexOf('/');
String file = slash >= 0 ? name.substring(slash + 1) : name;
InputStream ins = baseLoader().getResourceAsStream(name);
@@ -356,11 +364,11 @@ public static void loadResourceScript(Class c, String name, boolean failIfNotFou
}
}
-static public void init() throws Exception{
+static public void init() {
RT.errPrintWriter().println("No need to call RT.init() anymore");
}
-static public long lastModified(URL url, String libfile) throws Exception{
+static public long lastModified(URL url, String libfile) throws IOException{
if(url.getProtocol().equals("jar")) {
return ((JarURLConnection) url.openConnection()).getJarFile().getEntry(libfile).getTime();
}
@@ -369,7 +377,7 @@ static public long lastModified(URL url, String libfile) throws Exception{
}
}
-static void compile(String cljfile) throws Exception{
+static void compile(String cljfile) throws IOException{
InputStream ins = baseLoader().getResourceAsStream(cljfile);
if(ins != null) {
try {
@@ -385,11 +393,11 @@ static void compile(String cljfile) throws Exception{
throw new FileNotFoundException("Could not locate Clojure resource on classpath: " + cljfile);
}
-static public void load(String scriptbase) throws Exception{
+static public void load(String scriptbase) throws IOException, ClassNotFoundException{
load(scriptbase, true);
}
-static public void load(String scriptbase, boolean failIfNotFound) throws Exception{
+static public void load(String scriptbase, boolean failIfNotFound) throws IOException, ClassNotFoundException{
String classfile = scriptbase + LOADER_SUFFIX + ".class";
String cljfile = scriptbase + ".clj";
URL classURL = baseLoader().getResource(classfile);
@@ -421,7 +429,7 @@ static public void load(String scriptbase, boolean failIfNotFound) throws Except
throw new FileNotFoundException(String.format("Could not locate %s or %s on classpath: ", classfile, cljfile));
}
-static void doInit() throws Exception{
+static void doInit() throws ClassNotFoundException, IOException{
load("clojure/core");
Var.pushThreadBindings(
@@ -705,11 +713,11 @@ static public Object find(Object coll, Object key){
//takes a seq of key,val,key,val
//returns tail starting at val of matching key if found, else null
-static public ISeq findKey(Keyword key, ISeq keyvals) throws Exception{
+static public ISeq findKey(Keyword key, ISeq keyvals) {
while(keyvals != null) {
ISeq r = keyvals.next();
if(r == null)
- throw new Exception("Malformed keyword argslist");
+ throw Util.runtimeException("Malformed keyword argslist");
if(keyvals.first() == key)
return r;
keyvals = r.next();
@@ -717,7 +725,7 @@ static public ISeq findKey(Keyword key, ISeq keyvals) throws Exception{
return null;
}
-static public Object dissoc(Object coll, Object key) throws Exception{
+static public Object dissoc(Object coll, Object key) {
if(coll == null)
return null;
return ((IPersistentMap) coll).without(key);
@@ -1346,7 +1354,7 @@ static public ISeq listStar(Object arg1, Object arg2, Object arg3, Object arg4,
return (ISeq) cons(arg1, cons(arg2, cons(arg3, cons(arg4, cons(arg5, rest)))));
}
-static public ISeq arrayToList(Object[] a) throws Exception{
+static public ISeq arrayToList(Object[] a) {
ISeq ret = null;
for(int i = a.length - 1; i >= 0; --i)
ret = (ISeq) cons(a[i], ret);
@@ -1367,7 +1375,7 @@ static public Object[] object_array(Object sizeOrSeq){
}
}
-static public Object[] toArray(Object coll) throws Exception{
+static public Object[] toArray(Object coll) {
if(coll == null)
return EMPTY_ARRAY;
else if(coll instanceof Object[])
@@ -1391,7 +1399,7 @@ static public Object[] toArray(Object coll) throws Exception{
return ret;
}
else
- throw new Exception("Unable to convert: " + coll.getClass() + " to Object[]");
+ throw Util.runtimeException("Unable to convert: " + coll.getClass() + " to Object[]");
}
static public Object[] seqToArray(ISeq seq){
@@ -1402,12 +1410,12 @@ static public Object[] seqToArray(ISeq seq){
return ret;
}
-static public Object seqToTypedArray(ISeq seq) throws Exception{
+static public Object seqToTypedArray(ISeq seq) {
Class type = (seq != null) ? seq.first().getClass() : Object.class;
return seqToTypedArray(type, seq);
}
-static public Object seqToTypedArray(Class type, ISeq seq) throws Exception{
+static public Object seqToTypedArray(Class type, ISeq seq) {
Object ret = Array.newInstance(type, length(seq));
if(type == Integer.TYPE){
for(int i = 0; seq != null; ++i, seq=seq.next()){
@@ -1445,7 +1453,7 @@ static public int length(ISeq list){
return i;
}
-static public int boundedLength(ISeq list, int limit) throws Exception{
+static public int boundedLength(ISeq list, int limit) {
int i = 0;
for(ISeq c = list; c != null && i <= limit; c = c.next()) {
i++;
@@ -1461,12 +1469,12 @@ static Character readRet(int ret){
return box((char) ret);
}
-static public Character readChar(Reader r) throws Exception{
+static public Character readChar(Reader r) throws IOException{
int ret = r.read();
return readRet(ret);
}
-static public Character peekChar(Reader r) throws Exception{
+static public Character peekChar(Reader r) throws IOException{
int ret;
if(r instanceof PushbackReader) {
ret = r.read();
@@ -1514,7 +1522,7 @@ static public String printString(Object x){
return sw.toString();
}
catch(Exception e) {
- throw new RuntimeException(e);
+ throw Util.runtimeException(e);
}
}
@@ -1524,11 +1532,11 @@ static public Object readString(String s){
return LispReader.read(r, true, null, false);
}
catch(Exception e) {
- throw new RuntimeException(e);
+ throw Util.runtimeException(e);
}
}
-static public void print(Object x, Writer w) throws Exception{
+static public void print(Object x, Writer w) throws IOException{
//call multimethod
if(PRINT_INITIALIZED.isBound() && RT.booleanCast(PRINT_INITIALIZED.deref()))
PR_ON.invoke(x, w);
@@ -1684,7 +1692,7 @@ static public void print(Object x, Writer w) throws Exception{
//*/
}
-private static void printInnerSeq(ISeq x, Writer w) throws Exception{
+private static void printInnerSeq(ISeq x, Writer w) throws IOException{
for(ISeq s = x; s != null; s = s.next()) {
print(s.first(), w);
if(s.next() != null)
@@ -1734,7 +1742,7 @@ static public void formatStandard(Writer w, Object obj) throws IOException{
w.write(obj.toString());
}
-static public Object format(Object o, String s, Object... args) throws Exception{
+static public Object format(Object o, String s, Object... args) throws IOException{
Writer w;
if(o == null)
w = new StringWriter();
@@ -1748,7 +1756,7 @@ static public Object format(Object o, String s, Object... args) throws Exception
return null;
}
-static public ISeq doFormat(Writer w, String s, ISeq args) throws Exception{
+static public ISeq doFormat(Writer w, String s, ISeq args) throws IOException{
for(int i = 0; i < s.length();) {
char c = s.charAt(i++);
switch(Character.toLowerCase(c)) {
@@ -1833,9 +1841,16 @@ static public ClassLoader baseLoader(){
return Compiler.class.getClassLoader();
}
-static public Class classForName(String name) throws ClassNotFoundException{
+static public Class classForName(String name) {
- return Class.forName(name, true, baseLoader());
+ try
+ {
+ return Class.forName(name, true, baseLoader());
+ }
+ catch(ClassNotFoundException e)
+ {
+ throw Util.runtimeException(e);
+ }
}
static public Class loadClassForName(String name) throws ClassNotFoundException{
diff --git a/src/jvm/clojure/lang/Range.java b/src/jvm/clojure/lang/Range.java
index 4dc1add2..6cb39e15 100644
--- a/src/jvm/clojure/lang/Range.java
+++ b/src/jvm/clojure/lang/Range.java
@@ -43,14 +43,14 @@ public ISeq next(){
return null;
}
-public Object reduce(IFn f) throws Exception{
+public Object reduce(IFn f) {
Object ret = n;
for(int x = n+1;x < end;x++)
ret = f.invoke(ret, x);
return ret;
}
-public Object reduce(IFn f, Object start) throws Exception{
+public Object reduce(IFn f, Object start) {
Object ret = f.invoke(start,n);
for(int x = n+1;x < end;x++)
ret = f.invoke(ret, x);
diff --git a/src/jvm/clojure/lang/Ref.java b/src/jvm/clojure/lang/Ref.java
index a4626acb..92067853 100644
--- a/src/jvm/clojure/lang/Ref.java
+++ b/src/jvm/clojure/lang/Ref.java
@@ -83,11 +83,11 @@ volatile int maxHistory = 10;
static final AtomicLong ids = new AtomicLong();
-public Ref(Object initVal) throws Exception{
+public Ref(Object initVal) {
this(initVal, null);
}
-public Ref(Object initVal,IPersistentMap meta) throws Exception{
+public Ref(Object initVal,IPersistentMap meta) {
super(meta);
this.id = ids.getAndIncrement();
this.faults = new AtomicInteger();
@@ -165,11 +165,11 @@ public Object set(Object val){
return LockingTransaction.getEx().doSet(this, val);
}
-public Object commute(IFn fn, ISeq args) throws Exception{
+public Object commute(IFn fn, ISeq args) {
return LockingTransaction.getEx().doCommute(this, fn, args);
}
-public Object alter(IFn fn, ISeq args) throws Exception{
+public Object alter(IFn fn, ISeq args) {
LockingTransaction t = LockingTransaction.getEx();
return t.doSet(this, fn.applyTo(RT.cons(t.doGet(this), args)));
}
@@ -236,7 +236,7 @@ final public IFn fn(){
return (IFn) deref();
}
-public Object call() throws Exception{
+public Object call() {
return invoke();
}
@@ -247,110 +247,110 @@ public void run(){
}
catch(Exception e)
{
- throw new RuntimeException(e);
+ throw Util.runtimeException(e);
}
}
-public Object invoke() throws Exception{
+public Object invoke() {
return fn().invoke();
}
-public Object invoke(Object arg1) throws Exception{
+public Object invoke(Object arg1) {
return fn().invoke(arg1);
}
-public Object invoke(Object arg1, Object arg2) throws Exception{
+public Object invoke(Object arg1, Object arg2) {
return fn().invoke(arg1, arg2);
}
-public Object invoke(Object arg1, Object arg2, Object arg3) throws Exception{
+public Object invoke(Object arg1, Object arg2, Object arg3) {
return fn().invoke(arg1, arg2, arg3);
}
-public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4) throws Exception{
+public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4) {
return fn().invoke(arg1, arg2, arg3, arg4);
}
-public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5) throws Exception{
+public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5) {
return fn().invoke(arg1, arg2, arg3, arg4, arg5);
}
-public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6) throws Exception{
+public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6) {
return fn().invoke(arg1, arg2, arg3, arg4, arg5, arg6);
}
public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7)
- throws Exception{
+ {
return fn().invoke(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) throws Exception{
+ Object arg8) {
return fn().invoke(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) throws Exception{
+ Object arg8, Object arg9) {
return fn().invoke(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) throws Exception{
+ Object arg8, Object arg9, Object arg10) {
return fn().invoke(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) throws Exception{
+ Object arg8, Object arg9, Object arg10, Object arg11) {
return fn().invoke(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) throws Exception{
+ Object arg8, Object arg9, Object arg10, Object arg11, Object arg12) {
return fn().invoke(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)
- throws Exception{
+ {
return fn().invoke(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)
- throws Exception{
+ {
return fn().invoke(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) throws Exception{
+ Object arg15) {
return fn().invoke(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) throws Exception{
+ Object arg15, Object arg16) {
return fn().invoke(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) throws Exception{
+ Object arg15, Object arg16, Object arg17) {
return fn().invoke(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) throws Exception{
+ Object arg15, Object arg16, Object arg17, Object arg18) {
return fn().invoke(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) throws Exception{
+ Object arg15, Object arg16, Object arg17, Object arg18, Object arg19) {
return fn().invoke(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15,
arg16, arg17, arg18, arg19);
}
@@ -358,7 +358,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
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)
- throws Exception{
+ {
return fn().invoke(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15,
arg16, arg17, arg18, arg19, arg20);
}
@@ -367,12 +367,12 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
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,
Object... args)
- throws Exception{
+ {
return fn().invoke(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15,
arg16, arg17, arg18, arg19, arg20, args);
}
-public Object applyTo(ISeq arglist) throws Exception{
+public Object applyTo(ISeq arglist) {
return AFn.applyToHelper(this, arglist);
}
diff --git a/src/jvm/clojure/lang/Reflector.java b/src/jvm/clojure/lang/Reflector.java
index bd5a4e80..d13bf61a 100644
--- a/src/jvm/clojure/lang/Reflector.java
+++ b/src/jvm/clojure/lang/Reflector.java
@@ -20,20 +20,20 @@ import java.util.Arrays;
public class Reflector{
-public static Object invokeInstanceMethod(Object target, String methodName, Object[] args) throws Exception{
+public static Object invokeInstanceMethod(Object target, String methodName, Object[] args) {
try
{
Class c = target.getClass();
List methods = getMethods(c, args.length, methodName, false);
return invokeMatchingMethod(methodName, methods, target, args);
}
- catch(InvocationTargetException e)
+ catch(Exception e)
{
if(e.getCause() instanceof Exception)
- throw (Exception) e.getCause();
+ throw Util.runtimeException(e.getCause());
else if(e.getCause() instanceof Error)
throw (Error) e.getCause();
- throw e;
+ throw Util.runtimeException(e);
}
}
@@ -42,7 +42,7 @@ private static String noMethodReport(String methodName, Object target){
+ (target==null?"":" for " + target.getClass());
}
static Object invokeMatchingMethod(String methodName, List methods, Object target, Object[] args)
- throws Exception{
+ {
Method m = null;
Object[] boxedArgs = null;
if(methods.isEmpty())
@@ -89,13 +89,13 @@ static Object invokeMatchingMethod(String methodName, List methods, Object targe
{
return prepRet(m.getReturnType(), m.invoke(target, boxedArgs));
}
- catch(InvocationTargetException e)
+ catch(Exception e)
{
if(e.getCause() instanceof Exception)
- throw (Exception) e.getCause();
+ throw Util.runtimeException(e.getCause());
else if(e.getCause() instanceof Error)
throw (Error) e.getCause();
- throw e;
+ throw Util.runtimeException(e);
}
}
@@ -127,7 +127,7 @@ public static Method getAsMethodOfPublicBase(Class c, Method m){
return getAsMethodOfPublicBase(sc, m);
}
-public static Object invokeConstructor(Class c, Object[] args) throws Exception{
+public static Object invokeConstructor(Class c, Object[] args) {
try
{
Constructor[] allctors = c.getConstructors();
@@ -164,101 +164,129 @@ public static Object invokeConstructor(Class c, Object[] args) throws Exception{
+ " for " + c);
}
}
- catch(InvocationTargetException e)
+ catch(Exception e)
{
if(e.getCause() instanceof Exception)
- throw (Exception) e.getCause();
+ throw Util.runtimeException(e.getCause());
else if(e.getCause() instanceof Error)
throw (Error) e.getCause();
- throw e;
+ throw Util.runtimeException(e);
}
}
-public static Object invokeStaticMethodVariadic(String className, String methodName, Object... args) throws Exception{
+public static Object invokeStaticMethodVariadic(String className, String methodName, Object... args) {
return invokeStaticMethod(className, methodName, args);
}
-public static Object invokeStaticMethod(String className, String methodName, Object[] args) throws Exception{
+public static Object invokeStaticMethod(String className, String methodName, Object[] args) {
Class c = RT.classForName(className);
try
{
return invokeStaticMethod(c, methodName, args);
}
- catch(InvocationTargetException e)
+ catch(Exception e)
{
if(e.getCause() instanceof Exception)
- throw (Exception) e.getCause();
+ throw Util.runtimeException(e.getCause());
else if(e.getCause() instanceof Error)
throw (Error) e.getCause();
- throw e;
+ throw Util.runtimeException(e);
}
}
-public static Object invokeStaticMethod(Class c, String methodName, Object[] args) throws Exception{
+public static Object invokeStaticMethod(Class c, String methodName, Object[] args) {
if(methodName.equals("new"))
return invokeConstructor(c, args);
List methods = getMethods(c, args.length, methodName, true);
return invokeMatchingMethod(methodName, methods, null, args);
}
-public static Object getStaticField(String className, String fieldName) throws Exception{
+public static Object getStaticField(String className, String fieldName) {
Class c = RT.classForName(className);
return getStaticField(c, fieldName);
}
-public static Object getStaticField(Class c, String fieldName) throws Exception{
+public static Object getStaticField(Class c, String fieldName) {
// if(fieldName.equals("class"))
// return c;
Field f = getField(c, fieldName, true);
if(f != null)
{
- return prepRet(f.getType(), f.get(null));
+ try
+ {
+ return prepRet(f.getType(), f.get(null));
+ }
+ catch(IllegalAccessException e)
+ {
+ throw Util.runtimeException(e);
+ }
}
throw new IllegalArgumentException("No matching field found: " + fieldName
+ " for " + c);
}
-public static Object setStaticField(String className, String fieldName, Object val) throws Exception{
+public static Object setStaticField(String className, String fieldName, Object val) {
Class c = RT.classForName(className);
return setStaticField(c, fieldName, val);
}
-public static Object setStaticField(Class c, String fieldName, Object val) throws Exception{
+public static Object setStaticField(Class c, String fieldName, Object val) {
Field f = getField(c, fieldName, true);
if(f != null)
{
- f.set(null, boxArg(f.getType(), val));
+ try
+ {
+ f.set(null, boxArg(f.getType(), val));
+ }
+ catch(IllegalAccessException e)
+ {
+ throw Util.runtimeException(e);
+ }
return val;
}
throw new IllegalArgumentException("No matching field found: " + fieldName
+ " for " + c);
}
-public static Object getInstanceField(Object target, String fieldName) throws Exception{
+public static Object getInstanceField(Object target, String fieldName) {
Class c = target.getClass();
Field f = getField(c, fieldName, false);
if(f != null)
{
- return prepRet(f.getType(), f.get(target));
+ try
+ {
+ return prepRet(f.getType(), f.get(target));
+ }
+ catch(IllegalAccessException e)
+ {
+ throw Util.runtimeException(e);
+ }
}
throw new IllegalArgumentException("No matching field found: " + fieldName
+ " for " + target.getClass());
}
-public static Object setInstanceField(Object target, String fieldName, Object val) throws Exception{
+public static Object setInstanceField(Object target, String fieldName, Object val) {
Class c = target.getClass();
Field f = getField(c, fieldName, false);
if(f != null)
{
- f.set(target, boxArg(f.getType(), val));
+ try
+ {
+ f.set(target, boxArg(f.getType(), val));
+ }
+ catch(IllegalAccessException e)
+ {
+ throw Util.runtimeException(e);
+ }
return val;
}
throw new IllegalArgumentException("No matching field found: " + fieldName
+ " for " + target.getClass());
}
-public static Object invokeNoArgInstanceMember(Object target, String name) throws Exception{
+public static Object invokeNoArgInstanceMember(Object target, String name) {
//favor method over field
List meths = getMethods(target.getClass(), 0, name, false);
if(meths.size() > 0)
@@ -267,30 +295,44 @@ public static Object invokeNoArgInstanceMember(Object target, String name) throw
return getInstanceField(target, name);
}
-public static Object invokeInstanceMember(Object target, String name) throws Exception{
+public static Object invokeInstanceMember(Object target, String name) {
//check for field first
Class c = target.getClass();
Field f = getField(c, name, false);
if(f != null) //field get
{
- return prepRet(f.getType(), f.get(target));
+ try
+ {
+ return prepRet(f.getType(), f.get(target));
+ }
+ catch(IllegalAccessException e)
+ {
+ throw Util.runtimeException(e);
+ }
}
return invokeInstanceMethod(target, name, RT.EMPTY_ARRAY);
}
-public static Object invokeInstanceMember(String name, Object target, Object arg1) throws Exception{
+public static Object invokeInstanceMember(String name, Object target, Object arg1) {
//check for field first
Class c = target.getClass();
Field f = getField(c, name, false);
if(f != null) //field set
{
- f.set(target, boxArg(f.getType(), arg1));
+ try
+ {
+ f.set(target, boxArg(f.getType(), arg1));
+ }
+ catch(IllegalAccessException e)
+ {
+ throw Util.runtimeException(e);
+ }
return arg1;
}
return invokeInstanceMethod(target, name, new Object[]{arg1});
}
-public static Object invokeInstanceMember(String name, Object target, Object... args) throws Exception{
+public static Object invokeInstanceMember(String name, Object target, Object... args) {
return invokeInstanceMethod(target, name, args);
}
diff --git a/src/jvm/clojure/lang/Repl.java b/src/jvm/clojure/lang/Repl.java
index 847cf76c..d9d18a7d 100644
--- a/src/jvm/clojure/lang/Repl.java
+++ b/src/jvm/clojure/lang/Repl.java
@@ -16,7 +16,7 @@ import clojure.main;
public class Repl {
-public static void main(String[] args) throws Exception{
+public static void main(String[] args) {
main.legacy_repl(args);
}
}
diff --git a/src/jvm/clojure/lang/RestFn.java b/src/jvm/clojure/lang/RestFn.java
index 89f4e01b..98646835 100644
--- a/src/jvm/clojure/lang/RestFn.java
+++ b/src/jvm/clojure/lang/RestFn.java
@@ -1,553 +1,553 @@
-/**
- * Copyright (c) Rich Hickey. All rights reserved.
- * The use and distribution terms for this software are covered by the
- * Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
- * which can be found in the file epl-v10.html 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.
- **/
-package clojure.lang;
-
-public abstract class RestFn extends AFunction{
-abstract public int getRequiredArity();
-
-protected Object doInvoke(Object args) throws Exception{
- return null;
-}
-
-protected Object doInvoke(Object arg1, Object args) throws Exception{
- return null;
-}
-
-protected Object doInvoke(Object arg1, Object arg2, Object args) throws Exception{
- return null;
-}
-
-protected Object doInvoke(Object arg1, Object arg2, Object arg3, Object args) throws Exception{
- return null;
-}
-
-protected Object doInvoke(Object arg1, Object arg2, Object arg3, Object arg4, Object args) throws Exception{
- return null;
-}
-
-protected Object doInvoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object args)
- throws Exception{
- return null;
-}
-
-protected Object doInvoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object args)
- throws Exception{
- return null;
-}
-
-protected Object doInvoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7,
- Object args) throws Exception{
- return null;
-}
-
-protected Object doInvoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7,
- Object arg8, Object args) throws Exception{
- return null;
-}
-
-protected Object doInvoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7,
- Object arg8, Object arg9, Object args) throws Exception{
- return null;
-}
-
-protected Object doInvoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7,
- Object arg8, Object arg9, Object arg10, Object args) throws Exception{
- return null;
-}
-
-protected Object doInvoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7,
- Object arg8, Object arg9, Object arg10, Object arg11, Object args) throws Exception{
- return null;
-}
-
-protected Object doInvoke(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 args)
- throws Exception{
- return null;
-}
-
-protected Object doInvoke(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 args)
- throws Exception{
- return null;
-}
-
-protected Object doInvoke(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 args) throws Exception{
- return null;
-}
-
-protected Object doInvoke(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 args) throws Exception{
- return null;
-}
-
-protected Object doInvoke(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 args) throws Exception{
- return null;
-}
-
-protected Object doInvoke(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 args) throws Exception{
- return null;
-}
-
-protected Object doInvoke(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 args)
- throws Exception{
- return null;
-}
-
-protected Object doInvoke(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 args)
- throws Exception{
- return null;
-}
-
-protected Object doInvoke(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, Object args) throws Exception{
- return null;
-}
-
-
-public Object applyTo(ISeq args) throws Exception{
- if(RT.boundedLength(args, getRequiredArity()) <= getRequiredArity())
- {
- return AFn.applyToHelper(this, Util.ret1(args,args = null));
- }
- switch(getRequiredArity())
- {
- case 0:
- return doInvoke(Util.ret1(args,args = null));
- case 1:
- return doInvoke(args.first()
- , Util.ret1(args.next(),args=null));
- case 2:
- return doInvoke(args.first()
- , (args = args.next()).first()
- , Util.ret1(args.next(),args=null));
- case 3:
- return doInvoke(args.first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , Util.ret1(args.next(),args=null));
- case 4:
- return doInvoke(args.first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , Util.ret1(args.next(),args=null));
- case 5:
- return doInvoke(args.first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , Util.ret1(args.next(),args=null));
- case 6:
- return doInvoke(args.first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , Util.ret1(args.next(),args=null));
- case 7:
- return doInvoke(args.first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , Util.ret1(args.next(),args=null));
- case 8:
- return doInvoke(args.first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , Util.ret1(args.next(),args=null));
- case 9:
- return doInvoke(args.first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , Util.ret1(args.next(),args=null));
- case 10:
- return doInvoke(args.first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , Util.ret1(args.next(),args=null));
- case 11:
- return doInvoke(args.first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , Util.ret1(args.next(),args=null));
- case 12:
- return doInvoke(args.first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , Util.ret1(args.next(),args=null));
- case 13:
- return doInvoke(args.first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , Util.ret1(args.next(),args=null));
- case 14:
- return doInvoke(args.first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , Util.ret1(args.next(),args=null));
- case 15:
- return doInvoke(args.first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , Util.ret1(args.next(),args=null));
- case 16:
- return doInvoke(args.first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , Util.ret1(args.next(),args=null));
- case 17:
- return doInvoke(args.first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , Util.ret1(args.next(),args=null));
- case 18:
- return doInvoke(args.first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , Util.ret1(args.next(),args=null));
- case 19:
- return doInvoke(args.first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , Util.ret1(args.next(),args=null));
- case 20:
- return doInvoke(args.first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , (args = args.next()).first()
- , Util.ret1(args.next(),args=null));
-
- }
- return throwArity(-1);
-}
-
-public Object invoke() throws Exception{
- switch(getRequiredArity())
- {
- case 0:
- return doInvoke(null);
- default:
- return throwArity(0);
- }
-
-}
-
-public Object invoke(Object arg1) throws Exception{
- switch(getRequiredArity())
- {
- case 0:
- return doInvoke(ArraySeq.create(Util.ret1(arg1, arg1 = null)));
- case 1:
- return doInvoke(Util.ret1(arg1, arg1 = null), null);
- default:
- return throwArity(1);
- }
-
-}
-
-public Object invoke(Object arg1, Object arg2) throws Exception{
- switch(getRequiredArity())
- {
- case 0:
- return doInvoke(ArraySeq.create(Util.ret1(arg1, arg1 = null), Util.ret1(arg2, arg2 = null)));
- case 1:
- return doInvoke(Util.ret1(arg1, arg1 = null), ArraySeq.create(Util.ret1(arg2, arg2 = null)));
- case 2:
- return doInvoke(Util.ret1(arg1, arg1 = null), Util.ret1(arg2, arg2 = null), null);
- default:
- return throwArity(2);
- }
-
-}
-
-public Object invoke(Object arg1, Object arg2, Object arg3) throws Exception{
- switch(getRequiredArity())
- {
- case 0:
- return doInvoke(ArraySeq.create(Util.ret1(arg1, arg1 = null), Util.ret1(arg2, arg2 = null),
- Util.ret1(arg3, arg3 = null)));
- case 1:
- return doInvoke(Util.ret1(arg1, arg1 = null),
- ArraySeq.create(Util.ret1(arg2, arg2 = null), Util.ret1(arg3, arg3 = null)));
- case 2:
- return doInvoke(Util.ret1(arg1, arg1 = null), Util.ret1(arg2, arg2 = null),
- ArraySeq.create(Util.ret1(arg3, arg3 = null)));
- case 3:
- return doInvoke(Util.ret1(arg1, arg1 = null), Util.ret1(arg2, arg2 = null), Util.ret1(arg3, arg3 = null),
- null);
- default:
- return throwArity(3);
- }
-
-}
-
-public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4) throws Exception{
- switch(getRequiredArity())
- {
- case 0:
- return doInvoke(ArraySeq.create(Util.ret1(arg1, arg1 = null), Util.ret1(arg2, arg2 = null),
- Util.ret1(arg3, arg3 = null), Util.ret1(arg4, arg4 = null)));
- case 1:
- return doInvoke(Util.ret1(arg1, arg1 = null),
- ArraySeq.create(Util.ret1(arg2, arg2 = null), Util.ret1(arg3, arg3 = null),
- Util.ret1(arg4, arg4 = null)));
- case 2:
- return doInvoke(Util.ret1(arg1, arg1 = null), Util.ret1(arg2, arg2 = null),
- ArraySeq.create(Util.ret1(arg3, arg3 = null), Util.ret1(arg4, arg4 = null)));
- case 3:
- return doInvoke(Util.ret1(arg1, arg1 = null), Util.ret1(arg2, arg2 = null), Util.ret1(arg3, arg3 = null),
- ArraySeq.create(Util.ret1(arg4, arg4 = null)));
- case 4:
- return doInvoke(Util.ret1(arg1, arg1 = null), Util.ret1(arg2, arg2 = null), Util.ret1(arg3, arg3 = null),
- Util.ret1(arg4, arg4 = null), null);
- default:
- return throwArity(4);
- }
-
-}
-
-public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5) throws Exception{
- switch(getRequiredArity())
- {
- case 0:
- return doInvoke(ArraySeq.create(Util.ret1(arg1, arg1 = null), Util.ret1(arg2, arg2 = null),
- Util.ret1(arg3, arg3 = null), Util.ret1(arg4, arg4 = null),
- Util.ret1(arg5, arg5 = null)));
- case 1:
- return doInvoke(Util.ret1(arg1, arg1 = null),
- ArraySeq.create(Util.ret1(arg2, arg2 = null), Util.ret1(arg3, arg3 = null),
- Util.ret1(arg4, arg4 = null), Util.ret1(arg5, arg5 = null)));
- case 2:
- return doInvoke(Util.ret1(arg1, arg1 = null), Util.ret1(arg2, arg2 = null),
- ArraySeq.create(Util.ret1(arg3, arg3 = null), Util.ret1(arg4, arg4 = null),
- Util.ret1(arg5, arg5 = null)));
- case 3:
- return doInvoke(Util.ret1(arg1, arg1 = null), Util.ret1(arg2, arg2 = null), Util.ret1(arg3, arg3 = null),
- ArraySeq.create(Util.ret1(arg4, arg4 = null), Util.ret1(arg5, arg5 = null)));
- case 4:
- return doInvoke(Util.ret1(arg1, arg1 = null), Util.ret1(arg2, arg2 = null), Util.ret1(arg3, arg3 = null),
- Util.ret1(arg4, arg4 = null), ArraySeq.create(Util.ret1(arg5, arg5 = null)));
- case 5:
- return doInvoke(Util.ret1(arg1, arg1 = null), Util.ret1(arg2, arg2 = null), Util.ret1(arg3, arg3 = null),
- Util.ret1(arg4, arg4 = null), Util.ret1(arg5, arg5 = null), null);
- default:
- return throwArity(5);
- }
-
-}
-
-public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6) throws Exception{
- switch(getRequiredArity())
- {
- case 0:
- return doInvoke(ArraySeq.create(Util.ret1(arg1, arg1 = null), Util.ret1(arg2, arg2 = null),
- Util.ret1(arg3, arg3 = null), Util.ret1(arg4, arg4 = null),
- Util.ret1(arg5, arg5 = null), Util.ret1(arg6, arg6 = null)));
- case 1:
- return doInvoke(Util.ret1(arg1, arg1 = null),
- ArraySeq.create(Util.ret1(arg2, arg2 = null), Util.ret1(arg3, arg3 = null),
- Util.ret1(arg4, arg4 = null), Util.ret1(arg5, arg5 = null),
- Util.ret1(arg6, arg6 = null)));
- case 2:
- return doInvoke(Util.ret1(arg1, arg1 = null), Util.ret1(arg2, arg2 = null),
- ArraySeq.create(Util.ret1(arg3, arg3 = null), Util.ret1(arg4, arg4 = null),
- Util.ret1(arg5, arg5 = null), Util.ret1(arg6, arg6 = null)));
- case 3:
- return doInvoke(Util.ret1(arg1, arg1 = null), Util.ret1(arg2, arg2 = null), Util.ret1(arg3, arg3 = null),
- ArraySeq.create(Util.ret1(arg4, arg4 = null), Util.ret1(arg5, arg5 = null),
- Util.ret1(arg6, arg6 = null)));
- case 4:
- return doInvoke(Util.ret1(arg1, arg1 = null), Util.ret1(arg2, arg2 = null), Util.ret1(arg3, arg3 = null),
- Util.ret1(arg4, arg4 = null),
- ArraySeq.create(Util.ret1(arg5, arg5 = null), Util.ret1(arg6, arg6 = null)));
- case 5:
- return doInvoke(Util.ret1(arg1, arg1 = null), Util.ret1(arg2, arg2 = null), Util.ret1(arg3, arg3 = null),
- Util.ret1(arg4, arg4 = null), Util.ret1(arg5, arg5 = null),
- ArraySeq.create(Util.ret1(arg6, arg6 = null)));
- case 6:
- return doInvoke(Util.ret1(arg1, arg1 = null), Util.ret1(arg2, arg2 = null), Util.ret1(arg3, arg3 = null),
- Util.ret1(arg4, arg4 = null), Util.ret1(arg5, arg5 = null), Util.ret1(arg6, arg6 = null),
- null);
- default:
- return throwArity(6);
- }
-
-}
-
-public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7)
- throws Exception{
- switch(getRequiredArity())
- {
- case 0:
+/**
+ * Copyright (c) Rich Hickey. All rights reserved.
+ * The use and distribution terms for this software are covered by the
+ * Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
+ * which can be found in the file epl-v10.html 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.
+ **/
+package clojure.lang;
+
+public abstract class RestFn extends AFunction{
+abstract public int getRequiredArity();
+
+protected Object doInvoke(Object args) {
+ return null;
+}
+
+protected Object doInvoke(Object arg1, Object args) {
+ return null;
+}
+
+protected Object doInvoke(Object arg1, Object arg2, Object args) {
+ return null;
+}
+
+protected Object doInvoke(Object arg1, Object arg2, Object arg3, Object args) {
+ return null;
+}
+
+protected Object doInvoke(Object arg1, Object arg2, Object arg3, Object arg4, Object args) {
+ return null;
+}
+
+protected Object doInvoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object args)
+ {
+ return null;
+}
+
+protected Object doInvoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object args)
+ {
+ return null;
+}
+
+protected Object doInvoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7,
+ Object args) {
+ return null;
+}
+
+protected Object doInvoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7,
+ Object arg8, Object args) {
+ return null;
+}
+
+protected Object doInvoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7,
+ Object arg8, Object arg9, Object args) {
+ return null;
+}
+
+protected Object doInvoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7,
+ Object arg8, Object arg9, Object arg10, Object args) {
+ return null;
+}
+
+protected Object doInvoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7,
+ Object arg8, Object arg9, Object arg10, Object arg11, Object args) {
+ return null;
+}
+
+protected Object doInvoke(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 args)
+ {
+ return null;
+}
+
+protected Object doInvoke(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 args)
+ {
+ return null;
+}
+
+protected Object doInvoke(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 args) {
+ return null;
+}
+
+protected Object doInvoke(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 args) {
+ return null;
+}
+
+protected Object doInvoke(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 args) {
+ return null;
+}
+
+protected Object doInvoke(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 args) {
+ return null;
+}
+
+protected Object doInvoke(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 args)
+ {
+ return null;
+}
+
+protected Object doInvoke(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 args)
+ {
+ return null;
+}
+
+protected Object doInvoke(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, Object args) {
+ return null;
+}
+
+
+public Object applyTo(ISeq args) {
+ if(RT.boundedLength(args, getRequiredArity()) <= getRequiredArity())
+ {
+ return AFn.applyToHelper(this, Util.ret1(args,args = null));
+ }
+ switch(getRequiredArity())
+ {
+ case 0:
+ return doInvoke(Util.ret1(args,args = null));
+ case 1:
+ return doInvoke(args.first()
+ , Util.ret1(args.next(),args=null));
+ case 2:
+ return doInvoke(args.first()
+ , (args = args.next()).first()
+ , Util.ret1(args.next(),args=null));
+ case 3:
+ return doInvoke(args.first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , Util.ret1(args.next(),args=null));
+ case 4:
+ return doInvoke(args.first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , Util.ret1(args.next(),args=null));
+ case 5:
+ return doInvoke(args.first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , Util.ret1(args.next(),args=null));
+ case 6:
+ return doInvoke(args.first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , Util.ret1(args.next(),args=null));
+ case 7:
+ return doInvoke(args.first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , Util.ret1(args.next(),args=null));
+ case 8:
+ return doInvoke(args.first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , Util.ret1(args.next(),args=null));
+ case 9:
+ return doInvoke(args.first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , Util.ret1(args.next(),args=null));
+ case 10:
+ return doInvoke(args.first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , Util.ret1(args.next(),args=null));
+ case 11:
+ return doInvoke(args.first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , Util.ret1(args.next(),args=null));
+ case 12:
+ return doInvoke(args.first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , Util.ret1(args.next(),args=null));
+ case 13:
+ return doInvoke(args.first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , Util.ret1(args.next(),args=null));
+ case 14:
+ return doInvoke(args.first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , Util.ret1(args.next(),args=null));
+ case 15:
+ return doInvoke(args.first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , Util.ret1(args.next(),args=null));
+ case 16:
+ return doInvoke(args.first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , Util.ret1(args.next(),args=null));
+ case 17:
+ return doInvoke(args.first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , Util.ret1(args.next(),args=null));
+ case 18:
+ return doInvoke(args.first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , Util.ret1(args.next(),args=null));
+ case 19:
+ return doInvoke(args.first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , Util.ret1(args.next(),args=null));
+ case 20:
+ return doInvoke(args.first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , (args = args.next()).first()
+ , Util.ret1(args.next(),args=null));
+
+ }
+ return throwArity(-1);
+}
+
+public Object invoke() {
+ switch(getRequiredArity())
+ {
+ case 0:
+ return doInvoke(null);
+ default:
+ return throwArity(0);
+ }
+
+}
+
+public Object invoke(Object arg1) {
+ switch(getRequiredArity())
+ {
+ case 0:
+ return doInvoke(ArraySeq.create(Util.ret1(arg1, arg1 = null)));
+ case 1:
+ return doInvoke(Util.ret1(arg1, arg1 = null), null);
+ default:
+ return throwArity(1);
+ }
+
+}
+
+public Object invoke(Object arg1, Object arg2) {
+ switch(getRequiredArity())
+ {
+ case 0:
+ return doInvoke(ArraySeq.create(Util.ret1(arg1, arg1 = null), Util.ret1(arg2, arg2 = null)));
+ case 1:
+ return doInvoke(Util.ret1(arg1, arg1 = null), ArraySeq.create(Util.ret1(arg2, arg2 = null)));
+ case 2:
+ return doInvoke(Util.ret1(arg1, arg1 = null), Util.ret1(arg2, arg2 = null), null);
+ default:
+ return throwArity(2);
+ }
+
+}
+
+public Object invoke(Object arg1, Object arg2, Object arg3) {
+ switch(getRequiredArity())
+ {
+ case 0:
+ return doInvoke(ArraySeq.create(Util.ret1(arg1, arg1 = null), Util.ret1(arg2, arg2 = null),
+ Util.ret1(arg3, arg3 = null)));
+ case 1:
+ return doInvoke(Util.ret1(arg1, arg1 = null),
+ ArraySeq.create(Util.ret1(arg2, arg2 = null), Util.ret1(arg3, arg3 = null)));
+ case 2:
+ return doInvoke(Util.ret1(arg1, arg1 = null), Util.ret1(arg2, arg2 = null),
+ ArraySeq.create(Util.ret1(arg3, arg3 = null)));
+ case 3:
+ return doInvoke(Util.ret1(arg1, arg1 = null), Util.ret1(arg2, arg2 = null), Util.ret1(arg3, arg3 = null),
+ null);
+ default:
+ return throwArity(3);
+ }
+
+}
+
+public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4) {
+ switch(getRequiredArity())
+ {
+ case 0:
+ return doInvoke(ArraySeq.create(Util.ret1(arg1, arg1 = null), Util.ret1(arg2, arg2 = null),
+ Util.ret1(arg3, arg3 = null), Util.ret1(arg4, arg4 = null)));
+ case 1:
+ return doInvoke(Util.ret1(arg1, arg1 = null),
+ ArraySeq.create(Util.ret1(arg2, arg2 = null), Util.ret1(arg3, arg3 = null),
+ Util.ret1(arg4, arg4 = null)));
+ case 2:
+ return doInvoke(Util.ret1(arg1, arg1 = null), Util.ret1(arg2, arg2 = null),
+ ArraySeq.create(Util.ret1(arg3, arg3 = null), Util.ret1(arg4, arg4 = null)));
+ case 3:
+ return doInvoke(Util.ret1(arg1, arg1 = null), Util.ret1(arg2, arg2 = null), Util.ret1(arg3, arg3 = null),
+ ArraySeq.create(Util.ret1(arg4, arg4 = null)));
+ case 4:
+ return doInvoke(Util.ret1(arg1, arg1 = null), Util.ret1(arg2, arg2 = null), Util.ret1(arg3, arg3 = null),
+ Util.ret1(arg4, arg4 = null), null);
+ default:
+ return throwArity(4);
+ }
+
+}
+
+public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5) {
+ switch(getRequiredArity())
+ {
+ case 0:
+ return doInvoke(ArraySeq.create(Util.ret1(arg1, arg1 = null), Util.ret1(arg2, arg2 = null),
+ Util.ret1(arg3, arg3 = null), Util.ret1(arg4, arg4 = null),
+ Util.ret1(arg5, arg5 = null)));
+ case 1:
+ return doInvoke(Util.ret1(arg1, arg1 = null),
+ ArraySeq.create(Util.ret1(arg2, arg2 = null), Util.ret1(arg3, arg3 = null),
+ Util.ret1(arg4, arg4 = null), Util.ret1(arg5, arg5 = null)));
+ case 2:
+ return doInvoke(Util.ret1(arg1, arg1 = null), Util.ret1(arg2, arg2 = null),
+ ArraySeq.create(Util.ret1(arg3, arg3 = null), Util.ret1(arg4, arg4 = null),
+ Util.ret1(arg5, arg5 = null)));
+ case 3:
+ return doInvoke(Util.ret1(arg1, arg1 = null), Util.ret1(arg2, arg2 = null), Util.ret1(arg3, arg3 = null),
+ ArraySeq.create(Util.ret1(arg4, arg4 = null), Util.ret1(arg5, arg5 = null)));
+ case 4:
+ return doInvoke(Util.ret1(arg1, arg1 = null), Util.ret1(arg2, arg2 = null), Util.ret1(arg3, arg3 = null),
+ Util.ret1(arg4, arg4 = null), ArraySeq.create(Util.ret1(arg5, arg5 = null)));
+ case 5:
+ return doInvoke(Util.ret1(arg1, arg1 = null), Util.ret1(arg2, arg2 = null), Util.ret1(arg3, arg3 = null),
+ Util.ret1(arg4, arg4 = null), Util.ret1(arg5, arg5 = null), null);
+ default:
+ return throwArity(5);
+ }
+
+}
+
+public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6) {
+ switch(getRequiredArity())
+ {
+ case 0:
+ return doInvoke(ArraySeq.create(Util.ret1(arg1, arg1 = null), Util.ret1(arg2, arg2 = null),
+ Util.ret1(arg3, arg3 = null), Util.ret1(arg4, arg4 = null),
+ Util.ret1(arg5, arg5 = null), Util.ret1(arg6, arg6 = null)));
+ case 1:
+ return doInvoke(Util.ret1(arg1, arg1 = null),
+ ArraySeq.create(Util.ret1(arg2, arg2 = null), Util.ret1(arg3, arg3 = null),
+ Util.ret1(arg4, arg4 = null), Util.ret1(arg5, arg5 = null),
+ Util.ret1(arg6, arg6 = null)));
+ case 2:
+ return doInvoke(Util.ret1(arg1, arg1 = null), Util.ret1(arg2, arg2 = null),
+ ArraySeq.create(Util.ret1(arg3, arg3 = null), Util.ret1(arg4, arg4 = null),
+ Util.ret1(arg5, arg5 = null), Util.ret1(arg6, arg6 = null)));
+ case 3:
+ return doInvoke(Util.ret1(arg1, arg1 = null), Util.ret1(arg2, arg2 = null), Util.ret1(arg3, arg3 = null),
+ ArraySeq.create(Util.ret1(arg4, arg4 = null), Util.ret1(arg5, arg5 = null),
+ Util.ret1(arg6, arg6 = null)));
+ case 4:
+ return doInvoke(Util.ret1(arg1, arg1 = null), Util.ret1(arg2, arg2 = null), Util.ret1(arg3, arg3 = null),
+ Util.ret1(arg4, arg4 = null),
+ ArraySeq.create(Util.ret1(arg5, arg5 = null), Util.ret1(arg6, arg6 = null)));
+ case 5:
+ return doInvoke(Util.ret1(arg1, arg1 = null), Util.ret1(arg2, arg2 = null), Util.ret1(arg3, arg3 = null),
+ Util.ret1(arg4, arg4 = null), Util.ret1(arg5, arg5 = null),
+ ArraySeq.create(Util.ret1(arg6, arg6 = null)));
+ case 6:
+ return doInvoke(Util.ret1(arg1, arg1 = null), Util.ret1(arg2, arg2 = null), Util.ret1(arg3, arg3 = null),
+ Util.ret1(arg4, arg4 = null), Util.ret1(arg5, arg5 = null), Util.ret1(arg6, arg6 = null),
+ null);
+ default:
+ return throwArity(6);
+ }
+
+}
+
+public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7)
+ {
+ switch(getRequiredArity())
+ {
+ case 0:
return doInvoke(ArraySeq.create(Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
Util.ret1(arg3,arg3=null),
@@ -555,49 +555,49 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg5,arg5=null),
Util.ret1(arg6,arg6=null),
Util.ret1(arg7,arg7=null)));
- case 1:
+ case 1:
return doInvoke(Util.ret1(arg1,arg1=null), ArraySeq.create(Util.ret1(arg2,arg2=null),
Util.ret1(arg3,arg3=null),
Util.ret1(arg4,arg4=null),
Util.ret1(arg5,arg5=null),
Util.ret1(arg6,arg6=null),
Util.ret1(arg7,arg7=null)));
- case 2:
+ case 2:
return doInvoke(Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null), ArraySeq.create(Util.ret1(arg3,arg3=null),
Util.ret1(arg4,arg4=null),
Util.ret1(arg5,arg5=null),
Util.ret1(arg6,arg6=null),
Util.ret1(arg7,arg7=null)));
- case 3:
+ case 3:
return doInvoke(Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
Util.ret1(arg3,arg3=null), ArraySeq.create(Util.ret1(arg4,arg4=null),
Util.ret1(arg5,arg5=null),
Util.ret1(arg6,arg6=null),
Util.ret1(arg7,arg7=null)));
- case 4:
+ case 4:
return doInvoke(Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
Util.ret1(arg3,arg3=null),
Util.ret1(arg4,arg4=null), ArraySeq.create(Util.ret1(arg5,arg5=null),
Util.ret1(arg6,arg6=null),
Util.ret1(arg7,arg7=null)));
- case 5:
+ case 5:
return doInvoke(Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
Util.ret1(arg3,arg3=null),
Util.ret1(arg4,arg4=null),
Util.ret1(arg5,arg5=null), ArraySeq.create(Util.ret1(arg6,arg6=null),
Util.ret1(arg7,arg7=null)));
- case 6:
+ case 6:
return doInvoke(Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
Util.ret1(arg3,arg3=null),
Util.ret1(arg4,arg4=null),
Util.ret1(arg5,arg5=null),
Util.ret1(arg6,arg6=null), ArraySeq.create(Util.ret1(arg7,arg7=null)));
- case 7:
+ case 7:
return doInvoke(Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
Util.ret1(arg3,arg3=null),
@@ -605,17 +605,17 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg5,arg5=null),
Util.ret1(arg6,arg6=null),
Util.ret1(arg7,arg7=null), null);
- default:
- return throwArity(7);
- }
-
-}
-
-public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7,
- Object arg8) throws Exception{
- switch(getRequiredArity())
- {
- case 0:
+ default:
+ return throwArity(7);
+ }
+
+}
+
+public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7,
+ Object arg8) {
+ switch(getRequiredArity())
+ {
+ case 0:
return doInvoke(ArraySeq.create(Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
Util.ret1(arg3,arg3=null),
@@ -624,7 +624,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg6,arg6=null),
Util.ret1(arg7,arg7=null),
Util.ret1(arg8,arg8=null)));
- case 1:
+ case 1:
return doInvoke(Util.ret1(arg1,arg1=null), ArraySeq.create(Util.ret1(arg2,arg2=null),
Util.ret1(arg3,arg3=null),
Util.ret1(arg4,arg4=null),
@@ -632,7 +632,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg6,arg6=null),
Util.ret1(arg7,arg7=null),
Util.ret1(arg8,arg8=null)));
- case 2:
+ case 2:
return doInvoke(Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null), ArraySeq.create(Util.ret1(arg3,arg3=null),
Util.ret1(arg4,arg4=null),
@@ -640,7 +640,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg6,arg6=null),
Util.ret1(arg7,arg7=null),
Util.ret1(arg8,arg8=null)));
- case 3:
+ case 3:
return doInvoke(Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
Util.ret1(arg3,arg3=null), ArraySeq.create(Util.ret1(arg4,arg4=null),
@@ -648,7 +648,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg6,arg6=null),
Util.ret1(arg7,arg7=null),
Util.ret1(arg8,arg8=null)));
- case 4:
+ case 4:
return doInvoke(Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
Util.ret1(arg3,arg3=null),
@@ -656,7 +656,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg6,arg6=null),
Util.ret1(arg7,arg7=null),
Util.ret1(arg8,arg8=null)));
- case 5:
+ case 5:
return doInvoke(Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
Util.ret1(arg3,arg3=null),
@@ -664,7 +664,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg5,arg5=null), ArraySeq.create(Util.ret1(arg6,arg6=null),
Util.ret1(arg7,arg7=null),
Util.ret1(arg8,arg8=null)));
- case 6:
+ case 6:
return doInvoke(Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
Util.ret1(arg3,arg3=null),
@@ -672,7 +672,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg5,arg5=null),
Util.ret1(arg6,arg6=null), ArraySeq.create(Util.ret1(arg7,arg7=null),
Util.ret1(arg8,arg8=null)));
- case 7:
+ case 7:
return doInvoke(Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
Util.ret1(arg3,arg3=null),
@@ -680,7 +680,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg5,arg5=null),
Util.ret1(arg6,arg6=null),
Util.ret1(arg7,arg7=null), ArraySeq.create(Util.ret1(arg8,arg8=null)));
- case 8:
+ case 8:
return doInvoke(Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
Util.ret1(arg3,arg3=null),
@@ -689,17 +689,17 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg6,arg6=null),
Util.ret1(arg7,arg7=null),
Util.ret1(arg8,arg8=null), null);
- default:
- return throwArity(8);
- }
-
-}
-
-public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7,
- Object arg8, Object arg9) throws Exception{
- switch(getRequiredArity())
- {
- case 0:
+ default:
+ return throwArity(8);
+ }
+
+}
+
+public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7,
+ Object arg8, Object arg9) {
+ switch(getRequiredArity())
+ {
+ case 0:
return doInvoke(ArraySeq.create(Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
Util.ret1(arg3,arg3=null),
@@ -709,7 +709,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg7,arg7=null),
Util.ret1(arg8,arg8=null),
Util.ret1(arg9,arg9=null)));
- case 1:
+ case 1:
return doInvoke(Util.ret1(arg1,arg1=null), ArraySeq.create(Util.ret1(arg2,arg2=null),
Util.ret1(arg3,arg3=null),
Util.ret1(arg4,arg4=null),
@@ -718,7 +718,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg7,arg7=null),
Util.ret1(arg8,arg8=null),
Util.ret1(arg9,arg9=null)));
- case 2:
+ case 2:
return doInvoke(Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null), ArraySeq.create(Util.ret1(arg3,arg3=null),
Util.ret1(arg4,arg4=null),
@@ -727,7 +727,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg7,arg7=null),
Util.ret1(arg8,arg8=null),
Util.ret1(arg9,arg9=null)));
- case 3:
+ case 3:
return doInvoke(Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
Util.ret1(arg3,arg3=null), ArraySeq.create(Util.ret1(arg4,arg4=null),
@@ -736,7 +736,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg7,arg7=null),
Util.ret1(arg8,arg8=null),
Util.ret1(arg9,arg9=null)));
- case 4:
+ case 4:
return doInvoke(Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
Util.ret1(arg3,arg3=null),
@@ -745,7 +745,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg7,arg7=null),
Util.ret1(arg8,arg8=null),
Util.ret1(arg9,arg9=null)));
- case 5:
+ case 5:
return doInvoke(Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
Util.ret1(arg3,arg3=null),
@@ -754,7 +754,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg7,arg7=null),
Util.ret1(arg8,arg8=null),
Util.ret1(arg9,arg9=null)));
- case 6:
+ case 6:
return doInvoke(Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
Util.ret1(arg3,arg3=null),
@@ -763,7 +763,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg6,arg6=null), ArraySeq.create(Util.ret1(arg7,arg7=null),
Util.ret1(arg8,arg8=null),
Util.ret1(arg9,arg9=null)));
- case 7:
+ case 7:
return doInvoke(Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
Util.ret1(arg3,arg3=null),
@@ -772,7 +772,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg6,arg6=null),
Util.ret1(arg7,arg7=null), ArraySeq.create(Util.ret1(arg8,arg8=null),
Util.ret1(arg9,arg9=null)));
- case 8:
+ case 8:
return doInvoke(Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
Util.ret1(arg3,arg3=null),
@@ -781,7 +781,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg6,arg6=null),
Util.ret1(arg7,arg7=null),
Util.ret1(arg8,arg8=null), ArraySeq.create(Util.ret1(arg9,arg9=null)));
- case 9:
+ case 9:
return doInvoke(Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
Util.ret1(arg3,arg3=null),
@@ -791,17 +791,17 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg7,arg7=null),
Util.ret1(arg8,arg8=null),
Util.ret1(arg9,arg9=null), null);
- default:
- return throwArity(9);
- }
-
-}
-
-public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7,
- Object arg8, Object arg9, Object arg10) throws Exception{
- switch(getRequiredArity())
- {
- case 0:
+ default:
+ return throwArity(9);
+ }
+
+}
+
+public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7,
+ Object arg8, Object arg9, Object arg10) {
+ switch(getRequiredArity())
+ {
+ case 0:
return doInvoke(ArraySeq.create(Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
Util.ret1(arg3,arg3=null),
@@ -812,7 +812,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg8,arg8=null),
Util.ret1(arg9,arg9=null),
Util.ret1(arg10,arg10=null)));
- case 1:
+ case 1:
return doInvoke(Util.ret1(arg1,arg1=null), ArraySeq.create(Util.ret1(arg2,arg2=null),
Util.ret1(arg3,arg3=null),
Util.ret1(arg4,arg4=null),
@@ -822,7 +822,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg8,arg8=null),
Util.ret1(arg9,arg9=null),
Util.ret1(arg10,arg10=null)));
- case 2:
+ case 2:
return doInvoke(Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null), ArraySeq.create(Util.ret1(arg3,arg3=null),
Util.ret1(arg4,arg4=null),
@@ -832,7 +832,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg8,arg8=null),
Util.ret1(arg9,arg9=null),
Util.ret1(arg10,arg10=null)));
- case 3:
+ case 3:
return doInvoke(Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
Util.ret1(arg3,arg3=null), ArraySeq.create(Util.ret1(arg4,arg4=null),
@@ -842,7 +842,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg8,arg8=null),
Util.ret1(arg9,arg9=null),
Util.ret1(arg10,arg10=null)));
- case 4:
+ case 4:
return doInvoke(Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
Util.ret1(arg3,arg3=null),
@@ -852,7 +852,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg8,arg8=null),
Util.ret1(arg9,arg9=null),
Util.ret1(arg10,arg10=null)));
- case 5:
+ case 5:
return doInvoke(Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
Util.ret1(arg3,arg3=null),
@@ -862,7 +862,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg8,arg8=null),
Util.ret1(arg9,arg9=null),
Util.ret1(arg10,arg10=null)));
- case 6:
+ case 6:
return doInvoke(Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
Util.ret1(arg3,arg3=null),
@@ -872,7 +872,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg8,arg8=null),
Util.ret1(arg9,arg9=null),
Util.ret1(arg10,arg10=null)));
- case 7:
+ case 7:
return doInvoke(Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
Util.ret1(arg3,arg3=null),
@@ -882,7 +882,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg7,arg7=null), ArraySeq.create(Util.ret1(arg8,arg8=null),
Util.ret1(arg9,arg9=null),
Util.ret1(arg10,arg10=null)));
- case 8:
+ case 8:
return doInvoke(Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
Util.ret1(arg3,arg3=null),
@@ -892,7 +892,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg7,arg7=null),
Util.ret1(arg8,arg8=null), ArraySeq.create(Util.ret1(arg9,arg9=null),
Util.ret1(arg10,arg10=null)));
- case 9:
+ case 9:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -904,7 +904,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg8,arg8=null),
Util.ret1(arg9,arg9=null), ArraySeq.create(
Util.ret1(arg10,arg10=null)));
- case 10:
+ case 10:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -916,17 +916,17 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg8,arg8=null),
Util.ret1(arg9,arg9=null),
Util.ret1(arg10,arg10=null), null);
- default:
- return throwArity(10);
- }
-
-}
-
-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) throws Exception{
- switch(getRequiredArity())
- {
- case 0:
+ default:
+ return throwArity(10);
+ }
+
+}
+
+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) {
+ switch(getRequiredArity())
+ {
+ case 0:
return doInvoke(ArraySeq.create(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -939,7 +939,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg9,arg9=null),
Util.ret1(arg10,arg10=null),
Util.ret1(arg11,arg11=null)));
- case 1:
+ case 1:
return doInvoke(
Util.ret1(arg1,arg1=null), ArraySeq.create(
Util.ret1(arg2,arg2=null),
@@ -952,7 +952,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg9,arg9=null),
Util.ret1(arg10,arg10=null),
Util.ret1(arg11,arg11=null)));
- case 2:
+ case 2:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null), ArraySeq.create(
@@ -965,7 +965,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg9,arg9=null),
Util.ret1(arg10,arg10=null),
Util.ret1(arg11,arg11=null)));
- case 3:
+ case 3:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -978,7 +978,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg9,arg9=null),
Util.ret1(arg10,arg10=null),
Util.ret1(arg11,arg11=null)));
- case 4:
+ case 4:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -991,7 +991,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg9,arg9=null),
Util.ret1(arg10,arg10=null),
Util.ret1(arg11,arg11=null)));
- case 5:
+ case 5:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -1004,7 +1004,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg9,arg9=null),
Util.ret1(arg10,arg10=null),
Util.ret1(arg11,arg11=null)));
- case 6:
+ case 6:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -1017,7 +1017,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg9,arg9=null),
Util.ret1(arg10,arg10=null),
Util.ret1(arg11,arg11=null)));
- case 7:
+ case 7:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -1030,7 +1030,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg9,arg9=null),
Util.ret1(arg10,arg10=null),
Util.ret1(arg11,arg11=null)));
- case 8:
+ case 8:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -1043,7 +1043,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg9,arg9=null),
Util.ret1(arg10,arg10=null),
Util.ret1(arg11,arg11=null)));
- case 9:
+ case 9:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -1056,7 +1056,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg9,arg9=null), ArraySeq.create(
Util.ret1(arg10,arg10=null),
Util.ret1(arg11,arg11=null)));
- case 10:
+ case 10:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -1069,7 +1069,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg9,arg9=null),
Util.ret1(arg10,arg10=null), ArraySeq.create(
Util.ret1(arg11,arg11=null)));
- case 11:
+ case 11:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -1082,17 +1082,17 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg9,arg9=null),
Util.ret1(arg10,arg10=null),
Util.ret1(arg11,arg11=null), null);
- default:
- return throwArity(11);
- }
-
-}
-
-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) throws Exception{
- switch(getRequiredArity())
- {
- case 0:
+ default:
+ return throwArity(11);
+ }
+
+}
+
+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) {
+ switch(getRequiredArity())
+ {
+ case 0:
return doInvoke(ArraySeq.create(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -1106,7 +1106,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg10,arg10=null),
Util.ret1(arg11,arg11=null),
Util.ret1(arg12,arg12=null)));
- case 1:
+ case 1:
return doInvoke(
Util.ret1(arg1,arg1=null), ArraySeq.create(
Util.ret1(arg2,arg2=null),
@@ -1120,7 +1120,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg10,arg10=null),
Util.ret1(arg11,arg11=null),
Util.ret1(arg12,arg12=null)));
- case 2:
+ case 2:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null), ArraySeq.create(
@@ -1134,7 +1134,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg10,arg10=null),
Util.ret1(arg11,arg11=null),
Util.ret1(arg12,arg12=null)));
- case 3:
+ case 3:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -1148,7 +1148,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg10,arg10=null),
Util.ret1(arg11,arg11=null),
Util.ret1(arg12,arg12=null)));
- case 4:
+ case 4:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -1162,7 +1162,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg10,arg10=null),
Util.ret1(arg11,arg11=null),
Util.ret1(arg12,arg12=null)));
- case 5:
+ case 5:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -1176,7 +1176,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg10,arg10=null),
Util.ret1(arg11,arg11=null),
Util.ret1(arg12,arg12=null)));
- case 6:
+ case 6:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -1190,7 +1190,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg10,arg10=null),
Util.ret1(arg11,arg11=null),
Util.ret1(arg12,arg12=null)));
- case 7:
+ case 7:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -1204,7 +1204,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg10,arg10=null),
Util.ret1(arg11,arg11=null),
Util.ret1(arg12,arg12=null)));
- case 8:
+ case 8:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -1218,7 +1218,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg10,arg10=null),
Util.ret1(arg11,arg11=null),
Util.ret1(arg12,arg12=null)));
- case 9:
+ case 9:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -1232,7 +1232,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg10,arg10=null),
Util.ret1(arg11,arg11=null),
Util.ret1(arg12,arg12=null)));
- case 10:
+ case 10:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -1246,7 +1246,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg10,arg10=null), ArraySeq.create(
Util.ret1(arg11,arg11=null),
Util.ret1(arg12,arg12=null)));
- case 11:
+ case 11:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -1260,7 +1260,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg10,arg10=null),
Util.ret1(arg11,arg11=null), ArraySeq.create(
Util.ret1(arg12,arg12=null)));
- case 12:
+ case 12:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -1274,19 +1274,19 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg10,arg10=null),
Util.ret1(arg11,arg11=null),
Util.ret1(arg12,arg12=null), null);
- default:
- return throwArity(12);
- }
-
-}
-
-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)
- throws Exception{
- switch(getRequiredArity())
- {
- case 0:
- return doInvoke(
+ default:
+ return throwArity(12);
+ }
+
+}
+
+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)
+ {
+ switch(getRequiredArity())
+ {
+ case 0:
+ return doInvoke(
ArraySeq.create(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -1301,7 +1301,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg11,arg11=null),
Util.ret1(arg12,arg12=null),
Util.ret1(arg13,arg13=null)));
- case 1:
+ case 1:
return doInvoke(
Util.ret1(arg1,arg1=null), ArraySeq.create(
Util.ret1(arg2,arg2=null),
@@ -1317,7 +1317,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg12,arg12=null),
Util.ret1(arg13,arg13=null)));
- case 2:
+ case 2:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -1333,7 +1333,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg11,arg11=null),
Util.ret1(arg12,arg12=null),
Util.ret1(arg13,arg13=null)));
- case 3:
+ case 3:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -1349,7 +1349,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg11,arg11=null),
Util.ret1(arg12,arg12=null),
Util.ret1(arg13,arg13=null)));
- case 4:
+ case 4:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -1365,7 +1365,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg11,arg11=null),
Util.ret1(arg12,arg12=null),
Util.ret1(arg13,arg13=null)));
- case 5:
+ case 5:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -1381,7 +1381,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg11,arg11=null),
Util.ret1(arg12,arg12=null),
Util.ret1(arg13,arg13=null)));
- case 6:
+ case 6:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -1397,7 +1397,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg11,arg11=null),
Util.ret1(arg12,arg12=null),
Util.ret1(arg13,arg13=null)));
- case 7:
+ case 7:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -1413,7 +1413,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg11,arg11=null),
Util.ret1(arg12,arg12=null),
Util.ret1(arg13,arg13=null)));
- case 8:
+ case 8:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -1429,7 +1429,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg11,arg11=null),
Util.ret1(arg12,arg12=null),
Util.ret1(arg13,arg13=null)));
- case 9:
+ case 9:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -1445,7 +1445,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg11,arg11=null),
Util.ret1(arg12,arg12=null),
Util.ret1(arg13,arg13=null)));
- case 10:
+ case 10:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -1461,7 +1461,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg11,arg11=null),
Util.ret1(arg12,arg12=null),
Util.ret1(arg13,arg13=null)));
- case 11:
+ case 11:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -1477,7 +1477,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
ArraySeq.create(
Util.ret1(arg12,arg12=null),
Util.ret1(arg13,arg13=null)));
- case 12:
+ case 12:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -1493,7 +1493,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg12,arg12=null),
ArraySeq.create(
Util.ret1(arg13,arg13=null)));
- case 13:
+ case 13:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -1508,18 +1508,18 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg11,arg11=null),
Util.ret1(arg12,arg12=null),
Util.ret1(arg13,arg13=null), null);
- default:
- return throwArity(13);
- }
-
-}
-
-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)
- throws Exception{
- switch(getRequiredArity())
- {
- case 0:
+ default:
+ return throwArity(13);
+ }
+
+}
+
+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)
+ {
+ switch(getRequiredArity())
+ {
+ case 0:
return doInvoke(ArraySeq.create(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -1536,7 +1536,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg13,arg13=null),
Util.ret1(arg14,arg14=null)));
- case 1:
+ case 1:
return doInvoke(
Util.ret1(arg1,arg1=null), ArraySeq.create(
Util.ret1(arg2,arg2=null),
@@ -1553,7 +1553,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg13,arg13=null),
Util.ret1(arg14,arg14=null)));
- case 2:
+ case 2:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null), ArraySeq.create(
@@ -1570,7 +1570,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg13,arg13=null),
Util.ret1(arg14,arg14=null)));
- case 3:
+ case 3:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -1587,7 +1587,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg12,arg12=null),
Util.ret1(arg13,arg13=null),
Util.ret1(arg14,arg14=null)));
- case 4:
+ case 4:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -1604,7 +1604,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg12,arg12=null),
Util.ret1(arg13,arg13=null),
Util.ret1(arg14,arg14=null)));
- case 5:
+ case 5:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -1621,7 +1621,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg12,arg12=null),
Util.ret1(arg13,arg13=null),
Util.ret1(arg14,arg14=null)));
- case 6:
+ case 6:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -1638,7 +1638,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg12,arg12=null),
Util.ret1(arg13,arg13=null),
Util.ret1(arg14,arg14=null)));
- case 7:
+ case 7:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -1655,7 +1655,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg12,arg12=null),
Util.ret1(arg13,arg13=null),
Util.ret1(arg14,arg14=null)));
- case 8:
+ case 8:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -1672,7 +1672,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg12,arg12=null),
Util.ret1(arg13,arg13=null),
Util.ret1(arg14,arg14=null)));
- case 9:
+ case 9:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -1689,7 +1689,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg12,arg12=null),
Util.ret1(arg13,arg13=null),
Util.ret1(arg14,arg14=null)));
- case 10:
+ case 10:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -1706,7 +1706,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg12,arg12=null),
Util.ret1(arg13,arg13=null),
Util.ret1(arg14,arg14=null)));
- case 11:
+ case 11:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -1723,7 +1723,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg12,arg12=null),
Util.ret1(arg13,arg13=null),
Util.ret1(arg14,arg14=null)));
- case 12:
+ case 12:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -1740,7 +1740,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
ArraySeq.create(
Util.ret1(arg13,arg13=null),
Util.ret1(arg14,arg14=null)));
- case 13:
+ case 13:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -1757,7 +1757,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg13,arg13=null),
ArraySeq.create(
Util.ret1(arg14,arg14=null)));
- case 14:
+ case 14:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -1773,19 +1773,19 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg12,arg12=null),
Util.ret1(arg13,arg13=null),
Util.ret1(arg14,arg14=null),
- null);
- default:
- return throwArity(14);
- }
-
-}
-
-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) throws Exception{
- switch(getRequiredArity())
- {
- case 0:
+ null);
+ default:
+ return throwArity(14);
+ }
+
+}
+
+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) {
+ switch(getRequiredArity())
+ {
+ case 0:
return doInvoke(ArraySeq.create(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -1803,7 +1803,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg13,arg13=null),
Util.ret1(arg14,arg14=null),
Util.ret1(arg15,arg15=null)));
- case 1:
+ case 1:
return doInvoke(
Util.ret1(arg1,arg1=null), ArraySeq.create(
Util.ret1(arg2,arg2=null),
@@ -1821,7 +1821,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg13,arg13=null),
Util.ret1(arg14,arg14=null),
Util.ret1(arg15,arg15=null)));
- case 2:
+ case 2:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null), ArraySeq.create(
@@ -1839,7 +1839,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg13,arg13=null),
Util.ret1(arg14,arg14=null),
Util.ret1(arg15,arg15=null)));
- case 3:
+ case 3:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -1857,7 +1857,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg13,arg13=null),
Util.ret1(arg14,arg14=null),
Util.ret1(arg15,arg15=null)));
- case 4:
+ case 4:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -1875,7 +1875,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg13,arg13=null),
Util.ret1(arg14,arg14=null),
Util.ret1(arg15,arg15=null)));
- case 5:
+ case 5:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -1893,7 +1893,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg13,arg13=null),
Util.ret1(arg14,arg14=null),
Util.ret1(arg15,arg15=null)));
- case 6:
+ case 6:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -1911,7 +1911,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg13,arg13=null),
Util.ret1(arg14,arg14=null),
Util.ret1(arg15,arg15=null)));
- case 7:
+ case 7:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -1929,7 +1929,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg13,arg13=null),
Util.ret1(arg14,arg14=null),
Util.ret1(arg15,arg15=null)));
- case 8:
+ case 8:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -1947,7 +1947,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg13,arg13=null),
Util.ret1(arg14,arg14=null),
Util.ret1(arg15,arg15=null)));
- case 9:
+ case 9:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -1965,7 +1965,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg13,arg13=null),
Util.ret1(arg14,arg14=null),
Util.ret1(arg15,arg15=null)));
- case 10:
+ case 10:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -1983,7 +1983,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg13,arg13=null),
Util.ret1(arg14,arg14=null),
Util.ret1(arg15,arg15=null)));
- case 11:
+ case 11:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -2001,7 +2001,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg13,arg13=null),
Util.ret1(arg14,arg14=null),
Util.ret1(arg15,arg15=null)));
- case 12:
+ case 12:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -2019,7 +2019,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg13,arg13=null),
Util.ret1(arg14,arg14=null),
Util.ret1(arg15,arg15=null)));
- case 13:
+ case 13:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -2037,7 +2037,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
ArraySeq.create(
Util.ret1(arg14,arg14=null),
Util.ret1(arg15,arg15=null)));
- case 14:
+ case 14:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -2055,7 +2055,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg14,arg14=null),
ArraySeq.create(
Util.ret1(arg15,arg15=null)));
- case 15:
+ case 15:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -2073,18 +2073,18 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg14,arg14=null),
Util.ret1(arg15,arg15=null), null);
- default:
- return throwArity(15);
- }
-
-}
-
-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) throws Exception{
- switch(getRequiredArity())
- {
- case 0:
+ default:
+ return throwArity(15);
+ }
+
+}
+
+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) {
+ switch(getRequiredArity())
+ {
+ case 0:
return doInvoke(ArraySeq.create(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -2103,7 +2103,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg14,arg14=null),
Util.ret1(arg15,arg15=null),
Util.ret1(arg16,arg16=null)));
- case 1:
+ case 1:
return doInvoke(
Util.ret1(arg1,arg1=null), ArraySeq.create(
Util.ret1(arg2,arg2=null),
@@ -2122,7 +2122,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg14,arg14=null),
Util.ret1(arg15,arg15=null),
Util.ret1(arg16,arg16=null)));
- case 2:
+ case 2:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null), ArraySeq.create(
@@ -2141,7 +2141,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg14,arg14=null),
Util.ret1(arg15,arg15=null),
Util.ret1(arg16,arg16=null)));
- case 3:
+ case 3:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -2160,7 +2160,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg14,arg14=null),
Util.ret1(arg15,arg15=null),
Util.ret1(arg16,arg16=null)));
- case 4:
+ case 4:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -2179,7 +2179,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg14,arg14=null),
Util.ret1(arg15,arg15=null),
Util.ret1(arg16,arg16=null)));
- case 5:
+ case 5:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -2198,7 +2198,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg14,arg14=null),
Util.ret1(arg15,arg15=null),
Util.ret1(arg16,arg16=null)));
- case 6:
+ case 6:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -2217,7 +2217,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg14,arg14=null),
Util.ret1(arg15,arg15=null),
Util.ret1(arg16,arg16=null)));
- case 7:
+ case 7:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -2236,7 +2236,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg14,arg14=null),
Util.ret1(arg15,arg15=null),
Util.ret1(arg16,arg16=null)));
- case 8:
+ case 8:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -2255,7 +2255,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg14,arg14=null),
Util.ret1(arg15,arg15=null),
Util.ret1(arg16,arg16=null)));
- case 9:
+ case 9:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -2274,7 +2274,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg14,arg14=null),
Util.ret1(arg15,arg15=null),
Util.ret1(arg16,arg16=null)));
- case 10:
+ case 10:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -2293,7 +2293,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg14,arg14=null),
Util.ret1(arg15,arg15=null),
Util.ret1(arg16,arg16=null)));
- case 11:
+ case 11:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -2312,7 +2312,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg14,arg14=null),
Util.ret1(arg15,arg15=null),
Util.ret1(arg16,arg16=null)));
- case 12:
+ case 12:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -2331,7 +2331,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg14,arg14=null),
Util.ret1(arg15,arg15=null),
Util.ret1(arg16,arg16=null)));
- case 13:
+ case 13:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -2350,7 +2350,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg14,arg14=null),
Util.ret1(arg15,arg15=null),
Util.ret1(arg16,arg16=null)));
- case 14:
+ case 14:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -2369,7 +2369,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
ArraySeq.create(
Util.ret1(arg15,arg15=null),
Util.ret1(arg16,arg16=null)));
- case 15:
+ case 15:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -2388,7 +2388,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg15,arg15=null), ArraySeq.create(
Util.ret1(arg16,arg16=null)));
- case 16:
+ case 16:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -2407,18 +2407,18 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg15,arg15=null),
Util.ret1(arg16,arg16=null), null);
- default:
- return throwArity(16);
- }
-
-}
-
-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) throws Exception{
- switch(getRequiredArity())
- {
- case 0:
+ default:
+ return throwArity(16);
+ }
+
+}
+
+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) {
+ switch(getRequiredArity())
+ {
+ case 0:
return doInvoke(ArraySeq.create(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -2438,7 +2438,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg15,arg15=null),
Util.ret1(arg16,arg16=null),
Util.ret1(arg17,arg17=null)));
- case 1:
+ case 1:
return doInvoke(
Util.ret1(arg1,arg1=null), ArraySeq.create(
Util.ret1(arg2,arg2=null),
@@ -2458,7 +2458,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg15,arg15=null),
Util.ret1(arg16,arg16=null),
Util.ret1(arg17,arg17=null)));
- case 2:
+ case 2:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null), ArraySeq.create(
@@ -2478,7 +2478,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg15,arg15=null),
Util.ret1(arg16,arg16=null),
Util.ret1(arg17,arg17=null)));
- case 3:
+ case 3:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -2498,7 +2498,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg15,arg15=null),
Util.ret1(arg16,arg16=null),
Util.ret1(arg17,arg17=null)));
- case 4:
+ case 4:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -2518,7 +2518,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg15,arg15=null),
Util.ret1(arg16,arg16=null),
Util.ret1(arg17,arg17=null)));
- case 5:
+ case 5:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -2538,7 +2538,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg15,arg15=null),
Util.ret1(arg16,arg16=null),
Util.ret1(arg17,arg17=null)));
- case 6:
+ case 6:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -2558,7 +2558,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg15,arg15=null),
Util.ret1(arg16,arg16=null),
Util.ret1(arg17,arg17=null)));
- case 7:
+ case 7:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -2578,7 +2578,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg15,arg15=null),
Util.ret1(arg16,arg16=null),
Util.ret1(arg17,arg17=null)));
- case 8:
+ case 8:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -2598,7 +2598,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg15,arg15=null),
Util.ret1(arg16,arg16=null),
Util.ret1(arg17,arg17=null)));
- case 9:
+ case 9:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -2618,7 +2618,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg15,arg15=null),
Util.ret1(arg16,arg16=null),
Util.ret1(arg17,arg17=null)));
- case 10:
+ case 10:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -2638,7 +2638,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg15,arg15=null),
Util.ret1(arg16,arg16=null),
Util.ret1(arg17,arg17=null)));
- case 11:
+ case 11:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -2658,7 +2658,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg15,arg15=null),
Util.ret1(arg16,arg16=null),
Util.ret1(arg17,arg17=null)));
- case 12:
+ case 12:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -2678,7 +2678,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg15,arg15=null),
Util.ret1(arg16,arg16=null),
Util.ret1(arg17,arg17=null)));
- case 13:
+ case 13:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -2698,7 +2698,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg15,arg15=null),
Util.ret1(arg16,arg16=null),
Util.ret1(arg17,arg17=null)));
- case 14:
+ case 14:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -2718,7 +2718,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg15,arg15=null),
Util.ret1(arg16,arg16=null),
Util.ret1(arg17,arg17=null)));
- case 15:
+ case 15:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -2738,7 +2738,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg15,arg15=null), ArraySeq.create(
Util.ret1(arg16,arg16=null),
Util.ret1(arg17,arg17=null)));
- case 16:
+ case 16:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -2758,7 +2758,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg15,arg15=null),
Util.ret1(arg16,arg16=null), ArraySeq.create(
Util.ret1(arg17,arg17=null)));
- case 17:
+ case 17:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -2778,18 +2778,18 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg15,arg15=null),
Util.ret1(arg16,arg16=null),
Util.ret1(arg17,arg17=null), null);
- default:
- return throwArity(17);
- }
-
-}
-
-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) throws Exception{
- switch(getRequiredArity())
- {
- case 0:
+ default:
+ return throwArity(17);
+ }
+
+}
+
+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) {
+ switch(getRequiredArity())
+ {
+ case 0:
return doInvoke(ArraySeq.create(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -2810,7 +2810,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg16,arg16=null),
Util.ret1(arg17,arg17=null),
Util.ret1(arg18,arg18=null)));
- case 1:
+ case 1:
return doInvoke(
Util.ret1(arg1,arg1=null), ArraySeq.create(
Util.ret1(arg2,arg2=null),
@@ -2831,7 +2831,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg16,arg16=null),
Util.ret1(arg17,arg17=null),
Util.ret1(arg18,arg18=null)));
- case 2:
+ case 2:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null), ArraySeq.create(
@@ -2852,7 +2852,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg16,arg16=null),
Util.ret1(arg17,arg17=null),
Util.ret1(arg18,arg18=null)));
- case 3:
+ case 3:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -2873,7 +2873,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg16,arg16=null),
Util.ret1(arg17,arg17=null),
Util.ret1(arg18,arg18=null)));
- case 4:
+ case 4:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -2894,7 +2894,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg16,arg16=null),
Util.ret1(arg17,arg17=null),
Util.ret1(arg18,arg18=null)));
- case 5:
+ case 5:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -2915,7 +2915,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg16,arg16=null),
Util.ret1(arg17,arg17=null),
Util.ret1(arg18,arg18=null)));
- case 6:
+ case 6:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -2937,7 +2937,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg17,arg17=null),
Util.ret1(arg18,arg18=null)));
- case 7:
+ case 7:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -2958,7 +2958,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg16,arg16=null),
Util.ret1(arg17,arg17=null),
Util.ret1(arg18,arg18=null)));
- case 8:
+ case 8:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -2979,7 +2979,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg16,arg16=null),
Util.ret1(arg17,arg17=null),
Util.ret1(arg18,arg18=null)));
- case 9:
+ case 9:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -3000,7 +3000,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg16,arg16=null),
Util.ret1(arg17,arg17=null),
Util.ret1(arg18,arg18=null)));
- case 10:
+ case 10:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -3021,7 +3021,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg16,arg16=null),
Util.ret1(arg17,arg17=null),
Util.ret1(arg18,arg18=null)));
- case 11:
+ case 11:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -3042,7 +3042,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg16,arg16=null),
Util.ret1(arg17,arg17=null),
Util.ret1(arg18,arg18=null)));
- case 12:
+ case 12:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -3063,7 +3063,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg16,arg16=null),
Util.ret1(arg17,arg17=null),
Util.ret1(arg18,arg18=null)));
- case 13:
+ case 13:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -3084,7 +3084,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg16,arg16=null),
Util.ret1(arg17,arg17=null),
Util.ret1(arg18,arg18=null)));
- case 14:
+ case 14:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -3105,7 +3105,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg16,arg16=null),
Util.ret1(arg17,arg17=null),
Util.ret1(arg18,arg18=null)));
- case 15:
+ case 15:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -3126,7 +3126,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg16,arg16=null),
Util.ret1(arg17,arg17=null),
Util.ret1(arg18,arg18=null)));
- case 16:
+ case 16:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -3147,7 +3147,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg16,arg16=null), ArraySeq.create(
Util.ret1(arg17,arg17=null),
Util.ret1(arg18,arg18=null)));
- case 17:
+ case 17:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -3168,7 +3168,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg16,arg16=null),
Util.ret1(arg17,arg17=null), ArraySeq.create(
Util.ret1(arg18,arg18=null)));
- case 18:
+ case 18:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -3189,18 +3189,18 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg16,arg16=null),
Util.ret1(arg17,arg17=null),
Util.ret1(arg18,arg18=null), null);
- default:
- return throwArity(18);
- }
-
-}
-
-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) throws Exception{
- switch(getRequiredArity())
- {
- case 0:
+ default:
+ return throwArity(18);
+ }
+
+}
+
+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) {
+ switch(getRequiredArity())
+ {
+ case 0:
return doInvoke(ArraySeq.create(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -3222,7 +3222,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg17,arg17=null),
Util.ret1(arg18,arg18=null),
Util.ret1(arg19,arg19=null)));
- case 1:
+ case 1:
ISeq packed = PersistentList.EMPTY;
return doInvoke(
Util.ret1(arg1,arg1=null), ArraySeq.create(Util.ret1(arg2,arg2=null),
@@ -3243,7 +3243,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg17,arg17=null),
Util.ret1(arg18,arg18=null),
Util.ret1(arg19,arg19=null)));
- case 2:
+ case 2:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null), ArraySeq.create(
@@ -3265,7 +3265,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg17,arg17=null),
Util.ret1(arg18,arg18=null),
Util.ret1(arg19,arg19=null)));
- case 3:
+ case 3:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -3287,7 +3287,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg17,arg17=null),
Util.ret1(arg18,arg18=null),
Util.ret1(arg19,arg19=null)));
- case 4:
+ case 4:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -3309,7 +3309,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg17,arg17=null),
Util.ret1(arg18,arg18=null),
Util.ret1(arg19,arg19=null)));
- case 5:
+ case 5:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -3332,7 +3332,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg18,arg18=null),
Util.ret1(arg19,arg19=null)));
- case 6:
+ case 6:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -3355,7 +3355,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg18,arg18=null),
Util.ret1(arg19,arg19=null)));
- case 7:
+ case 7:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -3378,7 +3378,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg18,arg18=null),
Util.ret1(arg19,arg19=null)));
- case 8:
+ case 8:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -3401,7 +3401,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg17,arg17=null),
Util.ret1(arg18,arg18=null),
Util.ret1(arg19,arg19=null)));
- case 9:
+ case 9:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -3423,7 +3423,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg17,arg17=null),
Util.ret1(arg18,arg18=null),
Util.ret1(arg19,arg19=null)));
- case 10:
+ case 10:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -3445,7 +3445,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg17,arg17=null),
Util.ret1(arg18,arg18=null),
Util.ret1(arg19,arg19=null)));
- case 11:
+ case 11:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -3467,7 +3467,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg17,arg17=null),
Util.ret1(arg18,arg18=null),
Util.ret1(arg19,arg19=null)));
- case 12:
+ case 12:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -3489,7 +3489,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg17,arg17=null),
Util.ret1(arg18,arg18=null),
Util.ret1(arg19,arg19=null)));
- case 13:
+ case 13:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -3511,7 +3511,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg17,arg17=null),
Util.ret1(arg18,arg18=null),
Util.ret1(arg19,arg19=null)));
- case 14:
+ case 14:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -3533,7 +3533,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg17,arg17=null),
Util.ret1(arg18,arg18=null),
Util.ret1(arg19,arg19=null)));
- case 15:
+ case 15:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -3555,7 +3555,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg17,arg17=null),
Util.ret1(arg18,arg18=null),
Util.ret1(arg19,arg19=null)));
- case 16:
+ case 16:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -3577,7 +3577,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg17,arg17=null),
Util.ret1(arg18,arg18=null),
Util.ret1(arg19,arg19=null)));
- case 17:
+ case 17:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -3599,7 +3599,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg17,arg17=null), ArraySeq.create(
Util.ret1(arg18,arg18=null),
Util.ret1(arg19,arg19=null)));
- case 18:
+ case 18:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -3621,7 +3621,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg17,arg17=null),
Util.ret1(arg18,arg18=null), ArraySeq.create(
Util.ret1(arg19,arg19=null)));
- case 19:
+ case 19:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -3643,19 +3643,19 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg17,arg17=null),
Util.ret1(arg18,arg18=null),
Util.ret1(arg19,arg19=null), null);
- default:
- return throwArity(19);
- }
-
-}
-
-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)
- throws Exception{
- switch(getRequiredArity())
- {
- case 0:
+ default:
+ return throwArity(19);
+ }
+
+}
+
+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)
+ {
+ switch(getRequiredArity())
+ {
+ case 0:
return doInvoke(ArraySeq.create(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null),
@@ -3678,7 +3678,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg18,arg18=null),
Util.ret1(arg19,arg19=null),
Util.ret1(arg20,arg20=null)));
- case 1:
+ case 1:
return doInvoke(
Util.ret1(arg1,arg1=null), ArraySeq.create(
Util.ret1(arg2,arg2=null),
@@ -3701,7 +3701,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg18,arg18=null),
Util.ret1(arg19,arg19=null),
Util.ret1(arg20,arg20=null)));
- case 2:
+ case 2:
return doInvoke(
Util.ret1(arg1,arg1=null),
Util.ret1(arg2,arg2=null), ArraySeq.create(
@@ -3724,7 +3724,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg18,arg18=null),
Util.ret1(arg19,arg19=null),
Util.ret1(arg20,arg20=null)));
- case 3:
+ case 3:
return doInvoke(Util.ret1(arg1,arg1=null), Util.ret1(arg2,arg2=null), Util.ret1(arg3,arg3=null),
ArraySeq.create(Util.ret1(arg4,arg4=null), Util.ret1(arg5,arg5=null), Util.ret1(arg6,arg6=null),
Util.ret1(arg7,arg7=null), Util.ret1(arg8,arg8=null), Util.ret1(arg9,arg9=null),
@@ -3732,7 +3732,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg13,arg13=null), Util.ret1(arg14,arg14=null), Util.ret1(arg15,arg15=null),
Util.ret1(arg16,arg16=null), Util.ret1(arg17,arg17=null), Util.ret1(arg18,arg18=null),
Util.ret1(arg19,arg19=null), Util.ret1(arg20,arg20=null)));
- case 4:
+ case 4:
return doInvoke(Util.ret1(arg1,arg1=null), Util.ret1(arg2,arg2=null), Util.ret1(arg3,arg3=null),
Util.ret1(arg4,arg4=null), ArraySeq.create(Util.ret1(arg5,arg5=null), Util.ret1(arg6,arg6=null), Util.ret1(arg7,arg7=null),
Util.ret1(arg8,arg8=null), Util.ret1(arg9,arg9=null), Util.ret1(arg10,arg10=null),
@@ -3740,7 +3740,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg14,arg14=null), Util.ret1(arg15,arg15=null), Util.ret1(arg16,arg16=null),
Util.ret1(arg17,arg17=null), Util.ret1(arg18,arg18=null), Util.ret1(arg19,arg19=null),
Util.ret1(arg20,arg20=null)));
- case 5:
+ case 5:
return doInvoke(Util.ret1(arg1,arg1=null), Util.ret1(arg2,arg2=null), Util.ret1(arg3,arg3=null),
Util.ret1(arg4,arg4=null), Util.ret1(arg5,arg5=null), ArraySeq.create(Util.ret1(arg6,arg6=null), Util.ret1(arg7,arg7=null),
Util.ret1(arg8,arg8=null), Util.ret1(arg9,arg9=null),
@@ -3750,7 +3750,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg16,arg16=null), Util.ret1(arg17,arg17=null),
Util.ret1(arg18,arg18=null), Util.ret1(arg19,arg19=null),
Util.ret1(arg20,arg20=null)));
- case 6:
+ case 6:
return doInvoke(Util.ret1(arg1,arg1=null), Util.ret1(arg2,arg2=null), Util.ret1(arg3,arg3=null),
Util.ret1(arg4,arg4=null), Util.ret1(arg5,arg5=null), Util.ret1(arg6,arg6=null),
ArraySeq.create(Util.ret1(arg7,arg7=null), Util.ret1(arg8,arg8=null), Util.ret1(arg9,arg9=null),
@@ -3758,7 +3758,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg13,arg13=null), Util.ret1(arg14,arg14=null), Util.ret1(arg15,arg15=null),
Util.ret1(arg16,arg16=null), Util.ret1(arg17,arg17=null), Util.ret1(arg18,arg18=null),
Util.ret1(arg19,arg19=null), Util.ret1(arg20,arg20=null)));
- case 7:
+ case 7:
return doInvoke(Util.ret1(arg1,arg1=null), Util.ret1(arg2,arg2=null), Util.ret1(arg3,arg3=null),
Util.ret1(arg4,arg4=null), Util.ret1(arg5,arg5=null), Util.ret1(arg6,arg6=null),
Util.ret1(arg7,arg7=null), ArraySeq.create(Util.ret1(arg8,arg8=null), Util.ret1(arg9,arg9=null),
@@ -3768,7 +3768,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg16,arg16=null), Util.ret1(arg17,arg17=null),
Util.ret1(arg18,arg18=null), Util.ret1(arg19,arg19=null),
Util.ret1(arg20,arg20=null)));
- case 8:
+ case 8:
return doInvoke(
Util.ret1(arg1,arg1=null), Util.ret1(arg2,arg2=null), Util.ret1(arg3,arg3=null),
Util.ret1(arg4,arg4=null), Util.ret1(arg5,arg5=null), Util.ret1(arg6,arg6=null),
@@ -3778,7 +3778,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg15,arg15=null), Util.ret1(arg16,arg16=null),
Util.ret1(arg17,arg17=null), Util.ret1(arg18,arg18=null),
Util.ret1(arg19,arg19=null), Util.ret1(arg20,arg20=null)));
- case 9:
+ case 9:
return doInvoke(Util.ret1(arg1,arg1=null), Util.ret1(arg2,arg2=null), Util.ret1(arg3,arg3=null),
Util.ret1(arg4,arg4=null), Util.ret1(arg5,arg5=null), Util.ret1(arg6,arg6=null),
Util.ret1(arg7,arg7=null), Util.ret1(arg8,arg8=null), Util.ret1(arg9,arg9=null),
@@ -3786,7 +3786,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg13,arg13=null), Util.ret1(arg14,arg14=null), Util.ret1(arg15,arg15=null),
Util.ret1(arg16,arg16=null), Util.ret1(arg17,arg17=null), Util.ret1(arg18,arg18=null),
Util.ret1(arg19,arg19=null), Util.ret1(arg20,arg20=null)));
- case 10:
+ case 10:
return doInvoke(Util.ret1(arg1,arg1=null), Util.ret1(arg2,arg2=null), Util.ret1(arg3,arg3=null),
Util.ret1(arg4,arg4=null), Util.ret1(arg5,arg5=null), Util.ret1(arg6,arg6=null),
Util.ret1(arg7,arg7=null), Util.ret1(arg8,arg8=null), Util.ret1(arg9,arg9=null),
@@ -3795,7 +3795,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg15,arg15=null), Util.ret1(arg16,arg16=null),
Util.ret1(arg17,arg17=null), Util.ret1(arg18,arg18=null),
Util.ret1(arg19,arg19=null), Util.ret1(arg20,arg20=null)));
- case 11:
+ case 11:
return doInvoke(
Util.ret1(arg1,arg1=null), Util.ret1(arg2,arg2=null), Util.ret1(arg3,arg3=null),
Util.ret1(arg4,arg4=null), Util.ret1(arg5,arg5=null), Util.ret1(arg6,arg6=null),
@@ -3805,7 +3805,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg16,arg16=null), Util.ret1(arg17,arg17=null),
Util.ret1(arg18,arg18=null), Util.ret1(arg19,arg19=null),
Util.ret1(arg20,arg20=null)));
- case 12:
+ case 12:
return doInvoke(Util.ret1(arg1,arg1=null), Util.ret1(arg2,arg2=null), Util.ret1(arg3,arg3=null),
Util.ret1(arg4,arg4=null), Util.ret1(arg5,arg5=null), Util.ret1(arg6,arg6=null),
Util.ret1(arg7,arg7=null), Util.ret1(arg8,arg8=null), Util.ret1(arg9,arg9=null),
@@ -3813,7 +3813,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
ArraySeq.create(Util.ret1(arg13,arg13=null), Util.ret1(arg14,arg14=null), Util.ret1(arg15,arg15=null),
Util.ret1(arg16,arg16=null), Util.ret1(arg17,arg17=null), Util.ret1(arg18,arg18=null),
Util.ret1(arg19,arg19=null), Util.ret1(arg20,arg20=null)));
- case 13:
+ case 13:
return doInvoke(Util.ret1(arg1,arg1=null), Util.ret1(arg2,arg2=null), Util.ret1(arg3,arg3=null),
Util.ret1(arg4,arg4=null), Util.ret1(arg5,arg5=null), Util.ret1(arg6,arg6=null),
Util.ret1(arg7,arg7=null), Util.ret1(arg8,arg8=null), Util.ret1(arg9,arg9=null),
@@ -3822,7 +3822,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg16,arg16=null), Util.ret1(arg17,arg17=null),
Util.ret1(arg18,arg18=null), Util.ret1(arg19,arg19=null),
Util.ret1(arg20,arg20=null)));
- case 14:
+ case 14:
return doInvoke(Util.ret1(arg1,arg1=null), Util.ret1(arg2,arg2=null), Util.ret1(arg3,arg3=null),
Util.ret1(arg4,arg4=null), Util.ret1(arg5,arg5=null), Util.ret1(arg6,arg6=null),
Util.ret1(arg7,arg7=null), Util.ret1(arg8,arg8=null), Util.ret1(arg9,arg9=null),
@@ -3830,7 +3830,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg13,arg13=null), Util.ret1(arg14,arg14=null), ArraySeq.create(Util.ret1(arg15,arg15=null), Util.ret1(arg16,arg16=null),
Util.ret1(arg17,arg17=null), Util.ret1(arg18,arg18=null),
Util.ret1(arg19,arg19=null), Util.ret1(arg20,arg20=null)));
- case 15:
+ case 15:
return doInvoke(Util.ret1(arg1,arg1=null), Util.ret1(arg2,arg2=null), Util.ret1(arg3,arg3=null),
Util.ret1(arg4,arg4=null), Util.ret1(arg5,arg5=null), Util.ret1(arg6,arg6=null),
Util.ret1(arg7,arg7=null), Util.ret1(arg8,arg8=null), Util.ret1(arg9,arg9=null),
@@ -3838,7 +3838,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg13,arg13=null), Util.ret1(arg14,arg14=null), Util.ret1(arg15,arg15=null),
ArraySeq.create(Util.ret1(arg16,arg16=null), Util.ret1(arg17,arg17=null), Util.ret1(arg18,arg18=null),
Util.ret1(arg19,arg19=null), Util.ret1(arg20,arg20=null)));
- case 16:
+ case 16:
return doInvoke(Util.ret1(arg1,arg1=null), Util.ret1(arg2,arg2=null), Util.ret1(arg3,arg3=null),
Util.ret1(arg4,arg4=null), Util.ret1(arg5,arg5=null), Util.ret1(arg6,arg6=null),
Util.ret1(arg7,arg7=null), Util.ret1(arg8,arg8=null), Util.ret1(arg9,arg9=null),
@@ -3846,7 +3846,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg13,arg13=null), Util.ret1(arg14,arg14=null), Util.ret1(arg15,arg15=null),
Util.ret1(arg16,arg16=null), ArraySeq.create(Util.ret1(arg17,arg17=null), Util.ret1(arg18,arg18=null),
Util.ret1(arg19,arg19=null), Util.ret1(arg20,arg20=null)));
- case 17:
+ case 17:
return doInvoke(Util.ret1(arg1,arg1=null), Util.ret1(arg2,arg2=null), Util.ret1(arg3,arg3=null),
Util.ret1(arg4,arg4=null), Util.ret1(arg5,arg5=null), Util.ret1(arg6,arg6=null),
Util.ret1(arg7,arg7=null), Util.ret1(arg8,arg8=null), Util.ret1(arg9,arg9=null),
@@ -3854,7 +3854,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg13,arg13=null), Util.ret1(arg14,arg14=null), Util.ret1(arg15,arg15=null),
Util.ret1(arg16,arg16=null), Util.ret1(arg17,arg17=null), ArraySeq.create(Util.ret1(arg18,arg18=null), Util.ret1(arg19,arg19=null),
Util.ret1(arg20,arg20=null)));
- case 18:
+ case 18:
return doInvoke(Util.ret1(arg1,arg1=null), Util.ret1(arg2,arg2=null), Util.ret1(arg3,arg3=null),
Util.ret1(arg4,arg4=null), Util.ret1(arg5,arg5=null), Util.ret1(arg6,arg6=null),
Util.ret1(arg7,arg7=null), Util.ret1(arg8,arg8=null), Util.ret1(arg9,arg9=null),
@@ -3862,7 +3862,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg13,arg13=null), Util.ret1(arg14,arg14=null), Util.ret1(arg15,arg15=null),
Util.ret1(arg16,arg16=null), Util.ret1(arg17,arg17=null), Util.ret1(arg18,arg18=null),
ArraySeq.create(Util.ret1(arg19,arg19=null), Util.ret1(arg20,arg20=null)));
- case 19:
+ case 19:
return doInvoke(Util.ret1(arg1,arg1=null), Util.ret1(arg2,arg2=null), Util.ret1(arg3,arg3=null),
Util.ret1(arg4,arg4=null), Util.ret1(arg5,arg5=null), Util.ret1(arg6,arg6=null),
Util.ret1(arg7,arg7=null), Util.ret1(arg8,arg8=null), Util.ret1(arg9,arg9=null),
@@ -3870,7 +3870,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg13,arg13=null), Util.ret1(arg14,arg14=null), Util.ret1(arg15,arg15=null),
Util.ret1(arg16,arg16=null), Util.ret1(arg17,arg17=null), Util.ret1(arg18,arg18=null),
Util.ret1(arg19,arg19=null), ArraySeq.create(Util.ret1(arg20,arg20=null)));
- case 20:
+ case 20:
return doInvoke(Util.ret1(arg1,arg1=null), Util.ret1(arg2,arg2=null), Util.ret1(arg3,arg3=null),
Util.ret1(arg4,arg4=null), Util.ret1(arg5,arg5=null), Util.ret1(arg6,arg6=null),
Util.ret1(arg7,arg7=null), Util.ret1(arg8,arg8=null), Util.ret1(arg9,arg9=null),
@@ -3878,19 +3878,19 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg13,arg13=null), Util.ret1(arg14,arg14=null), Util.ret1(arg15,arg15=null),
Util.ret1(arg16,arg16=null), Util.ret1(arg17,arg17=null), Util.ret1(arg18,arg18=null),
Util.ret1(arg19,arg19=null), Util.ret1(arg20,arg20=null), null);
- default:
- return throwArity(20);
- }
+ default:
+ return throwArity(20);
+ }
-}
-
-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, Object... args)
- throws Exception{
- switch(getRequiredArity())
- {
- case 0:
+}
+
+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, Object... args)
+ {
+ switch(getRequiredArity())
+ {
+ case 0:
return doInvoke(ontoArrayPrepend(args, Util.ret1(arg1,arg1=null), Util.ret1(arg2,arg2=null), Util.ret1(arg3,arg3=null),
Util.ret1(arg4,arg4=null), Util.ret1(arg5,arg5=null), Util.ret1(arg6,arg6=null),
Util.ret1(arg7,arg7=null), Util.ret1(arg8,arg8=null), Util.ret1(arg9,arg9=null),
@@ -3898,7 +3898,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg13,arg13=null), Util.ret1(arg14,arg14=null), Util.ret1(arg15,arg15=null),
Util.ret1(arg16,arg16=null), Util.ret1(arg17,arg17=null), Util.ret1(arg18,arg18=null),
Util.ret1(arg19,arg19=null), Util.ret1(arg20,arg20=null)));
- case 1:
+ case 1:
return doInvoke(Util.ret1(arg1,arg1=null), ontoArrayPrepend(args, Util.ret1(arg2,arg2=null), Util.ret1(arg3,arg3=null),
Util.ret1(arg4,arg4=null), Util.ret1(arg5,arg5=null),
Util.ret1(arg6,arg6=null), Util.ret1(arg7,arg7=null),
@@ -3909,7 +3909,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg16,arg16=null), Util.ret1(arg17,arg17=null),
Util.ret1(arg18,arg18=null), Util.ret1(arg19,arg19=null),
Util.ret1(arg20,arg20=null)));
- case 2:
+ case 2:
return doInvoke(Util.ret1(arg1,arg1=null), Util.ret1(arg2,arg2=null), ontoArrayPrepend(args, Util.ret1(arg3,arg3=null),
Util.ret1(arg4,arg4=null), Util.ret1(arg5,arg5=null),
Util.ret1(arg6,arg6=null), Util.ret1(arg7,arg7=null),
@@ -3920,7 +3920,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg16,arg16=null), Util.ret1(arg17,arg17=null),
Util.ret1(arg18,arg18=null), Util.ret1(arg19,arg19=null),
Util.ret1(arg20,arg20=null)));
- case 3:
+ case 3:
return doInvoke(Util.ret1(arg1,arg1=null), Util.ret1(arg2,arg2=null), Util.ret1(arg3,arg3=null),
ontoArrayPrepend(args, Util.ret1(arg4,arg4=null), Util.ret1(arg5,arg5=null), Util.ret1(arg6,arg6=null),
Util.ret1(arg7,arg7=null), Util.ret1(arg8,arg8=null), Util.ret1(arg9,arg9=null),
@@ -3928,7 +3928,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg13,arg13=null), Util.ret1(arg14,arg14=null), Util.ret1(arg15,arg15=null),
Util.ret1(arg16,arg16=null), Util.ret1(arg17,arg17=null), Util.ret1(arg18,arg18=null),
Util.ret1(arg19,arg19=null), Util.ret1(arg20,arg20=null)));
- case 4:
+ case 4:
return doInvoke(Util.ret1(arg1,arg1=null), Util.ret1(arg2,arg2=null), Util.ret1(arg3,arg3=null),
Util.ret1(arg4,arg4=null), ontoArrayPrepend(args, Util.ret1(arg5,arg5=null), Util.ret1(arg6,arg6=null), Util.ret1(arg7,arg7=null),
Util.ret1(arg8,arg8=null), Util.ret1(arg9,arg9=null), Util.ret1(arg10,arg10=null),
@@ -3936,7 +3936,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg14,arg14=null), Util.ret1(arg15,arg15=null), Util.ret1(arg16,arg16=null),
Util.ret1(arg17,arg17=null), Util.ret1(arg18,arg18=null), Util.ret1(arg19,arg19=null),
Util.ret1(arg20,arg20=null)));
- case 5:
+ case 5:
return doInvoke(Util.ret1(arg1,arg1=null), Util.ret1(arg2,arg2=null), Util.ret1(arg3,arg3=null),
Util.ret1(arg4,arg4=null), Util.ret1(arg5,arg5=null), ontoArrayPrepend(args, Util.ret1(arg6,arg6=null), Util.ret1(arg7,arg7=null),
Util.ret1(arg8,arg8=null), Util.ret1(arg9,arg9=null),
@@ -3946,7 +3946,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg16,arg16=null), Util.ret1(arg17,arg17=null),
Util.ret1(arg18,arg18=null), Util.ret1(arg19,arg19=null),
Util.ret1(arg20,arg20=null)));
- case 6:
+ case 6:
return doInvoke(Util.ret1(arg1,arg1=null), Util.ret1(arg2,arg2=null), Util.ret1(arg3,arg3=null),
Util.ret1(arg4,arg4=null), Util.ret1(arg5,arg5=null), Util.ret1(arg6,arg6=null),
ontoArrayPrepend(args, Util.ret1(arg7,arg7=null), Util.ret1(arg8,arg8=null), Util.ret1(arg9,arg9=null),
@@ -3954,7 +3954,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg13,arg13=null), Util.ret1(arg14,arg14=null), Util.ret1(arg15,arg15=null),
Util.ret1(arg16,arg16=null), Util.ret1(arg17,arg17=null), Util.ret1(arg18,arg18=null),
Util.ret1(arg19,arg19=null), Util.ret1(arg20,arg20=null)));
- case 7:
+ case 7:
return doInvoke(Util.ret1(arg1,arg1=null), Util.ret1(arg2,arg2=null), Util.ret1(arg3,arg3=null),
Util.ret1(arg4,arg4=null), Util.ret1(arg5,arg5=null), Util.ret1(arg6,arg6=null),
Util.ret1(arg7,arg7=null), ontoArrayPrepend(args, Util.ret1(arg8,arg8=null), Util.ret1(arg9,arg9=null),
@@ -3964,7 +3964,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg16,arg16=null), Util.ret1(arg17,arg17=null),
Util.ret1(arg18,arg18=null), Util.ret1(arg19,arg19=null),
Util.ret1(arg20,arg20=null)));
- case 8:
+ case 8:
return doInvoke(Util.ret1(arg1,arg1=null), Util.ret1(arg2,arg2=null), Util.ret1(arg3,arg3=null),
Util.ret1(arg4,arg4=null), Util.ret1(arg5,arg5=null), Util.ret1(arg6,arg6=null),
Util.ret1(arg7,arg7=null), Util.ret1(arg8,arg8=null), ontoArrayPrepend(args, Util.ret1(arg9,arg9=null), Util.ret1(arg10,arg10=null),
@@ -3973,7 +3973,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg15,arg15=null), Util.ret1(arg16,arg16=null),
Util.ret1(arg17,arg17=null), Util.ret1(arg18,arg18=null),
Util.ret1(arg19,arg19=null), Util.ret1(arg20,arg20=null)));
- case 9:
+ case 9:
return doInvoke(Util.ret1(arg1,arg1=null), Util.ret1(arg2,arg2=null), Util.ret1(arg3,arg3=null),
Util.ret1(arg4,arg4=null), Util.ret1(arg5,arg5=null), Util.ret1(arg6,arg6=null),
Util.ret1(arg7,arg7=null), Util.ret1(arg8,arg8=null), Util.ret1(arg9,arg9=null),
@@ -3981,7 +3981,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg13,arg13=null), Util.ret1(arg14,arg14=null), Util.ret1(arg15,arg15=null),
Util.ret1(arg16,arg16=null), Util.ret1(arg17,arg17=null), Util.ret1(arg18,arg18=null),
Util.ret1(arg19,arg19=null), Util.ret1(arg20,arg20=null)));
- case 10:
+ case 10:
return doInvoke(Util.ret1(arg1,arg1=null), Util.ret1(arg2,arg2=null), Util.ret1(arg3,arg3=null),
Util.ret1(arg4,arg4=null), Util.ret1(arg5,arg5=null), Util.ret1(arg6,arg6=null),
Util.ret1(arg7,arg7=null), Util.ret1(arg8,arg8=null), Util.ret1(arg9,arg9=null),
@@ -3990,7 +3990,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg15,arg15=null), Util.ret1(arg16,arg16=null),
Util.ret1(arg17,arg17=null), Util.ret1(arg18,arg18=null),
Util.ret1(arg19,arg19=null), Util.ret1(arg20,arg20=null)));
- case 11:
+ case 11:
return doInvoke(
Util.ret1(arg1,arg1=null), Util.ret1(arg2,arg2=null), Util.ret1(arg3,arg3=null),
Util.ret1(arg4,arg4=null), Util.ret1(arg5,arg5=null), Util.ret1(arg6,arg6=null),
@@ -4000,7 +4000,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg16,arg16=null), Util.ret1(arg17,arg17=null),
Util.ret1(arg18,arg18=null), Util.ret1(arg19,arg19=null),
Util.ret1(arg20,arg20=null)));
- case 12:
+ case 12:
return doInvoke(
Util.ret1(arg1,arg1=null), Util.ret1(arg2,arg2=null), Util.ret1(arg3,arg3=null),
Util.ret1(arg4,arg4=null), Util.ret1(arg5,arg5=null), Util.ret1(arg6,arg6=null),
@@ -4009,7 +4009,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
ontoArrayPrepend(args, Util.ret1(arg13,arg13=null), Util.ret1(arg14,arg14=null), Util.ret1(arg15,arg15=null),
Util.ret1(arg16,arg16=null), Util.ret1(arg17,arg17=null), Util.ret1(arg18,arg18=null),
Util.ret1(arg19,arg19=null), Util.ret1(arg20,arg20=null)));
- case 13:
+ case 13:
return doInvoke(Util.ret1(arg1,arg1=null), Util.ret1(arg2,arg2=null), Util.ret1(arg3,arg3=null),
Util.ret1(arg4,arg4=null), Util.ret1(arg5,arg5=null), Util.ret1(arg6,arg6=null),
Util.ret1(arg7,arg7=null), Util.ret1(arg8,arg8=null), Util.ret1(arg9,arg9=null),
@@ -4018,7 +4018,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg16,arg16=null), Util.ret1(arg17,arg17=null),
Util.ret1(arg18,arg18=null), Util.ret1(arg19,arg19=null),
Util.ret1(arg20,arg20=null)));
- case 14:
+ case 14:
return doInvoke(Util.ret1(arg1,arg1=null), Util.ret1(arg2,arg2=null), Util.ret1(arg3,arg3=null),
Util.ret1(arg4,arg4=null), Util.ret1(arg5,arg5=null), Util.ret1(arg6,arg6=null),
Util.ret1(arg7,arg7=null), Util.ret1(arg8,arg8=null), Util.ret1(arg9,arg9=null),
@@ -4026,7 +4026,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg13,arg13=null), Util.ret1(arg14,arg14=null), ontoArrayPrepend(args, Util.ret1(arg15,arg15=null), Util.ret1(arg16,arg16=null),
Util.ret1(arg17,arg17=null), Util.ret1(arg18,arg18=null),
Util.ret1(arg19,arg19=null), Util.ret1(arg20,arg20=null)));
- case 15:
+ case 15:
return doInvoke(Util.ret1(arg1,arg1=null), Util.ret1(arg2,arg2=null), Util.ret1(arg3,arg3=null),
Util.ret1(arg4,arg4=null), Util.ret1(arg5,arg5=null), Util.ret1(arg6,arg6=null),
Util.ret1(arg7,arg7=null), Util.ret1(arg8,arg8=null), Util.ret1(arg9,arg9=null),
@@ -4034,7 +4034,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg13,arg13=null), Util.ret1(arg14,arg14=null), Util.ret1(arg15,arg15=null),
ontoArrayPrepend(args, Util.ret1(arg16,arg16=null), Util.ret1(arg17,arg17=null), Util.ret1(arg18,arg18=null),
Util.ret1(arg19,arg19=null), Util.ret1(arg20,arg20=null)));
- case 16:
+ case 16:
return doInvoke(Util.ret1(arg1,arg1=null), Util.ret1(arg2,arg2=null), Util.ret1(arg3,arg3=null),
Util.ret1(arg4,arg4=null), Util.ret1(arg5,arg5=null), Util.ret1(arg6,arg6=null),
Util.ret1(arg7,arg7=null), Util.ret1(arg8,arg8=null), Util.ret1(arg9,arg9=null),
@@ -4042,7 +4042,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg13,arg13=null), Util.ret1(arg14,arg14=null), Util.ret1(arg15,arg15=null),
Util.ret1(arg16,arg16=null), ontoArrayPrepend(args, Util.ret1(arg17,arg17=null), Util.ret1(arg18,arg18=null),
Util.ret1(arg19,arg19=null), Util.ret1(arg20,arg20=null)));
- case 17:
+ case 17:
return doInvoke(Util.ret1(arg1,arg1=null), Util.ret1(arg2,arg2=null), Util.ret1(arg3,arg3=null),
Util.ret1(arg4,arg4=null), Util.ret1(arg5,arg5=null), Util.ret1(arg6,arg6=null),
Util.ret1(arg7,arg7=null), Util.ret1(arg8,arg8=null), Util.ret1(arg9,arg9=null),
@@ -4050,7 +4050,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg13,arg13=null), Util.ret1(arg14,arg14=null), Util.ret1(arg15,arg15=null),
Util.ret1(arg16,arg16=null), Util.ret1(arg17,arg17=null), ontoArrayPrepend(args, Util.ret1(arg18,arg18=null), Util.ret1(arg19,arg19=null),
Util.ret1(arg20,arg20=null)));
- case 18:
+ case 18:
return doInvoke(Util.ret1(arg1,arg1=null), Util.ret1(arg2,arg2=null), Util.ret1(arg3,arg3=null),
Util.ret1(arg4,arg4=null), Util.ret1(arg5,arg5=null), Util.ret1(arg6,arg6=null),
Util.ret1(arg7,arg7=null), Util.ret1(arg8,arg8=null), Util.ret1(arg9,arg9=null),
@@ -4058,7 +4058,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg13,arg13=null), Util.ret1(arg14,arg14=null), Util.ret1(arg15,arg15=null),
Util.ret1(arg16,arg16=null), Util.ret1(arg17,arg17=null), Util.ret1(arg18,arg18=null),
ontoArrayPrepend(args, Util.ret1(arg19,arg19=null), Util.ret1(arg20,arg20=null)));
- case 19:
+ case 19:
return doInvoke(Util.ret1(arg1,arg1=null), Util.ret1(arg2,arg2=null), Util.ret1(arg3,arg3=null),
Util.ret1(arg4,arg4=null), Util.ret1(arg5,arg5=null), Util.ret1(arg6,arg6=null),
Util.ret1(arg7,arg7=null), Util.ret1(arg8,arg8=null), Util.ret1(arg9,arg9=null),
@@ -4066,7 +4066,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg13,arg13=null), Util.ret1(arg14,arg14=null), Util.ret1(arg15,arg15=null),
Util.ret1(arg16,arg16=null), Util.ret1(arg17,arg17=null), Util.ret1(arg18,arg18=null),
Util.ret1(arg19,arg19=null), ontoArrayPrepend(args, Util.ret1(arg20,arg20=null)));
- case 20:
+ case 20:
return doInvoke(Util.ret1(arg1,arg1=null), Util.ret1(arg2,arg2=null), Util.ret1(arg3,arg3=null),
Util.ret1(arg4,arg4=null), Util.ret1(arg5,arg5=null), Util.ret1(arg6,arg6=null),
Util.ret1(arg7,arg7=null), Util.ret1(arg8,arg8=null), Util.ret1(arg9,arg9=null),
@@ -4074,31 +4074,31 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
Util.ret1(arg13,arg13=null), Util.ret1(arg14,arg14=null), Util.ret1(arg15,arg15=null),
Util.ret1(arg16,arg16=null), Util.ret1(arg17,arg17=null), Util.ret1(arg18,arg18=null),
Util.ret1(arg19,arg19=null), Util.ret1(arg20,arg20=null), ArraySeq.create(args));
- default:
- return throwArity(21);
- }
-
-}
-
-
-protected static ISeq ontoArrayPrepend(Object[] array, Object... args){
- ISeq ret = ArraySeq.create(array);
- for(int i = args.length - 1; i >= 0; --i)
- ret = RT.cons(args[i], ret);
- return ret;
-}
-
-protected static ISeq findKey(Object key, ISeq args){
- while(args != null)
- {
- if(key == args.first())
- return args.next();
- args = RT.next(args);
- args = RT.next(args);
- }
- return null;
-}
-
-
-}
-
+ default:
+ return throwArity(21);
+ }
+
+}
+
+
+protected static ISeq ontoArrayPrepend(Object[] array, Object... args){
+ ISeq ret = ArraySeq.create(array);
+ for(int i = args.length - 1; i >= 0; --i)
+ ret = RT.cons(args[i], ret);
+ return ret;
+}
+
+protected static ISeq findKey(Object key, ISeq args){
+ while(args != null)
+ {
+ if(key == args.first())
+ return args.next();
+ args = RT.next(args);
+ args = RT.next(args);
+ }
+ return null;
+}
+
+
+}
+
diff --git a/src/jvm/clojure/lang/Reversible.java b/src/jvm/clojure/lang/Reversible.java
index 66fe1477..d80d0f3b 100644
--- a/src/jvm/clojure/lang/Reversible.java
+++ b/src/jvm/clojure/lang/Reversible.java
@@ -13,5 +13,5 @@
package clojure.lang;
public interface Reversible{
-ISeq rseq() throws Exception;
+ISeq rseq() ;
}
diff --git a/src/jvm/clojure/lang/Script.java b/src/jvm/clojure/lang/Script.java
index 4df40e4b..4676f70e 100644
--- a/src/jvm/clojure/lang/Script.java
+++ b/src/jvm/clojure/lang/Script.java
@@ -16,7 +16,7 @@ import clojure.main;
public class Script {
-public static void main(String[] args) throws Exception{
+public static void main(String[] args) {
main.legacy_script(args);
}
}
diff --git a/src/jvm/clojure/lang/Settable.java b/src/jvm/clojure/lang/Settable.java
index b263d5ce..ebf0be4a 100644
--- a/src/jvm/clojure/lang/Settable.java
+++ b/src/jvm/clojure/lang/Settable.java
@@ -13,6 +13,6 @@
package clojure.lang;
public interface Settable {
- Object doSet(Object val) throws Exception;
- Object doReset(Object val) throws Exception;
+ Object doSet(Object val) ;
+ Object doReset(Object val) ;
}
diff --git a/src/jvm/clojure/lang/Symbol.java b/src/jvm/clojure/lang/Symbol.java
index cdad6422..193ed0b5 100644
--- a/src/jvm/clojure/lang/Symbol.java
+++ b/src/jvm/clojure/lang/Symbol.java
@@ -114,11 +114,11 @@ private Object readResolve() throws ObjectStreamException{
return intern(ns, name);
}
-public Object invoke(Object obj) throws Exception{
+public Object invoke(Object obj) {
return RT.get(obj, this);
}
-public Object invoke(Object obj, Object notFound) throws Exception{
+public Object invoke(Object obj, Object notFound) {
return RT.get(obj, this, notFound);
}
diff --git a/src/jvm/clojure/lang/TransactionalHashMap.java b/src/jvm/clojure/lang/TransactionalHashMap.java
index ba77b862..ea3f9d71 100644
--- a/src/jvm/clojure/lang/TransactionalHashMap.java
+++ b/src/jvm/clojure/lang/TransactionalHashMap.java
@@ -35,17 +35,17 @@ Entry entryAt(Object k){
return mapAt(binFor(k)).entryAt(k);
}
-public TransactionalHashMap() throws Exception{
+public TransactionalHashMap() {
this(421);
}
-public TransactionalHashMap(int nBins) throws Exception{
+public TransactionalHashMap(int nBins) {
bins = new Ref[nBins];
for(int i = 0; i < nBins; i++)
bins[i] = new Ref(PersistentHashMap.EMPTY);
}
-public TransactionalHashMap(Map<? extends K, ? extends V> m) throws Exception{
+public TransactionalHashMap(Map<? extends K, ? extends V> m) {
this(m.size());
putAll(m);
}
@@ -93,7 +93,7 @@ public V remove(Object k){
}
catch(Exception e)
{
- throw new RuntimeException(e);
+ throw Util.runtimeException(e);
}
return (V) ret;
}
@@ -163,7 +163,7 @@ public boolean remove(Object k, Object v){
}
catch(Exception ex)
{
- throw new RuntimeException(ex);
+ throw Util.runtimeException(ex);
}
return true;
}
diff --git a/src/jvm/clojure/lang/Util.java b/src/jvm/clojure/lang/Util.java
index c2a37f75..2b0831cd 100644
--- a/src/jvm/clojure/lang/Util.java
+++ b/src/jvm/clojure/lang/Util.java
@@ -138,4 +138,18 @@ static public <K,V> void clearCache(ReferenceQueue rq, ConcurrentHashMap<K, Refe
}
}
}
+
+static public RuntimeException runtimeException(String s){
+ return new RuntimeException(s);
+}
+static public RuntimeException runtimeException(String s, Throwable e){
+ return new RuntimeException(s, e);
+}
+
+static public RuntimeException runtimeException(Throwable e){
+ if(e instanceof RuntimeException)
+ return (RuntimeException)e;
+ return new RuntimeException(e);
+}
+
}
diff --git a/src/jvm/clojure/lang/Var.java b/src/jvm/clojure/lang/Var.java
index ed9d0a59..3be479bb 100644
--- a/src/jvm/clojure/lang/Var.java
+++ b/src/jvm/clojure/lang/Var.java
@@ -202,7 +202,7 @@ public void setValidator(IFn vf){
validator = vf;
}
-public Object alter(IFn fn, ISeq args) throws Exception{
+public Object alter(IFn fn, ISeq args) {
set(fn.applyTo(RT.cons(deref(), args)));
return this;
}
@@ -219,11 +219,11 @@ public Object set(Object val){
throw new IllegalStateException(String.format("Can't change/establish root binding of: %s with set", sym));
}
-public Object doSet(Object val) throws Exception {
+public Object doSet(Object val) {
return set(val);
}
-public Object doReset(Object val) throws Exception {
+public Object doReset(Object val) {
bindRoot(val);
return val;
}
@@ -240,7 +240,7 @@ public void setMacro() {
}
catch (Exception e)
{
- throw new RuntimeException(e);
+ throw Util.runtimeException(e);
}
}
@@ -271,7 +271,7 @@ public void setTag(Symbol tag) {
}
catch (Exception e)
{
- throw new RuntimeException(e);
+ throw Util.runtimeException(e);
}
}
@@ -291,7 +291,7 @@ synchronized public void bindRoot(Object root){
}
catch (Exception e)
{
- throw new RuntimeException(e);
+ throw Util.runtimeException(e);
}
notifyWatches(oldroot,this.root);
}
@@ -309,7 +309,7 @@ synchronized public void unbindRoot(){
++rev;
}
-synchronized public void commuteRoot(IFn fn) throws Exception{
+synchronized public void commuteRoot(IFn fn) {
Object newRoot = fn.invoke(root);
validate(getValidator(), newRoot);
Object oldroot = root;
@@ -318,7 +318,7 @@ synchronized public void commuteRoot(IFn fn) throws Exception{
notifyWatches(oldroot,newRoot);
}
-synchronized public Object alterRoot(IFn fn, ISeq args) throws Exception{
+synchronized public Object alterRoot(IFn fn, ISeq args) {
Object newRoot = fn.applyTo(RT.cons(root, args));
validate(getValidator(), newRoot);
Object oldroot = root;
@@ -378,7 +378,7 @@ final public IFn fn(){
return (IFn) deref();
}
-public Object call() throws Exception{
+public Object call() {
return invoke();
}
@@ -389,110 +389,110 @@ public void run(){
}
catch(Exception e)
{
- throw new RuntimeException(e);
+ throw Util.runtimeException(e);
}
}
-public Object invoke() throws Exception{
+public Object invoke() {
return fn().invoke();
}
-public Object invoke(Object arg1) throws Exception{
+public Object invoke(Object arg1) {
return fn().invoke(arg1);
}
-public Object invoke(Object arg1, Object arg2) throws Exception{
+public Object invoke(Object arg1, Object arg2) {
return fn().invoke(arg1, arg2);
}
-public Object invoke(Object arg1, Object arg2, Object arg3) throws Exception{
+public Object invoke(Object arg1, Object arg2, Object arg3) {
return fn().invoke(arg1, arg2, arg3);
}
-public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4) throws Exception{
+public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4) {
return fn().invoke(arg1, arg2, arg3, arg4);
}
-public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5) throws Exception{
+public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5) {
return fn().invoke(arg1, arg2, arg3, arg4, arg5);
}
-public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6) throws Exception{
+public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6) {
return fn().invoke(arg1, arg2, arg3, arg4, arg5, arg6);
}
public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7)
- throws Exception{
+ {
return fn().invoke(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) throws Exception{
+ Object arg8) {
return fn().invoke(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) throws Exception{
+ Object arg8, Object arg9) {
return fn().invoke(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) throws Exception{
+ Object arg8, Object arg9, Object arg10) {
return fn().invoke(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) throws Exception{
+ Object arg8, Object arg9, Object arg10, Object arg11) {
return fn().invoke(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) throws Exception{
+ Object arg8, Object arg9, Object arg10, Object arg11, Object arg12) {
return fn().invoke(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)
- throws Exception{
+ {
return fn().invoke(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)
- throws Exception{
+ {
return fn().invoke(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) throws Exception{
+ Object arg15) {
return fn().invoke(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) throws Exception{
+ Object arg15, Object arg16) {
return fn().invoke(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) throws Exception{
+ Object arg15, Object arg16, Object arg17) {
return fn().invoke(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) throws Exception{
+ Object arg15, Object arg16, Object arg17, Object arg18) {
return fn().invoke(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) throws Exception{
+ Object arg15, Object arg16, Object arg17, Object arg18, Object arg19) {
return fn().invoke(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15,
arg16, arg17, arg18, arg19);
}
@@ -500,7 +500,7 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
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)
- throws Exception{
+ {
return fn().invoke(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15,
arg16, arg17, arg18, arg19, arg20);
}
@@ -509,25 +509,32 @@ public Object invoke(Object arg1, Object arg2, Object arg3, Object arg4, Object
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,
Object... args)
- throws Exception{
+ {
return fn().invoke(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15,
arg16, arg17, arg18, arg19, arg20, args);
}
-public Object applyTo(ISeq arglist) throws Exception{
+public Object applyTo(ISeq arglist) {
return AFn.applyToHelper(this, arglist);
}
static IFn assoc = new AFn(){
@Override
- public Object invoke(Object m, Object k, Object v) throws Exception {
+ public Object invoke(Object m, Object k, Object v) {
return RT.assoc(m, k, v);
}
};
static IFn dissoc = new AFn() {
@Override
- public Object invoke(Object c, Object k) throws Exception {
- return RT.dissoc(c, k);
+ public Object invoke(Object c, Object k) {
+ try
+ {
+ return RT.dissoc(c, k);
+ }
+ catch(Exception e)
+ {
+ return Util.runtimeException(e);
+ }
}
};
}
diff --git a/src/jvm/clojure/main.java b/src/jvm/clojure/main.java
index d9fc8537..8430be8a 100644
--- a/src/jvm/clojure/main.java
+++ b/src/jvm/clojure/main.java
@@ -22,17 +22,17 @@ final static private Var LEGACY_REPL = RT.var("clojure.main", "legacy-repl");
final static private Var LEGACY_SCRIPT = RT.var("clojure.main", "legacy-script");
final static private Var MAIN = RT.var("clojure.main", "main");
-public static void legacy_repl(String[] args) throws Exception{
+public static void legacy_repl(String[] args) {
REQUIRE.invoke(CLOJURE_MAIN);
LEGACY_REPL.invoke(RT.seq(args));
}
-public static void legacy_script(String[] args) throws Exception{
+public static void legacy_script(String[] args) {
REQUIRE.invoke(CLOJURE_MAIN);
LEGACY_SCRIPT.invoke(RT.seq(args));
}
-public static void main(String[] args) throws Exception{
+public static void main(String[] args) {
REQUIRE.invoke(CLOJURE_MAIN);
MAIN.applyTo(RT.seq(args));
}