com.github.anilople.javajvm.instructions.constants.ICONST_3 Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of javajvm Show documentation
Show all versions of javajvm Show documentation
Use Java to Implement JVM
The newest version!
package com.github.anilople.javajvm.instructions.constants;
import com.github.anilople.javajvm.instructions.BytecodeReader;
import com.github.anilople.javajvm.instructions.Instruction;
import com.github.anilople.javajvm.runtimedataarea.Frame;
/**
* Description: Push the int constant (-1, 0, 1, 2, 3, 4 or 5) onto the operand
* stack.
* Notes: Each of this family of instructions is equivalent to bipush for
* the respective value of , except that the operand is implicit.
*/
public class ICONST_3 implements Instruction {
@Override
public void fetchOperands(BytecodeReader bytecodeReader) {
}
@Override
public void execute(Frame frame) {
ICONST_M1.execute(this, frame, 3);
}
@Override
public int size() {
return 1;
}
}