commit 161356f5a25ea66e46dc29488835648d9eb8624a
parent 4805f8828088633c6a82a0ace2a5ac176a5b8315
Author: Alexander Burger <abu@software-lab.de>
Date: Wed, 17 Jul 2013 21:07:33 +0200
ErsatzLisp java compiler warning messages
Diffstat:
5 files changed, 32 insertions(+), 24 deletions(-)
diff --git a/ersatz/fun.src b/ersatz/fun.src
@@ -1,4 +1,4 @@
-# 05jul13abu
+# 17jul13abu
# (c) Software Lab. Alexander Burger
# Ersatz PicoLisp Functions
@@ -58,6 +58,7 @@ up (i j k x)
return p.Data[i] = ex.Car.eval();
return p.Data[i];
}
+ q = p;
}
}
}
@@ -501,7 +502,7 @@ maps (i j k w x y s v)
return x;
# (map 'fun 'lst ..) -> lst
-map (i j w x y v)
+map (i j w x v)
w = (x = ex.Cdr).Car.eval();
if ((x = x.Cdr) instanceof Cell) {
v = new Any[6];
@@ -509,7 +510,7 @@ map (i j w x y v)
do
v = append(v, i++, x.Car.eval());
while ((x = x.Cdr) instanceof Cell);
- while ((y = v[0]) instanceof Cell) {
+ while (v[0] instanceof Cell) {
x = w.apply(ex, false, v, i);
for (j = i; --j >= 0;)
v[j] = v[j].Cdr;
@@ -518,7 +519,7 @@ map (i j w x y v)
return x;
# (mapc 'fun 'lst ..) -> any
-mapc (i j w x y v)
+mapc (i j w x v)
w = (x = ex.Cdr).Car.eval();
if ((x = x.Cdr) instanceof Cell) {
v = new Any[6];
@@ -526,7 +527,7 @@ mapc (i j w x y v)
do
v = append(v, i++, x.Car.eval());
while ((x = x.Cdr) instanceof Cell);
- while ((y = v[0]) instanceof Cell) {
+ while (v[0] instanceof Cell) {
x = w.apply(ex, true, v, i);
for (j = i; --j >= 0;)
v[j] = v[j].Cdr;
@@ -1621,7 +1622,7 @@ $ (i x)
return x;
# (call 'any ..) -> flg
-call (i j x)
+call (x)
ArrayList<String> cmd = new ArrayList<String>();
for (x = ex.Cdr; x instanceof Cell; x = x.Cdr)
cmd.add(x.Car.eval().name());
@@ -2112,7 +2113,7 @@ wipe (x y)
return x;
# (meta 'obj|typ 'sym ['sym2|cnt ..]) -> any
-meta (x y)
+meta (x)
if ((x = (ex = ex.Cdr).Car.eval()) instanceof Symbol)
x = x.Car;
for (x = meta(x, (ex = ex.Cdr).Car.eval()); (ex = ex.Cdr) instanceof Cell;)
@@ -2710,7 +2711,7 @@ n== (x y)
return Nil;
# (=0 'any) -> 0 | NIL
-=0 (x)
+=0 ()
return ex.Cdr.Car.eval().equal(Zero)? Zero : Nil;
# (=T 'any) -> flg
@@ -2826,7 +2827,7 @@ mmeq (x y z)
x = (ex = ex.Cdr).Car.eval();
for (y = (ex = ex.Cdr).Car.eval(); x instanceof Cell; x = x.Cdr)
if ((z = memq(x.Car, y)) != null)
- return x;
+ return z;
return Nil;
# (sect 'lst 'lst) -> lst
@@ -3315,7 +3316,7 @@ char (x)
return x == T? mkChar(0x10000) : new Number(firstChar(x));
# (skip ['any]) -> sym
-skip (c)
+skip ()
return InFile.skipc(firstChar(ex.Cdr.Car.eval())) < 0? Nil : mkChar(InFile.Chr);
# (eol) -> flg
@@ -3382,7 +3383,7 @@ till (x y str sb)
return mkStr(sb);
# (line 'flg) -> lst|sym
-line (i x y z sb)
+line (x y sb)
if (InFile.Chr == 0)
InFile.get();
if (InFile.eol())
@@ -3563,15 +3564,15 @@ echo (i j k n x y v)
return T;
# (prin 'any ..) -> any
-prin (x y)
- for (y = Nil; (ex = ex.Cdr) instanceof Cell; OutFile.Wr.print((y = ex.Car.eval()).name()));
- return y;
+prin (x)
+ for (x = Nil; (ex = ex.Cdr) instanceof Cell; OutFile.Wr.print((x = ex.Car.eval()).name()));
+ return x;
# (prinl 'any ..) -> any
-prinl (x y)
- for (y = Nil; (ex = ex.Cdr) instanceof Cell; OutFile.Wr.print((y = ex.Car.eval()).name()));
+prinl (x)
+ for (x = Nil; (ex = ex.Cdr) instanceof Cell; OutFile.Wr.print((x = ex.Car.eval()).name()));
OutFile.newline();
- return y;
+ return x;
# (space ['cnt]) -> cnt
space (i x)
@@ -3645,7 +3646,7 @@ listen (i j x y)
}
# (connect 'any 'cnt) -> cnt | NIL
-connect (i)
+connect ()
try {
SocketChannel chan = SocketChannel.open();
if (chan.connect(new InetSocketAddress(evString(ex.Cdr), evInt(ex.Cdr.Cdr))))
diff --git a/ersatz/picolisp.jar b/ersatz/picolisp.jar
Binary files differ.
diff --git a/ersatz/sys.src b/ersatz/sys.src
@@ -1,4 +1,4 @@
-// 10jul13abu
+// 17jul13abu
// (c) Software Lab. Alexander Burger
import java.util.*;
@@ -7,7 +7,6 @@ import java.io.*;
import java.net.*;
import java.nio.*;
import java.nio.channels.*;
-import java.nio.channels.spi.*;
import java.lang.reflect.*;
/* Ersatz PicoLisp Interpreter (Poor Man's PicoLisp) */
@@ -862,7 +861,7 @@ public class PicoLisp {
}
final static Any idx(Any var, Any key, int flg) {
- Any x, y, z, p, tree, tos;
+ Any x, y, z, p;
boolean ad;
int i;
if (key == null)
@@ -1213,6 +1212,8 @@ public class PicoLisp {
x = ex.Cdr.prog();
Env.Args = args;
Env.Arg = arg;
+ Env.ArgC = argc;
+ Env.Next = next;
}
for (i = bnd.Cnt; (i -= 2) >= 0;)
bnd.Data[i+1].Car = bnd.Data[i];
@@ -2375,6 +2376,8 @@ public class PicoLisp {
x = z.Cdr.prog();
Env.Args = args;
Env.Arg = arg;
+ Env.ArgC = argc;
+ Env.Next = next;
}
for (i = bnd.Cnt; (i -= 2) >= 0;)
bnd.Data[i+1].Car = bnd.Data[i];
@@ -2641,6 +2644,8 @@ public class PicoLisp {
x = Cdr.prog();
Env.Args = args;
Env.Arg = arg;
+ Env.ArgC = argc;
+ Env.Next = next;
}
for (i = bnd.Cnt; (i -= 2) >= 0;)
bnd.Data[i+1].Car = bnd.Data[i];
@@ -2685,6 +2690,8 @@ public class PicoLisp {
x = Cdr.prog();
Env.Args = args;
Env.Arg = arg;
+ Env.ArgC = argc;
+ Env.Next = next;
}
for (i = bnd.Cnt; (i -= 2) >= 0;)
bnd.Data[i+1].Car = bnd.Data[i];
diff --git a/src/vers.h b/src/vers.h
@@ -1 +1 @@
-static byte Version[4] = {3,1,3,3};
+static byte Version[4] = {3,1,3,4};
diff --git a/src64/version.l b/src64/version.l
@@ -1,6 +1,6 @@
-# 05jul13abu
+# 17jul13abu
# (c) Software Lab. Alexander Burger
-(de *Version 3 1 3 3)
+(de *Version 3 1 3 4)
# vi:et:ts=3:sw=3