compute-cpl implementation only in Scheme
authorAndy Wingo <wingo@pobox.com>
Wed, 24 Dec 2014 14:37:14 +0000 (09:37 -0500)
committerAndy Wingo <wingo@pobox.com>
Fri, 23 Jan 2015 15:15:59 +0000 (16:15 +0100)
commit9167e0b88d3829a6b54d4b4faa6197b3675bb38e
tree37ff7a908cd06f409e63648b28322a49dda3e0ea
parentd1500d3a3bea2c27a077e781c3265def6154097c
compute-cpl implementation only in Scheme

* libguile/goops.c (build_class_class_slots, create_basic_classes):
  Instead of creating <class> with uninitialized `direct-slots',
  `slots', and `getters-n-setters' fields and initializing them later,
  create <class> with a "boot" version of unspecialized slots and later
  replace the fields with specialized slot classes.  This allows
  slot-ref to work during early boot, which is necessary to move
  compute-cpl to Scheme.
  (create_standard_classes): Finish initializing <class> here.
  (map, filter_cpl, compute_cpl): Remove the boot-time compute-cpl in C
  and its helpers.
  (scm_basic_basic_make_class): Call compute-cpl in Scheme.
  (fix_cpl): Remove; since we use the correct compute-cpl from the
  beginning, there's no need to correct for the deficiencies of the C
  implementation any more.
  (build_slots_list): Adapt to build_class_class_slots change.

* module/oop/goops.scm (compute-std-cpl, compute-cpl): Move these up to
  the top, so they can be called by the boot process.
  (compute-clos-cpl, top-sort, std-tie-breaker, build-transitive-closure)
  (build-constraints): Remove unused private code.
libguile/goops.c
module/oop/goops.scm