chiark / gitweb /
src/classes.lisp, src/class-finalize-impl.lisp: Don't export slot writers.
[sod] / src / method-aggregate.lisp
index 9d0a6dde11df2e7dde2bb3a1e072ec11abfbca01..e9a889d1f3e72d0ceb28d47f384ed5069e5a332c 100644 (file)
@@ -28,7 +28,7 @@ (cl:in-package #:sod)
 ;;;--------------------------------------------------------------------------
 ;;; Classes and protocol.
 
-(export 'aggregating-message)
+(export '(aggregating-message message-combination))
 (defclass aggregating-message (simple-message)
   ((combination :initarg :combination :type keyword
                :reader message-combination)
@@ -406,18 +406,21 @@ (defmethod aggregating-message-properties
     :before :fragment
     :first :fragment
     :each :fragment
-    :after :fragment))
+    :after :fragment
+    :count :id))
 
 (defmethod compute-aggregating-message-kernel
     ((message aggregating-message) (combination (eql :custom))
      codegen target methods arg-names
      &key (retvar "sod_ret") (valvar "sod_val")
-         decls before each (first each) after)
+         decls before each (first each) after count)
   (let* ((type (c-type-subtype (sod-message-type message)))
         (not-void-p (not (eq type c-type-void))))
     (when not-void-p
       (ensure-var codegen retvar type)
       (ensure-var codegen valvar type))
+    (when count
+      (ensure-var codegen count c-type-int (length methods)))
     (when decls
       (emit-decl codegen decls))
     (labels ((maybe-emit (fragment)