From d96b36c5d158f9d4f03cda725d8d0d7a8a8a2c9f Mon Sep 17 00:00:00 2001 From: "Fikus, Evelyn (WWI2012D)" Date: Mon, 22 Jun 2015 12:55:21 +0200 Subject: [PATCH] =?UTF-8?q?Assign.java=20genByteCode=20Methode=20angef?= =?UTF-8?q?=C3=BCgt=20(noch=20leer)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/de/dhbwstuttgart/syntaxtree/statement/Assign.java | 6 +++++- src/de/dhbwstuttgart/syntaxtree/statement/Null.java | 1 + src/de/dhbwstuttgart/syntaxtree/statement/Return.java | 3 ++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java b/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java index 2bfab538..b30832cb 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Assign.java @@ -7,6 +7,7 @@ import java.util.Hashtable; import java.util.Iterator; import org.apache.bcel.generic.ClassGen; +import org.apache.bcel.generic.InstructionList; import de.dhbwstuttgart.typeinference.Menge; import de.dhbwstuttgart.logger.Logger; @@ -172,7 +173,10 @@ public class Assign extends Expr @Override - public void genByteCode(ClassGen _cg) { + public InstructionList genByteCode(ClassGen _cg) { + + + return null; // TODO Auto-generated method stub } diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Null.java b/src/de/dhbwstuttgart/syntaxtree/statement/Null.java index f69eaa27..8eee26ed 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Null.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Null.java @@ -98,6 +98,7 @@ public class Null extends Literal InstructionList il = new InstructionList(); il.append(_factory.ACONST_NULL); + return il; } diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Return.java b/src/de/dhbwstuttgart/syntaxtree/statement/Return.java index 7cef4cf9..1fba9e32 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Return.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Return.java @@ -138,8 +138,9 @@ public class Return extends Statement InstructionFactory _factory = new InstructionFactory(cg, cg.getConstantPool()); + //Stimmt das VOID hier eigentlich? il.append(_factory.createReturn(org.apache.bcel.generic.Type.VOID)); - //TO BE DONE + return il; }