0.7.8.18:
authorAlexey Dejneka <adejneka@comail.ru>
Sun, 6 Oct 2002 09:15:50 +0000 (09:15 +0000)
committerAlexey Dejneka <adejneka@comail.ru>
Sun, 6 Oct 2002 09:15:50 +0000 (09:15 +0000)
        Fix bug 129: insufficient syntax checking in MACROLET.
        New bug: EVAL-WHEN inside MACROLET.

BUGS
src/compiler/ir1-translators.lisp
tests/compiler.pure.lisp
version.lisp-expr

diff --git a/BUGS b/BUGS
index bc92e10..bacda62 100644 (file)
--- a/BUGS
+++ b/BUGS
@@ -615,11 +615,11 @@ WORKAROUND:
 124:
    As of version 0.pre7.14, SBCL's implementation of MACROLET makes
    the entire lexical environment at the point of MACROLET available
-   in the bodies of the macroexpander functions. In particular, it 
-   allows the function bodies (which run at compile time) to try to 
+   in the bodies of the macroexpander functions. In particular, it
+   allows the function bodies (which run at compile time) to try to
    access lexical variables (which are only defined at runtime).
    It doesn't even issue a warning, which is bad.
-  
+
    The SBCL behavior arguably conforms to the ANSI spec (since the
    spec says that the behavior is undefined, ergo anything conforms).
    However, it would be better to issue a compile-time error.
@@ -635,7 +635,7 @@ WORKAROUND:
        the local macro definitions in a MACROLET, but the consequences
        are undefined if the local macro definitions reference any
        local variable or function bindings that are visible in that
-       lexical environment. 
+       lexical environment.
    Then it seems to contradict itself by giving the example
        (defun foo (x flag)
           (macrolet ((fudge (z)
@@ -676,22 +676,15 @@ WORKAROUND:
   structure classes related by inheritance. As of 0.7.0, SBCL still 
   doesn't follow it.
 
-129:
-  insufficient syntax checking in MACROLET:
-   (defun foo (x)
-     (macrolet ((defmacro bar (z) `(+ z z)))
-       (bar x)))
-  shouldn't compile without error (because of the extra DEFMACRO symbol).
-
 135:
   Ideally, uninterning a symbol would allow it, and its associated
-  FDEFINITION and PROCLAIM data, to be reclaimed by the GC. However, 
+  FDEFINITION and PROCLAIM data, to be reclaimed by the GC. However,
   at least as of sbcl-0.7.0, this isn't the case. Information about
   FDEFINITIONs and PROCLAIMed properties is stored in globaldb.lisp
   essentially in ordinary (non-weak) hash tables keyed by symbols.
   Thus, once a system has an entry in this system, it tends to live
   forever, even when it is uninterned and all other references to it
-  are lost. 
+  are lost.
 
 136:
   (reported by Arnaud Rouanet on cmucl-imp 2001-12-18)
@@ -721,7 +714,7 @@ WORKAROUND:
   T
   * (defclass b () ())
   #<STANDARD-CLASS B>
-   
+
   ;;; And now...
   * (subtypep 'b 'a)
   T
@@ -821,9 +814,15 @@ WORKAROUND:
     debugger invoked on condition of type TYPE-ERROR:
       The value NIL is not of type SB-C::NODE.
   The location of this failure has moved around as various related
-  issues were cleaned up. As of sbcl-0.7.1.9, it occurs in 
+  issues were cleaned up. As of sbcl-0.7.1.9, it occurs in
   NODE-BLOCK called by LAMBDA-COMPONENT called by IR2-CONVERT-CLOSURE.
 
+  (Python LET-converts KIDIFY1 into KID-FROB, then tries to inline
+  expand KID-FROB into %ZEEP. Having partially done it, it sees a call
+  of KIDIFY1, which already does not exist. So it gives up on
+  expansion, leaving garbage consisting of infinished blocks of the
+  partially converted function.)
+
 157:
   Functions SUBTYPEP, TYPEP, UPGRADED-ARRAY-ELEMENT-TYPE, and 
   UPGRADED-COMPLEX-PART-TYPE should have an optional environment argument.
@@ -1125,6 +1124,8 @@ WORKAROUND:
              (print j))))
        (trust-assertion 6) ; prints nothing unless DECLARE is commented out
 
+     (see bug 203)
+
 193: "unhelpful CLOS error reporting when the primary method is missing"
   In sbcl-0.7.7, when
     (defmethod foo :before ((x t)) (print x))
@@ -1224,6 +1225,20 @@ WORKAROUND:
   This situation may appear during optimizing away degenerate cases of
   certain functions: see bugs 54, 192b.
 
+204:
+  (EVAL-WHEN (:COMPILE-TOPLEVEL) ...) inside MACROLET evaluates its
+  argument in the null lexical environment. E.g. compiling file with
+
+    (macrolet ((def (x) `(print ,x)))
+      (eval-when (:compile-toplevel)
+        (def 'hello)))
+
+  causes
+
+    debugger invoked on condition of type UNDEFINED-FUNCTION:
+      The function DEF is undefined.
+
+
 DEFUNCT CATEGORIES OF BUGS
   IR1-#:
     These labels were used for bugs related to the old IR1 interpreter.
index eb15d0c..76b2edc 100644 (file)
      (destructuring-bind (name arglist &body body) definition
        (unless (symbolp name)
         (compiler-error "The local macro name ~S is not a symbol." name))
+       (unless (listp arglist)
+        (compiler-error "The local macro argument list ~S is not a list." arglist))
        (let ((whole (gensym "WHOLE"))
             (environment (gensym "ENVIRONMENT")))
         (multiple-value-bind (body local-decls)
index ba58524..d120ba4 100644 (file)
 ;;; a bug in the MAP deftransform caused non-VECTOR array specifiers
 ;;; to cause errors in the compiler.  Fixed by CSR in 0.7.8.10
 (assert (list (compile nil '(lambda (x) (map 'simple-array 'identity x)))))
+
+;;; bug 129: insufficient syntax checking in MACROLET
+(multiple-value-bind (result error)
+    (ignore-errors (eval '(macrolet ((foo x `',x)) (foo 1 2 3))))
+  (assert (null result))
+  (assert (typep error 'error)))
index d1600b2..afa4eac 100644 (file)
@@ -18,4 +18,4 @@
 ;;; internal versions off the main CVS branch, it gets hairier, e.g.
 ;;; "0.pre7.14.flaky4.13".)
 
-"0.7.8.17"
+"0.7.8.18"