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

import ch.ntb.inf.deep.ssa.SSAValue;

public class MonadicRef extends Monadic {
	
	int ref;
	
	
	public MonadicRef(int opCode) {
		super(opCode);		
	}
	
	public MonadicRef(int opCode, int ref){
		super(opCode);
		this.ref = ref;
	}
	
	public MonadicRef(int opCode, SSAValue operand){
		super(opCode,operand);
	}
	
	public MonadicRef(int opCode, int ref, SSAValue operand){
		super(opCode,operand);
		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("MonadicRef["+ scMnemonics[ssaOpcode]+"] ( "+ operands[0].typeName() + " )");
	}
	

}

@@ -74,16 +74,57 @@
 AValue;%0D
+%0Aimport ch.ntb.inf.deep.strings.HString;%0D
 %0A%0D%0Apubli
@@ -165,23 +165,54 @@
  %7B%0D%0A%09%0D%0A%09
-int ref
+HString className;%0D%0A%09HString fieldName
 ;%0D%0A%09%0D%0A%09%0D
@@ -308,53 +308,125 @@
 de, 
-int ref)%7B%0D%0A%09%09super(opCode);%0D%0A%09%09this.ref = ref
+HString className, HString fieldName)%7B%0D%0A%09%09super(opCode);%0D%0A%09%09this.className = className;%0D%0A%09%09this.fieldName = fieldName
 ;%0D%0A%09
@@ -546,23 +546,52 @@
 opCode, 
-int ref
+HString className, HString fieldName
 , SSAVal
@@ -641,73 +641,190 @@
 his.
-ref = ref;%0D%0A%09%7D%0D%0A%09%0D%0A%09public void setArg(int ref)%7B%0D%0A%09%09this.ref =ref
+className = className;%0D%0A%09%09this.fieldName = fieldName;%0D%0A%09%7D%0D%0A%09%0D%0A%09public void setArgs(HString className, HString fieldName)%7B%0D%0A%09%09this.className = className;%0D%0A%09%09this.fieldName = fieldName
 ;%0D%0A%09
@@ -841,18 +841,25 @@
 lic 
-int
+HString%5B%5D
  getArg
+s
 ()%7B%0D
@@ -872,11 +872,43 @@
 urn 
-ref
+new HString%5B%5D%7BclassName, fieldName%7D
 ;%0D%0A%09

add fields className and methodName