From 1cd1aa7a50d14d1fcfcd335533d8fcee8dfb379b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=BCtterling=2C=20Franziska=20=28WWI2012D=29?= Date: Mon, 22 Jun 2015 16:40:30 +0200 Subject: [PATCH 1/2] =?UTF-8?q?=C3=84nderung=20an=20StringLitTest.jav=20->?= =?UTF-8?q?=20jetzt=20return=20void?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/log4j.xml | 70 +++++++++---------- bin/log4jTesting.xml | 48 ++++++------- bin/parser/BoundedParameter.jav | 6 +- bin/parser/FieldInitializationTest.jav | 4 +- bin/parser/GenericFieldVarTest.jav | 6 +- bin/parser/ImportTest.jav | 6 +- .../syntaxtree/statement/Assign.java | 4 +- test/bytecode/StringLitTest.jav | 2 +- 8 files changed, 73 insertions(+), 73 deletions(-) diff --git a/bin/log4j.xml b/bin/log4j.xml index f36fb342..64e7c5db 100755 --- a/bin/log4j.xml +++ b/bin/log4j.xml @@ -1,35 +1,35 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bin/log4jTesting.xml b/bin/log4jTesting.xml index ef849218..dc30c245 100755 --- a/bin/log4jTesting.xml +++ b/bin/log4jTesting.xml @@ -1,24 +1,24 @@ - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bin/parser/BoundedParameter.jav b/bin/parser/BoundedParameter.jav index 0cb21f77..6d7518a9 100644 --- a/bin/parser/BoundedParameter.jav +++ b/bin/parser/BoundedParameter.jav @@ -1,3 +1,3 @@ -class Matrix{ - String op = "String"; -} +class Matrix{ + String op = "String"; +} diff --git a/bin/parser/FieldInitializationTest.jav b/bin/parser/FieldInitializationTest.jav index 35b56df8..302667b9 100644 --- a/bin/parser/FieldInitializationTest.jav +++ b/bin/parser/FieldInitializationTest.jav @@ -1,3 +1,3 @@ -class FieldInitializationTest{ - String var = "hallo"; +class FieldInitializationTest{ + String var = "hallo"; } \ No newline at end of file diff --git a/bin/parser/GenericFieldVarTest.jav b/bin/parser/GenericFieldVarTest.jav index 214c3f94..a47b41eb 100644 --- a/bin/parser/GenericFieldVarTest.jav +++ b/bin/parser/GenericFieldVarTest.jav @@ -1,3 +1,3 @@ -class Test{ - A var; -} +class Test{ + A var; +} diff --git a/bin/parser/ImportTest.jav b/bin/parser/ImportTest.jav index bec195d8..2de55cee 100644 --- a/bin/parser/ImportTest.jav +++ b/bin/parser/ImportTest.jav @@ -1,4 +1,4 @@ -import java.util.*; - -class ImportTest{ +import java.util.*; + +class ImportTest{ } \ No newline at end of file diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java b/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java index b2f69b33..a71592ed 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java @@ -179,8 +179,8 @@ public class Assign extends Expr //Bytecode: bipush 20 // istore_1 InstructionFactory _factory = new InstructionFactory(cg, cg.getConstantPool()); - InstructionList il = this.expr2.genByteCode(cg);//expr2 rechte expr - il.append(_factory.createConstant(expr2.toString())); + InstructionList il = expr2.genByteCode(cg);//expr2 rechte expr + il.append(_factory.createConstant(expr2)); il.append(_factory.ISTORE_1); return il; } diff --git a/test/bytecode/StringLitTest.jav b/test/bytecode/StringLitTest.jav index 6397f8c7..d221e988 100644 --- a/test/bytecode/StringLitTest.jav +++ b/test/bytecode/StringLitTest.jav @@ -1,7 +1,7 @@ class StringLitTest{ -Object method() { s = ""; } +void method() { s = ""; } } \ No newline at end of file From d9a08820e8941e39c50cd0948bfdcdd371b42f0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=BCtterling=2C=20Franziska=20=28WWI2012D=29?= Date: Mon, 22 Jun 2015 16:47:19 +0200 Subject: [PATCH 2/2] Idee zu Return createReturn --- src/de/dhbwstuttgart/syntaxtree/statement/Return.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Return.java b/src/de/dhbwstuttgart/syntaxtree/statement/Return.java index a4b6dfbc..ad3907e0 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Return.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Return.java @@ -138,7 +138,7 @@ public class Return extends Statement InstructionFactory _factory = new InstructionFactory(cg, cg.getConstantPool()); - //Stimmt das VOID hier eigentlich? + //Stimmt das VOID hier eigentlich? --> Wie wäre es mit getReturnType o.ä.? + evtl. von Type zu bcelType casten? il.append(_factory.createReturn(org.apache.bcel.generic.Type.VOID));