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

add formals', body', and `compile-env' slots to <method>

* ice-9/boot-9.scm (compile-time-environment): Return #f instead of
  erroring under the interpreter, a bit more sane.

* libguile/goops.c (create_standard_classes):
* libguile/goops.h (scm_si_formals, scm_si_body, scm_si_compile_env):
* oop/goops.scm (method, initialize): Add `formals', `body', and
  `compile-env' slots to <method>.
This commit is contained in:
Andy Wingo 2008-10-24 11:56:31 +02:00
parent ae9ce4b786
commit 21497600d2
4 changed files with 20 additions and 6 deletions

View file

@ -484,6 +484,9 @@
ls))))
`(make <method>
#:specializers (cons* ,@(specializers args))
#:formals ',(formals args)
#:body ',body
#:compile-env (compile-time-environment)
#:procedure (lambda ,(formals args)
,@(if (null? body)
(list *unspecified*)
@ -1427,7 +1430,11 @@
(slot-set! method 'specializers (get-keyword #:specializers initargs '()))
(slot-set! method 'procedure
(get-keyword #:procedure initargs dummy-procedure))
(slot-set! method 'code-table '()))
(slot-set! method 'code-table '())
(slot-set! method 'formals (get-keyword #:formals initargs '()))
(slot-set! method 'body (get-keyword #:body initargs '()))
(slot-set! method 'compile-env (get-keyword #:compile-env initargs #f)))
(define-method (initialize (obj <foreign-object>) initargs))