1 cananian 1.1.2.1 // InRet.java, created Mon Dec 21 15:48:53 1998 by cananian 2 cananian 1.1.2.3 // Copyright (C) 1998 C. Scott Ananian <cananian@alumni.princeton.edu> 3 cananian 1.1.2.3 // Licensed under the terms of the GNU GPL; see COPYING for details. 4 cananian 1.1.2.1 package harpoon.IR.Bytecode; 5 cananian 1.1.2.1 6 cananian 1.1.2.1 /** 7 cananian 1.1.2.1 * <code>InRet</code> is an InCti with an operand. 8 cananian 1.1.2.1 * 9 cananian 1.1.2.1 * @author C. Scott Ananian <cananian@alumni.princeton.edu> 10 cananian 1.2 * @version $Id: InRet.java,v 1.2 2002/02/25 21:04:17 cananian Exp $ 11 cananian 1.1.2.1 */ 12 cananian 1.1.2.1 public class InRet extends InCti { 13 cananian 1.1.2.1 final OpLocalVariable operand; 14 cananian 1.1.2.1 /** Creates a <code>InRet</code>. */ 15 cananian 1.1.2.1 public InRet(String sourcefile, int linenumber, byte[] code, int pc) { 16 cananian 1.1.2.1 super(sourcefile, linenumber, code, pc); 17 cananian 1.1.2.1 operand = new OpLocalVariable(InGen.u1(code, pc+1)); 18 cananian 1.1.2.1 } 19 cananian 1.1.2.2 /** Returns the local variable operand of the RET instruction. */ 20 cananian 1.1.2.2 public OpLocalVariable getOperand() { return operand; } 21 cananian 1.1.2.4 22 cananian 1.1.2.4 public String toString() { 23 cananian 1.1.2.4 return Op.toString(opcode)+" "+operand; 24 cananian 1.1.2.4 } 25 cananian 1.2 }