Compare commits

2 Commits

Author SHA1 Message Date
364176057d add java compiler classes 2024-05-15 22:12:06 +02:00
d5c0717763 testing with compiler without java classpath 2024-05-15 22:08:37 +02:00
1153 changed files with 50365 additions and 6843 deletions

7
.gitignore vendored
View File

@@ -4,7 +4,7 @@
# But do not ignore .class files in resources/bytecode/javFiles (necessary for tests)
!/resources/bytecode/javFiles/**/*.class
!/lib/classes/**/*.class
!/java-compiler-classes/**/*.class
# Log file
*.log
@@ -30,7 +30,4 @@ replay_pid*
#compiled files
out
logFiles
*.iml
.idea/
logFiles

Binary file not shown.

View File

@@ -11,7 +11,7 @@ To remove all compile files, use
./compile.sh clean
```
To run all junit tests on the files, use
```
./test.sh
```

View File

@@ -3,7 +3,7 @@ class Apply { }
public class applyLambda {
public m () {
m () {
var lam1 = (x) -> {
return x;
};

View File

@@ -3,10 +3,9 @@
SRCDIR="javatx-src/main/java"
DESTDIR="out/src"
TESTDESTDIR="out/tests"
DEPENDENCIES="dependencies/*"
DEPENDENCIES="dependencies"
JAVAC_FLAGS="-g:none -nowarn"
JAVATX_COMPILER_PATH="JavaTXcompiler.jar"
COMPILED_CLASSES="lib/classes"
JAVATX_COMPILER_PATH="JavaTXCompiler.jar"
#remove all files, if the script is called with parameter "clear"
if [ "$1" = "clean" ]; then
@@ -14,7 +13,7 @@ if [ "$1" = "clean" ]; then
exit 0
fi
if [ "$1" != "debug" ] && [ "$1" != "" ]; then
if [ "$1" != "" ]; then
echo "invalid argument: $1"
exit 1
fi
@@ -62,23 +61,29 @@ for file in "${JAV_FILES[@]}"; do
fi
done
if [ "$1" == "debug" ]; then
echo "-d \"$(realpath $DESTDIR)\" -cp \"$(realpath $SRCDIR):$(realpath $DESTDIR):$(realpath $COMPILED_CLASSES)\" $(realpath ${JAV_CHANGED[@]})"
exit 0
fi
if [ "${#JAV_CHANGED[@]}" -ne 0 ]; then
echo "java -jar $JAVATX_COMPILER_PATH -d $DESTDIR -cp "$SRCDIR:$DEPENDENCIES:$COMPILED_CLASSES" ${JAV_CHANGED[@]}"
java -jar $JAVATX_COMPILER_PATH -d $DESTDIR -cp "$SRCDIR:$DEPENDENCIES:$COMPILED_CLASSES" "${JAV_CHANGED[@]}"
echo "java -jar $JAVATX_COMPILER_PATH -d $DESTDIR -cp "$SRCDIR:dependencies/" ${JAV_CHANGED[@]}"
java -jar $JAVATX_COMPILER_PATH -d $DESTDIR -cp "$SRCDIR:dependencies/:java-compiler-classes/" "${JAV_CHANGED[@]}"
if [ $? -ne 0 ]; then
echo "Fehler beim Kompilieren der Jav-Dateien. Beende das Skript."
exit 1
fi
fi
#if [ "${#JAV_CHANGED[@]}" -ne 0 ]; then
# for ((i = 0; i < "${#JAV_CHANGED[@]}"; i++)); do
# echo "java -jar $(realpath $JAVATX_COMPILER_PATH) -d $(realpath "$DESTDIR") -cp "$(realpath $SRCDIR):$(realpath $DESTDIR):$(realpath "target/dependencies/")" ${JAV_CHANGED[i]}"
# java -jar $JAVATX_COMPILER_PATH -d "$DESTDIR" -cp "$SRCDIR:$DESTDIR:target/dependencies/" "${JAV_CHANGED[i]}"
# if [ $? -eq 1 ]; then
# exit 1;
# fi
# done
#fi
if [ "${#JAVA_CHANGED[@]}" -ne 0 ]; then
echo "javac -d $DESTDIR -cp "$SRCDIR:$DESTDIR:$DEPENDENCIES" $JAVAC_FLAGS ${JAVA_CHANGED[@]}"
javac -d $DESTDIR -cp "$SRCDIR:$DESTDIR:$DEPENDENCIES" $JAVAC_FLAGS "${JAVA_CHANGED[@]}"
echo "javac -d $DESTDIR -cp "$SRCDIR:$DESTDIR:dependencies/*:java-compiler-classes/*" $JAVAC_FLAGS ${JAVA_CHANGED[@]}"
javac -d $DESTDIR -cp "$SRCDIR:$DESTDIR:dependencies/*:java-compiler-classes/*" $JAVAC_FLAGS "${JAVA_CHANGED[@]}"
fi
# if [ $? -eq 0 ]; then

232
errors Normal file

File diff suppressed because one or more lines are too long

3470
funnclass Normal file

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More