[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 16/42: Further GOOPS simplifications
From: |
Andy Wingo |
Subject: |
[Guile-commits] 16/42: Further GOOPS simplifications |
Date: |
Sat, 10 Jan 2015 00:03:08 +0000 |
wingo pushed a commit to branch wip-goops-refactor
in repository guile.
commit c3f12955c7e2b778ee59a813a4302675acebda16
Author: Andy Wingo <address@hidden>
Date: Sun Jan 4 15:52:12 2015 -0500
Further GOOPS simplifications
* libguile/goops.c (scm_no_applicable_method): Define in Scheme and
capture in C.
* module/oop/goops.scm (no-applicable-method): Define here. Import the
utils module in the normal define-module block.
---
libguile/goops.c | 7 +------
module/oop/goops.scm | 8 +++++---
2 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/libguile/goops.c b/libguile/goops.c
index 521b6e1..56b638f 100644
--- a/libguile/goops.c
+++ b/libguile/goops.c
@@ -1895,12 +1895,7 @@ SCM_DEFINE (scm_sys_goops_early_init,
"%goops-early-init", 0, 0, 0,
create_struct_classes ();
create_port_classes ();
- {
- SCM name = scm_from_latin1_symbol ("no-applicable-method");
- scm_no_applicable_method =
- scm_make (scm_list_3 (scm_class_generic, k_name, name));
- scm_module_define (scm_module_goops, name, scm_no_applicable_method);
- }
+ scm_no_applicable_method = scm_variable_ref (scm_c_lookup
("no-applicable-method"));
return SCM_UNSPECIFIED;
}
diff --git a/module/oop/goops.scm b/module/oop/goops.scm
index 56d3243..d250701 100644
--- a/module/oop/goops.scm
+++ b/module/oop/goops.scm
@@ -27,6 +27,7 @@
(define-module (oop goops)
#:use-module (srfi srfi-1)
#:use-module (ice-9 match)
+ #:use-module (oop goops util)
#:export-syntax (define-class class standard-define-class
define-generic define-accessor define-method
define-extended-generic define-extended-generics
@@ -510,14 +511,15 @@
(define-standard-class <input-port> (<port>))
(define-standard-class <output-port> (<port>))
(define-standard-class <input-output-port> (<input-port> <output-port>))
- )
+
+ (define no-applicable-method
+ (make <generic> #:name 'no-applicable-method)))
(eval-when (compile load eval)
(%goops-early-init))
;; Then load the rest of GOOPS
-(use-modules (oop goops util)
- (oop goops dispatch)
+(use-modules (oop goops dispatch)
(oop goops compile))
- [Guile-commits] 03/42: Rewrite %method-more-specific? to be in Scheme, (continued)
- [Guile-commits] 03/42: Rewrite %method-more-specific? to be in Scheme, Andy Wingo, 2015/01/09
- [Guile-commits] 04/42: Remove unused macros in goops.c, Andy Wingo, 2015/01/09
- [Guile-commits] 10/42: Remove declarations without definitions, Andy Wingo, 2015/01/09
- [Guile-commits] 08/42: Preparation for more GOOPS refactorings, Andy Wingo, 2015/01/09
- [Guile-commits] 06/42: compute-cpl implementation only in Scheme, Andy Wingo, 2015/01/09
- [Guile-commits] 09/42: Remove unused %fast-slot-ref / %fast-slot-set! from GOOPS, Andy Wingo, 2015/01/09
- [Guile-commits] 12/42: Deprecate scm_basic_make_class, Andy Wingo, 2015/01/09
- [Guile-commits] 14/42: define-generic, define-extended-generic are hygienic syntax, Andy Wingo, 2015/01/09
- [Guile-commits] 07/42: %init-goops-builtins is an extension, not a global, Andy Wingo, 2015/01/09
- [Guile-commits] 13/42: `class' is a hygienic macro, Andy Wingo, 2015/01/09
- [Guile-commits] 16/42: Further GOOPS simplifications,
Andy Wingo <=
- [Guile-commits] 18/42: Remove unused scm_t_method and SCM_METHOD, Andy Wingo, 2015/01/09
- [Guile-commits] 15/42: Remove unused *goops-module* definition., Andy Wingo, 2015/01/09
- [Guile-commits] 19/42: Deprecate scm_no_applicable_method C export, Andy Wingo, 2015/01/09
- [Guile-commits] 21/42: Remove useless scm_s_slot_set_x export, Andy Wingo, 2015/01/09
- [Guile-commits] 20/42: Remove unreachable code in scm_setter, Andy Wingo, 2015/01/09
- [Guile-commits] 02/42: Deprecate C interfaces scm_compute_applicable_methods, scm_find_method, Andy Wingo, 2015/01/09
- [Guile-commits] 23/42: Remove unused CPP defines naming <method> slots, Andy Wingo, 2015/01/09
- [Guile-commits] 27/42: Remove scm_at_assert_bound_ref, Andy Wingo, 2015/01/09
- [Guile-commits] 28/42: Remove scm_assert_bound, Andy Wingo, 2015/01/09
- [Guile-commits] 30/42: More unused code removal in GOOPS, Andy Wingo, 2015/01/09