From bd84a394dcdc795182f60ea1ad2b8276e11574dd Mon Sep 17 00:00:00 2001 From: bdemsky Date: Mon, 7 Aug 2006 23:07:14 +0000 Subject: [PATCH] Changes checked in --- Robust/src/IR/Flat/BuildCode.java | 65 ++++++++++++++++++++++++++++- Robust/src/IR/Tree/DNFFlag.java | 16 ++++++- Robust/src/IR/Tree/DNFFlagAtom.java | 16 ++++++- 3 files changed, 92 insertions(+), 5 deletions(-) diff --git a/Robust/src/IR/Flat/BuildCode.java b/Robust/src/IR/Flat/BuildCode.java index 76aa6ded..ca460c3a 100644 --- a/Robust/src/IR/Flat/BuildCode.java +++ b/Robust/src/IR/Flat/BuildCode.java @@ -1,4 +1,7 @@ package IR.Flat; +import IR.Tree.FlagExpressionNode; +import IR.Tree.DNFFlag; +import IR.Tree.DNFFlagAtom; import IR.*; import java.util.*; import java.io.*; @@ -89,6 +92,21 @@ public class BuildCode { printClassStruct(typeutil.getClass(TypeUtil.ObjectClass), outclassdefs); outclassdefs.println(" int ___length___;"); outclassdefs.println("};\n"); + + if (state.TASK) { + //Print out definitions for task types + outclassdefs.println("struct parameterdescriptor {"); + outclassdefs.println("int type;"); + outclassdefs.println("int numberterms;"); + outclassdefs.println("int **intarray;"); + outclassdefs.println("};"); + + outclassdefs.println("struct taskdescriptor {"); + outclassdefs.println("void * taskptr;"); + outclassdefs.println("int numParameters;"); + outclassdefs.println("struct parameterdescriptor **descriptorarray;"); + outclassdefs.println("};"); + } } // Output function prototypes and structures for parameters @@ -165,9 +183,54 @@ public class BuildCode { /** This method outputs TaskDescriptor information */ void generateTaskDescriptor(PrintWriter output, TaskDescriptor task) { + for (int i=0;i