13.07.2015 Views

The PowerPC 604 RISC Microprocessor - eisber.net

The PowerPC 604 RISC Microprocessor - eisber.net

The PowerPC 604 RISC Microprocessor - eisber.net

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

A.3 Managing Arrays Lquick variants) A.4 Manipulating Object Fields (_quick variants)anewarray_quickAllocate new array of references to objectsSyntax.Stack. .., size => resultitnewurra)_qtackindextr)te Iimlextote2size must be an integer. It represents the number of elements in the new array.mdexbytel and indexbyte2 are are used to construct an index into the constant pool of the current class.<strong>The</strong> entry must be a class.A new array of the indicated class type and capable of holding size elements is allocated, and result is areference to this new array. Allocation of an array large enough to contain size items of the given classtype is attempted. All elements of the array are initialized to zero.If size is less than zero, a Mega t i veAr rayS i zeExcept ion is thrown. If there is not enoughmemory to allocate the array, an Ou tO f MemoryError is thrown.multianewarray_quickAllocate new multi-dimensional arraySyntaxmultuotelvarray_quickindexbyte Ioulexb)te2dimensionsStack ., size(, size2, => resultliach size must be an integer. Each represents the number of elements in a dimension of the array.index bytel and rndexbyre2 are used to construct an index into the constant pool of the current class. <strong>The</strong>resulting entry must be a classdimensions has the following aspects:• It must be an integer 2 I.• It represents the number of dimensions being created. It must be .c the number of dimensions ofthe array class.• It represents the number of elements that are popped off the stack. All must be integers greaterthan or equal to zero. <strong>The</strong>se are used as the sizes of the dimension.If any of the size arguments on the stack is less than zero, a Negat iveArraySi zeExcept ion isthrown. If there is not enough memory to allocate the array, an OutOftlemoryError is thrown.<strong>The</strong> result is a reference to the new array object.Note: More explanation needed about how this is an array of arrays.putfield_quickSet field in objectSyntax:iturfield_quic koffsetunusedStack: ...,objedref, volute =>objectref must be a reference to an object. value must be a value of a type appropriate for the specifiedfield. offset is the offset for the field in that object. value is written at offset into the object. Both tilt/cc:refand value are popped from the stack.If objectref is null, a Nu 1 1 Poin ter Except ion is generated.putfield2_quickSet long integer or double float field in objectSyntax:otafield2_quickoffsetunusedStack: ..., ob ectref, valite•toordl, volute-toord2=>objectref must be a reference to an object. value must be a value of a type appropriate for the specifiedfield. offset is the offset for the field In that object. value is written at offset into the object . Both objectrefand value are popped from the stack.If objectref is null, a NullPointerExcept ion is generated.getfield_quickFetch field from objectSyntax:Stack:getfleld_quickoffsetunusedobjected/ => ..., valueobjectref must be a handle to an object. <strong>The</strong> value at offset into the object referenced by objectref replacesobjectref on the top of the stack.If objectref is null, a Nul 1 Po I nter Except ion is generated.August 22. 1995 Ix VI11.1 Machine Specification 75 76 lava Virtual Machine Specification August 22. 1995

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!