org.jikesrvm.ia32
Class MultianewarrayHelper

java.lang.Object
  extended by org.jikesrvm.ia32.MultianewarrayHelper
Direct Known Subclasses:
ArchitectureSpecific.MultianewarrayHelper

public abstract class MultianewarrayHelper
extends Object

Helper routine to pull the parameters to multianewarray off the Java expression stack maintained by the baseline compiler and pass them to RuntimeEntrypoints.buildMultiDimensionalArray.

TODO: There is only 1 line of platform dependent code here; refactor?


Constructor Summary
MultianewarrayHelper()
           
 
Method Summary
(package private) static Object newArrayArray(int methodId, int numDimensions, int typeId, int argOffset)
          Allocate something like {@code new Foo[cnt0][cnt1]...
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultianewarrayHelper

public MultianewarrayHelper()
Method Detail

newArrayArray

static Object newArrayArray(int methodId,
                            int numDimensions,
                            int typeId,
                            int argOffset)
                     throws NoClassDefFoundError,
                            NegativeArraySizeException,
                            OutOfMemoryError
Allocate something like new Foo[cnt0][cnt1]...[cntN-1], or new int[cnt0][cnt1]...[cntN-1].

Parameters:
methodId - method id of caller
numDimensions - number of array dimensions
typeId - type id of type reference for array
argOffset - position of word *above* `cnt0' argument within caller's frame This is used to access the number of elements to be allocated for each dimension. See also: bytecode 0xc5 ("multianewarray") in BaselineCompilerImpl
Throws:
NoClassDefFoundError
NegativeArraySizeException
OutOfMemoryError