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

📄 chap06.html

📁 Inside the java virtualMachine,深入研究java虚拟机
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<P>Table 6-10. Format of a <FONT FACE="Courier New">CONSTANT_Integer_info</FONT> table</P>
<TABLE WIDTH="500">
<TR><TD VALIGN="TOP"><STRONG>Type</STRONG></TD><TD VALIGN="TOP"><STRONG>Name</STRONG></TD><TD VALIGN="TOP"><STRONG>Count</STRONG></TD></TR>
<TR><TD VALIGN="TOP"><FONT FACE="Courier New">u1</FONT></TD><TD VALIGN="TOP"><FONT FACE="Courier New">tag</FONT></TD><TD VALIGN="TOP">1</TD></TR>
<TR><TD VALIGN="TOP"><FONT FACE="Courier New">u4</FONT></TD><TD VALIGN="TOP"><FONT FACE="Courier New">bytes</FONT></TD><TD VALIGN="TOP">1</TD></TR>
</TABLE>
<I><P><FONT FACE="Courier New">tag</FONT></P>
</I><P>The <FONT FACE="Courier New">tag</FONT> item has the value <FONT FACE="Courier New">CONSTANT_Integer</FONT> (3).</P>
<I><P><FONT FACE="Courier New">bytes</FONT></P>
</I><P>The <FONT FACE="Courier New">bytes</FONT> item contains the <FONT FACE="Courier New">int</FONT> value stored in big-endian order.</P>
<H3><P>The CONSTANT_Float_info Table</P>
</H3><P>The <FONT FACE="Courier New">CONSTANT_Float_info</FONT> table stores a constant <FONT FACE="Courier New">float</FONT> value. This table is used only to store <FONT FACE="Courier New">float</FONT> literals. It is not used in symbolic references. Table 6-11 shows the format of a <FONT FACE="Courier New">CONSTANT_Float_info</FONT> table.</P>
<P>Table 6-11. Format of a <FONT FACE="Courier New">CONSTANT_Float_info</FONT> table</P>
<TABLE WIDTH="500">
<TR><TD VALIGN="TOP"><STRONG>Type</STRONG></TD><TD VALIGN="TOP"><STRONG>Name</STRONG></TD><TD VALIGN="TOP"><STRONG>Count</STRONG></TD></TR>
<TR><TD VALIGN="TOP"><FONT FACE="Courier New">u1</FONT></TD><TD VALIGN="TOP"><FONT FACE="Courier New">tag</FONT></TD><TD VALIGN="TOP">1</TD></TR>
<TR><TD VALIGN="TOP"><FONT FACE="Courier New">u4</FONT></TD><TD VALIGN="TOP"><FONT FACE="Courier New">bytes</FONT></TD><TD VALIGN="TOP">1</TD></TR>
</TABLE>
<I><P><FONT FACE="Courier New">tag</FONT></P>
</I><P>The <FONT FACE="Courier New">tag</FONT> item has the value <FONT FACE="Courier New">CONSTANT_Float</FONT> (4).</P>
<I><P><FONT FACE="Courier New">bytes</FONT></P>
</I><P>The <FONT FACE="Courier New">bytes</FONT> item contains the <FONT FACE="Courier New">float</FONT> value stored in big-endian order. For the details of the representation of <FONT FACE="Courier New">float</FONT> in the Java class file, see Chapter 14, &quot;Floating Point Arithmetic.&quot;</P>
<H3><P>The CONSTANT_Long_info Table</P>
</H3><P>The <FONT FACE="Courier New">CONSTANT_Long_info</FONT> table stores a constant <FONT FACE="Courier New">long</FONT> value. This table is used only to store <FONT FACE="Courier New">long</FONT> literals. It is not used in symbolic references. Table 6-12 shows the format of a <FONT FACE="Courier New">CONSTANT_Long_info</FONT> table.</P>
<P>As noted above, a <FONT FACE="Courier New">long</FONT> occupies two slots in the constant pool table. In the class file, a <FONT FACE="Courier New">long</FONT> entry is just followed by the next entry, but the index of the next entry is two more than that of the <FONT FACE="Courier New">long</FONT> entry.</P>
<P>Table 6-12. Format of a <FONT FACE="Courier New">CONSTANT_Long_info</FONT> table</P>
<TABLE WIDTH="500">
<TR><TD VALIGN="TOP"><STRONG>Type</STRONG></TD><TD VALIGN="TOP"><STRONG>Name</STRONG></TD><TD VALIGN="TOP"><STRONG>Count</STRONG></TD></TR>
<TR><TD VALIGN="TOP"><FONT FACE="Courier New">u1</FONT></TD><TD VALIGN="TOP"><FONT FACE="Courier New">tag</FONT></TD><TD VALIGN="TOP">1</TD></TR>
<TR><TD VALIGN="TOP"><FONT FACE="Courier New">u8</FONT></TD><TD VALIGN="TOP"><FONT FACE="Courier New">bytes</FONT></TD><TD VALIGN="TOP">1</TD></TR>
</TABLE>
<I><P><FONT FACE="Courier New">tag</FONT></P>
</I><P>The <FONT FACE="Courier New">tag</FONT> item has the value <FONT FACE="Courier New">CONSTANT_Long</FONT> (5).</P>
<I><P><FONT FACE="Courier New">bytes</FONT></P>
</I><P>The <FONT FACE="Courier New">bytes</FONT> item contains the <FONT FACE="Courier New">long</FONT> value stored in big-endian order.</P>
<H3><P>The CONSTANT_Double_info Table</P>
</H3><P>The <FONT FACE="Courier New">CONSTANT_Double_info</FONT> table stores a constant <FONT FACE="Courier New">double</FONT> value. This table is used only to store <FONT FACE="Courier New">double</FONT> literals. It is not used in symbolic references. Table 6-13 shows the format of a <FONT FACE="Courier New">CONSTANT_Double_info</FONT> table.</P>
<P>As noted above, a <FONT FACE="Courier New">double</FONT> occupies two slots in the constant pool table. In the class file, a <FONT FACE="Courier New">double</FONT> entry is just followed by the next entry, but the index of the next entry is two more than that of the <FONT FACE="Courier New">double</FONT> entry.</P>
<P>Table 6-13. Format of a <FONT FACE="Courier New">CONSTANT_Double_info</FONT> table</P>
<TABLE WIDTH="500">
<TR><TD VALIGN="TOP"><STRONG>Type</STRONG></TD><TD VALIGN="TOP"><STRONG>Name</STRONG></TD><TD VALIGN="TOP"><STRONG>Count</STRONG></TD></TR>
<TR><TD VALIGN="TOP"><FONT FACE="Courier New">u1</FONT></TD><TD VALIGN="TOP"><FONT FACE="Courier New">tag</FONT></TD><TD VALIGN="TOP">1</TD></TR>
<TR><TD VALIGN="TOP"><FONT FACE="Courier New">u8</FONT></TD><TD VALIGN="TOP"><FONT FACE="Courier New">bytes</FONT></TD><TD VALIGN="TOP">1</TD></TR>
</TABLE>
<I><P><FONT FACE="Courier New">tag</FONT></P>
</I><P>The <FONT FACE="Courier New">tag</FONT> item has the value <FONT FACE="Courier New">CONSTANT_Double</FONT> (6).</P>
<I><P><FONT FACE="Courier New">bytes</FONT></P>
</I><P>The <FONT FACE="Courier New">bytes</FONT> item contains the <FONT FACE="Courier New">double</FONT> value stored in big-endian order. For the details of the representation of <FONT FACE="Courier New">double</FONT> in the Java class file, see Chapter 14, &quot;Floating Point Arithmetic.&quot;</P>
<H3><P>The CONSTANT_Class_info Table</P>
</H3><P>The <FONT FACE="Courier New">CONSTANT_Class_info</FONT> table represents a class or interface in symbolic references. All symbolic references, whether they refer to a class, interface, field, or method, include a <FONT FACE="Courier New">CONSTANT_Class_info</FONT> table. Table 6-14 shows the format of a <FONT FACE="Courier New">CONSTANT_Class_info</FONT> table.</P>
<P>Table 6-14. Format of a <FONT FACE="Courier New">CONSTANT_Class_info</FONT> table</P>
<TABLE WIDTH="500">
<TR><TD VALIGN="TOP"><STRONG>Type</STRONG></TD><TD VALIGN="TOP"><STRONG>Name</STRONG></TD><TD VALIGN="TOP"><STRONG>Count</STRONG></TD></TR>
<TR><TD VALIGN="TOP"><FONT FACE="Courier New">u1</FONT></TD><TD VALIGN="TOP"><FONT FACE="Courier New">tag</FONT></TD><TD VALIGN="TOP">1</TD></TR>
<TR><TD VALIGN="TOP"><FONT FACE="Courier New">u2</FONT></TD><TD VALIGN="TOP"><FONT FACE="Courier New">name_index</FONT></TD><TD VALIGN="TOP">1</TD></TR>
</TABLE>
<I><P><FONT FACE="Courier New">tag</FONT></P>
</I><P>The <FONT FACE="Courier New">tag</FONT> item has the value <FONT FACE="Courier New">CONSTANT_Class</FONT> (7).</P>
<I><P><FONT FACE="Courier New">name_index</FONT></P>
</I><P>The <FONT FACE="Courier New">name_index</FONT> item gives the index of a <FONT FACE="Courier New">CONSTANT_Utf8_info</FONT> table that contains a fully qualified name of a class or interface.</P>
<H3><P>The CONSTANT_String_info Table</P>
</H3><P>A <FONT FACE="Courier New">CONSTANT_String_info</FONT> represents a literal string value, which will be represented as an instance of class <FONT FACE="Courier New">java.lang.String</FONT>. This table is only used to represent literal strings. It is not used in symbolic references. Table 6-15 shows the format of a <FONT FACE="Courier New">CONSTANT_String_info</FONT> table.</P>
<P>Table 6-15. Format of a <FONT FACE="Courier New">CONSTANT_String_info</FONT> table</P>
<TABLE WIDTH="500">
<TR><TD VALIGN="TOP"><STRONG>Type</STRONG></TD><TD VALIGN="TOP"><STRONG>Name </STRONG></TD><TD VALIGN="TOP"><STRONG>Count</STRONG></TD></TR>
<TR><TD VALIGN="TOP"><FONT FACE="Courier New">u1</FONT></TD><TD VALIGN="TOP"><FONT FACE="Courier New">tag</FONT></TD><TD VALIGN="TOP">1</TD></TR>
<TR><TD VALIGN="TOP"><FONT FACE="Courier New">u2</FONT></TD><TD VALIGN="TOP"><FONT FACE="Courier New">string_index</FONT></TD><TD VALIGN="TOP">1</TD></TR>
</TABLE>
<I><P><FONT FACE="Courier New">tag</FONT></P>
</I><P>The <FONT FACE="Courier New">tag</FONT> item has the value <FONT FACE="Courier New">CONSTANT_String</FONT> (8).</P>
<I><P><FONT FACE="Courier New">string_index</FONT></P>
</I><P>The <FONT FACE="Courier New">string_index</FONT> item gives the index of a <FONT FACE="Courier New">CONSTANT_Utf8_info</FONT> entry that contains the value of the literal string.</P>
<H3><P>The CONSTANT_Fieldref_info Table</P>
</H3><P>The <FONT FACE="Courier New">CONSTANT_Fieldref_info</FONT> table represents a symbolic reference to a field. Table 6-16 shows the format of a <FONT FACE="Courier New">CONSTANT_Fieldref_info</FONT> table.</P>
<P>Table 6-16. Format of a <FONT FACE="Courier New">CONSTANT_Fieldref_info</FONT> table</P>
<TABLE WIDTH="500">
<TR><TD VALIGN="TOP"><STRONG>Type</STRONG></TD><TD VALIGN="TOP"><STRONG>Name </STRONG></TD><TD VALIGN="TOP"><STRONG>Count</STRONG></TD></TR>
<TR><TD VALIGN="TOP"><FONT FACE="Courier New">u1</FONT></TD><TD VALIGN="TOP"><FONT FACE="Courier New">tag</FONT></TD><TD VALIGN="TOP">1</TD></TR>
<TR><TD VALIGN="TOP"><FONT FACE="Courier New">u2</FONT></TD><TD VALIGN="TOP"><FONT FACE="Courier New">class_index</FONT></TD><TD VALIGN="TOP">1</TD></TR>
<TR><TD VALIGN="TOP"><FONT FACE="Courier New">u2</FONT></TD><TD VALIGN="TOP"><FONT FACE="Courier New">name_and_type_index</FONT></TD><TD VALIGN="TOP">1</TD></TR>
</TABLE>
<I><P><FONT FACE="Courier New">tag</FONT></P>
</I><P>The <FONT FACE="Courier New">tag</FONT> item has the value <FONT FACE="Courier New">CONSTANT_Fieldref</FONT> (9).</P>

⌨️ 快捷键说明

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