Changeset 4598


Ignore:
Timestamp:
11/02/03 00:27:09 (19 years ago)
Author:
piso
Message:
  • getLispClass(), getSlots()
  • ALLOCATE-STD-INSTANCE: special case code for subclasses of CONDITION.
File:
1 edited

Legend:

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

    r4348 r4598  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: StandardObject.java,v 1.9 2003-10-13 14:11:52 piso Exp $
     5 * $Id: StandardObject.java,v 1.10 2003-11-02 00:27:09 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    3636        this.cls = cls;
    3737        this.slots = slots;
     38    }
     39
     40    public final LispClass getLispClass()
     41    {
     42        return cls;
     43    }
     44
     45    public final LispObject getSlots()
     46    {
     47        return slots;
    3848    }
    3949
     
    152162                if (symbol == Symbol.STANDARD_GENERIC_FUNCTION)
    153163                    return new GenericFunction((LispClass)first, second);
     164                LispObject cpl = ((LispClass)first).getCPL();
     165                while (cpl != NIL) {
     166                    LispObject obj = cpl.car();
     167                    if (obj == BuiltInClass.CONDITION)
     168                        return new Condition((LispClass)first, second);
     169                    cpl = cpl.cdr();
     170                }
    154171                return new StandardObject((LispClass)first, second);
    155172            }
Note: See TracChangeset for help on using the changeset viewer.