Neue Klasse für Interface eingeführt

This commit is contained in:
JanUlrich 2014-03-14 14:09:03 +01:00
parent 977e777878
commit 40346b2a0b
7 changed files with 8477 additions and 7954 deletions

View File

@ -394,12 +394,12 @@ typedeclaration :classdeclaration
{
$$=$1;
}
/* | interfacedeclaration
| interfacedeclaration
{
// SCJU: Interface
$$=$1;
}
*/
qualifiedname : name '.' IDENTIFIER
{

View File

@ -12,12 +12,9 @@ import mycompiler.mytype.Type;
*/
public class Interface extends Class {
public Interface(String name, Modifiers mod, ClassBody cb, Vector<Type> ct,
Vector<UsedId> usedIdsToCheck, UsedId superclass,
Vector<UsedId> superif, Vector<Type> paralist) {
super(name, mod, cb, ct, usedIdsToCheck, superclass, superif, paralist);
public Interface(String name){
super(name);
}
}

View File

@ -9,7 +9,6 @@ import mycompiler.myclass.Field;
import mycompiler.mybytecode.ClassFile;
import mycompiler.myclass.Constant;
import mycompiler.myclass.FieldDecl;
import mycompiler.myclass.Method;
import mycompiler.myexception.JVMCodeException;
import mycompiler.mymodifier.Modifiers;

File diff suppressed because it is too large Load Diff

View File

@ -394,12 +394,12 @@ typedeclaration :classdeclaration
{
$$=$1;
}
/* | interfacedeclaration
| interfacedeclaration
{
// SCJU: Interface
$$=$1;
}
*/
qualifiedname : name '.' IDENTIFIER
{

View File

@ -1,85 +1,123 @@
Class DEBUG [Typeinference] Erstellte Assumptions: this: ConstructorTest1Method Assumptions:
[MethodAssumption: ConstructorTest1 null { [no type [var], (var = int 1)]]
Class DEBUG [Typeinference] Erstellte Assumptions: this: MatrixMethod Assumptions:
[MethodAssumption: Matrix null { []]
FieldVar Assumptions:
[]
[typinferenz.assumptions.FieldAssumption@fefb1c0]
LocalVar Assumptions:
[]
Parameter Assumptions:
[]
Block DEBUG [Typeinference] Prozessing statement: no type [var]
Block DEBUG [Typeinference] Prozessing statement: (var = int 1)
Block DEBUG [Typeinference] Prozessing statement: void(var: TPH D = int 1)
Block DEBUG [Typeinference] Prozessing statement: TPH D [var]
Class DEBUG [Typeinference] Erstellte Constraints: int < TPH D
TPH D < TPH E
Block DEBUG [Typeinference] Prozessing statement: null Return null (( [ f, ]) -> null { [null Return null (f.apply( [ null (this(null)), m, ]))])
Block DEBUG [Typeinference] Prozessing statement: null Return null (f.apply( [ null (this(null)), m, ]))
Block DEBUG [Typeinference] Prozessing statement: TPH CJ Return TPH CF (f: TPH CD.apply( [ Matrix (this(null)), m: TPH CB, ]))
Block DEBUG [Typeinference] Prozessing statement: TPH CK Return TPH CE (( [ TPH CD f, ]) -> TPH CJ { [TPH CJ Return TPH CF (f: TPH CD.apply( [ Matrix (this(null)), m: TPH CB, ]))])
Class DEBUG [Typeinference] Erstellte Constraints: TPH BZ < TPH BZ
[(TPH CG <. TPH CF), (Matrix <. TPH CH), (TPH CB <. TPH CI), (TPH CD <. FunN), ]
TPH CF < TPH CJ
Fun1< TPH CJ, TPH CD > < TPH CE
TPH CE < TPH CK
Fun1< TPH CK, TPH CB > < TPH CC
TPH CC < TPH BZ
SourceFile DEBUG [Typeinference] Karthesisches Produkt der Constraints: [[(int <. TPH D), (TPH D <. TPH E)]]
SourceFile DEBUG [Typeinference] Unifiziertes Ergebnis: [[(TPH E = int), (TPH D = int)]]
SourceFile DEBUG [Typeinference] Karthesisches Produkt der Constraints: [[(TPH BZ <. TPH BZ), (TPH CG <. TPH CF), (Matrix <. TPH CH), (TPH CB <. TPH CI), (TPH CD <. FunN), (TPH CF <. TPH CJ), (Fun1< TPH CJ, TPH CD > <. TPH CE), (TPH CE <. TPH CK), (Fun1< TPH CK, TPH CB > <. TPH CC), (TPH CC <. TPH BZ)]]
SourceFile DEBUG [Typeinference] Unifiziertes Ergebnis: [[(TPH CG <. TPH CF), (TPH CB <. TPH CI), (TPH CF <. TPH CJ), (TPH CK = Fun1< TPH CJ, FunN >), (TPH BZ = Fun1< Fun1< TPH CJ, FunN >, TPH CB >), (TPH CH = Matrix), (TPH CD = FunN), (TPH CE = Fun1< TPH CJ, FunN >), (TPH CC = Fun1< Fun1< TPH CJ, FunN >, TPH CB >)], [(TPH CG <. TPH CF), (TPH CB <. TPH CI), (TPH CF <. TPH CJ), (TPH CK = Fun1< TPH CJ, FunN >), (TPH BZ = Fun1< Fun1< TPH CJ, FunN >, TPH CB >), (TPH CH = Vector< Vector< GTV Integer > >), (TPH CD = FunN), (TPH CE = Fun1< TPH CJ, FunN >), (TPH CC = Fun1< Fun1< TPH CJ, FunN >, TPH CB >)], [(TPH CG <. TPH CF), (TPH CB <. TPH CI), (TPH CF <. TPH CJ), (TPH CK = Fun1< TPH CJ, FunN >), (TPH BZ = Fun1< Fun1< TPH CJ, FunN >, TPH CB >), (TPH CH = Vector< ? extends Vector< GTV Integer > >), (TPH CD = FunN), (TPH CE = Fun1< TPH CJ, FunN >), (TPH CC = Fun1< Fun1< TPH CJ, FunN >, TPH CB >)], [(TPH CG <. TPH CF), (TPH CB <. TPH CI), (TPH CF <. TPH CJ), (TPH CK = Fun1< TPH CJ, FunN >), (TPH BZ = Fun1< Fun1< TPH CJ, FunN >, TPH CB >), (TPH CH = Vector< ? extends Vector< ? extends GTV Integer > >), (TPH CD = FunN), (TPH CE = Fun1< TPH CJ, FunN >), (TPH CC = Fun1< Fun1< TPH CJ, FunN >, TPH CB >)], [(TPH CG <. TPH CF), (TPH CB <. TPH CI), (TPH CF <. TPH CJ), (TPH CK = Fun1< TPH CJ, FunN >), (TPH BZ = Fun1< Fun1< TPH CJ, FunN >, TPH CB >), (TPH CH = Vector< ? extends Vector< ? super GTV Integer > >), (TPH CD = FunN), (TPH CE = Fun1< TPH CJ, FunN >), (TPH CC = Fun1< Fun1< TPH CJ, FunN >, TPH CB >)], [(TPH CG <. TPH CF), (TPH CB <. TPH CI), (TPH CF <. TPH CJ), (TPH CK = Fun1< TPH CJ, FunN >), (TPH BZ = Fun1< Fun1< TPH CJ, FunN >, TPH CB >), (TPH CH = Vector< ? super Vector< GTV Integer > >), (TPH CD = FunN), (TPH CE = Fun1< TPH CJ, FunN >), (TPH CC = Fun1< Fun1< TPH CJ, FunN >, TPH CB >)], [(TPH CG <. TPH CF), (TPH CB <. TPH CI), (TPH CF <. TPH CJ), (TPH CK = Fun1< TPH CJ, FunN >), (TPH BZ = Fun1< Fun1< TPH CJ, FunN >, TPH CB >), (TPH CH = Vector< ? super Matrix >), (TPH CD = FunN), (TPH CE = Fun1< TPH CJ, FunN >), (TPH CC = Fun1< Fun1< TPH CJ, FunN >, TPH CB >)]]
SourceFile DEBUG [Typeinference]
JavaFiles:
SourceFile DEBUG [Typeinference] JavaFile für ResultSet Unified Constraints: [(TPH E = int), (TPH D = int)]
SourceFile DEBUG [Typeinference] JavaFile für ResultSet Unified Constraints: [(TPH CG <. TPH CF), (TPH CB <. TPH CI), (TPH CF <. TPH CJ), (TPH CK = Fun1< TPH CJ, FunN >), (TPH BZ = Fun1< Fun1< TPH CJ, FunN >, TPH CB >), (TPH CH = Matrix), (TPH CD = FunN), (TPH CE = Fun1< TPH CJ, FunN >), (TPH CC = Fun1< Fun1< TPH CJ, FunN >, TPH CB >)]
SourceFile DEBUG [Typeinference] class ConstructorTest1 extends Object
SourceFile DEBUG [Typeinference] class <CJ, CB>Matrix extends Vector<Vector<Integer>>
{
ConstructorTest1 ConstructorTest1()
{
int var;
var = 1;
}
}
Class DEBUG [Typeinference] Erstellte Assumptions: this: ConstructorTest2Method Assumptions:
[MethodAssumption: void void { [(var = NEW ConstructorTest1)], MethodAssumption: ConstructorTest2 null { []]
FieldVar Assumptions:
[typinferenz.assumptions.FieldAssumption@27beded]
LocalVar Assumptions:
[]
Parameter Assumptions:
[]
Block DEBUG [Typeinference] Prozessing statement: (var = NEW ConstructorTest1)
Block DEBUG [Typeinference] Prozessing statement: void(var: TPH B = NEW ConstructorTest1)
Class DEBUG [Typeinference] Erstellte Constraints: TPH B < TPH B
[(ConstructorTest1 <. ConstructorTest1), (ConstructorTest1 <. ConstructorTest1), ]
ConstructorTest1 < TPH B
TPH B < TPH G
void < void
SourceFile DEBUG [Typeinference] Karthesisches Produkt der Constraints: [[(TPH B <. TPH B), (ConstructorTest1 <. ConstructorTest1), (ConstructorTest1 <. TPH B), (TPH B <. TPH G), (void <. void)], [(TPH B <. TPH B), (ConstructorTest1 <. ConstructorTest1), (ConstructorTest1 <. TPH B), (TPH B <. TPH G), (void <. void)]]
SourceFile DEBUG [Typeinference] Unifiziertes Ergebnis: [[(TPH G = ConstructorTest1), (TPH B = ConstructorTest1)]]
SourceFile DEBUG [Typeinference]
JavaFiles:
SourceFile DEBUG [Typeinference] JavaFile für ResultSet Unified Constraints: [(TPH G = ConstructorTest1), (TPH B = ConstructorTest1)]
SourceFile DEBUG [Typeinference] class ConstructorTest2 extends Object
{
ConstructorTest1 var;
void method()
{
var = new ConstructorTest1();
}
ConstructorTest2 ConstructorTest2()
Fun1<Fun1<CJ, FunN>, CB> op = (CB m) -> {
return (FunN f) -> {
return f.apply(this, m);;
};
};
Matrix Matrix()
{
}
}
SourceFile DEBUG [Typeinference] Unifiziertes Ergebnis: [[(TPH G = ConstructorTest1), (TPH B = ConstructorTest1)]]
SourceFile DEBUG [Typeinference]
JavaFiles:
SourceFile DEBUG [Typeinference] JavaFile für ResultSet Unified Constraints: [(TPH CG <. TPH CF), (TPH CB <. TPH CI), (TPH CF <. TPH CJ), (TPH CK = Fun1< TPH CJ, FunN >), (TPH BZ = Fun1< Fun1< TPH CJ, FunN >, TPH CB >), (TPH CH = Vector< Vector< GTV Integer > >), (TPH CD = FunN), (TPH CE = Fun1< TPH CJ, FunN >), (TPH CC = Fun1< Fun1< TPH CJ, FunN >, TPH CB >)]
SourceFile DEBUG [Typeinference] JavaFile für ResultSet Unified Constraints: [(TPH G = ConstructorTest1), (TPH B = ConstructorTest1)]
SourceFile DEBUG [Typeinference] class ConstructorTest2 extends Object
SourceFile DEBUG [Typeinference] class <CJ, CB>Matrix extends Vector<Vector<Integer>>
{
ConstructorTest1 var;
void method()
{
var = new ConstructorTest1();
}
ConstructorTest2 ConstructorTest2()
Fun1<Fun1<CJ, FunN>, CB> op = (CB m) -> {
return (FunN f) -> {
return f.apply(this, m);;
};
};
Matrix Matrix()
{
}
}
SourceFile DEBUG [Typeinference] JavaFile für ResultSet Unified Constraints: [(TPH CG <. TPH CF), (TPH CB <. TPH CI), (TPH CF <. TPH CJ), (TPH CK = Fun1< TPH CJ, FunN >), (TPH BZ = Fun1< Fun1< TPH CJ, FunN >, TPH CB >), (TPH CH = Vector< ? extends Vector< GTV Integer > >), (TPH CD = FunN), (TPH CE = Fun1< TPH CJ, FunN >), (TPH CC = Fun1< Fun1< TPH CJ, FunN >, TPH CB >)]
SourceFile DEBUG [Typeinference] class <CJ, CB>Matrix extends Vector<Vector<Integer>>
{
Fun1<Fun1<CJ, FunN>, CB> op = (CB m) -> {
return (FunN f) -> {
return f.apply(this, m);;
};
};
Matrix Matrix()
{
}
}
SourceFile DEBUG [Typeinference] JavaFile für ResultSet Unified Constraints: [(TPH CG <. TPH CF), (TPH CB <. TPH CI), (TPH CF <. TPH CJ), (TPH CK = Fun1< TPH CJ, FunN >), (TPH BZ = Fun1< Fun1< TPH CJ, FunN >, TPH CB >), (TPH CH = Vector< ? extends Vector< ? extends GTV Integer > >), (TPH CD = FunN), (TPH CE = Fun1< TPH CJ, FunN >), (TPH CC = Fun1< Fun1< TPH CJ, FunN >, TPH CB >)]
SourceFile DEBUG [Typeinference] class <CJ, CB>Matrix extends Vector<Vector<Integer>>
{
Fun1<Fun1<CJ, FunN>, CB> op = (CB m) -> {
return (FunN f) -> {
return f.apply(this, m);;
};
};
Matrix Matrix()
{
}
}
SourceFile DEBUG [Typeinference] JavaFile für ResultSet Unified Constraints: [(TPH CG <. TPH CF), (TPH CB <. TPH CI), (TPH CF <. TPH CJ), (TPH CK = Fun1< TPH CJ, FunN >), (TPH BZ = Fun1< Fun1< TPH CJ, FunN >, TPH CB >), (TPH CH = Vector< ? extends Vector< ? super GTV Integer > >), (TPH CD = FunN), (TPH CE = Fun1< TPH CJ, FunN >), (TPH CC = Fun1< Fun1< TPH CJ, FunN >, TPH CB >)]
SourceFile DEBUG [Typeinference] class <CJ, CB>Matrix extends Vector<Vector<Integer>>
{
Fun1<Fun1<CJ, FunN>, CB> op = (CB m) -> {
return (FunN f) -> {
return f.apply(this, m);;
};
};
Matrix Matrix()
{
}
}
SourceFile DEBUG [Typeinference] JavaFile für ResultSet Unified Constraints: [(TPH CG <. TPH CF), (TPH CB <. TPH CI), (TPH CF <. TPH CJ), (TPH CK = Fun1< TPH CJ, FunN >), (TPH BZ = Fun1< Fun1< TPH CJ, FunN >, TPH CB >), (TPH CH = Vector< ? super Vector< GTV Integer > >), (TPH CD = FunN), (TPH CE = Fun1< TPH CJ, FunN >), (TPH CC = Fun1< Fun1< TPH CJ, FunN >, TPH CB >)]
SourceFile DEBUG [Typeinference] class <CJ, CB>Matrix extends Vector<Vector<Integer>>
{
Fun1<Fun1<CJ, FunN>, CB> op = (CB m) -> {
return (FunN f) -> {
return f.apply(this, m);;
};
};
Matrix Matrix()
{
}
}
SourceFile DEBUG [Typeinference] JavaFile für ResultSet Unified Constraints: [(TPH CG <. TPH CF), (TPH CB <. TPH CI), (TPH CF <. TPH CJ), (TPH CK = Fun1< TPH CJ, FunN >), (TPH BZ = Fun1< Fun1< TPH CJ, FunN >, TPH CB >), (TPH CH = Vector< ? super Matrix >), (TPH CD = FunN), (TPH CE = Fun1< TPH CJ, FunN >), (TPH CC = Fun1< Fun1< TPH CJ, FunN >, TPH CB >)]
SourceFile DEBUG [Typeinference] class <CJ, CB>Matrix extends Vector<Vector<Integer>>
{
Fun1<Fun1<CJ, FunN>, CB> op = (CB m) -> {
return (FunN f) -> {
return f.apply(this, m);;
};
};
Matrix Matrix()
{
}
}

File diff suppressed because it is too large Load Diff