📄 instructions2.doc164.html
字号:
<html><head><title>VM Spec </title></head><body BGCOLOR=#eeeeff text=#000000 LINK=#0000ff VLINK=#000077 ALINK=#ff0000> <a href="VMSpecTOC.doc.html">Contents</a> | <a href="Instructions2.doc163.html">Prev</a> | <a href="Instructions2.doc165.html">Next</a> | <a href="Mnemonics.doc.html">Index</a><hr><br> <a name="newarray"></a><h2>newarray</h2><a name="newarray.Operation"></a><b>Operation</b><br><a name="69816"></a>Create new array<p><Table Border="3"><tr><td><a name="69813"></a> <i>newarray</i><td><a name="87568"></a> <tr><td><a name="69815"></a> <i>atype</i><td><a name="87568"></a> </Table><Table><tr><td></Table><p><a name="newarray.Forms"></a><b>Forms</b><br><a name="69817"></a><i>newarray</i> = 188 (0xbc)<p><a name="newarray.Stack"></a><b>Stack</b><br><a name="69818"></a>..., <i>count</i><em> </em><img src="chars/arrwdbrt.gif"> ..., <i>arrayref</i><p><a name="newarray.Description"></a><b>Description</b><br><a name="69819"></a>The <i>count</i> must be of type <code>int</code>. It is popped off the operand stack. The <i>count</i> represents the number of elements in the array to be created. <p><a name="69820"></a>The <i>atype</i> is a code that indicates the type of array to create. It must take one of the following values:<p><Table Border="3"><tr><td><a name="69823"></a> Array Type<p><td><a name="69825"></a> <i>atype</i><p><tr><td><a name="69827"></a> <code>T_BOOLEAN</code><p><td><a name="69829"></a> <code>4</code><p><tr><td><a name="69831"></a> <code>T_CHAR</code><p><td><a name="69833"></a> <code>5</code><p><tr><td><a name="69835"></a> <code>T_FLOAT</code><p><td><a name="69837"></a> <code>6</code><p><tr><td><a name="69839"></a> <code>T_DOUBLE</code><p><td><a name="69841"></a> <code>7</code><p><tr><td><a name="69843"></a> <code>T_BYTE</code><p><td><a name="69845"></a> <code>8</code><p><tr><td><a name="69847"></a> <code>T_SHORT</code><p><td><a name="69849"></a> <code>9</code><p><tr><td><a name="69851"></a> <code>T_INT</code><p><td><a name="69853"></a> <code>10</code><p><tr><td><a name="69855"></a> <code>T_LONG</code><p><td><a name="69857"></a> <code>11</code><p></Table><Table><tr><td></Table><p><a name="69858"></a>A new array whose components are of type <i>atype</i>, of length <i>count</i>, is allocated from the garbage-collected heap. A <code>reference</code> <i>arrayref</i> to this new array object is pushed into the operand stack. All of the elements of the new array are initialized to the default initial values for its type (<a href="Concepts.doc.html#15858">§2.5.1</a>).<p><hr><!-- This inserts footnotes--><p><a href="VMSpecTOC.doc.html">Contents</a> | <a href="Instructions2.doc163.html">Prev</a> | <a href="Instructions2.doc165.html">Next</a> | <a href="Mnemonics.doc.html">Index</a><p><font size=-1>Java Virtual Machine Specification (HTML generated by dkramer on February 25, 1997)<br><i><a href="Copyright.doc.html">Copyright © 1996 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 + -