forked from JavaTX/JavaCompilerCore
Fehler
This commit is contained in:
parent
1888eb6d46
commit
b32e437a05
@ -155,7 +155,7 @@ public class BytecodeGen implements ASTVisitor {
|
|||||||
String methDesc = null;
|
String methDesc = null;
|
||||||
|
|
||||||
// Method getModifiers() ?
|
// Method getModifiers() ?
|
||||||
int acc = isInterface?Opcodes.ACC_ABSTRACT:0;
|
int acc = isInterface?Opcodes.ACC_ABSTRACT:method.modifier;
|
||||||
|
|
||||||
boolean hasGenInParameterList = genericsAndBounds.containsKey(resultSet.resolveType(method.getReturnType()).resolvedType.acceptTV(new TypeToDescriptor()));
|
boolean hasGenInParameterList = genericsAndBounds.containsKey(resultSet.resolveType(method.getReturnType()).resolvedType.acceptTV(new TypeToDescriptor()));
|
||||||
if(!hasGenInParameterList) {
|
if(!hasGenInParameterList) {
|
||||||
@ -183,7 +183,7 @@ public class BytecodeGen implements ASTVisitor {
|
|||||||
System.out.println(sig);
|
System.out.println(sig);
|
||||||
NormalMethod meth = new NormalMethod(method,genericsAndBounds,genericsAndBoundsMethod,hasGen);
|
NormalMethod meth = new NormalMethod(method,genericsAndBounds,genericsAndBoundsMethod,hasGen);
|
||||||
methDesc = meth.accept(new DescriptorToString(resultSet));
|
methDesc = meth.accept(new DescriptorToString(resultSet));
|
||||||
MethodVisitor mv = cw.visitMethod(Opcodes.ACC_PUBLIC+acc, method.getName(), methDesc, sig, null);
|
MethodVisitor mv = cw.visitMethod(acc, method.getName(), methDesc, sig, null);
|
||||||
|
|
||||||
mv.visitCode();
|
mv.visitCode();
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ package bytecode;
|
|||||||
|
|
||||||
public class ATest extends JavaTXCompilerTest {
|
public class ATest extends JavaTXCompilerTest {
|
||||||
public ATest() {
|
public ATest() {
|
||||||
fileName = "A";
|
fileName = "Example";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
public class Example {
|
public class Example {
|
||||||
|
|
||||||
public m() {
|
public m(Integer x) {
|
||||||
String x = "X";
|
// String x = "X";
|
||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
}
|
}
|
13
test/bytecode/For.jav
Normal file
13
test/bytecode/For.jav
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
class For{
|
||||||
|
m(Integer x){
|
||||||
|
Boolean b = true;
|
||||||
|
while(x<2){
|
||||||
|
x = x +1;
|
||||||
|
b = false;
|
||||||
|
}
|
||||||
|
return x;
|
||||||
|
// for(int i = 0;i<10;i++) {
|
||||||
|
// x = x + 5;
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
}
|
9
test/bytecode/ForTest.java
Normal file
9
test/bytecode/ForTest.java
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
package bytecode;
|
||||||
|
|
||||||
|
public class ForTest extends JavaTXCompilerTest {
|
||||||
|
|
||||||
|
public ForTest() {
|
||||||
|
this.fileName = "For";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
class LamAssign {
|
class LamAssign {
|
||||||
|
|
||||||
m () {
|
m () {
|
||||||
|
Loading…
Reference in New Issue
Block a user