;;;
;;; SOD is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
;;;
;;; SOD is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
;;;--------------------------------------------------------------------------
;;; Direct method classes.
;;;--------------------------------------------------------------------------
;;; Direct method classes.
(defclass basic-direct-method (sod-method)
((role :initarg :role :type symbol :reader sod-method-role)
(function-type :type c-function-type :reader sod-method-function-type))
(defclass basic-direct-method (sod-method)
((role :initarg :role :type symbol :reader sod-method-role)
(function-type :type c-function-type :reader sod-method-function-type))
(error "Method return type ~A must be `void'" (c-type-subtype type)))
(unless (argument-lists-compatible-p (c-function-arguments msgtype)
(c-function-arguments type))
(error "Method return type ~A must be `void'" (c-type-subtype type)))
(unless (argument-lists-compatible-p (c-function-arguments msgtype)
(c-function-arguments type))
(return-type (c-type-subtype (sod-message-type message)))
(msgargs (sod-message-argument-tail message))
(arguments (if (varargs-message-p message)
(return-type (c-type-subtype (sod-message-type message)))
(msgargs (sod-message-argument-tail message))
(arguments (if (varargs-message-p message)
method-args)
method-args)))))
;;;--------------------------------------------------------------------------
;;; Effective method classes.
method-args)
method-args)))))
;;;--------------------------------------------------------------------------
;;; Effective method classes.
(defclass basic-effective-method (effective-method)
((around-methods :initarg :around-methods :initform nil
:type list :reader effective-method-around-methods)
(defclass basic-effective-method (effective-method)
((around-methods :initarg :around-methods :initform nil
:type list :reader effective-method-around-methods)
(sod-class-nickname message-class)
(sod-message-name message)
(sod-class-nickname chain-head))
(sod-class-nickname message-class)
(sod-message-name message)
(sod-class-nickname chain-head))
(defmethod method-entry-slot-name ((entry method-entry))
(let* ((method (method-entry-effective-method entry))
(defmethod method-entry-slot-name ((entry method-entry))
(let* ((method (method-entry-effective-method entry))
- (deliver-expr codegen target call)))
- (emit-inst codegen (make-va-end-inst *sod-ap*))
+ (deliver-call codegen :void "va_start"
+ *sod-ap* parm-n)
+ (deliver-expr codegen target call)
+ (deliver-call codegen :void "va_end"
+ *sod-ap*)))
(codegen-pop-function codegen main main-type))))))
;; Generate the method body. We'll work out what to do with it later.
(codegen-pop-function codegen main main-type))))))
;; Generate the method body. We'll work out what to do with it later.