forked from JavaTX/JavaCompilerCore
newest compiler versions state
This commit is contained in:
parent
9ec4d59f24
commit
18728712d3
BIN
JavaTXcompiler-2.0-jar-with-dependencies.jar
Normal file
BIN
JavaTXcompiler-2.0-jar-with-dependencies.jar
Normal file
Binary file not shown.
BIN
JavaTXcompiler-2.1-jar-with-dependencies.jar
Normal file
BIN
JavaTXcompiler-2.1-jar-with-dependencies.jar
Normal file
Binary file not shown.
BIN
JavaTXcompiler-2.2-jar-with-dependencies.jar
Normal file
BIN
JavaTXcompiler-2.2-jar-with-dependencies.jar
Normal file
Binary file not shown.
24
compile.sh
24
compile.sh
@ -3,7 +3,7 @@
|
||||
SRCDIR="javatx-src/main/java"
|
||||
DESTDIR="out"
|
||||
JAVAC_FLAGS="-g:none -nowarn"
|
||||
JAVATX_COMPILER_PATH="JavaTXcompiler-1.9-jar-with-dependencies.jar"
|
||||
JAVATX_COMPILER_PATH="JavaTXcompiler-2.2-jar-with-dependencies.jar"
|
||||
|
||||
#remove all files, if the script is called with parameter "clear"
|
||||
if [ "$1" = "clean" ]; then
|
||||
@ -11,6 +11,11 @@ if [ "$1" = "clean" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "$1" != "" ]; then
|
||||
echo "invalid argument: $1"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#find all .java/.jav files recursively and store them in an array
|
||||
JAVA_FILES=($(find "$SRCDIR" -name "*.java"))
|
||||
JAV_FILES=($(find "$SRCDIR" -name "*.jav"))
|
||||
@ -50,21 +55,26 @@ for file in "${JAV_FILES[@]}"; do
|
||||
fi
|
||||
done
|
||||
|
||||
# Not used because it is currently extremely slow/not working
|
||||
#if [ "${#JAV_CHANGED[@]}" -ne 0 ]; then
|
||||
# echo "java -jar $JAVATX_COMPILER_PATH -d $DESTDIR -cp "$SRCDIR:$DESTDIR:target/dependencies/" ${JAV_CHANGED[@]}"
|
||||
# java -jar $JAVATX_COMPILER_PATH -d $DESTDIR -cp "$SRCDIR:$DESTDIR:target/dependencies/" "${JAV_CHANGED[@]}"
|
||||
#fi
|
||||
|
||||
if [ "${#JAV_CHANGED[@]}" -ne 0 ]; then
|
||||
for ((i = 0; i < "${#JAV_CHANGED[@]}"; i++)); do
|
||||
echo "java -jar $JAVATX_COMPILER_PATH -d "${JAV_CLASSES[i]%/*}" -cp "$SRCDIR:$DESTDIR:target/dependencies/" ${JAV_CHANGED[i]}"
|
||||
java -jar $JAVATX_COMPILER_PATH -d "${JAV_CLASSES[i]%/*}" -cp "$SRCDIR:$DESTDIR:target/dependencies/" "${JAV_CHANGED[i]}"
|
||||
echo "java -jar $JAVATX_COMPILER_PATH -d "$DESTDIR" -cp "$SRCDIR:$DESTDIR: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:target/dependencies/*" $JAVAC_FLAGS ${JAVA_CHANGED[@]}"
|
||||
javac -d $DESTDIR -cp "$SRCDIR:$DESTDIR:target/dependencies/*" $JAVAC_FLAGS "${JAVA_CHANGED[@]}"
|
||||
fi
|
||||
#if [ "${#JAVA_CHANGED[@]}" -ne 0 ]; then
|
||||
# echo "javac -d $DESTDIR -cp "$SRCDIR:$DESTDIR:target/dependencies/*" $JAVAC_FLAGS ${JAVA_CHANGED[@]}"
|
||||
# javac -d $DESTDIR -cp "$SRCDIR:$DESTDIR:target/dependencies/*" $JAVAC_FLAGS "${JAVA_CHANGED[@]}"
|
||||
#fi
|
||||
|
||||
|
||||
|
||||
|
@ -152,6 +152,7 @@ public class ClassOrInterface extends SyntaxTreeNode implements TypeScope {
|
||||
return new RefType(name, params, offset);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @return die aktuelle Klasse als RefType
|
||||
|
@ -39,25 +39,25 @@ public class MethodAssumption extends Assumption{
|
||||
}
|
||||
*/
|
||||
|
||||
public ClassOrInterface getReceiver(){
|
||||
public getReceiver(){
|
||||
return receiver;
|
||||
}
|
||||
|
||||
public RefTypeOrTPHOrWildcardOrGeneric getReturnType() {
|
||||
public getReturnType() {
|
||||
return retType;
|
||||
}
|
||||
|
||||
public List<? extends RefTypeOrTPHOrWildcardOrGeneric> getArgTypes(){
|
||||
public getArgTypes(){
|
||||
return params;
|
||||
}
|
||||
|
||||
public RefTypeOrTPHOrWildcardOrGeneric getReturnType(GenericsResolver resolver) {
|
||||
public getReturnType(resolver) {
|
||||
return resolver.resolve(retType);
|
||||
}
|
||||
|
||||
public List<RefTypeOrTPHOrWildcardOrGeneric> getArgTypes(GenericsResolver resolver) {
|
||||
public getArgTypes(resolver) {
|
||||
List<RefTypeOrTPHOrWildcardOrGeneric> ret = new ArrayList<>();
|
||||
for(RefTypeOrTPHOrWildcardOrGeneric param : params){
|
||||
for(param : params){
|
||||
param = resolver.resolve(param);
|
||||
ret.add(param);
|
||||
}
|
||||
@ -69,14 +69,15 @@ public class MethodAssumption extends Assumption{
|
||||
* @param resolver
|
||||
* @return
|
||||
*/
|
||||
public RefTypeOrTPHOrWildcardOrGeneric getReceiverType(GenericsResolver resolver) {
|
||||
public getReceiverType(resolver) {
|
||||
if (receiver == null) return null;
|
||||
List<RefTypeOrTPHOrWildcardOrGeneric> params = new ArrayList<>();
|
||||
for(GenericTypeVar gtv : receiver.getGenerics()){
|
||||
for(gtv : receiver.getGenerics()){
|
||||
//Die Generics werden alle zu TPHs umgewandelt.
|
||||
params.add(resolver.resolve(new GenericRefType(gtv.getName(), new NullToken())));
|
||||
}
|
||||
RefTypeOrTPHOrWildcardOrGeneric receiverType;
|
||||
|
||||
if(receiver instanceof FunNClass){
|
||||
receiverType = new RefType(new JavaClassName(receiver.getClassName().toString()+"$$"), params, new NullToken()); // new FunN(params);
|
||||
}else{
|
||||
@ -86,7 +87,7 @@ public class MethodAssumption extends Assumption{
|
||||
return receiverType;
|
||||
}
|
||||
|
||||
public Boolean isInherited() {
|
||||
public isInherited() {
|
||||
return isInherited;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user