summaryrefslogtreecommitdiff
path: root/libguile/goops.c
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2017-09-13 22:23:20 +0200
committerAndy Wingo <wingo@pobox.com>2017-09-14 09:49:55 +0200
commitee5994a5178c14de685011c28e3c3c0a0a353622 (patch)
tree0fb51e90c8b833a39723e078c60a4ef25025a998 /libguile/goops.c
parent7e91ff651b3c9f7c27f2be146ea611bab65809a8 (diff)
downloadguile-ee5994a5178c14de685011c28e3c3c0a0a353622.tar.gz
remove self field of vtables
* libguile/struct.h (SCM_VTABLE_BASE_LAYOUT, scm_vtable_index_self): Remove "self" field. Renumber the other fields. * module/oop/goops.scm (<self-slot>): Remove. (fold-class-slots): Adapt for "self" slot removal. Adapt all users. (class-redefinition): Now that there is no "self" slot to update, use %modify-instance instead of %modify-class. * libguile/goops.c (class_self): Remove. (scm_sys_modify_class): Remove. * libguile/goops.h (scm_sys_modify_class): Remove. * module/rnrs/records/procedural.scm: Import vtable-offset-user. Renumber rtd indexes using vtable-offset-user. * module/srfi/srfi-35.scm (%condition-type-vtable): Remove mention of vtable fields. * module/system/base/types.scm (address->inferior-struct): Adapt for different vtable field layout.
Diffstat (limited to 'libguile/goops.c')
-rw-r--r--libguile/goops.c19
1 files changed, 1 insertions, 18 deletions
diff --git a/libguile/goops.c b/libguile/goops.c
index 7e7a26553..d0e646339 100644
--- a/libguile/goops.c
+++ b/libguile/goops.c
@@ -115,7 +115,7 @@ static SCM class_atomic_box;
static SCM class_port, class_input_output_port;
static SCM class_input_port, class_output_port;
static SCM class_foreign_slot;
-static SCM class_self, class_protected;
+static SCM class_protected;
static SCM class_hidden, class_opaque, class_read_only;
static SCM class_protected_hidden, class_protected_opaque, class_protected_read_only;
static SCM class_scm;
@@ -542,22 +542,6 @@ SCM_DEFINE (scm_sys_modify_instance, "%modify-instance", 2, 0, 0,
}
#undef FUNC_NAME
-SCM_DEFINE (scm_sys_modify_class, "%modify-class", 2, 0, 0,
- (SCM old, SCM new),
- "")
-#define FUNC_NAME s_scm_sys_modify_class
-{
- SCM_VALIDATE_CLASS (1, old);
- SCM_VALIDATE_CLASS (2, new);
-
- scm_sys_modify_instance (old, new);
- SCM_STRUCT_DATA (old)[scm_vtable_index_self] = SCM_UNPACK (old);
- SCM_STRUCT_DATA (new)[scm_vtable_index_self] = SCM_UNPACK (new);
-
- return SCM_UNSPECIFIED;
-}
-#undef FUNC_NAME
-
/* Primitive generics: primitives that can dispatch to generics if their
@@ -920,7 +904,6 @@ SCM_DEFINE (scm_sys_goops_early_init, "%goops-early-init", 0, 0, 0,
class_hidden = scm_variable_ref (scm_c_lookup ("<hidden-slot>"));
class_opaque = scm_variable_ref (scm_c_lookup ("<opaque-slot>"));
class_read_only = scm_variable_ref (scm_c_lookup ("<read-only-slot>"));
- class_self = scm_variable_ref (scm_c_lookup ("<self-slot>"));
class_protected_opaque = scm_variable_ref (scm_c_lookup ("<protected-opaque-slot>"));
class_protected_hidden = scm_variable_ref (scm_c_lookup ("<protected-hidden-slot>"));
class_protected_read_only = scm_variable_ref (scm_c_lookup ("<protected-read-only-slot>"));