1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 19:50:24 +02:00

first step towards effective methods

* libguile/goops.c (create_standard_classes):
* libguile/goops.h *scm_si_applicable_methods, scm_si_effective_method)
  (scm_si_applicable_setter_methods, scm_si_effective_setter_method):
  Add space for the new form of the generic cache and effective method.
This commit is contained in:
Andy Wingo 2009-11-05 11:32:16 +01:00
parent b6cf4d0265
commit 0f84ac3fe6
2 changed files with 10 additions and 2 deletions

View file

@ -2594,8 +2594,12 @@ create_standard_classes (void)
k_init_value, k_init_value,
SCM_EOL), SCM_EOL),
scm_from_locale_symbol ("%cache"), scm_from_locale_symbol ("%cache"),
scm_from_locale_symbol ("applicable-methods"),
scm_from_locale_symbol ("effective-method"),
SCM_UNDEFINED); SCM_UNDEFINED);
SCM setter_slots = scm_list_1 (scm_from_locale_symbol ("%setter-cache")); SCM setter_slots = scm_list_3 (scm_from_locale_symbol ("%setter-cache"),
scm_from_locale_symbol ("applicable-setter-methods"),
scm_from_locale_symbol ("effective-setter-method"));
SCM egf_slots = scm_list_1 (scm_list_3 (scm_from_locale_symbol ("extends"), SCM egf_slots = scm_list_1 (scm_list_3 (scm_from_locale_symbol ("extends"),
k_init_value, k_init_value,
SCM_EOL)); SCM_EOL));

View file

@ -178,7 +178,11 @@ typedef struct scm_t_method {
#define scm_si_cache_mutex 3 #define scm_si_cache_mutex 3
#define scm_si_extended_by 4 #define scm_si_extended_by 4
#define scm_si_generic_cache 5 #define scm_si_generic_cache 5
#define scm_si_generic_setter_cache 6 #define scm_si_applicable_methods 6
#define scm_si_effective_method 7
#define scm_si_generic_setter_cache 8
#define scm_si_applicable_setter_methods 9
#define scm_si_effective_setter_method 10
#define scm_si_generic_function 0 /* offset of gf slot in a <method> */ #define scm_si_generic_function 0 /* offset of gf slot in a <method> */
#define scm_si_specializers 1 /* offset of spec. slot in a <method> */ #define scm_si_specializers 1 /* offset of spec. slot in a <method> */