diff options
author | Andy Wingo <wingo@pobox.com> | 2015-01-04 13:41:09 -0500 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2015-01-23 16:16:00 +0100 |
commit | 51fd1cd650755f60e21ed54957348c171a3648a5 (patch) | |
tree | a3bec2a4223c9e5859d8aefe117088b4cee6beea /libguile/goops.h | |
parent | a91ea6a8a36b6911a0d355f7d167f0135aa32348 (diff) | |
download | guile-51fd1cd650755f60e21ed54957348c171a3648a5.tar.gz |
Move GOOPS boot to Scheme
* module/oop/goops.scm (build-<class>-slots): New helper, replacing
build_class_class_slots.
(build-slots-list, %compute-getters-n-setters, %compute-layout): New
private helpers, moved here from C.
(%prep-layout!): Reimplement in Scheme.
(make-standard-class): New private helper, replacing
scm_basic_make_class.
(<class>, <top>, <object>): Define in Scheme.
(<foreign-slot>, <protected-slot>, <hidden-slot>, <opaque-slot>,
<read-only-slot>, <self-slot>, <protected-opaque-slot>,
<protected-hidden-slot>, <protected-read-only-slot>, <scm-slot>,
<int-slot>, <float-slot>, <double-slot>, <procedure-class>,
<applicable-struct-class>, <method>, <accessor-method>, <applicable>,
<applicable-struct>, <generic>, <extended-generic>,
<generic-with-setter>, <accessor>, <extended-generic-with-setter>,
<extended-accessor>): Define in Scheme.
(<boolean>, <char>, <list>, <pair>, <null>, <string>, <symbol>,
<vector>, <foreign>, <hashtable>, <fluid>, <dynamic-state>, <frame>,
<vm-continuation>, <bytevector>, <uvec>, <array>, <bitvector>,
<number>, <complex>, <real>, <integer>, <fraction>, <keyword>,
<unknown>, <procedure>, <primitive-generic>, <port>, <input-port>,
<output-port>, <input-output-port>): Define in Scheme.
(compute-slots): Use build-slots-list helper.
* libguile/goops.h:
* libguile/goops.c (scm_basic_basic_make_class, scm_sys_compute_slots)
(scm_sys_prep_layout_x): Remove. These were available to C, but were
undocumented internals that were dangerous, confusing, and
unnecessary.
* libguile/goops.c: Add note about variable versus value references.
Remove internal C routines that were just used during boot, as they
have been moved to Scheme.
(scm_basic_make_class): Change to call out to make-standard-class in
Scheme.
(scm_sys_make_root_class, scm_sys_bless_applicable_struct_vtable_x)
(scm_sys_bless_pure_generic_vtable_x, scm_sys_init_layout_x): New
private helpers.
(scm_sys_goops_early_init): Change to capture values defined in
Scheme.
Diffstat (limited to 'libguile/goops.h')
-rw-r--r-- | libguile/goops.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/libguile/goops.h b/libguile/goops.h index b5f88be9b..a9b99213b 100644 --- a/libguile/goops.h +++ b/libguile/goops.h @@ -3,7 +3,7 @@ #ifndef SCM_GOOPS_H #define SCM_GOOPS_H -/* Copyright (C) 1998,1999,2000,2001,2002,2003, 2006, 2008, 2009, 2011 Free Software Foundation, Inc. +/* Copyright (C) 1998,1999,2000,2001,2002,2003, 2006, 2008, 2009, 2011, 2015 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License @@ -235,7 +235,6 @@ SCM_API SCM scm_class_of (SCM obj); /* Low level functions exported */ SCM_API SCM scm_make_next_method (SCM methods, SCM args, SCM gf); -SCM_API SCM scm_basic_basic_make_class (SCM c, SCM name, SCM dsupers, SCM dslots); SCM_API SCM scm_basic_make_class (SCM c, SCM name, SCM dsupers, SCM dslots); /* Primitives exported */ @@ -248,13 +247,11 @@ SCM_API SCM scm_slot_set_x (SCM obj, SCM slot_name, SCM value); SCM_API SCM scm_pure_generic_p (SCM obj); #endif -SCM_API SCM scm_sys_compute_slots (SCM c); SCM_INTERNAL void scm_i_inherit_applicable (SCM c); SCM_INTERNAL SCM scm_i_get_keyword (SCM key, SCM l, long len, SCM default_value, const char *subr); SCM_API SCM scm_get_keyword (SCM key, SCM l, SCM default_value); SCM_API SCM scm_sys_initialize_object (SCM obj, SCM initargs); -SCM_API SCM scm_sys_prep_layout_x (SCM c); SCM_API SCM scm_sys_inherit_magic_x (SCM c, SCM dsupers); SCM_API SCM scm_instance_p (SCM obj); SCM_API SCM scm_class_name (SCM obj); |