NichtHaskell/Source/abstractSyntaxTree/Expression/InstVarExpression.java
Jochen Seyfried 2527d15467 Added Bytecodegeneration to the missing classes
Also included some TODOs in areas where parameters and some connections are missing
2024-05-07 13:50:51 +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);
}
}