java - 我应该如何解释 JVM 指令集文档中的 "Operand Stack"?

标签 java jvm jvm-bytecode

我正在阅读章节6. The Java Virtual Machine Instruction Set

当我阅读下面摘录中的“操作数堆栈”时,我不确定如何解释该部分。特别是箭头,是栈内、栈外的意思吗?

mnemonic
Operation
    Short description of the instruction

Format

    mnemonic
    operand1
    operand2
    ...
Forms
    mnemonic = opcode

Operand Stack
    ..., value1, value2 →

    ..., value3

Description
    A longer description detailing constraints on operand stack contents or constant pool entries, the operation performed, the type of the results, etc.

最佳答案

我想这在“注释”部分中有解释:

In the description of the Java Virtual Machine instructions, the effect of an instruction's execution on the operand stack (§2.6.2) of the current frame (§2.6) is represented textually, with the stack growing from left to right and each value represented separately. Thus,

..., value1, value2 →

..., result

shows an operation that begins by having value2 on top of the operand stack with value1 just beneath it.

关于java - 我应该如何解释 JVM 指令集文档中的 "Operand Stack"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68214038/

相关文章:

java - 如果在 ClassWriter 中设置了 COMPUTE_FRAMES,ASM 会跳过类

java - 为什么 Java 1.0.2 的接口(interface) Member 没有设置 ACC_ABSTRACT?

java - ASM : visitLabel generates too many labels and nop instructions

java - 以最佳方式计算 JavaRDD 的统计信息

java - Postgresql 未使用 JDBC 连接到 android,抛出 org.postgresql.util.PSQLException : The connection attempt failed

Java BeanUtilsBean : Convert Date to String

Java ScheduledExecutorService 幕后工作

java - 在java中将ISO日期字符串转换为Jdatechooser日期

java - 对 BLOB 进行操作需要太多时间

java - Maven和JVM的关系