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

📄 instructions2.doc101.html

📁 Jvm 规范说明。The Java Virtual Machine was designed to support the Java programming language. Some concep
💻 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.doc100.html">Prev</a> | <a href="Instructions2.doc102.html">Next</a> | <a href="Mnemonics.doc.html">Index</a><hr><br> <a name="instanceof"></a><h2>instanceof</h2><a name="instanceof.Operation"></a><b>Operation</b><br><a name="68727"></a><p><Table Border="3"><tr><td><a name="68722"></a> <i>instanceof</i><td><a name="87568"></a> <tr><td><a name="68724"></a> <i>indexbyte1</i><td><a name="87568"></a> <tr><td><a name="68726"></a> <i>indexbyte2</i><td><a name="87568"></a> </Table><Table><tr><td></Table>Determine if object is of given type<p><a name="instanceof.Forms"></a><b>Forms</b><br><a name="68728"></a><i>instanceof</i> = 193 (0xc1)<p><a name="instanceof.Stack"></a><b>Stack</b><br><a name="68729"></a>..., <i>objectref</i><em> </em><img src="chars/arrwdbrt.gif"> ..., <i>result</i><p><a name="instanceof.Description"></a><b>Description</b><br><a name="68730"></a>The <i>objectref</i>, which must be of type <code>reference</code>, is popped from 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">(&#167;3.6)</a>, where the value of the index is (<i>indexbyte1</i> << 8) | <i>indexbyte2</i>. The item at that index in the constant pool must be a <code>CONSTANT_Class</code> <a href="ClassFile.doc.html#1221">(&#167;4.4.1)</a>, a symbolic reference to a class, array, or interface. The symbolic reference is resolved <a href="ConstantPool.doc.html#51579">(&#167;5.1)</a>. <p><a name="140275"></a>If <i>objectref</i> is not <code>null</code> and is an instance of the resolved class, array, or interface, the <i>instanceof</i> instruction pushes an <code>int</code> <i>result</i> of <i>1</i> as an int on the operand stack. Otherwise, it pushes an <code>int</code> <i>result</i> of <i>0</i>.<p><a name="68740"></a>The following rules are used to determine whether an <i>objectref</i> that is not <code>null</code> is an instance of the resolved type: If S is the class of the object referred to by <i>objectref</i> and T is the resolved class, array, or interface type, <i>instanceof</i> determines whether <i>objectref</i> is an instance of T as follows:<p><hr><!-- This inserts footnotes--><p><a href="VMSpecTOC.doc.html">Contents</a> | <a href="Instructions2.doc100.html">Prev</a> | <a href="Instructions2.doc102.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 &#169 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 + -