summaryrefslogtreecommitdiff
path: root/lib/chillcg/include/code_gen/CG_chillRepr.h
diff options
context:
space:
mode:
authorTuowen Zhao <ztuowen@gmail.com>2016-10-06 16:07:35 -0600
committerTuowen Zhao <ztuowen@gmail.com>2016-10-06 16:07:35 -0600
commitf329ee2b4cfdde656d2fe30f2a2789d8a3774203 (patch)
treeea000895ad943188ebdded11f4311b4e1cf011bb /lib/chillcg/include/code_gen/CG_chillRepr.h
parentb7a50e256d0ac6ec120050173b37f34d434ef325 (diff)
downloadchill-f329ee2b4cfdde656d2fe30f2a2789d8a3774203.tar.gz
chill-f329ee2b4cfdde656d2fe30f2a2789d8a3774203.tar.bz2
chill-f329ee2b4cfdde656d2fe30f2a2789d8a3774203.zip
cleanup
Diffstat (limited to 'lib/chillcg/include/code_gen/CG_chillRepr.h')
-rwxr-xr-xlib/chillcg/include/code_gen/CG_chillRepr.h22
1 files changed, 4 insertions, 18 deletions
diff --git a/lib/chillcg/include/code_gen/CG_chillRepr.h b/lib/chillcg/include/code_gen/CG_chillRepr.h
index ea2048b..a2363c9 100755
--- a/lib/chillcg/include/code_gen/CG_chillRepr.h
+++ b/lib/chillcg/include/code_gen/CG_chillRepr.h
@@ -2,7 +2,6 @@
#ifndef CG_chillRepr_h
#define CG_chillRepr_h
-// Repr using chillAst internally
#include <stdio.h>
#include <string.h>
#include <code_gen/CG_outputRepr.h>
@@ -11,10 +10,8 @@
#define __STDC_CONSTANT_MACROS
#endif
-
#include "chillAST/chillASTs.hh"
-
namespace omega {
class CG_chillRepr : public CG_outputRepr {
@@ -22,16 +19,8 @@ namespace omega {
public:
CG_chillRepr() { stmtclassname = strdup("NOTHING"); }
-
-
char *type() const { return strdup("chill"); };
- //
- std::vector<chillAST_Node *> chillnodes; // TODO make private
- void printChillNodes() const {
- for (int i = 0; i < chillnodes.size(); i++)
- chillnodes[i]->print();
- fflush(stdout);
- };
+ std::vector<chillAST_Node *> chillnodes;
CG_chillRepr(std::vector<chillAST_Node *> cnodes) {
chillnodes = cnodes;
@@ -53,12 +42,11 @@ namespace omega {
void addStatement(chillAST_Node *s) { chillnodes.push_back(s); };
std::vector<chillAST_Node *> getChillCode() const { return chillnodes; };
-
+ //! Return the containing code
chillAST_Node *GetCode();
-
~CG_chillRepr();
-
+ //! Creating a deep copy of this node
CG_outputRepr *clone() const;
void clear();
@@ -67,9 +55,7 @@ namespace omega {
//---------------------------------------------------------------------------
// Dump operations
//---------------------------------------------------------------------------
- void dump() const { printChillNodes(); };
-
- void Dump() const;
+ void dump() const;
private:
char *stmtclassname; // chill