diff --git a/changelog b/changelog index 8be8e99..41a1e91 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,8 @@ +20090808 tpd src/axiom-website/patches.html 20090808.03.tpd.patch +20090808 tpd src/interp/Makefile remove bits.lisp +20090808 tpd src/interp/debugsys.lisp remove bits reference +20090808 tpd src/interp/vmlisp.lisp merge bits.lisp +20090808 tpd src/interp/bits.lisp removed, merged with vmlisp.lisp 20090808 tpd src/axiom-website/patches.html 20090808.02.tpd.patch 20090808 tpd src/interp/Makefile remove spad.lisp 20090808 tpd src/interp/debugsys.lisp remove spad reference diff --git a/src/axiom-website/patches.html b/src/axiom-website/patches.html index ce6b71a..0bcb210 100644 --- a/src/axiom-website/patches.html +++ b/src/axiom-website/patches.html @@ -1758,6 +1758,8 @@ vmlisp.lisp and spaderror.lisp merged
vmlisp.lisp and debug.lisp merged
20090808.02.tpd.patch vmlisp.lisp and spad.lisp merged
+20090808.03.tpd.patch +vmlisp.lisp and bits.lisp merged
diff --git a/src/interp/Makefile.pamphlet b/src/interp/Makefile.pamphlet index ef5cfd5..4cb0d64 100644 --- a/src/interp/Makefile.pamphlet +++ b/src/interp/Makefile.pamphlet @@ -128,7 +128,6 @@ expanded in later compiles. All macros are assumed to be in this list of files. <>= DEP= ${MID}/vmlisp.lisp \ - ${MID}/bits.lisp \ ${MID}/setq.lisp ${MID}/property.lisp \ ${MID}/unlisp.lisp ${MID}/foam_l.lisp \ ${MID}/axext_l.lisp @@ -175,7 +174,7 @@ and graphics. <>= OBJS= ${OUT}/vmlisp.${O} \ ${OUT}/unlisp.${O} ${OUT}/setq.${LISP} \ - ${OUT}/astr.${O} ${OUT}/bits.${O} \ + ${OUT}/astr.${O} \ ${OUT}/alql.${O} ${OUT}/buildom.${O} \ ${OUT}/cattable.${O} \ ${OUT}/cformat.${O} ${OUT}/cfuns.${O} \ @@ -417,7 +416,6 @@ DOCFILES=${DOC}/alql.boot.dvi \ ${DOC}/astr.boot.dvi ${DOC}/ax.boot.dvi \ ${DOC}/axext_l.lisp.dvi \ ${DOC}/bc-matrix.boot.dvi \ - ${DOC}/bits.lisp.dvi \ ${DOC}/br-con.boot.dvi \ ${DOC}/buildom.boot.dvi \ ${DOC}/category.boot.dvi ${DOC}/cattable.boot.dvi \ @@ -910,39 +908,6 @@ ${MID}/apply.lisp: ${IN}/apply.lisp.pamphlet @ -\subsection{bits.lisp \cite{8}} -<>= -${OUT}/bits.${O}: ${MID}/bits.lisp - @ echo 13 making ${OUT}/bits.${O} from ${MID}/bits.lisp - @ ( cd ${MID} ; \ - if [ -z "${NOISE}" ] ; then \ - echo '(progn (compile-file "${MID}/bits.lisp"' \ - ':output-file "${OUT}/bits.${O}") (${BYE}))' | ${DEPSYS} ; \ - else \ - echo '(progn (compile-file "${MID}/bits.lisp"' \ - ':output-file "${OUT}/bits.${O}") (${BYE}))' | ${DEPSYS} \ - >${TMP}/trace ; \ - fi ) -@ -<>= -${MID}/bits.lisp: ${IN}/bits.lisp.pamphlet - @ echo 14 making ${MID}/bits.lisp from ${IN}/bits.lisp.pamphlet - @ (cd ${MID} ; \ - ${TANGLE} ${IN}/bits.lisp.pamphlet >bits.lisp ) - -@ -<>= -${DOC}/bits.lisp.dvi: ${IN}/bits.lisp.pamphlet - @echo 15 making ${DOC}/bits.lisp.dvi from ${IN}/bits.lisp.pamphlet - @(cd ${DOC} ; \ - cp ${IN}/bits.lisp.pamphlet ${DOC} ; \ - ${DOCUMENT} ${NOISE} bits.lisp ; \ - rm -f ${DOC}/bits.lisp.pamphlet ; \ - rm -f ${DOC}/bits.lisp.tex ; \ - rm -f ${DOC}/bits.lisp ) - -@ - \subsection{cfuns.lisp \cite{10}} <>= ${OUT}/cfuns.${O}: ${MID}/cfuns.lisp @@ -7058,10 +7023,6 @@ clean: <> <> -<> -<> -<> - <> <> <> @@ -7655,7 +7616,6 @@ pp \bibitem{4} {\bf \$SPAD/src/interp/setq.lisp.pamphlet} \bibitem{5} {\bf \$SPAD/src/interp/patches.lisp.pamphlet} \bibitem{6} {\bf www.aldor.org} -\bibitem{8} {\bf \$SPAD/src/interp/bits.lisp.pamphlet} \bibitem{10} {\bf \$SPAD/src/interp/cfuns.lisp.pamphlet} \bibitem{12} {\bf \$SPAD/src/interp/construc.lisp.pamphlet} \bibitem{13} {\bf \$SPAD/src/interp/daase.lisp.pamphlet} diff --git a/src/interp/bits.lisp.pamphlet b/src/interp/bits.lisp.pamphlet deleted file mode 100644 index c764797..0000000 --- a/src/interp/bits.lisp.pamphlet +++ /dev/null @@ -1,93 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/interp bits.lisp} -\author{Timothy Daly} -\maketitle -\begin{abstract} -\end{abstract} -\eject -\tableofcontents -\eject -\section{License} -<>= -;; Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. -;; All rights reserved. -;; -;; Redistribution and use in source and binary forms, with or without -;; modification, are permitted provided that the following conditions are -;; met: -;; -;; - Redistributions of source code must retain the above copyright -;; notice, this list of conditions and the following disclaimer. -;; -;; - Redistributions in binary form must reproduce the above copyright -;; notice, this list of conditions and the following disclaimer in -;; the documentation and/or other materials provided with the -;; distribution. -;; -;; - Neither the name of The Numerical ALgorithms Group Ltd. nor the -;; names of its contributors may be used to endorse or promote products -;; derived from this software without specific prior written permission. -;; -;; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -;; IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -;; TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -;; PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER -;; OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -;; EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -;; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -;; PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -;; LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -;; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -@ -<<*>>= -<> - -;;; The types "bit" and "bit vector" are implemented differently -;;; in different variants of lisp. -;;; These lisp macros/functions will have different implementations -;;; on different lisp systems. - -;;; The operations which traverse entire vectors are given as functions -;;; since the function calling overhead will be relatively small. -;;; The operations which extract or set a single part of the vector are -;;; provided as macros. - -(in-package "BOOT") - -;;; SMW Nov 88: Created - -(defmacro truth-to-bit (x) `(cond (,x 1) ('else 0))) -(defmacro bit-to-truth (b) `(eq ,b 1)) - -(defun bvec-make-full (n x) - (make-array (list n) :element-type 'bit :initial-element x)) - -(defmacro bvec-elt (bv i) `(sbit ,bv ,i)) -(defmacro bvec-setelt (bv i x) `(setf (sbit ,bv ,i) ,x)) -(defmacro bvec-size (bv) `(size ,bv)) - -(defun bvec-copy (bv) (copy-seq bv)) -(defun bvec-concat (bv1 bv2) (concatenate '(vector bit) bv1 bv2)) -(defun bvec-equal (bv1 bv2) (equal bv1 bv2)) -(defun bvec-greater (bv1 bv2) - (let ((pos (mismatch bv1 bv2))) - (cond ((or (null pos) (>= pos (length bv1))) nil) - ((< pos (length bv2)) (> (bit bv1 pos) (bit bv2 pos))) - ((find 1 bv1 :start pos) t) - (t nil)))) -(defun bvec-and (bv1 bv2) (bit-and bv1 bv2)) -(defun bvec-or (bv1 bv2) (bit-ior bv1 bv2)) -(defun bvec-xor (bv1 bv2) (bit-xor bv1 bv2)) -(defun bvec-nand (bv1 bv2) (bit-nand bv1 bv2)) -(defun bvec-nor (bv1 bv2) (bit-nor bv1 bv2)) -(defun bvec-not (bv) (bit-not bv)) -@ -\eject -\begin{thebibliography}{99} -\bibitem{1} nothing -\end{thebibliography} -\end{document} diff --git a/src/interp/debugsys.lisp.pamphlet b/src/interp/debugsys.lisp.pamphlet index 66d5daf..1dee087 100644 --- a/src/interp/debugsys.lisp.pamphlet +++ b/src/interp/debugsys.lisp.pamphlet @@ -88,7 +88,6 @@ loaded by hand we need to establish a value. (thesymb "/int/interp/unlisp.lisp") (thesymb "/int/interp/setq.lisp") (thesymb "/int/interp/astr.clisp") - (thesymb "/int/interp/bits.lisp") (thesymb "/int/interp/alql.clisp") (thesymb "/int/interp/buildom.clisp") (thesymb "/int/interp/cattable.clisp") diff --git a/src/interp/vmlisp.lisp.pamphlet b/src/interp/vmlisp.lisp.pamphlet index 7e6ec14..2e3f814 100644 --- a/src/interp/vmlisp.lisp.pamphlet +++ b/src/interp/vmlisp.lisp.pamphlet @@ -7119,6 +7119,36 @@ special. `(spadcall (svref ,dollar (the fixnum ,n)))) +;;; The operations which traverse entire vectors are given as functions +;;; since the function calling overhead will be relatively small. +;;; The operations which extract or set a single part of the vector are +;;; provided as macros. + +(defmacro truth-to-bit (x) `(cond (,x 1) ('else 0))) +(defmacro bit-to-truth (b) `(eq ,b 1)) + +(defun bvec-make-full (n x) + (make-array (list n) :element-type 'bit :initial-element x)) + +(defmacro bvec-elt (bv i) `(sbit ,bv ,i)) +(defmacro bvec-setelt (bv i x) `(setf (sbit ,bv ,i) ,x)) +(defmacro bvec-size (bv) `(size ,bv)) + +(defun bvec-copy (bv) (copy-seq bv)) +(defun bvec-concat (bv1 bv2) (concatenate '(vector bit) bv1 bv2)) +(defun bvec-equal (bv1 bv2) (equal bv1 bv2)) +(defun bvec-greater (bv1 bv2) + (let ((pos (mismatch bv1 bv2))) + (cond ((or (null pos) (>= pos (length bv1))) nil) + ((< pos (length bv2)) (> (bit bv1 pos) (bit bv2 pos))) + ((find 1 bv1 :start pos) t) + (t nil)))) +(defun bvec-and (bv1 bv2) (bit-and bv1 bv2)) +(defun bvec-or (bv1 bv2) (bit-ior bv1 bv2)) +(defun bvec-xor (bv1 bv2) (bit-xor bv1 bv2)) +(defun bvec-nand (bv1 bv2) (bit-nand bv1 bv2)) +(defun bvec-nor (bv1 bv2) (bit-nor bv1 bv2)) +(defun bvec-not (bv) (bit-not bv)) @ \eject \begin{thebibliography}{99}