Skip to content


Subversion checkout URL

You can clone with
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base: master
compare: property-mop
Checking mergeability… Don’t worry, you can still create the pull request.
  • 6 commits
  • 1 file changed
  • 0 commit comments
  • 2 contributors
Commits on Dec 17, 2009
@zkat MOP: Added property metaobject definition. 8980dc5
@zkat MOP: This is what the definition of a standard property should be.
*the-standard-property-child* will have to be bound, during bootstrap, to a crafted instance that
represents a basic property metaobject with only 'property-name as its sole property. This is what
will break the circularity created by the concept of properties-within-properties.
@zkat MOP: Setting up some code before the dive. cdfd29b
@zkat MOP: Speculation with d-p-v a87ca3b
@zkat MOP: This should refer to the -mold- 6b63149
@adlai adlai MOP: Changing the property-name to NAME 80d8acf
Showing with 26 additions and 9 deletions.
  1. +26 −9 src/properties.lisp
35 src/properties.lisp
@@ -9,8 +9,24 @@
(in-package :sheeple)
-(defun property-position (property-name object)
- (position property-name (mold-properties (%object-mold object)) :test #'eq))
+(defun property-position (object propd)
+ (if (std-property-p propd) ; do we need the name, too?
+ 0 ; what goes here?...
+ (position propd (mold-properties (%object-mold object)) :test #'eq :key #'property-name)))
+(defun find-property-definition (object property-name)
+ ;; todo
+ )
+;;; Property prototype
+(define-bound-variables =property= *the-standard-property-child-mold*)
+(defvar *the-standard-property-form*
+ `(defproto =standard-property= ()
+ ((name nil :accessor property-name))))
+(defun std-property-p (propd)
+ (eq (%object-mold propd) *the-standard-property-child-mold*))
;;; Base Property API
@@ -19,16 +35,17 @@
"Returns the property-value set locally in OBJECT for PROPERTY-NAME. If the
property is not set locally, a condition of type `unbound-property' is signaled."
(check-type property-name symbol)
- (if (std-object-p object)
- (std-direct-property-value object property-name)
- (smop:direct-property-value (object-metaobject object) object property-name)))
-(defun std-direct-property-value (object property-name)
- (aif (property-position property-name object)
+ (let ((propd (find-property-definition object property-name)))
+ (if (and (std-object-p object) (std-property-p propd))
+ (std-direct-property-value object propd)
+ (smop:direct-property-value (object-metaobject object) object property-name))))
+(defun std-direct-property-value (object propd)
+ (aif (property-position object propd)
(svref (%object-property-values object) it)
- (restart-case (error 'unbound-property :object object :property-name property-name)
+ (restart-case (error 'unbound-property :object object :property-name (property-name propd))
(continue ()
:report "Try accessing the property again."
- (direct-property-value object property-name))
+ (direct-property-value object propd))
(use-value (value)
:report "Return a value."
:interactive (lambda ()

No commit comments for this range

Something went wrong with that request. Please try again.