Deleted TODOs which are done

This commit is contained in:
Jochen Seyfried 2024-06-28 20:31:21 +02:00
parent b787b333fb
commit d1da1c6eee
3 changed files with 1 additions and 5 deletions

View File

@ -49,7 +49,6 @@ public class FieldDecl extends AbstractType implements Node {
}
public void codeGen(ClassWriter cw) {
//TODO: Do we have fields with initial values? --> No dont think so --> assign
FieldVisitor fv = cw.visitField(Opcodes.ACC_PUBLIC, identifier, getFieldDescriptor(), null, null);
fv.visitEnd();
}

View File

@ -75,7 +75,6 @@ public class MethodDecl implements Node {
mv.visitVarInsn(Opcodes.ALOAD, 0);
mv.visitMethodInsn(Opcodes.INVOKESPECIAL, "java/lang/Object", "<init>", "()V", false);
//TODO: Initialize the fields of the class
HashMap<String, String> classFields = typeContext.get(classThatContainsMethod);
for (Map.Entry<String, String> entry : classFields.entrySet()) {

View File

@ -52,8 +52,7 @@ public class Program implements Node {
}
methodContext.put(oneClass.name, identifierAndMethod);
}
//TODO: uncomment this code
/*
int mainCounter = 0;
// check if main exists
for(RefType oneClass : classes){
@ -62,7 +61,6 @@ public class Program implements Node {
}
if(mainCounter != 1)
throw new TypeCheckException("There is not 1 Main method.");
*/
// typecheck each class
TypeCheckResult result = new TypeCheckResult();