diff options
Diffstat (limited to 'boil')
-rw-r--r-- | boil/library/BoilVisitor.java | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/boil/library/BoilVisitor.java b/boil/library/BoilVisitor.java index bdcb8de..83b1fd3 100644 --- a/boil/library/BoilVisitor.java +++ b/boil/library/BoilVisitor.java @@ -850,7 +850,16 @@ public class BoilVisitor extends GJDepthFirst<String,String> { // we'll do everything here and exit the function MinimalLogger.info("Message send found THIS"); rhs = n.f0.accept(this, argu); + ClassInstance cur = this.symt.getClass(this.symt.getActive(TypeEnum.classname)); + MinimalLogger.info("Calculating method index to call..."); + int mtdIndex = cur.getMethods() + .indexOf(this.symt.getMethod(mtd)) * 4; + this.addVapor(n.f4.accept(this, argu)); + this.addVapor(String.format(" %s = [%s+%d]\n", + rhs, + rhs, + mtdIndex)); this.addVapor(String.format(" %s = call %s(this", _ret, rhs)); @@ -1056,10 +1065,6 @@ public class BoilVisitor extends GJDepthFirst<String,String> { String thisID = this.tf.alias(this.getUniqueID()); this.addVapor(String.format(" %s = [this]\n", thisID)); - this.addVapor(String.format(" %s = [%s+%d]\n", - thisID, - thisID, - 0)); _ret += thisID; /////////////////////////////////////////////////////////////// MinimalLogger.info(String.format("<- %s with %s", |