没有合适的资源?快使用搜索试试~ 我知道了~
首页JVMIS Java指令集
资源详情
资源评论
资源推荐
Java Virtual Machine Instruction Set
aaload
Operation
Load reference from array
Format
aaload
Forms
aaload = 50 (0x32)
Operand Stack
..., arrayref, index ==> ..., value
Description
The arrayref must be of type reference and must refer to an array whose
components are of type reference. The index must be of type int. Both arrayref
and index are popped from the operand stack. The reference value in the
component of the array at index is retrieved and pushed onto the operand stack.
Runtime Exceptions
If arrayref is null, aaload throws a NullPointerException.
Otherwise, if index is not within the bounds of the array referenced by arrayref, the
aaload instruction throws an ArrayIndexOutOfBoundsException.
aastore
Operation
Store into reference array
Format
aastore
Forms
aastore = 83 (0x53)
Operand Stack
..., arrayref, index, value ==> ...
Description
The arrayref must be of type reference and must refer to an array whose
components are of type reference. The index must be of type int and value must
be of type reference. The arrayref, index, and value are popped from the operand
stack. The reference value is stored as the component of the array at index.
The type of value must be assignment compatible (§2.6.7) with the type of the
components of the array referenced by arrayref. Assignment of a value of reference
type S (source) to a variable of reference type T (target) is allowed only when the
type S supports all the operations defined on type T. The detailed rules follow:
• If S is a class type, then:
• If T is a class type, then S must be the same class (§2.8.1) as T, or S must be
a subclass of T;
• If T is an interface type, S must implement (§2.13) interface T.
• If S is an interface type, then:
• If T is a class type, then T must be Object (§2.4.7).
• If T is an interface type, then T must be the same interface as S or a
superinterface of S (§2.13.2).
• If S is an array type, namely, the type SC[], that is, an array of components of type
SC, then:
• If T is a class type, then T must be Object (§2.4.7).
• If T is an array type TC[], that is, an array of components of type TC, then
one of the following must be true:
• TC and SC are the same primitive type (§2.4.1).
• TC and SC are reference types (§2.4.6), and type SC is assignable to
TC by these runtime rules.
• If T is an interface type, T must be one of the interfaces implemented by
arrays (§2.15).
Runtime Exceptions
If arrayref is null, aastore throws a NullPointerException.
Otherwise, if index is not within the bounds of the array referenced by arrayref, the
aastore instruction throws an ArrayIndexOutOfBoundsException.
Otherwise, if arrayref is not null and the actual type of value is not assignment
compatible (§2.6.7) with the actual type of the components of the array, aastore
throws an ArrayStoreException.
aconst_null
Operation
Push null
Format
aconst_null
Forms
aconst_null = 1 (0x1)
Operand Stack
... ==> ..., null
Description
Push the null object reference onto the operand stack.
Notes
The Java virtual machine does not mandate a concrete value for null.
aload
Operation
Load reference from local variable
Format
aload
index
Forms
aload = 25 (0x19)
Operand Stack
... ==> ..., objectref
Description
The index is an unsigned byte that must be an index into the local variable array of
the current frame (§3.6). The local variable at index must contain a reference.
The objectref in the local variable at index is pushed onto the operand stack.
Notes
The aload instruction cannot be used to load a value of type returnAddress from
a local variable onto the operand stack. This asymmetry with the astore instruction
is intentional.
The aload opcode can be used in conjunction with the wide instruction to access a
local variable using a two-byte unsigned index.
aload_<n>
Operation
Load reference from local variable
Format
aload_<n>
Forms
aload_0 = 42 (0x2a) aload_1 = 43 (0x2b) aload_2 = 44 (0x2c) aload_3 = 45
(0x2d)
Operand Stack
... ==> ..., objectref
Description
The <n> must be an index into the local variable array of the current frame
(§3.6). The local variable at <n> must contain a reference. The objectref in the
local variable at index is pushed onto the operand stack.
Notes
An aload_<n> instruction cannot be used to load a value of type returnAddress
from a local variable onto the operand stack. This asymmetry with the
corresponding astore_<n> instruction is intentional. Each of the aload_<n>
instructions is the same as aload with an index of <n>, except that the operand
<n> is implicit.
anewarray
Operation
Create new array of reference
Format
anewarray
indexbyte1
indexbyte2
Forms
anewarray = 189 (0xbd)
Operand Stack
..., count ==> ..., arrayref
Description
The count must be of type int. It is popped off the operand stack. The count
represents the number of components of the array to be created. The unsigned
indexbyte1 and indexbyte2 are used to construct an index into the runtime constant
pool of the current class (§3.6), where the value of the index is (indexbyte1 << 8)
| indexbyte2. The runtime constant pool item at that index must be a symbolic
reference to a class, array, or interface type. The named class, array, or interface
type is resolved (§5.4.3.1). A new array with components of that type, of length
count, is allocated from the garbage-collected heap, and a reference arrayref to
this new array object is pushed onto the operand stack. All components of the new
array are initialized to null, the default value for reference types (§2.5.1).
Linking Exceptions
During resolution of the symbolic reference to the class, array, or interface type, any
of the exceptions documented in §5.4.3.1 can be thrown.
Runtime Exception
Otherwise, if count is less than zero, the anewarray instruction throws a
NegativeArraySizeException.
Notes
The anewarray instruction is used to create a single dimension of an array of object
references or part of a multidimensional array.
areturn
Operation
Return reference from method
Format
剩余120页未读,继续阅读
哈库纳玛塔塔
- 粉丝: 58
- 资源: 40
上传资源 快速赚钱
- 我的内容管理 收起
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
会员权益专享
最新资源
- zigbee-cluster-library-specification
- JSBSim Reference Manual
- c++校园超市商品信息管理系统课程设计说明书(含源代码) (2).pdf
- 建筑供配电系统相关课件.pptx
- 企业管理规章制度及管理模式.doc
- vb打开摄像头.doc
- 云计算-可信计算中认证协议改进方案.pdf
- [详细完整版]单片机编程4.ppt
- c语言常用算法.pdf
- c++经典程序代码大全.pdf
- 单片机数字时钟资料.doc
- 11项目管理前沿1.0.pptx
- 基于ssm的“魅力”繁峙宣传网站的设计与实现论文.doc
- 智慧交通综合解决方案.pptx
- 建筑防潮设计-PowerPointPresentati.pptx
- SPC统计过程控制程序.pptx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论1