summaryrefslogtreecommitdiff
path: root/heat
diff options
context:
space:
mode:
Diffstat (limited to 'heat')
-rw-r--r--heat/HeatVisitor.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/heat/HeatVisitor.java b/heat/HeatVisitor.java
index 243812c..15971d3 100644
--- a/heat/HeatVisitor.java
+++ b/heat/HeatVisitor.java
@@ -10,7 +10,7 @@ public class HeatVisitor extends GJDepthFirst<TypeBundle,ArrayList<TypeBundle>>
private SymbolTable symt;
- private MethodInstance recentMethod = null; // the most recent method called
+ private ClassInstance recentClass = null; // the most recent method called
public HeatVisitor(SymbolTable symt) {
this.symt = symt;
@@ -799,7 +799,7 @@ public class HeatVisitor extends GJDepthFirst<TypeBundle,ArrayList<TypeBundle>>
case 8:
MinimalLogger.info(String.format("Message send found BRACKET"));
t = new TypeInstance("null",null,null,null);
- ClassInstance c = this.recentMethod.getReturn();
+ ClassInstance c = this.recentClass;
MinimalLogger.info(String.format("Setting class to the most recent return: %s",
c.toString()));
t.addClassInstance(c);
@@ -836,7 +836,7 @@ public class HeatVisitor extends GJDepthFirst<TypeBundle,ArrayList<TypeBundle>>
MinimalLogger.info(String.format("The most recently called method is now %s",
m.toString()));
- this.recentMethod = m;
+ this.recentClass = m.getReturn();
String ret = m.getReturn().getName();
if (ret.equals("intarray"))
@@ -1039,6 +1039,7 @@ public class HeatVisitor extends GJDepthFirst<TypeBundle,ArrayList<TypeBundle>>
n.getClass().getSimpleName(),
id));
///////////////////////////////////////////////////////////////
+ this.recentClass = this.symt.getClass(id);
_ret = new TypeBundle(TypeEnum.classname, this.symt.getClass(id));
///////////////////////////////////////////////////////////////
MinimalLogger.info(String.format("<- %s with %s",