picolisp

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/picolisp.git/
Log | Files | Refs | README | LICENSE

commit 0ecd64b424c794cf0ac0e32d949ebba0c4d707a7
parent c1d2f1a9dcf0289369cc7c279443a3bcd3bd3eb4
Author: Alexander Burger <abu@software-lab.de>
Date:   Fri,  9 Sep 2011 14:37:51 +0200

Bug in '@' lambda bindings (32-bit)
Diffstat:
MCHANGES | 1+
Mersatz/picolisp.jar | 0
Msrc/flow.c | 20++++++++++----------
Msrc/main.c | 20++++++++++----------
Msrc/vers.h | 2+-
Msrc64/version.l | 4++--
Mtest/src/main.l | 8+++++++-
7 files changed, 31 insertions(+), 24 deletions(-)

diff --git a/CHANGES b/CHANGES @@ -1,4 +1,5 @@ * XXsep11 picoLisp-3.0.8 + Bug in '@' lambda bindings (32-bit) GC bug in 64-bit bignums Bug in 64-bit 'exec' error handling Bug in 'rand' (64-bit) diff --git a/ersatz/picolisp.jar b/ersatz/picolisp.jar Binary files differ. diff --git a/src/flow.c b/src/flow.c @@ -1,4 +1,4 @@ -/* 25feb11abu +/* 09sep11abu * (c) Software Lab. Alexander Burger */ @@ -306,11 +306,11 @@ static any evMethod(any o, any expr, any x) { ++f.cnt, x = cdr(x), y = cdr(y); } if (isNil(y)) { - while (--f.i > 0) { - x = val(f.bnd[f.i].sym); + do { + x = val(f.bnd[--f.i].sym); val(f.bnd[f.i].sym) = f.bnd[f.i].val; f.bnd[f.i].val = x; - } + } while (f.i); f.bnd[f.cnt].sym = This, f.bnd[f.cnt++].val = val(This), val(This) = o; y = cls, cls = Env.cls; Env.cls = y; y = key, key = Env.key; Env.key = y; @@ -318,11 +318,11 @@ static any evMethod(any o, any expr, any x) { } else if (y != At) { f.bnd[f.cnt].sym = y, f.bnd[f.cnt++].val = val(y), val(y) = x; - while (--f.i > 0) { - x = val(f.bnd[f.i].sym); + do { + x = val(f.bnd[--f.i].sym); val(f.bnd[f.i].sym) = f.bnd[f.i].val; f.bnd[f.i].val = x; - } + } while (f.i); f.bnd[f.cnt].sym = This, f.bnd[f.cnt++].val = val(This), val(This) = o; y = cls, cls = Env.cls; Env.cls = y; y = key, key = Env.key; Env.key = y; @@ -335,11 +335,11 @@ static any evMethod(any o, any expr, any x) { while (--n >= 0) Push(c[n], EVAL(car(x))), x = cdr(x); - while (--f.i > 0) { - x = val(f.bnd[f.i].sym); + do { + x = val(f.bnd[--f.i].sym); val(f.bnd[f.i].sym) = f.bnd[f.i].val; f.bnd[f.i].val = x; - } + } while (f.i); n = Env.next, Env.next = cnt; arg = Env.arg, Env.arg = c; f.bnd[f.cnt].sym = This, f.bnd[f.cnt++].val = val(This), val(This) = o; diff --git a/src/main.c b/src/main.c @@ -1,4 +1,4 @@ -/* 10jun11abu +/* 09sep11abu * (c) Software Lab. Alexander Burger */ @@ -660,20 +660,20 @@ any evExpr(any expr, any x) { ++f.cnt, x = cdr(x), y = cdr(y); } if (isNil(y)) { - while (--f.i > 0) { - x = val(f.bnd[f.i].sym); + do { + x = val(f.bnd[--f.i].sym); val(f.bnd[f.i].sym) = f.bnd[f.i].val; f.bnd[f.i].val = x; - } + } while (f.i); x = prog(cdr(expr)); } else if (y != At) { f.bnd[f.cnt].sym = y, f.bnd[f.cnt++].val = val(y), val(y) = x; - while (--f.i > 0) { - x = val(f.bnd[f.i].sym); + do { + x = val(f.bnd[--f.i].sym); val(f.bnd[f.i].sym) = f.bnd[f.i].val; f.bnd[f.i].val = x; - } + } while (f.i); x = prog(cdr(expr)); } else { @@ -683,11 +683,11 @@ any evExpr(any expr, any x) { while (--n >= 0) Push(c[n], EVAL(car(x))), x = cdr(x); - while (--f.i > 0) { - x = val(f.bnd[f.i].sym); + do { + x = val(f.bnd[--f.i].sym); val(f.bnd[f.i].sym) = f.bnd[f.i].val; f.bnd[f.i].val = x; - } + } while (f.i); n = Env.next, Env.next = cnt; arg = Env.arg, Env.arg = c; x = prog(cdr(expr)); diff --git a/src/vers.h b/src/vers.h @@ -1 +1 @@ -static byte Version[4] = {3,0,7,7}; +static byte Version[4] = {3,0,7,8}; diff --git a/src64/version.l b/src64/version.l @@ -1,6 +1,6 @@ -# 24aug11abu +# 09sep11abu # (c) Software Lab. Alexander Burger -(de *Version 3 0 7 7) +(de *Version 3 0 7 8) # vi:et:ts=3:sw=3 diff --git a/test/src/main.l b/test/src/main.l @@ -1,6 +1,12 @@ -# 07sep11abu +# 09sep11abu # (c) Software Lab. Alexander Burger +### Evaluation ### +(test 2 + (when 1 + ('((N) N) (and 2)) + @ ) ) + ### alarm ### (let N 6 (alarm 1 (inc 'N))