⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 instructions2.doc1.html

📁 Jvm 规范说明。The Java Virtual Machine was designed to support the Java programming language. Some concep
💻 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=100%><tr>
<td><a href="VMSpecTOC.doc.html">Contents</a> | <a href="Instructions2.doc.html">Prev</a> | <a href="Instructions2.doc2.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="baload">
</a><h2>baload</h2>
<a name="baload.Operation"></a>
<b>Operation</h3></b>
<a name="67301"></a>
Load <code>byte</code> or <code>boolean</code> from array<p><Table Border="1">
<tr><td><a name="67300"></a>
 <i>baload</i>
<td><a name="87568"></a>
 

</Table><br><br><p>
<a name="baload.Forms"></a>
<b>Forms</h3></b>
<a name="67302"></a>
<i>baload</i> = 51 (0x33)<p>
<a name="baload.Stack"></a>
<b>Stack</h3></b>
<a name="67303"></a>
..., <i>arrayref</i>, <i>index</i> <img src="chars/arrwdbrt.gif"> ..., <i>value</i><p>
<a name="baload.Description"></a>
<b>Description</h3></b>
<a name="67304"></a>
The <i>arrayref</i> must be of type <code>reference</code> and must refer to an array whose components are of type <code>byte</code> or of type <code>boolean</code>. The <i>index</i> must be of type <code>int</code>. Both <i>arrayref</i> and <i>index</i> are popped from the operand stack. The <code>byte</code> <i>value</i> in the component of the array at <i>index</i> is retrieved, sign-extended to an <code>int</code> <i>value</i>, and pushed onto the top of the operand stack.<p>
<a name="baload.Runtime"></a>
<b>Runtime Exceptions</h3></b>
<a name="67306"></a>
If <i>arrayref</i><em> </em>is <code>null</code>, <i>baload</i> throws a <code>NullPointerException</code>. <p>
<a name="67307"></a>
Otherwise, if <i>index</i> is not within the bounds of the array referenced by <i>arrayref</i>, the <i>baload</i> instruction throws an <code>ArrayIndex-OutOfBounds-Exception</code>.<p>
<a name="baload.Notes"></a>
<b>Notes</h3></b>
<a name="101054"></a>
The <i>baload</i> instruction is used to load values from both <code>byte</code> and <code>boolean</code> arrays. In Sun's implementation of the Java Virtual Machine, <code>boolean</code> arrays (arrays of type <code>T_BOOLEAN</code>; see <a href="Overview.doc.html#12237">&#167;3.1</a> and the description of the <i>newarray</i> instruction) are implemented as arrays of 8-bit values. Other implementations may implement packed <code>boolean</code> arrays; the <i>baload</i> instruction of such implementations must be used to access those arrays.<p>
<a name="baload.	"></a>
<b>	</h3></b>

<a name="bastore"></a>
<hr><h2>bastore</h2>
<a name="bastore.Operation"></a>
<b>Operation</h3></b>
<a name="67321"></a>
Store into <code>byte</code> or <code>boolean</code> array<p><Table Border="1">
<tr><td><a name="67320"></a>
 <i>bastore</i>
<td><a name="87568"></a>
 

</Table><br><br><p>
<a name="bastore.Forms"></a>
<b>Forms</h3></b>
<a name="67322"></a>
<i>bastore</i> = 84 (0x54)<p>
<a name="bastore.Stack"></a>
<b>Stack</h3></b>
<a name="67323"></a>
..., <i>arrayref</i>, <i>index</i>, <i>value</i> <img src="chars/arrwdbrt.gif"> ...<p>
<a name="bastore.Description"></a>
<b>Description</h3></b>
<a name="67324"></a>
The <i>arrayref</i> must be of type <code>reference</code> and must refer to an array whose components are of type <code>byte</code> or of type <code>boolean</code>. The <i>index</i> and the <i>value</i> must both be of type <code>int</code>. The <i>arrayref</i>, <i>index</i>, and <i>value</i> are popped from the operand stack. The <code>int</code> <i>value</i> is truncated to a <code>byte</code> and stored as the component of the array indexed by <i>index</i>. <p>
<a name="bastore.Runtime"></a>
<b>Runtime Exceptions</h3></b>
<a name="67326"></a>
If <i>arrayref</i><em> </em>is <code>null</code>, <i>bastore</i> throws a <code>NullPointerException</code>. <p>
<a name="67327"></a>
Otherwise, if <i>index</i> is not within the bounds of the array referenced by <i>arrayref</i>, the <i>bastore</i> instruction throws an <code>ArrayIndexOutOfBoundsException</code>.<p>
<a name="bastore.Notes"></a>
<b>Notes</h3></b>
<a name="101065"></a>
The <i>bastore</i> instruction is used to store values into both <code>byte</code> and <code>boolean</code> arrays. In Sun's implementation of the Java Virtual Machine, <code>boolean</code> arrays (arrays of type <code>T_BOOLEAN</code>; see <a href="Overview.doc.html#12237">&#167;3.1</a> and the description of the <i>newarray</i> instruction) are implemented as arrays of 8-bit values. Other implementations may implement packed <code>boolean</code> arrays; the <i>bastore</i> instruction of such implementations must be used to store into those arrays.<p>

<a name="bipush"></a>
<hr><h2>bipush</h2>
<a name="bipush.Operation"></a>
<b>Operation</h3></b>
<a name="67336"></a>
Push <code>byte</code><p><Table Border="1">
<tr><td><a name="67333"></a>
 <i>bipush</i>
<td><a name="87568"></a>
 

<tr><td><a name="67335"></a>
 <i>byte</i>
<td><a name="87568"></a>
 

</Table><br><br><p>
<a name="bipush.Forms"></a>
<b>Forms</h3></b>
<a name="67337"></a>
<i>bipush</i><em> </em>= 16 (0x10)<p>
<a name="bipush.Stack"></a>
<b>Stack</h3></b>
<a name="67338"></a>
... <img src="chars/arrwdbrt.gif"> ..., <i>value</i><p>
<a name="bipush.Description"></a>
<b>Description</h3></b>
<a name="67339"></a>
The immediate <i>byte</i> is sign-extended to an <code>int</code>, and the resulting <i>value</i> is pushed onto the operand stack.<p>


<hr>
<!-- This inserts footnotes--><p>
<a href="VMSpecTOC.doc.html">Contents</a> | <a href="Instructions2.doc.html">Prev</a> | <a href="Instructions2.doc2.html">Next</a> | <a href="Lindholm.INDEX.html">Index</a>
<p>
<font size = -1>Java Virtual Machine Specification <br>
<!--(HTML generated by dkramer on March 31, 1997)-->
<!--
(HTML generated by dkramer on March 25, 1997)-->
<br>
<i><a href="Copyright.doc.html">Copyright &#169 1996, 1997 Sun Microsystems, Inc.</a>
All rights reserved</i>
<br>
Please send any comments or corrections to <a href="mailto:jvm@java.sun.com">jvm@java.sun.com</a>
</font>
</body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -