📄 quick2.doc5.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>VM Spec </title>
</head>
<body BGCOLOR=#eeeeff text=#000000 LINK=#0000ff VLINK=#000077 ALINK=#ff0000>
<table width=600><tr>
<td><a href="Copyright.doc.html">Contents</a> | <a href="Quick2.doc4.html">Prev</a> | <a href="Quick2.doc6.html">Next</a> | <a href="Lindholm.INDEX.html">Index</a></td><td align=right><i><i>The Java<sup><font size=-2>TM</font></sup> Virtual Machine Specification</i></i></td>
</tr></table>
<hr><br>
<a name="multianewarray_quick"></a>
<h2>multianewarray_quick</h2>
<a name="multianewarray_quick.Operation"></a>
<b>Operation</b><br>
<a name="852"></a>
Create new multidimensional array<p>
<Table Border="0">
<tr><td><a name="845"></a>
<i>multianewarray_quick</i>
<td><a name="579"></a>
<tr><td><a name="847"></a>
<i>indexbyte1</i>
<td><a name="586"></a>
<tr><td><a name="849"></a>
<i>indexbyte2</i>
<td><a name="593"></a>
<tr><td><a name="851"></a>
<i>dimensions</i>
<td><a name="600"></a>
</Table>
<p>
<a name="multianewarray_quick.Forms"></a>
<b>Forms</b><br>
<a name="12466"></a>
<i>multianewarray_quick</i> = 223 (0xdf)<p>
<a name="multianewarray_quick.Stack"></a>
<b>Stack</b><br>
<a name="853"></a>
..., <i>count1</i>,<em> </em>[<i>count2</i>, ...]<em> </em><img src="chars/arrwdbrt.gif"> ..., <i>arrayref</i><p>
<a name="multianewarray_quick.Description"></a>
<b>Description</b><br>
<a name="854"></a>
The <i>dimensions</i> is an unsigned byte which must be greater than or equal to 1. It represents the number of dimensions of the array to be created. The operand stack must contain <i>dimensions</i> words, which must be of type <code>int</code> and nonnegative, each representing the number of components in a dimension of the array to be created. The <i>count1</i> is the desired length in the first dimension, <i>count2</i> in the second, etc.<p>
<a name="8049"></a>
All of the <i>count</i> values are popped off the operand stack. The unsigned <i>indexbyte1</i> and <i>indexbyte2</i> are used to construct an index into the constant pool of the current class <a href="Overview.doc.html#17257">(§3.6)</a>, where the value of the index is (<i>indexbyte1</i> << 8) | <i>indexbyte2</i>. The resulting entry must have already been resolved to an array class type of dimensionality greater than or equal to <i>dimensions</i>.<p>
<a name="8024"></a>
A new multidimensional array of the array type is allocated from the garbage-collected heap. The components of the first dimension of the array are initialized to subarrays of the type of second dimension, and so on. The components of the array in the final dimension are initialized to the default initial value for its type (<a href="Concepts.doc.html#15858">§2.5.1</a>). A <code>reference</code> <i>arrayref</i> to the new array is pushed onto the operand stack. <p>
<a name="23288"></a>
multianewarray_quick (cont.) multianewarray_quick (cont.)<p>
<a name="multianewarray_quick.Runtime"></a>
<b>Runtime Exception</b><br>
<a name="1624"></a>
If any of the <i>dimensions</i> values on the operand stack is less than zero, <i>multianewarray_quick</i> throws a <code>NegativeArraySize</code><code>-Exception</code>.<p>
<a name="multianewarray_quick.Notes"></a>
<b>Notes</b><br>
<a name="4903"></a>
The opcode of this instruction was originally <i>multianewarray</i>. The operands of the <i>multianewarray</i> instruction are not modified.<p>
<a name="4901"></a>
<p>
<hr>
<!-- This inserts footnotes--><p><br>
<a href="Copyright.doc.html">Contents</a> | <a href="Quick2.doc4.html">Prev</a> | <a href="Quick2.doc6.html">Next</a> | <a href="Lindholm.INDEX.html">Index</a>
<p>
<font size=-1>Java Virtual Machine Specification (HTML generated by chsieh on March 13, 1997)<br>
<i><a href="Copyright.doc.html">Copyright © 1996, 1997 Sun Microsystems, Inc.</a>
All rights reserved</i>
<br>
Please send any comments or corrections to <a href="mailto:doug.kramer@sun.com">doug.kramer@sun.com</a>
</font>
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -