commit 3ce5128faabdc53b3e06eaa77f20be6de3de27cc
parent ae2da1f4e7c00ea0f05df2aacc5a33713560d30e
Author: Alexander Burger <abu@software-lab.de>
Date: Tue, 11 Jun 2013 10:43:42 +0200
Bug in 'cutLocalCX' / 'joinLocalCX'
Diffstat:
7 files changed, 56 insertions(+), 57 deletions(-)
diff --git a/doc64/structures b/doc64/structures
@@ -1,4 +1,4 @@
-# 13nov12abu
+# 11jun13abu
# (c) Software Lab. Alexander Burger
@@ -220,12 +220,12 @@
Z |
L |
<III> [env] |
- <II> seg |
- <I> lim |
- LINK ----+ <-- co7
-
-
- Stack segment:
+ <II> seg -----|-----------------+
+ <I> lim | |
+ LINK ----+ <-- co7 |
+ |
+ |
+ Stack segment: <--------------+
<-I> tag # Tag
<-II> stk # Stack pointer --+
[env] # Environment |
diff --git a/ersatz/picolisp.jar b/ersatz/picolisp.jar
Binary files differ.
diff --git a/lib/map b/lib/map
@@ -1,5 +1,5 @@
-! (2885 . "@src64/flow.l")
-$ (2987 . "@src64/flow.l")
+! (2884 . "@src64/flow.l")
+$ (2986 . "@src64/flow.l")
% (2572 . "@src64/big.l")
& (2807 . "@src64/big.l")
* (2389 . "@src64/big.l")
@@ -46,7 +46,7 @@ bool (1724 . "@src64/flow.l")
box (828 . "@src64/flow.l")
box? (1131 . "@src64/sym.l")
by (1669 . "@src64/apply.l")
-bye (3435 . "@src64/flow.l")
+bye (3434 . "@src64/flow.l")
bytes (2973 . "@src64/subr.l")
caaaar (271 . "@src64/subr.l")
caaadr (288 . "@src64/subr.l")
@@ -62,7 +62,7 @@ caddar (409 . "@src64/subr.l")
cadddr (435 . "@src64/subr.l")
caddr (156 . "@src64/subr.l")
cadr (45 . "@src64/subr.l")
-call (3087 . "@src64/flow.l")
+call (3086 . "@src64/flow.l")
car (5 . "@src64/subr.l")
case (1965 . "@src64/flow.l")
catch (2467 . "@src64/flow.l")
@@ -115,7 +115,7 @@ diff (2590 . "@src64/subr.l")
dir (3154 . "@src64/main.l")
dm (545 . "@src64/flow.l")
do (2141 . "@src64/flow.l")
-e (2948 . "@src64/flow.l")
+e (2947 . "@src64/flow.l")
echo (4434 . "@src64/io.l")
env (609 . "@src64/main.l")
eof (3549 . "@src64/io.l")
@@ -141,7 +141,7 @@ flip (1700 . "@src64/subr.l")
flush (5143 . "@src64/io.l")
fold (3521 . "@src64/sym.l")
for (2230 . "@src64/flow.l")
-fork (3261 . "@src64/flow.l")
+fork (3260 . "@src64/flow.l")
format (2089 . "@src64/big.l")
free (1960 . "@src64/db.l")
from (3568 . "@src64/io.l")
@@ -169,12 +169,12 @@ inc (2256 . "@src64/big.l")
index (2638 . "@src64/subr.l")
info (3056 . "@src64/main.l")
intern (1007 . "@src64/sym.l")
-ipid (3206 . "@src64/flow.l")
+ipid (3205 . "@src64/flow.l")
isa (967 . "@src64/flow.l")
job (1429 . "@src64/flow.l")
journal (971 . "@src64/db.l")
key (3401 . "@src64/io.l")
-kill (3238 . "@src64/flow.l")
+kill (3237 . "@src64/flow.l")
last (2045 . "@src64/subr.l")
le0 (2693 . "@src64/big.l")
length (2742 . "@src64/subr.l")
@@ -239,7 +239,7 @@ on (1717 . "@src64/sym.l")
onOff (1747 . "@src64/sym.l")
one (1780 . "@src64/sym.l")
open (4360 . "@src64/io.l")
-opid (3222 . "@src64/flow.l")
+opid (3221 . "@src64/flow.l")
opt (3345 . "@src64/main.l")
or (1640 . "@src64/flow.l")
out (4236 . "@src64/io.l")
@@ -324,7 +324,7 @@ tail (1912 . "@src64/subr.l")
tell (3285 . "@src64/io.l")
text (1407 . "@src64/sym.l")
throw (2493 . "@src64/flow.l")
-tick (3174 . "@src64/flow.l")
+tick (3173 . "@src64/flow.l")
till (3635 . "@src64/io.l")
time (2861 . "@src64/main.l")
touch (1181 . "@src64/sym.l")
diff --git a/src/vers.h b/src/vers.h
@@ -1 +1 @@
-static byte Version[4] = {3,1,2,11};
+static byte Version[4] = {3,1,2,12};
diff --git a/src64/flow.l b/src64/flow.l
@@ -1,4 +1,4 @@
-# 25may13abu
+# 11jun13abu
# (c) Software Lab. Alexander Burger
(code 'redefMsgEC)
@@ -2846,27 +2846,26 @@
jmp resumeCoroutine # Resume
(code 'cutLocalCX 0)
- do
- ld A (X) # Get link
- null A # Any?
- jz ret # No
- cmp A C # More locals?
- if eq # No
- ld (X) 0 # Cut off
- ret
- end
- ld X A # Next frame
- loop
+ cmp C (X) # Any locals?
+ if ne # Yes
+ do
+ ld X (X) # Frame pointer
+ cmp C (X) # More locals?
+ until eq # No
+ ld (X) 0 # Cut off
+ end
+ ret
(code 'joinLocalCX 0)
- do
- null (X) # More locals?
- if z # No
- ld (X) C # Join
- ret
- end
- ld X (X) # Next frame
- loop
+ cmp C (X) # Any locals?
+ if ne # Yes
+ do
+ ld X (X) # Frame pointer
+ null (X) # More locals?
+ until z # No
+ ld (X) C # Join
+ end
+ ret
(code 'closeCoFilesC 0)
do
diff --git a/src64/tags b/src64/tags
@@ -1110,23 +1110,23 @@ sys/x86-64.linux.defs.l,1959
resumeCoroutine2576,60042
doYield2729,65274
cutLocalCX2848,68623
-joinLocalCX2861,68853
-closeCoFilesC2871,69016
-doBreak2885,69279
-brkLoadE_E2893,69431
-doE2948,71031
-doTrace2987,71797
-traceCY3059,73712
-doCall3087,74200
-doTick3174,76392
-doIpid3206,77389
-doOpid3222,77677
-doKill3238,77972
-doFork3261,78407
-forkLispX_FE3274,78628
-doBye3435,83188
-byeE3447,83360
-finishE3459,83671
+joinLocalCX2859,68829
+closeCoFilesC2870,69031
+doBreak2884,69294
+brkLoadE_E2892,69446
+doE2947,71046
+doTrace2986,71812
+traceCY3058,73727
+doCall3086,74215
+doTick3173,76407
+doIpid3205,77404
+doOpid3221,77692
+doKill3237,77987
+doFork3260,78422
+forkLispX_FE3273,78643
+doBye3434,83203
+byeE3446,83375
+finishE3458,83686
./subr.l,2147
doCar5,71
diff --git a/src64/version.l b/src64/version.l
@@ -1,6 +1,6 @@
-# 30may13abu
+# 11jun13abu
# (c) Software Lab. Alexander Burger
-(de *Version 3 1 2 11)
+(de *Version 3 1 2 12)
# vi:et:ts=3:sw=3