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

📄 jcvm07instr.html

📁 JAVA CARD 开发包规格说明,版本为2.2.2
💻 HTML
📖 第 1 页 / 共 5 页
字号:
</P><BR><TABLE CLASS="Titled" BORDER=1 BORDERCOLORLIGHT="#FFFFFF" BORDERCOLORDARK="#000000" CELLPADDING=5 CELLSPACING=0 BORDER="1" DIR="LTR"><CAPTION></CAPTION><TBODY><TR><TD SCOPE="ROW" ROWSPAN="1" COLSPAN="1"><P CLASS="TableText"><A NAME="pgfId-18686"></A><I CLASS="Variable">bipush</I></P></TD></TR><TR><TD SCOPE="ROW" ROWSPAN="1" COLSPAN="1"><P CLASS="TableText"><A NAME="pgfId-18688"></A><I CLASS="Variable">byte</I></P></TD></TR></TBODY></TABLE><BR><P CLASS="Paragraph"><A NAME="pgfId-7201"></A>Forms</P><P CLASS="Paragraph"><A NAME="pgfId-7202"></A>bipush = 18 (0x12)</P><P CLASS="Paragraph"><A NAME="pgfId-7203"></A>Stack</P><P CLASS="Paragraph"><A NAME="pgfId-7204"></A>... -&gt;<BR>..., value.word1, value.word2</P><P CLASS="Paragraph"><A NAME="pgfId-7205"></A>Description</P><P CLASS="Paragraph"><A NAME="pgfId-7206"></A>The immediate byte is sign-extended to an int, and the resulting value is pushed onto the operand stack.</P><BR><HR NOSHADE SIZE=1><TABLE CLASS="TipNote" DIR="LTR" WIDTH="100%" SUMMARY="TipNote"><COLGROUP SPAN="1" WIDTH="100%"><TR ALIGN="left" VALIGN="top"><TD ROWSPAN="1" COLSPAN="1" ABBR="TipNoteText"><P CLASS="TipNote"><B CLASS="TipNote">Note - </B><A NAME="pgfId-50876"></A>If a virtual machine does not support the int data type, the bipush instruction will not be available.</P></TD></TR></TABLE><HR NOSHADE SIZE=1><BR><H3 CLASS="Head2"><A NAME="pgfId-50877"></A>7.5.15	<A NAME="marker-54573"></A>bspush</H3><P CLASS="Paragraph"><A NAME="pgfId-50878"></A>Push byte</P><P CLASS="Paragraph"><A NAME="pgfId-7211"></A>Format</P><BR><TABLE CLASS="Titled" BORDER=1 BORDERCOLORLIGHT="#FFFFFF" BORDERCOLORDARK="#000000" CELLPADDING=5 CELLSPACING=0 BORDER="1" DIR="LTR"><CAPTION></CAPTION><TBODY><TR><TD SCOPE="ROW" ROWSPAN="1" COLSPAN="1"><P CLASS="TableText"><A NAME="pgfId-18690"></A><I CLASS="Variable">bspush</I></P></TD></TR><TR><TD SCOPE="ROW" ROWSPAN="1" COLSPAN="1"><P CLASS="TableText"><A NAME="pgfId-18692"></A><I CLASS="Variable">byte</I></P></TD></TR></TBODY></TABLE><BR><P CLASS="Paragraph"><A NAME="pgfId-7214"></A>Forms</P><P CLASS="Paragraph"><A NAME="pgfId-7215"></A>bspush = 16 (0x10)</P><P CLASS="Paragraph"><A NAME="pgfId-7216"></A>Stack</P><P CLASS="Paragraph"><A NAME="pgfId-7217"></A>... -&gt;<BR>..., value</P><P CLASS="Paragraph"><A NAME="pgfId-7218"></A>Description</P><P CLASS="Paragraph"><A NAME="pgfId-7219"></A>The immediate byte is sign-extended to a short, and the resulting value is pushed onto the operand stack.</P><H3 CLASS="Head2"><A NAME="pgfId-7220"></A>7.5.16	<A NAME="marker-54574"></A>checkcast</H3><P CLASS="Paragraph"><A NAME="pgfId-7221"></A>Check whether object is of given type</P><P CLASS="Paragraph"><A NAME="pgfId-7222"></A>Format</P><BR><TABLE CLASS="Titled" BORDER=1 BORDERCOLORLIGHT="#FFFFFF" BORDERCOLORDARK="#000000" CELLPADDING=5 CELLSPACING=0 BORDER="1" DIR="LTR"><CAPTION></CAPTION><TBODY><TR><TD SCOPE="ROW" ROWSPAN="1" COLSPAN="1"><P CLASS="TableText"><A NAME="pgfId-18694"></A><I CLASS="Variable">checkcast</I></P></TD></TR><TR><TD SCOPE="ROW" ROWSPAN="1" COLSPAN="1"><P CLASS="TableText"><A NAME="pgfId-18696"></A><I CLASS="Variable">atype</I></P></TD></TR><TR><TD SCOPE="ROW" ROWSPAN="1" COLSPAN="1"><P CLASS="TableText"><A NAME="pgfId-18698"></A><I CLASS="Variable">indexbyte1</I></P></TD></TR><TR><TD SCOPE="ROW" ROWSPAN="1" COLSPAN="1"><P CLASS="TableText"><A NAME="pgfId-18700"></A><I CLASS="Variable">indexbyte2</I></P></TD></TR></TBODY></TABLE><BR><P CLASS="Paragraph"><A NAME="pgfId-7227"></A>Forms</P><P CLASS="Paragraph"><A NAME="pgfId-7228"></A>checkcast = 148 (0x94)</P><P CLASS="Paragraph"><A NAME="pgfId-7229"></A>Stack</P><P CLASS="Paragraph"><A NAME="pgfId-7230"></A>..., objectref -&gt;<BR>..., objectref</P><P CLASS="Paragraph"><A NAME="pgfId-7231"></A>Description</P><P CLASS="Paragraph"><A NAME="pgfId-7232"></A>The unsigned byte atype is a code that indicates if the type against which the object is being checked is an array type or a class type. It must take one of the following values or zero:</P><BR><TABLE CLASS="Titled" BORDER=1 BORDERCOLORLIGHT="#FFFFFF" BORDERCOLORDARK="#000000" CELLPADDING=5 CELLSPACING=0 DIR="LTR"><CAPTION CLASS="TableCaption"><A NAME="pgfId-1004231"> </A> TABLE 7-2 	Array Values </CAPTION><THEAD><TR><TH SCOPE="COL" ROWSPAN="1" COLSPAN="1" BGCOLOR="#CCCCCC"><P CLASS="TableHead"><A NAME="pgfId-1004275"></A>Array Type</P></TH><TH SCOPE="COL" ROWSPAN="1" COLSPAN="1" BGCOLOR="#CCCCCC"><P CLASS="TableHead"><A NAME="pgfId-1004277"></A>atype</P></TH></TR></THEAD><TBODY><TR><TD SCOPE="ROW" ROWSPAN="1" COLSPAN="1"><P CLASS="TableText"><A NAME="pgfId-1004259"></A><KBD CLASS="Filename-Command">T_BOOLEAN</KBD></P></TD><TD ROWSPAN="1" COLSPAN="1"><P CLASS="TableText"><A NAME="pgfId-1004261"></A><KBD CLASS="Filename-Command">10</KBD></P></TD></TR><TR><TD SCOPE="ROW" ROWSPAN="1" COLSPAN="1"><P CLASS="TableText"><A NAME="pgfId-1004263"></A><KBD CLASS="Filename-Command">T_BYTE</KBD></P></TD><TD ROWSPAN="1" COLSPAN="1"><P CLASS="TableText"><A NAME="pgfId-1004265"></A><KBD CLASS="Filename-Command">11</KBD></P></TD></TR><TR><TD SCOPE="ROW" ROWSPAN="1" COLSPAN="1"><P CLASS="TableText"><A NAME="pgfId-1004267"></A><KBD CLASS="Filename-Command">T_SHORT</KBD></P></TD><TD ROWSPAN="1" COLSPAN="1"><P CLASS="TableText"><A NAME="pgfId-1004269"></A><KBD CLASS="Filename-Command">12</KBD></P></TD></TR><TR><TD SCOPE="ROW" ROWSPAN="1" COLSPAN="1"><P CLASS="TableText"><A NAME="pgfId-1004285"></A><KBD CLASS="Filename-Command">T_INT</KBD></P></TD><TD ROWSPAN="1" COLSPAN="1"><P CLASS="TableText"><A NAME="pgfId-1004287"></A><KBD CLASS="Filename-Command">13</KBD></P></TD></TR><TR><TD SCOPE="ROW" ROWSPAN="1" COLSPAN="1"><P CLASS="TableText"><A NAME="pgfId-1004289"></A><KBD CLASS="Filename-Command">T_REFERENCE</KBD></P></TD><TD ROWSPAN="1" COLSPAN="1"><P CLASS="TableText"><A NAME="pgfId-1004291"></A><KBD CLASS="Filename-Command">14</KBD></P></TD></TR></TBODY></TABLE><BR><P CLASS="Paragraph"><A NAME="pgfId-7258"></A>If the value of atype is 10, 11, 12, or 13, the values of the indexbyte1 and indexbyte2 must be zero, and the value of atype indicates the array type against which to check the object. Otherwise the unsigned indexbyte1 and indexbyte2 are used to construct an index into the constant pool of the current package (<A HREF="JCVM03structVM.html#13656" CLASS="XRef">Section 3.5, Frames</A>), where the value of the index is (indexbyte1 &lt;&lt; 8) | indexbyte2. The item at that index in the constant pool must be of type CONSTANT_Classref (<A HREF="JCVM06cap.html#39801" CLASS="XRef">Section 6.7.1, CONSTANT_Classref</A>), a reference to a class or interface type. The reference is resolved. If the value of atype is 14, the object is checked against an array type that is an array of object references of the type of the resolved class. If the value of atype is zero, the object is checked against a class or interface type that is the resolved class.</P><P CLASS="Paragraph"><A NAME="pgfId-7259"></A>The objectref must be of type reference. If objectref is null or can be cast to the specified array type or the resolved class or interface type, the operand stack is unchanged; otherwise the checkcast instruction throws a ClassCastException.</P><P CLASS="Paragraph"><A NAME="pgfId-50915"></A>The following rules are used to determine whether an objectref that is not null can be cast to the resolved type: if S is the class of the object referred to by objectref and T is the resolved class, array or interface type, checkcast determines whether objectref can be cast to type T as follows:</P><UL><LI CLASS="Bullet1"><A NAME="pgfId-48331"></A>If S is a class type, then:</LI><P CLASS="Linebreak"></P><UL><LI CLASS="Bullet2"><A NAME="pgfId-48332"></A>If T is a class type, then S must be the same class as T, or S must be a subclass of T;</LI><P CLASS="Linebreak"></P><LI CLASS="Bullet2"><A NAME="pgfId-48272"></A>If T is an interface type, then S must implement interface T.</LI><P CLASS="Linebreak"></P></UL><LI CLASS="Bullet1"><A NAME="pgfId-48273"></A>If S is an interface type<A NAME="fnote3"></A><A HREF="#pgfId-53478"  CLASS="footnote"><SUP>[3]</SUP></A>, then:</LI><P CLASS="Linebreak"></P><UL><LI CLASS="Bullet2"><A NAME="pgfId-48274"></A>If T is a class type, then T must be Object (<A HREF="JCVM02lang.html#Classes" CLASS="XRef">Section 2.2.2.4, Classes</A>);</LI><P CLASS="Linebreak"></P><LI CLASS="Bullet2"><A NAME="pgfId-52940"></A>If T is an interface type, T must be the same interface as S or a superinterface of S.</LI><P CLASS="Linebreak"></P></UL><LI CLASS="Bullet1"><A NAME="pgfId-48411"></A>If S is an array type, namely the type SC[], that is, an array of components of type SC, then:</LI><P CLASS="Linebreak"></P>

⌨️ 快捷键说明

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