From 7c4e08afcaa6851fe5e5bb11d666bb1e68778e4d Mon Sep 17 00:00:00 2001 From: bdemsky Date: Fri, 10 Mar 2006 19:13:22 +0000 Subject: [PATCH] add new files for codegen --- Robust/src/IR/Flat/BuildCode.java | 29 +++++++++++++++++++++++++++++ Robust/src/IR/Flat/FKind.java | 15 +++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 Robust/src/IR/Flat/BuildCode.java create mode 100644 Robust/src/IR/Flat/FKind.java diff --git a/Robust/src/IR/Flat/BuildCode.java b/Robust/src/IR/Flat/BuildCode.java new file mode 100644 index 00000000..996eb55d --- /dev/null +++ b/Robust/src/IR/Flat/BuildCode.java @@ -0,0 +1,29 @@ +package IR.Flat; +import IR.*; +import java.util.*; + +public class BuildCode { + State state; + Hashtable temptovar; + + public BuildCode(State st, Hashtable temptovar) { + state=st; + this.temptovar=temptovar; + } + + public void buildCode() { + Iterator it=state.getClassSymbolTable().getDescriptorsIterator(); + while(it.hasNext()) { + ClassDescriptor cn=(ClassDescriptor)it.next(); + generateCallStructs(cn); + } + } + + private void generateCallStructs(ClassDescriptor cn) { + Iterator methodit=cn.getMethods(); + while(methodit.hasNext()) { + MethodDescriptor md=(MethodDescriptor)methodit.next(); + + } + } +} diff --git a/Robust/src/IR/Flat/FKind.java b/Robust/src/IR/Flat/FKind.java new file mode 100644 index 00000000..9281f29c --- /dev/null +++ b/Robust/src/IR/Flat/FKind.java @@ -0,0 +1,15 @@ +package IR.Flat; + +public class FKind { + + public static final int FlatCall=1; + public static final int FlatFieldNode=2; + public static final int FlatSetFieldNode=3; + public static final int FlatNew=4; + public static final int FlatOpNode=5; + public static final int FlatCastNode=6; + public static final int FlatLiteralNode=7; + public static final int FlatReturnNode=8; + public static final int FlatCondBranch=9; + public static final int FlatNop=10; +} -- 2.34.1