// Copyright (c) 1996-2002 Brian D. Carlstrom

package bdc.scheme;

import bdc.util.DynamicArray;

/**
    A DynamicArray of Variables
*/
public class VariableArray extends DynamicArray
{

    /**
        The number of variables which are arguments versus locals
    */
    public int arguments;

    /**
        The number of arguments/variables going in the heap
    */
    public int heap;

    /**
        The number of locals going on the stack
    */
    public int local;


    /**
        PR5137

        We save a local typed pointer to the array to work around the
        fact that Netscape's verifier doesn't think object arrays are
        objects and the cast from Object[] to the more specific type
        in the array accessor would fail.

        See also SymbolArray, VariableArray, ExpressionArray
    */
    private Variable[] localArray;

    public Object[] alloc (int size)
    {
        this.localArray = new Variable[size];
        return this.localArray;
    }

    public final Variable[] array ()
    {
        return this.localArray;
    }
}
