expansion.
* goops.scm (change-object-class): Quote empty list constants.
(method): Reverted previous change (enclosing body);
Quote empty list.
(initialize <method>): Supply `dummy-procedure' as default instead
of creating a new closure.
* goops/internal.scm: Re-export (oop goops) without copying
bindings.
2001-03-04 Mikael Djurfeldt <mdj@linnaeus.mit.edu>
+ * goops/compile.scm (compile-method): Tag method closure for body
+ expansion.
+
* goops.scm (change-object-class): Quote empty list constants.
(method): Reverted previous change (enclosing body);
Quote empty list.
- (initialize <method>): Pre-expand the method closure.
+ (initialize <method>): Supply `dummy-procedure' as default instead
+ of creating a new closure.
+ * goops/internal.scm: Re-export (oop goops) without copying
+ bindings.
+
2001-02-23 Keisuke Nishida <kxn30@po.cwru.edu>
* goops.scm (method): Enclosed BODY by `(let () ...)'.
(set-procedure-property! generic 'name name))
))
+(define dummy-procedure (lambda args *unspecified*))
+
(define-method initialize ((method <method>) initargs)
(next-method)
(slot-set! method 'generic-function (get-keyword #:generic-function initargs #f))
(slot-set! method 'specializers (get-keyword #:specializers initargs '()))
- (slot-set! method
- 'procedure
- (%pre-expand-closure!
- (get-keyword #:procedure initargs (lambda l '()))))
+ (slot-set! method 'procedure
+ (get-keyword #:procedure initargs dummy-procedure))
(slot-set! method 'code-table '()))
(define-method initialize ((obj <foreign-object>) initargs))
-;;;; Copyright (C) 1999 Free Software Foundation, Inc.
+;;;; Copyright (C) 1999, 2001 Free Software Foundation, Inc.
;;;;
;;;; This program is free software; you can redistribute it and/or modify
;;;; it under the terms of the GNU General Public License as published by
;;; NOTE: This section is far from finished. It will finally be
;;; implemented on C level.
+(define %tag-body
+ (nested-ref the-root-module '(app modules oop goops %tag-body)))
+
(define (compile-method methods types)
(let* ((proc (method-procedure (car methods)))
(src (procedure-source proc))
,@body)))
(cons (procedure-environment proc)
(cons formals
- body))
+ (%tag-body body)))
)))
;;; installed-scm-file
-;;;; Copyright (C) 1999 Free Software Foundation, Inc.
+;;;; Copyright (C) 1999, 2001 Free Software Foundation, Inc.
;;;;
;;;; This program is free software; you can redistribute it and/or modify
;;;; it under the terms of the GNU General Public License as published by
(define-module (oop goops internal)
:use-module (oop goops))
-;; Export all bindings from (oop goops)
-(module-for-each (lambda (sym var)
- (module-add! %module-public-interface sym var))
- (nested-ref the-root-module '(app modules oop goops)))
+(set-module-uses! %module-public-interface
+ (list (nested-ref the-root-module '(app modules oop goops))))