package ch.ntb.inf.deep.ssa.instruction;

public class NoOpndRef extends NoOpnd {
	int ref;

	public NoOpndRef(int opcode){
		super(opcode);
	}
	
	public NoOpndRef(int opcode, int ref) {
		super(opcode);
		this.ref = ref;
	}
	
	public void setArg(int ref){
		this.ref=ref;
	}

	public int getArg(){
		return ref;
	}
	
	@Override
	public void print(int level) {
		for (int i = 0; i < level*3; i++)System.out.print(" ");
		System.out.println("NoOpndRef["+ scMnemonics[ssaOpcode]+"]");
	}

}

package ch.ntb.inf.deep.ssa.instruction;

import ch.ntb.inf.deep.strings.HString;

public class NoOpndRef extends NoOpnd {
	HString fieldName;

	public NoOpndRef(int opcode){
		super(opcode);
	}
	
	public NoOpndRef(int opcode, HString fieldName) {
		super(opcode);
		this.fieldName = fieldName;
	}
	
	public void setArg(HString fieldName){
		this.fieldName = fieldName;
	}

	public HString getArg(){
		return fieldName;
	}
	
	@Override
	public void print(int level) {
		for (int i = 0; i < level*3; i++)System.out.print(" ");
		System.out.print("NoOpndRef["+ scMnemonics[ssaOpcode]+"]");
		if(fieldName != null){
			System.out.println("(" + fieldName + ")");
		}else{
			System.out.println();
		}
	}

}

add field fieldName