chiark / gitweb /
src/class-finalize-impl.lisp: Reorder `flet'/`macrolet'.
authorMark Wooding <mdw@distorted.org.uk>
Thu, 26 May 2016 08:26:09 +0000 (09:26 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 29 May 2016 13:27:39 +0000 (14:27 +0100)
The `macrolet' macro expansion explicitly references the function
defined in the `flet' form, so probably they should be the other way
out.

src/class-finalize-impl.lisp

index 23d7107b7a88d69a2f4937acd7014f91c52cdc36..36d56e042ff5304760e94e8a7ef097966586c081 100644 (file)
@@ -431,13 +431,13 @@        (default-slot (class 'metaclass) (guess-metaclass class))
       (:finalized
        t))))
 
-(macrolet ((define-layout-slot (slot (class) &body body)
-            `(define-on-demand-slot sod-class ,slot (,class)
-               (check-class-is-finalized ,class)
-               ,@body)))
-  (flet ((check-class-is-finalized (class)
-          (unless (eq (sod-class-state class) :finalized)
-            (error "Class ~S is not finalized" class))))
+(flet ((check-class-is-finalized (class)
+        (unless (eq (sod-class-state class) :finalized)
+          (error "Class ~S is not finalized" class))))
+  (macrolet ((define-layout-slot (slot (class) &body body)
+              `(define-on-demand-slot sod-class ,slot (,class)
+                 (check-class-is-finalized ,class)
+                 ,@body)))
     (define-layout-slot %ilayout (class)
       (compute-ilayout class))
     (define-layout-slot effective-methods (class)