[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 63/88: Commenting in goops.scm
From: |
Andy Wingo |
Subject: |
[Guile-commits] 63/88: Commenting in goops.scm |
Date: |
Fri, 23 Jan 2015 15:25:53 +0000 |
wingo pushed a commit to branch master
in repository guile.
commit 9ae00706e4e13185d7175902a2db4c2e84bf94bb
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 5fc76da..7d5b956 100644
--- a/module/oop/goops.scm
+++ b/module/oop/goops.scm
@@ -593,7 +593,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>))
@@ -630,7 +629,6 @@ subclasses of @var{c}."
<extended-generic-with-setter>)
#:metaclass <applicable-struct-with-setter-class>)
-;; Methods
(define-standard-class <method> (<object>)
generic-function
specializers
@@ -641,7 +639,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>))
@@ -702,6 +699,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 '()))
@@ -726,12 +735,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)
@@ -778,6 +781,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] 60/88: Add compute-cpl tests, (continued)
- [Guile-commits] 60/88: Add compute-cpl tests, Andy Wingo, 2015/01/23
- [Guile-commits] 72/88: change-object-class refactor, Andy Wingo, 2015/01/23
- [Guile-commits] 69/88: GOOPS class slot indices defined as inline values, Andy Wingo, 2015/01/23
- [Guile-commits] 71/88: slot-ref, slot-set! et al bypass "using-class" variants, Andy Wingo, 2015/01/23
- [Guile-commits] 70/88: Manipulate GOOPS vtable flags from Scheme, for speed, Andy Wingo, 2015/01/23
- [Guile-commits] 73/88: GOOPS: Deprecate "using-class" procs like slot-ref-using-class, Andy Wingo, 2015/01/23
- [Guile-commits] 65/88: when and unless for one-armed ifs in goops.scm, Andy Wingo, 2015/01/23
- [Guile-commits] 75/88: Beginnings of <slot> slot definition class, Andy Wingo, 2015/01/23
- [Guile-commits] 68/88: `match' refactor in goops.scm, Andy Wingo, 2015/01/23
- [Guile-commits] 78/88: Inline helpers into slot-ref, slot-set!, etc, Andy Wingo, 2015/01/23
- [Guile-commits] 63/88: Commenting in goops.scm,
Andy Wingo <=
- [Guile-commits] 82/88: Fix foreign objects for removal of getters-n-setters, Andy Wingo, 2015/01/23
- [Guile-commits] 81/88: Minor GOOPS cleanups, Andy Wingo, 2015/01/23
- [Guile-commits] 79/88: Inline internal slot accessors, Andy Wingo, 2015/01/23
- [Guile-commits] 74/88: The GOOPS "unbound" value is a unique pair, Andy Wingo, 2015/01/23
- [Guile-commits] 83/88: Update (oop goops save) for <slot> objects, Andy Wingo, 2015/01/23
- [Guile-commits] 77/88: Use a vtable bit to mark <slot> instances, Andy Wingo, 2015/01/23
- [Guile-commits] 86/88: Simplify GOOPS effective method cache format, Andy Wingo, 2015/01/23
- [Guile-commits] 87/88: Export <slot> from GOOPS, Andy Wingo, 2015/01/23
- [Guile-commits] 80/88: Optimize %initialize-object, Andy Wingo, 2015/01/23
- [Guile-commits] 85/88: Fast generic function dispatch without calling `compile' at runtime, Andy Wingo, 2015/01/23