Changeset 5206


Ignore:
Timestamp:
12/19/03 19:20:29 (17 years ago)
Author:
piso
Message:

Work in progress.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/lisp/clos.lisp

    r5200 r5206  
    22;;;
    33;;; Copyright (C) 2003 Peter Graves
    4 ;;; $Id: clos.lisp,v 1.44 2003-12-19 18:30:31 piso Exp $
     4;;; $Id: clos.lisp,v 1.45 2003-12-19 19:20:29 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    8181(defsetf std-instance-layout %set-std-instance-layout)
    8282(defsetf std-instance-slots %set-std-instance-slots)
     83(defsetf instance-ref %set-instance-ref)
    8384
    8485(defun (setf find-class) (new-value symbol &optional errorp environment)
     
    428429  (let* ((location (slot-location (class-of instance) slot-name))
    429430         (value (cond ((fixnump location)
    430                        (slot-contents (std-instance-slots instance) location))
     431                       (instance-ref instance location))
    431432                      ((consp location)
    432433                       (cdr location))
     
    434435                       (slot-missing (class-of instance) instance slot-name 'slot-value)))))
    435436    (if (eq +slot-unbound+ value)
    436         (error "the slot ~S is unbound in the object ~S" slot-name instance)
     437        (error "The slot ~S is unbound in the object ~S." slot-name instance)
    437438        value)))
    438439
     
    445446  (let ((location (slot-location (class-of instance) slot-name)))
    446447    (cond ((fixnump location)
    447            (setf (slot-contents (std-instance-slots instance) location) new-value))
     448;;            (setf (slot-contents (std-instance-slots instance) location) new-value))
     449           (setf (instance-ref instance location) new-value))
    448450          ((consp location)
    449451           (setf (cdr location) new-value))
     
    461463  (let ((location (slot-location (class-of instance) slot-name)))
    462464    (cond ((fixnump location)
    463            (neq +slot-unbound+ (slot-contents (std-instance-slots instance) location)))
     465;;            (neq +slot-unbound+ (slot-contents (std-instance-slots instance) location)))
     466           (neq +slot-unbound+ (instance-ref instance location)))
    464467          ((consp location)
    465468           (neq +slot-unbound+ (cdr location)))
Note: See TracChangeset for help on using the changeset viewer.