chiark / gitweb /
src/codegen-proto.lisp, doc/list-exports.lisp: Export `inst' readers.
authorMark Wooding <mdw@distorted.org.uk>
Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 13 Sep 2015 23:02:27 +0000 (00:02 +0100)
doc/list-exports.lisp
src/codegen-proto.lisp

index 710da87d4507f7027a19eec8362a9a21f70b953d..fd02f009e5767d6e018861f67f6592f7c43725cc 100644 (file)
@@ -19,10 +19,13 @@ (defmethod form-list-exports ((head (eql 'export)) tail)
 
 (defmethod form-list-exports ((head (eql 'definst)) tail)
   (destructuring-bind (code (streamvar &key export) args &body body) tail
-    (declare (ignore streamvar args body))
+    (declare (ignore streamvar body))
     (and export
-        (list (symbolicate code '-inst)
-              (symbolicate 'make- code '-inst)))))
+        (list* (symbolicate code '-inst)
+               (symbolicate 'make- code '-inst)
+               (mapcar (lambda (arg)
+                         (symbolicate 'inst- arg))
+                       args)))))
 
 (defmethod form-list-exports ((head (eql 'define-tagged-type)) tail)
   (destructuring-bind (kind what) tail
index 571f0b0cdf7fd5b0a8f07997f87163103606bb2b..7c8f65c8189fb42ae9dd3250c4031ae7340514bb 100644 (file)
@@ -167,7 +167,10 @@        (defmethod print-object ((,inst-var ,class-name) ,streamvar)
                 (format stream "~@<~@{~S ~@_~S~^ ~_~}~:>"
                         ,@(mappend #'list keys args)))
               (progn ,@body))))
-       ,@(and export `((export '(,class-name ,constructor-name))))
+       ,@(and export `((export '(,class-name ,constructor-name
+                                ,@(mapcar (lambda (arg)
+                                            (symbolicate 'inst- arg))
+                                          args)))))
        ',code)))
 
 ;; Important instruction classes.