logo       

2.01 patches: msg#00088

lisp.corman

Subject: 2.01 patches

In addition to the ANSI compatibility file I sent notice of
a little while ago, I have the following patches for 2.01 (one per file)
available.
If anyone is interested in any of them, just send email:



;;; READ
;;; Problem: (read nil) signals an error.
;;; Solution: Convert T and NIL to *TERMINAL-IO* and *STANDARD-INPUT*
;;; respectively, as specified in the Hyperspec.


;;; DO, DO*
;;; Problem: If you type
;;;
;;; (do ((x 0 (1+ x)) ((y 0 (1+ y)))) ((= x 10)) (list x y))
;;;
;;; the compiler wouldn't catch the syntax error (which you may
;;; not have either! -- one too many parenthesis around the Y clause)
;;;
;;; and perversely produces code that actually executes in a seemingly
;;; reasonable manner.
;;;
;;; Solution: check for this case and generate an error message.
;;; Fix both DO and DO*.


;;; CT:DEFUN-CALLBACK
;;; Problem: Functions defined with (CT:DEFUN-CALLBACK <name> ...)
;;; and friends do not create a (BLOCK <name> &rest body) block, so that one
;;; cannot use (RETURN-FROM <name>) statement to exit the function.
;;;
;;; Also, documentation and declarations are not handled correctly.
;;;
;;; Solution: modify the macro to parse the body for doc and decls,
;;; change the code generation to put the required BLOCK form
;;; around the body, putting the doc string and the decls in their
;;; proper places.


;;; DIRECTORY
;;; Problem: There was no way to extract a list of subdirectories
;;; of a given directory from Corman Lisp.
;;;
;;; Solution: Add the functions cl::directory-subdirs and
;;; cl::directory-files-and-subdirs.
;;;
;;; Along the way cl::directory got rewritten, such that it, and the
;;; other functions, call cl::directory-internal with appropriate
;;; switches.


;;; WITH-STANDARD-IO-SYNTAX
;;; Problem: WITH-STANDARD-IO-SYNTAX is not implemented.
;;; Solution: Implement it.


;;; DEBUG::FIND-SOURCE
;;; Problem: Loading a file using a PATHNAME instead of a STRING
;;; and then trying to use DEBUG::FIND-SOURCE on a function in that
;;; file results in an error when calling ED because ED expects a string.
;;;
;;; Solution: if the result of DEBUG::FUNCTION-SOURCE-FILE is a PATHNAME,
;;; convert it to a string.


;;; DEFMETHOD
;;; Author: Karsten Poeck
;;; Fix the warning about unused variables used as specialisers
;;; e.g. (defmethod foo ((x integer)) 1)
;;; would issue a warning about X being unused, but it should not.


;;; MAKE-PATHNAME
;;; Problem. MAKE-PATHNAME does not conform to its Hyperspec
;;; specification.
;;; Solution: Write a MAKE-PATHNAME whose spec is taken directly
;;; from the Hyperspec text.
;;; Note: Ignores LOGICAL-PATHNAME considerations.
;;; Note: Does not redefine MAKE-PATHNAME. Creates the MAKE-PATHNAME-HS
;;; function currently.


;;; WITH-OPEN-FILE
;;; Problem. WITH-OPEN-FILE tries to close NIL
;;; if the OPEN call returns NIL legitimately (which it might).
;;;
;;; (with-open-file (p "C:/does-not-exist.lisp" :if-does-not-exist nil)
;;; (print "hello") (terpri) (force-output t))
;;;
;;; "hello"
;;; An error occurred in function CLOSE:
;;; Error: Not a stream: NIL
;;;
;;; Solution: Add a test to prevent this case.


;;; EVAL
;;; Problem: EVAL compiles the code it is 'eval'-ing, but it
;;; ignores the issue of one subform defining an object in the global
;;; environment which is to be used later by another subform.
;;;
;;; Example (type in at toplevel):
;;;
;;; (progn
;;; (defmacro plugh (x) `(1+ ,x))
;;; (defun foo () (plugh 3))
;;; )
;;; Warning: Function not defined: PLUGH
;;; (foo)
;;; An error occurred in function NTH:
;;; Error: Not a list: 3
;;;
;;; Solution: It should do the whole 'toplevel form' thing correctly,
;;; but for now just hack it to recognize PROGN.


;;; DEFUN
;;; Problem: Defining a function named (setf <any>) causes
;;; -- a block named |(setf <any>)| to be established around
;;; the body, instead of a block named <any>
;;; -- DEFUN returns the symbol |(setf <any>)| instead of
;;; the list (setf <any>), which it is supposed to do
;;; according to the Hyperspec.
;;;
;;; Solution: Add ORIGINAL-NAME and BLOCK-NAME internal variables,
;;; set them to the proper values, and use them where appropriate.
;;;
;;; Also turned IF for SETF name conditional into UNLESS and removed PROGN.
;;; Also merged the SETF and non-SETF branches of the code generation
;;; at the bottom since it differed only in one line.
;;;
;;; Also added a test to prevent things like (DEFUN (SETF X Y) ...)
;;; from getting through.



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get 128 Bit SSL Encryption!
http://us.click.yahoo.com/xaxhjB/hdqFAA/xGHJAA/SyjtlB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
cormanlisp-unsubscribe@xxxxxxxxxxxxxxx



Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/





<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise