1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-10 14:00:21 +02:00

* 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>): Supply `dummy-procedure' as default instead
of creating a new closure.

* goops/internal.scm: Re-export (oop goops) without copying
bindings.
This commit is contained in:
Mikael Djurfeldt 2001-03-04 20:46:34 +00:00
parent 5e03762c12
commit b432fb4b99
4 changed files with 20 additions and 12 deletions

View file

@ -1,10 +1,17 @@
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 () ...)'.

View file

@ -1314,14 +1314,14 @@
(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))

View file

@ -1,4 +1,4 @@
;;;; 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
@ -109,6 +109,9 @@
;;; 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))
@ -132,5 +135,5 @@
,@body)))
(cons (procedure-environment proc)
(cons formals
body))
(%tag-body body)))
)))

View file

@ -1,6 +1,6 @@
;;; 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
@ -22,7 +22,5 @@
(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))))