[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 09/25: Commenting in goops.scm
From: |
Andy Wingo |
Subject: |
[Guile-commits] 09/25: Commenting in goops.scm |
Date: |
Mon, 19 Jan 2015 10:41:08 +0000 |
wingo pushed a commit to branch wip-goops-refactor
in repository guile.
commit 342bf183841187ac69ae68aa7b345910392787b2
Author: Andy Wingo <address@hidden>
Date: Tue Jan 13 23:16:40 2015 +0100
Commenting in goops.scm
* module/oop/goops.scm: More narrative cleanup.
---
module/oop/goops.scm | 28 +++++++++++++++++++---------
1 files changed, 19 insertions(+), 9 deletions(-)
diff --git a/module/oop/goops.scm b/module/oop/goops.scm
index 115f240..7b5b972 100644
--- a/module/oop/goops.scm
+++ b/module/oop/goops.scm
@@ -592,7 +592,6 @@ subclasses of @var{c}."
;;; Now, to build out the class hierarchy.
;;;
-;; Applicables and their classes.
(define-standard-class <procedure-class> (<class>))
(define-standard-class <applicable-struct-class>
(<procedure-class>))
@@ -629,7 +628,6 @@ subclasses of @var{c}."
<extended-generic-with-setter>)
#:metaclass <applicable-struct-with-setter-class>)
-;; Methods
(define-standard-class <method> (<object>)
generic-function
specializers
@@ -640,7 +638,6 @@ subclasses of @var{c}."
(define-standard-class <accessor-method> (<method>)
(slot-definition #:init-keyword #:slot-definition))
-;; Primitive types classes
(define-standard-class <boolean> (<top>))
(define-standard-class <char> (<top>))
(define-standard-class <list> (<top>))
@@ -700,6 +697,18 @@ function."
(struct-set! <applicable> class-index-direct-subclasses
(cons class subclasses)))))
+
+
+
+;;;
+;;; At this point we have defined the class hierarchy, and it's time to
+;;; move on to instance allocation and generics. Once we have generics,
+;;; we'll fill out the metaobject protocol.
+;;;
+;;; Here we define a limited version of `make', so that we can allocate
+;;; instances of specific classes. This definition will be replaced
+;;; later.
+;;;
(define (%invalidate-method-cache! gf)
(slot-set! gf 'procedure (delayed-compile gf))
(slot-set! gf 'effective-methods '()))
@@ -724,12 +733,6 @@ followed by its associated value. If @var{l} does not
hold a value for
(scm-error 'wrong-type-arg #f "Not a keyword: ~S" (list kw) #f))
(if (eq? kw key) arg (lp l))))))
-;; A simple make which will be redefined later. This version handles
-;; only creation of gf, methods and classes (no instances).
-;;
-;; Since this code will disappear when Goops will be fully booted,
-;; no precaution is taken to be efficient.
-;;
(define (%allocate-instance class)
(let ((obj (allocate-struct class (struct-ref class class-index-nfields))))
(%clear-fields! obj)
@@ -776,6 +779,13 @@ followed by its associated value. If @var{l} does not
hold a value for
@code{#f} otherwise."
(and (memq class (class-precedence-list (class-of obj))) #t))
+
+
+
+;;;
+;;; Slot access.
+;;;
+
;; In the future, this function will return the effective slot
;; definition associated with SLOT_NAME. Now it just returns some of
;; the information which will be stored in the effective slot
- [Guile-commits] branch wip-goops-refactor updated (b623b66 -> 2941be2), Andy Wingo, 2015/01/19
- [Guile-commits] 01/25: GOOPS cleanup to use SRFI-1 better, Andy Wingo, 2015/01/19
- [Guile-commits] 02/25: append-map rather than mapappend, Andy Wingo, 2015/01/19
- [Guile-commits] 03/25: GOOPS utils module cleanups, Andy Wingo, 2015/01/19
- [Guile-commits] 04/25: Fold (oop goops util) into (oop goops), Andy Wingo, 2015/01/19
- [Guile-commits] 05/25: Scheme GOOPS cleanups, Andy Wingo, 2015/01/19
- [Guile-commits] 07/25: scm_make cleanup, Andy Wingo, 2015/01/19
- [Guile-commits] 06/25: Add compute-cpl tests, Andy Wingo, 2015/01/19
- [Guile-commits] 09/25: Commenting in goops.scm,
Andy Wingo <=
- [Guile-commits] 08/25: Narrative reordering in goops.scm, Andy Wingo, 2015/01/19
- [Guile-commits] 11/25: when and unless for one-armed ifs in goops.scm, Andy Wingo, 2015/01/19
- [Guile-commits] 13/25: Convert emit-linear-dispatch to use match, Andy Wingo, 2015/01/19
- [Guile-commits] 14/25: `match' refactor in goops.scm, Andy Wingo, 2015/01/19
- [Guile-commits] 15/25: GOOPS class slot indices defined as inline values, Andy Wingo, 2015/01/19
- [Guile-commits] 10/25: More GOOPS comments, Andy Wingo, 2015/01/19
- [Guile-commits] 17/25: slot-ref, slot-set! et al bypass "using-class" variants, Andy Wingo, 2015/01/19
- [Guile-commits] 18/25: change-object-class refactor, Andy Wingo, 2015/01/19
- [Guile-commits] 19/25: GOOPS: Deprecate "using-class" procs like slot-ref-using-class, Andy Wingo, 2015/01/19
- [Guile-commits] 12/25: More GOOPS cleanups, Andy Wingo, 2015/01/19