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

Binary file not shown.

View File

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

View File

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

View File

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