From 1e8444d5ffb348bc4f2104f352e0e90bd51b5767 Mon Sep 17 00:00:00 2001 From: julian Date: Thu, 25 Jan 2024 11:05:51 +0100 Subject: [PATCH] trying to add more classes, currently failing --- makefile | 5 +---- src/main/java/de/dhbwstuttgart/bytecode/FunNGenerator.java | 2 ++ .../de/dhbwstuttgart/bytecode/JavaTXSignatureAttribute.java | 2 ++ .../de/dhbwstuttgart/target/generate/ASTToTargetAST.java | 4 ---- .../dhbwstuttgart/typeinference/assumptions/Assumption.jav | 2 +- .../assumptions/{FunNClass.java => FunNClass.jav} | 0 6 files changed, 6 insertions(+), 9 deletions(-) rename src/main/java/de/dhbwstuttgart/typeinference/assumptions/{FunNClass.java => FunNClass.jav} (100%) diff --git a/makefile b/makefile index 8c12bca2..3e7909f4 100644 --- a/makefile +++ b/makefile @@ -1,7 +1,7 @@ JFLAGS = -g:none JC = javac -JTX = JavaTXcompiler-0.1-jar-with-dependencies.jar +JTX = JavaTXcompiler-0.3-jar-with-dependencies.jar SRCDIR = src/main/java DESTDIR = out @@ -17,9 +17,6 @@ JAVCLASSES := $(patsubst $(SRCDIR)/%.jav,$(DESTDIR)/%.class,$(JAVSOURCES)) # Create a list of directories that need to be created in the destination directory DIRS := $(sort $(dir $(JAVACLASSES))) $(sort $(dir $(JAVCLASSES))) -all: - @echo "$(JAVCLASSES)" - default: classes # Rule for creating directories diff --git a/src/main/java/de/dhbwstuttgart/bytecode/FunNGenerator.java b/src/main/java/de/dhbwstuttgart/bytecode/FunNGenerator.java index 411d9bf2..7060824c 100644 --- a/src/main/java/de/dhbwstuttgart/bytecode/FunNGenerator.java +++ b/src/main/java/de/dhbwstuttgart/bytecode/FunNGenerator.java @@ -12,6 +12,8 @@ import java.util.stream.Stream; import static org.objectweb.asm.Opcodes.*; +import java.lang.String; + /** * //ToDo beschreiben * diff --git a/src/main/java/de/dhbwstuttgart/bytecode/JavaTXSignatureAttribute.java b/src/main/java/de/dhbwstuttgart/bytecode/JavaTXSignatureAttribute.java index ee7b2e57..41a53b7c 100644 --- a/src/main/java/de/dhbwstuttgart/bytecode/JavaTXSignatureAttribute.java +++ b/src/main/java/de/dhbwstuttgart/bytecode/JavaTXSignatureAttribute.java @@ -2,6 +2,8 @@ package de.dhbwstuttgart.bytecode; import org.objectweb.asm.*; +import java.lang.String; + public class JavaTXSignatureAttribute extends Attribute { public String signature; diff --git a/src/main/java/de/dhbwstuttgart/target/generate/ASTToTargetAST.java b/src/main/java/de/dhbwstuttgart/target/generate/ASTToTargetAST.java index a7e82f51..6d73186d 100644 --- a/src/main/java/de/dhbwstuttgart/target/generate/ASTToTargetAST.java +++ b/src/main/java/de/dhbwstuttgart/target/generate/ASTToTargetAST.java @@ -4,7 +4,6 @@ import de.dhbwstuttgart.bytecode.FunNGenerator; import de.dhbwstuttgart.core.JavaTXCompiler; import de.dhbwstuttgart.environment.ByteArrayClassLoader; import de.dhbwstuttgart.environment.IByteArrayClassLoader; -import de.dhbwstuttgart.exceptions.NotImplementedException; import de.dhbwstuttgart.parser.NullToken; import de.dhbwstuttgart.syntaxtree.*; import de.dhbwstuttgart.syntaxtree.Record; @@ -16,11 +15,8 @@ import de.dhbwstuttgart.target.tree.expression.*; import de.dhbwstuttgart.target.tree.type.*; import de.dhbwstuttgart.typeinference.result.*; -import javax.sql.rowset.RowSetWarning; -import java.lang.annotation.Target; import java.util.*; import java.util.stream.Collectors; -import java.util.stream.Stream; /** * @author dholle diff --git a/src/main/java/de/dhbwstuttgart/typeinference/assumptions/Assumption.jav b/src/main/java/de/dhbwstuttgart/typeinference/assumptions/Assumption.jav index 6e5c6475..9f4271bc 100644 --- a/src/main/java/de/dhbwstuttgart/typeinference/assumptions/Assumption.jav +++ b/src/main/java/de/dhbwstuttgart/typeinference/assumptions/Assumption.jav @@ -3,7 +3,7 @@ package de.dhbwstuttgart.typeinference.assumptions; import de.dhbwstuttgart.syntaxtree.TypeScope; public class Assumption { - private final typeScope; + private final TypeScope typeScope; public Assumption(typeScope) { this.typeScope = typeScope; diff --git a/src/main/java/de/dhbwstuttgart/typeinference/assumptions/FunNClass.java b/src/main/java/de/dhbwstuttgart/typeinference/assumptions/FunNClass.jav similarity index 100% rename from src/main/java/de/dhbwstuttgart/typeinference/assumptions/FunNClass.java rename to src/main/java/de/dhbwstuttgart/typeinference/assumptions/FunNClass.jav