X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fdebug-var-io.lisp;h=087b46c1ebd3e077eabf0c22297eb9b50f697b8f;hb=f4f18b9dcdaf1948947b1747f5bfa766a1a0ee4c;hp=36cbb443ab0ad066d3b54bdd359dcab739fff2e0;hpb=cea4896b2482b7b2b429c1631d774b4cfbc0efba;p=sbcl.git diff --git a/src/code/debug-var-io.lisp b/src/code/debug-var-io.lisp index 36cbb44..087b46c 100644 --- a/src/code/debug-var-io.lisp +++ b/src/code/debug-var-io.lisp @@ -44,8 +44,8 @@ (ash (aref ,vec (+ ,index 4)) 24)) (incf ,index 5)))))) -;;; Takes an adjustable vector Vec with a fill pointer and pushes the -;;; variable length representation of Int on the end. +;;; Take an adjustable vector VEC with a fill pointer and push the +;;; variable length representation of INT on the end. (defun write-var-integer (int vec) (declare (type (unsigned-byte 32) int)) (cond ((<= int 253) @@ -62,20 +62,21 @@ ;;;; packed strings ;;;; -;;;; A packed string is a variable length integer length followed by the -;;;; character codes. +;;;; A packed string is a variable length integer length followed by +;;;; the character codes. -;;; Read a packed string from Vec starting at Index, advancing Index. +;;; Read a packed string from VEC starting at INDEX, advancing INDEX. (defmacro read-var-string (vec index) (once-only ((len `(read-var-integer ,vec ,index))) (once-only ((res `(make-string ,len))) `(progn - (%primitive byte-blt ,vec ,index ,res 0 ,len) + (%byte-blt ,vec ,index ,res 0 ,len) (incf ,index ,len) ,res)))) -;;; Write String into Vec (adjustable, fill-pointer) represented as the -;;; length (in a var-length integer) followed by the codes of the characters. +;;; Write STRING into VEC (adjustable, with fill-pointer) represented +;;; as the length (in a var-length integer) followed by the codes of +;;; the characters. (defun write-var-string (string vec) (declare (simple-string string)) (let ((len (length string))) @@ -86,12 +87,12 @@ ;;;; packed bit vectors -;;; Read the specified number of Bytes out of Vec at Index and convert them -;;; to a bit-vector. Index is incremented. +;;; Read the specified number of BYTES out of VEC at INDEX and convert +;;; them to a BIT-VECTOR. INDEX is incremented. (defmacro read-packed-bit-vector (bytes vec index) (once-only ((n-bytes bytes)) (once-only ((n-res `(make-array (* ,n-bytes 8) :element-type 'bit))) `(progn - (%primitive byte-blt ,vec ,index ,n-res 0 ,n-bytes) + (%byte-blt ,vec ,index ,n-res 0 ,n-bytes) (incf ,index ,n-bytes) ,n-res))))