All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.anilople.javajvm.instructions.loads.ILOAD_0 Maven / Gradle / Ivy

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;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy