Add #:static-slot-allocation?
authorAndy Wingo <wingo@pobox.com>
Fri, 6 Feb 2015 12:25:17 +0000 (13:25 +0100)
committerAndy Wingo <wingo@pobox.com>
Fri, 6 Feb 2015 12:25:17 +0000 (13:25 +0100)
commit26350edcac94ae51737b5394f74b84592d43af76
treeff474bbc6920cf98478441894a37f849e5c814fe
parent05d0cdf18eb70f69239af5f299cb74f77c21f8d9
Add #:static-slot-allocation?

* libguile/goops.h (SCM_VTABLE_FLAG_GOOPS_STATIC): Reserve the fourth
  GOOPS flag to indicate that a class has static slot allocation.

* libguile/goops.c (scm_init_goops_builtins): Define
  vtable-flag-goops-static for goops.scm.

* module/oop/goops.scm (class-has-statically-allocated-slots?): New
  helper.
  (build-slots-list): Instead of the ad-hoc checks for <class> or
  <slot>, use the new helper.
  (initialize): Accept #:static-slot-allocation? keyword.

* module/system/foreign-object.scm (make-foreign-object-type): Declare
  foreign object classes as having static slot allocation.

* test-suite/tests/goops.test ("static slot allocation"): Add tests.
libguile/goops.c
libguile/goops.h
module/oop/goops.scm
module/system/foreign-object.scm
test-suite/tests/goops.test