1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 11:40:18 +02:00
guile/module/oop/goops
Andy Wingo 2f652c6884 generics now dispatch as applicable structs
* libguile/eval.i.c (CEVAL, SCM_APPLY): Dispatch applicable structs
  before pure generics. In practice what this means is that we never hit
  the mcache case, because all pure generics are applicable structs.
  We're moving over to having generics dispatch themselves. Also, they
  don't prepend the struct as an arg; in order to have that effect, the
  user has closures.

* libguile/goops.c (scm_apply_generic, scm_call_generic_0):
  (scm_call_generic_1, scm_call_generic_2, scm_call_generic_3): Dispatch
  directly to the struct procedures.
  (scm_var_make_extended_generic): Remove a duplicate definition for
  scm_var_make_extended_generic.
  (create_standard_classes): Mark all instances of
  <applicable-struct-class> (themselves classes) as applicable classes.
  Meaning: generics are now applicable structs.

* libguile/goops.h (SCM_CLASS_CLASS_LAYOUT): The hashsets are actually
  uw slots -- or at least, making subclasses maps the int slots to be uw
  slots

* libguile/vm-i-system.c (call, goto/args, mv-call): Dispatch applicable
  structs in the VM.

* module/oop/goops/dispatch.scm (emit-linear-dispatch): Fix bug in the
  non-rest cache miss case.
  (delayed-compile): Rework to avoid fluids.
  (cache-dispatch): Don't call `equal?', it causes bootstrapping
  problems with the primitive-generic equal?. Using our own version is
  faster anyway.
2009-11-26 00:25:07 +01:00
..
accessors.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
active-slot.scm Remove unused variables in ice-9/goops/srfi/scripts. 2009-09-21 00:24:08 +02:00
compile.scm remove code-table slot from methods 2009-11-26 00:25:06 +01:00
composite-slot.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
describe.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
dispatch.scm generics now dispatch as applicable structs 2009-11-26 00:25:07 +01:00
internal.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
save.scm Fix typos leading to wrong argument counts. 2009-11-07 19:24:49 +01:00
simple.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
stklos.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
util.scm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00