Changeset 10375


Ignore:
Timestamp:
11/05/05 20:02:01 (16 years ago)
Author:
piso
Message:

STD-SLOT-VALUE, SET-STD-SLOT-VALUE: access slotTable directly.

File:
1 edited

Legend:

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

    r10373 r10375  
    33 *
    44 * Copyright (C) 2003-2005 Peter Graves
    5  * $Id: StandardObject.java,v 1.52 2005-11-05 19:33:06 piso Exp $
     5 * $Id: StandardObject.java,v 1.53 2005-11-05 20:02:01 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    404404            throws ConditionThrowable
    405405        {
    406             LispObject value = null;
    407406            final StandardObject instance;
    408407            try {
     
    417416                layout = instance.updateLayout();
    418417            }
    419             int index = layout.getSlotIndex(second);
    420             if (index >= 0) {
     418            LispObject value;
     419            LispObject index = layout.slotTable.get(second);
     420            if (index != null) {
    421421                // Found instance slot.
    422                 value = instance.slots[index];
     422                value = instance.slots[((Fixnum)index).value];
    423423            } else {
    424424                // Check for shared slot.
     
    460460                layout = instance.updateLayout();
    461461            }
    462             int index = layout.getSlotIndex(second);
    463             if (index >= 0) {
     462            LispObject index = layout.slotTable.get(second);
     463            if (index != null) {
    464464                // Found instance slot.
    465                 instance.slots[index] = third;
     465                instance.slots[((Fixnum)index).value] = third;
    466466                return third;
    467467            }
Note: See TracChangeset for help on using the changeset viewer.