fasl-read handles negative fixnums.

This commit is contained in:
Abdulaziz Ghuloum 2006-12-26 09:22:58 +03:00
parent 3ddceaa164
commit 9c00592520
2 changed files with 10 additions and 1 deletions

Binary file not shown.

View File

@ -250,7 +250,16 @@
[(fx<= c3 127)
(fxlogor (fxlogor (fxsra c0 2) (fxsll c1 6))
(fxlogor (fxsll c2 14) (fxsll c3 22)))]
[else (error who "neg")]))]
[else
(let ([c0 (fxlogand #xFF (fxlognot c0))]
[c1 (fxlogand #xFF (fxlognot c1))]
[c2 (fxlogand #xFF (fxlognot c2))]
[c3 (fxlogand #xFF (fxlognot c3))])
(fx- -1
(fxlogor (fxlogor (fxsra c0 2)
(fxsll c1 6))
(fxlogor (fxsll c2 14)
(fxsll c3 22)))))]))]
[(#\P)
(let ([a (read)])
(cons a (read)))]