summaryrefslogtreecommitdiffstats
path: root/src/org/jetbrains/java/decompiler/code/instructions/RET.java
blob: 490ad8cd900b4585c554624e2ca30a1882c3dead (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package org.jetbrains.java.decompiler.code.instructions;

import java.io.DataOutputStream;
import java.io.IOException;

import org.jetbrains.java.decompiler.code.Instruction;

public class RET extends Instruction {

	public void writeToStream(DataOutputStream out, int offset) throws IOException {
		if(wide) {
			out.writeByte(opc_wide);
		}
		out.writeByte(opc_ret);
		if(wide) {
			out.writeShort(getOperand(0));
		} else {
			out.writeByte(getOperand(0));
		}
	}
	
	public int length() {
		return wide?4:2;
	}
	
}