NichtHaskell/Source/abstractSyntaxTree/Expression/InstVarExpression.java
2024-05-08 12:56:40 +02:00

33 lines
1.1 KiB
Java

package abstractSyntaxTree.Expression;
import TypeCheck.TypeCheckResult;
import abstractSyntaxTree.Datatype.RefType;
import jdk.jshell.spi.ExecutionControl;
import org.objectweb.asm.MethodVisitor;
public class InstVarExpression implements IExpression{
//TODO: We have to decide upon more parameters and where they come from, for
// example here we need the index of the field, the class reference and the field name
private RefType classRef;
private String fieldName;
/* public InstVarExpression(RefType classRef, String fieldName){
this.classRef = classRef;
this.fieldName = fieldName;
}*/
@Override
public TypeCheckResult typeCheck() throws Exception {
return null;
}
@Override
public void codeGen(MethodVisitor mv) throws Exception {
throw new ExecutionControl.NotImplementedException("CodeGen not implemented for InstVarExpression");
//ALOAD the index of the var
//GETFIELD the field
//visitFieldInsn(Opcodes.GETFIELD, "class reference", "field name", type);
}
}