📄 quick2.doc.html
字号:
The operands of the <i>getfield</i> instruction are not modified. Because the <i>getfield_quick_w</i> instruction operates on both one- and two-word wide fields, it needs to know both the field offset and the type of that field. Because the original <i>getfield</i> instruction needed a 16-bit index, the field offset may be 16 bits wide. As there is insufficient space in the instruction to store both a 16-bit offset and a field type, <i>getfield_quick_w</i> retains its original operands and uses them to index into the constant pool, where the offset and field type are available in the resolved entry.<p>
<a name="getfield2_quick"></a>
<hr><h2>getfield2_quick</h2>
<a name="getfield2_quick.Operation"></a>
<b>Operation</h3></b>
<a name="5099"></a>
Fetch <code>long</code> or <code>double</code> field from object<p><Table Border="1">
<tr><td><a name="5094"></a>
<i>getfield2_quick</i>
<td><a name="475"></a>
<tr><td><a name="5096"></a>
<i>offset</i>
<td><a name="482"></a>
<tr><td><a name="5098"></a>
<i><unused></i>
<td><a name="489"></a>
</Table><br><br><p>
<a name="getfield2_quick.Forms"></a>
<b>Forms</h3></b>
<a name="12452"></a>
<i>getfield2_quick</i> = 208 (0xd0)<p>
<a name="getfield2_quick.Stack"></a>
<b>Stack</h3></b>
<a name="8389"></a>
..., <i>objectref</i> <img src="chars/arrwdbrt.gif"> ..., <i>value.word1</i>, <i>value.word2</i><p>
<a name="getfield2_quick.Description"></a>
<b>Description</h3></b>
<a name="8391"></a>
The <i>objectref</i>, which must be of type <code>reference</code>, is popped from the operand stack. The <i>value</i> of the two-word field at <i>offset</i> into the class instance referenced by <i>objectref</i> is fetched and pushed onto the operand stack.<p>
<a name="getfield2_quick.Runtime"></a>
<b>Runtime Exception</h3></b>
<a name="12072"></a>
If <i>objectref</i> is <code>null</code>, the <i>getfield2_quick</i> instruction throws a <code>NullPointerException</code>.<p>
<a name="getfield2_quick.Notes"></a>
<b>Notes</h3></b>
<a name="8918"></a>
The opcode of this instruction was originally <i>getfield</i>, operating on a field determined dynamically to have an offset into the class instance data of 255 words or less and to have a width of two words. <p>
<a name="17426"></a>
When the constant pool entry referenced by a <i>getfield</i> instruction is resolved, the offset for the field it references is generated. That offset replaces the first operand of the original <i>getfield</i> instruction. The second operand of the <i>getfield</i> is unused by <i>getfield2_quick</i>. <p>
<a name="getstatic_quick"></a>
<hr><h2>getstatic_quick</h2>
<a name="getstatic_quick.Operation"></a>
<b>Operation</h3></b>
<a name="8932"></a>
Get static field from class<p><Table Border="1">
<tr><td><a name="8927"></a>
<i>getstatic_quick</i>
<td><a name="300"></a>
<tr><td><a name="8929"></a>
<i>indexbyte1</i>
<td><a name="307"></a>
<tr><td><a name="8931"></a>
<i>indexbyte2</i>
<td><a name="314"></a>
</Table><br><br><p>
<a name="getstatic_quick.Forms"></a>
<b>Forms</h3></b>
<a name="12453"></a>
<i>getstatic_quick</i> = 210 (0xd2)<p>
<a name="getstatic_quick.Stack"></a>
<b>Stack</h3></b>
<a name="5122"></a>
..., <img src="chars/arrwdbrt.gif"> ..., <i>value</i> <p>
<a name="getstatic_quick.Description"></a>
<b>Description</h3></b>
<a name="5123"></a>
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 constant pool item at that index must be a <code>CONSTANT_Fieldref</code> <a href="ClassFile.doc.html#4723">(§4.4.2)</a> which must already have been resolved and must be a class (<code>static</code>) field that is one word wide. The <i>value</i> of that class field is fetched and pushed onto the operand stack.<p>
<a name="getstatic_quick.Notes"></a>
<b>Notes</h3></b>
<a name="5127"></a>
The opcode of this instruction was originally <i>getstatic</i>, operating on a <code>static</code> field determined dynamically to be one word wide. The operands of the <i>getstatic</i> instruction are not modified. There is no equivalent to the <i>getfield_quick</i> instruction, storing a class offset as an instruction operand, for one-word <code>static</code> fields.<p>
<a name="getstatic2_quick"></a>
<hr><h2>getstatic2_quick</h2>
<a name="getstatic2_quick.Operation"></a>
<b>Operation</h3></b>
<a name="5141"></a>
Get static field from class<p><Table Border="1">
<tr><td><a name="5136"></a>
<i>getstatic2_quick</i>
<td><a name="527"></a>
<tr><td><a name="5138"></a>
<i>indexbyte1</i>
<td><a name="534"></a>
<tr><td><a name="5140"></a>
<i>indexbyte2</i>
<td><a name="541"></a>
</Table><br><br><p>
<a name="getstatic2_quick.Forms"></a>
<b>Forms</h3></b>
<a name="12454"></a>
<i>getstatic2_quick</i> = 212 (0xd4)<p>
<a name="getstatic2_quick.Stack"></a>
<b>Stack</h3></b>
<a name="5142"></a>
...,<em> </em><img src="chars/arrwdbrt.gif"> ..., <i>value.word1</i>, <i>value.word2</i><p>
<a name="getstatic2_quick.Description"></a>
<b>Description</h3></b>
<a name="5143"></a>
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 constant pool item at that index must be a <code>CONSTANT_Fieldref</code> <a href="ClassFile.doc.html#4723">(§4.4.2)</a> which must already have been resolved and must be a class (<code>static</code>) field that is two words wide. The <i>value</i> of that class field is fetched and pushed onto the operand stack.<p>
<a name="8437"></a>
The constant pool item is a field reference to a static field of a class. The type of the field must be <code>long</code> or <code>double</code>. The value of that field is pushed onto the stack.<p>
<a name="getstatic2_quick.Notes"></a>
<b>Notes</h3></b>
<a name="8485"></a>
The opcode of this instruction was originally <i>getstatic</i>, operating on a class field determined dynamically to be two words wide. The operands of the <i>getstatic</i> instruction are not modified. There is no equivalent to the <i>getfield2_quick</i> instruction, storing a class offset as an instruction operand, for two-word <code>static</code> fields.<p>
<a name="instanceof_quick"></a>
<hr><h2>instanceof_quick</h2>
<a name="instanceof_quick.Operation"></a>
<b>Operation</h3></b>
<a name="5311"></a>
<p><Table Border="1">
<tr><td><a name="5306"></a>
<i>instanceof_quick</i>
<td><a name="423"></a>
<tr><td><a name="5308"></a>
<i>indexbyte1</i>
<td><a name="430"></a>
<tr><td><a name="5310"></a>
<i>indexbyte2</i>
<td><a name="437"></a>
</Table><br><br>Determine if object is of given type<p>
<a name="instanceof_quick.Forms"></a>
<b>Forms</h3></b>
<a name="12455"></a>
<i>instanceof_quick</i> = 225 (0xe1)<p>
<a name="instanceof_quick.Stack"></a>
<b>Stack</h3></b>
<a name="5312"></a>
..., <i>objectref</i><em> </em><img src="chars/arrwdbrt.gif"> ..., <i>result</i><p>
<a name="instanceof_quick.Description"></a>
<b>Description</h3></b>
<a name="8113"></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">(§3.6)</a>, where the value of the index is (<i>indexbyte1</i> << 8) | <i>indexbyte2</i>. The class at that index of the constant pool must have already been successfully resolved and may be a class, array, or interface.<p>
<a name="18712"></a>
If <i>objectref</i> is not <code>null</code> and is an instance of the resolved class, array, or interface, the <i>instanceof_quick</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="18713"></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 instance type, <i>instanceof_quick</i> determines whether <i>objectref</i> is an instance of T as follows:<p>
<ul><a name="11862"></a>
<li>If S is an ordinary (non-array) class, then:
<ul>
<a name="11866"></a>
<li>If T is a class type, then S must be the same class <a href="Concepts.doc.html#20389">(§2.8.1)</a> as T, or a subclass of T.
<a name="11870"></a>
<li>If T is an interface type, then S must implement <a href="Concepts.doc.html#16432">(§2.13)</a> interface T.
</ul>
</ul>
<a name="instanceof_quick"></a>
<hr><h2>instanceof_quick</h2>
<ul><a name="11871"></a>
<li>If S is a class representing the array type SC<code>[]</code>, that is, an array of components of type SC, then:
<ul>
<a name="11875"></a>
<li>If T is a class type, then T must be <code>Object</code> <a href="Concepts.doc.html#27433">(§2.4.6)</a>.
<a name="11876"></a>
<li>If T is an array type TC<code>[]</code>, that is, an array of components of type TC, then one of the following must be true:
<ul>
<a name="11880"></a>
<li>TC and SC are the same primitive type <a href="Concepts.doc.html#19511">(§2.4.1)</a>.
<a name="11884"></a>
<li>TC and SC are reference types <a href="Concepts.doc.html#25376">(§2.4.5)</a> and type SC can be cast to TC by these runtime rules.
</ul>
</ul>
</ul><a name="8134"></a>
S cannot be an interface type, because there are no instances of interfaces, only instances of classes and arrays.<p>
<a name="instanceof_quick.Notes"></a>
<b>Notes</h3></b>
<a name="5318"></a>
The opcode of this instruction was originally <i>instanceof</i>. The operands of the <i>instanceof</i> instruction are not modified.<p>
<a name="invokeinterface_quick"></a>
<hr><h2>invokeinterface_quick</h2>
<a name="invokeinterface_quick.Operation"></a>
<b>Operation</h3></b>
<a name="5257"></a>
Invoke interface method<p><Table Border="1">
<tr><td><a name="5248"></a>
<i>invokeinterface_quick</i>
<td><a name="182"></a>
<tr><td><a name="5250"></a>
<i>idbyte1</i>
<td><a name="189"></a>
<tr><td><a name="5252"></a>
<i>idbyte2</i>
<td><a name="196"></a>
<tr><td><a name="5254"></a>
<i>nargs</i>
<td><a name="203"></a>
<tr><td><a name="5256"></a>
<i>guess</i>
<td><a name="210"></a>
</Table><br><br><p>
<a name="invokeinterface_quick.Forms"></a>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -