From e9e33066e1961c46a5d73afb7983688165315d93 Mon Sep 17 00:00:00 2001 From: jjenista Date: Mon, 10 May 2010 22:22:17 +0000 Subject: [PATCH] Added the this() explicit constructor invocation which is very similar to super() already part of the compiler. This helps when porting benchmarks that use this invocation --- Robust/src/IR/Tree/BuildIR.java | 11 +++++++ Robust/src/Parse/java14.cup | 8 +++-- Robust/src/Tests/explicitConstrInvok/makefile | 32 +++++++++++++++++++ .../src/Tests/explicitConstrInvok/test.java | 29 +++++++++++++++++ 4 files changed, 78 insertions(+), 2 deletions(-) create mode 100644 Robust/src/Tests/explicitConstrInvok/makefile create mode 100644 Robust/src/Tests/explicitConstrInvok/test.java diff --git a/Robust/src/IR/Tree/BuildIR.java b/Robust/src/IR/Tree/BuildIR.java index e9176923..d57a4068 100644 --- a/Robust/src/IR/Tree/BuildIR.java +++ b/Robust/src/IR/Tree/BuildIR.java @@ -623,6 +623,17 @@ public class BuildIR { } BlockExpressionNode ben=new BlockExpressionNode(min); bn.addFirstBlockStatement(ben); + + } else if (bodyn!=null&&bodyn.getChild("explconstrinv")!=null) { + ParseNode eci=bodyn.getChild("explconstrinv"); + NameDescriptor nd=new NameDescriptor(cn.getSymbol()); + Vector args=parseArgumentList(eci); + MethodInvokeNode min=new MethodInvokeNode(nd); + for(int i=0; i