Changeset 10372


Ignore:
Timestamp:
11/05/05 19:31:53 (16 years ago)
Author:
piso
Message:

private final LispClass? cls => public final LispClass? lispClass

File:
1 edited

Legend:

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

    r10369 r10372  
    33 *
    44 * Copyright (C) 2003-2005 Peter Graves
    5  * $Id: Layout.java,v 1.22 2005-11-05 19:16:01 piso Exp $
     5 * $Id: Layout.java,v 1.23 2005-11-05 19:31:53 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    2424public final class Layout extends LispObject
    2525{
    26     private boolean invalid;
    27 
    28     private final LispClass cls;
     26    private static final boolean useHashTable = true;
     27
     28    public final LispClass lispClass;
     29
    2930    private final LispObject[] slotNames;
    3031    private final LispObject sharedSlots;
    31 
    32     private static final boolean useHashTable = true;
    33 
    3432    private final EqHashTable ht;
    3533
    36     public Layout(LispClass cls, LispObject instanceSlots, LispObject sharedSlots)
    37     {
    38         this.cls = cls;
     34    private boolean invalid;
     35
     36    public Layout(LispClass lispClass, LispObject instanceSlots, LispObject sharedSlots)
     37    {
     38        this.lispClass = lispClass;
    3939        Debug.assertTrue(instanceSlots.listp());
    4040        int length = 0;
     
    6969    }
    7070
    71     public Layout(LispClass cls, LispObject[] instanceSlotNames,
     71    public Layout(LispClass lispClass, LispObject[] instanceSlotNames,
    7272                  LispObject sharedSlots)
    7373    {
    74         this.cls = cls;
     74        this.lispClass = lispClass;
    7575        this.slotNames = instanceSlotNames;
    7676        this.sharedSlots = sharedSlots;
     
    8787    private Layout(Layout oldLayout)
    8888    {
    89         cls = oldLayout.cls;
     89        lispClass = oldLayout.lispClass;
    9090        slotNames = oldLayout.slotNames;
    9191        sharedSlots = oldLayout.sharedSlots;
     
    102102    {
    103103        LispObject result = NIL;
    104         result = result.push(new Cons("class", cls));
     104        result = result.push(new Cons("class", lispClass));
    105105        for (int i = 0; i < slotNames.length; i++) {
    106106            result = result.push(new Cons("slot " + i, slotNames[i]));
     
    118118    {
    119119        invalid = true;
    120     }
    121 
    122     public LispClass getLispClass()
    123     {
    124         return cls;
    125120    }
    126121
     
    187182        {
    188183            try {
    189                 return ((Layout)arg).cls;
     184                return ((Layout)arg).lispClass;
    190185            }
    191186            catch (ClassCastException e) {
     
    295290        public LispObject execute(LispObject arg) throws ConditionThrowable
    296291        {
    297             final LispClass cls;
    298             try {
    299                 cls = (LispClass) arg;
     292            final LispClass lispClass;
     293            try {
     294                lispClass = (LispClass) arg;
    300295            }
    301296            catch (ClassCastException e) {
    302297                return signalTypeError(arg, Symbol.CLASS);
    303298            }
    304             Layout oldLayout = cls.getClassLayout();
     299            Layout oldLayout = lispClass.getClassLayout();
    305300            Layout newLayout = new Layout(oldLayout);
    306             cls.setClassLayout(newLayout);
     301            lispClass.setClassLayout(newLayout);
    307302            oldLayout.invalidate();
    308303            return arg;
Note: See TracChangeset for help on using the changeset viewer.