com.github.anilople.javajvm.instructions.loads.ILOAD_0 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.loads;
import com.github.anilople.javajvm.instructions.BytecodeReader;
import com.github.anilople.javajvm.instructions.Instruction;
import com.github.anilople.javajvm.runtimedataarea.Frame;
/**
* Operation:
* Load int from local variable
* Description:
* The must be an index into the local variable array of the
* current frame (§2.6). The local variable at must contain an
* int . The value of the local variable at is pushed onto the
* operand stack.
* Notes:
* Each of the iload_ instructions is the same as iload with an
* index of , except that the operand is implicit.
*/
public class ILOAD_0 implements Instruction {
@Override
public void fetchOperands(BytecodeReader bytecodeReader) {
}
@Override
public void execute(Frame frame) {
ILOAD.execute(this, frame, 0);
}
@Override
public int size() {
return 1;
}
}