'a' 在 'aload' 或 'areturn' 等 JVM 指令中意味着什么?
What does 'a' mean in JVM instructions like 'aload' or 'areturn'?
'a' 在 JVM 指令如 'aload' 或 'areturn' 中是什么意思?
我知道它们对引用进行操作,但为什么它们被命名为 'aload'、'astore' 等而不是 'rload'、'rstore' 等?
我相信历史上 'a' 代表 'address',因为对象引用只是堆中的一个普通地址。
可以在 K virtual machine by Sun Microsystems - one of the first Java Virtual Machines for Java ME. The sources can be downloaded from CLDC 1.1 RI page 的来源中找到对这个想法的支持。
来自kvm/VmCommon/src/bytecodes.c
的片段:
#if STANDARDBYTECODES
SELECT(ILOAD) /* Load integer from local variable */
unsigned int index = ip[1];
pushStack(lp[index]);
DONE(2)
#endif
...
#if STANDARDBYTECODES
SELECT(ALOAD) /* Load address from local variable */
unsigned int index = ip[1];
pushStack(lp[index]);
DONE(2)
#endif
'a' 在 JVM 指令如 'aload' 或 'areturn' 中是什么意思? 我知道它们对引用进行操作,但为什么它们被命名为 'aload'、'astore' 等而不是 'rload'、'rstore' 等?
我相信历史上 'a' 代表 'address',因为对象引用只是堆中的一个普通地址。
可以在 K virtual machine by Sun Microsystems - one of the first Java Virtual Machines for Java ME. The sources can be downloaded from CLDC 1.1 RI page 的来源中找到对这个想法的支持。
来自kvm/VmCommon/src/bytecodes.c
的片段:
#if STANDARDBYTECODES
SELECT(ILOAD) /* Load integer from local variable */
unsigned int index = ip[1];
pushStack(lp[index]);
DONE(2)
#endif
...
#if STANDARDBYTECODES
SELECT(ALOAD) /* Load address from local variable */
unsigned int index = ip[1];
pushStack(lp[index]);
DONE(2)
#endif