Changeset 5272


Ignore:
Timestamp:
12/27/03 17:02:58 (17 years ago)
Author:
piso
Message:

Support fill pointers for displaced arrays.

File:
1 edited

Legend:

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

    r5112 r5272  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: make_array.java,v 1.7 2003-12-13 00:02:47 piso Exp $
     5 * $Id: make_array.java,v 1.8 2003-12-27 17:02:58 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    6868            if (initialContents != NIL)
    6969                return signal(new LispError(":INITIAL-CONTENTS must not be specified with :DISPLACED-TO"));
    70             return new DisplacedArray(dimv, array, offset);
     70            DisplacedArray displacedArray = new DisplacedArray(dimv, array, offset);
     71            if (rank == 1 && fillPointer != NIL)
     72                displacedArray.setFillPointer(fillPointer);
     73            return displacedArray;
    7174        }
    7275        if (rank == 1) {
     
    7679            if (size < 0 || size >= limit) {
    7780                StringBuffer sb = new StringBuffer();
    78                 sb.append("the size specified for this array (");
     81                sb.append("The size specified for this array (");
    7982                sb.append(size);
    8083                sb.append(')');
     
    8285                    sb.append(" is >= ARRAY-DIMENSION-LIMIT (");
    8386                    sb.append(limit);
    84                     sb.append(')');
     87                    sb.append(").");
    8588                } else
    86                     sb.append(" is negative");
     89                    sb.append(" is negative.");
    8790                return signal(new LispError(sb.toString()));
    8891            }
Note: See TracChangeset for help on using the changeset viewer.