LRDE Tiger Compiler  1.34a $Id: 7fef12e1f5fa43449d667a0eec1d837c40fc1202 $
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
cjump.hh
Go to the documentation of this file.
1 
6 #ifndef TREE_CJUMP_HH
7 # define TREE_CJUMP_HH
8 
9 # include <iosfwd>
10 
11 # include <temp/fwd.hh>
12 # include <tree/stm.hh>
13 # include <tree/exp.hh>
14 # include <tree/label.hh>
15 # include <tree/name.hh>
16 
17 namespace tree
18 {
20  class Cjump : public Stm
21  {
22  public:
24  enum Relop
25  {
26  eq,
27  ne,
28  lt,
29  gt,
30  le,
31  ge,
32  ult,
33  ule,
34  ugt,
36  };
37 
46  Cjump(Relop relop,
47  const rExp& left, const rExp& right,
48  const rName& iftrue, const rName& iffalse);
49 
53 
54  rExp left_get() const;
56  rExp right_get() const;
57 
62 
64  void label_false_set(const temp::Label& false_label);
65 
68 
70  virtual kind_tree_type kind_get() const override;
71 
74 
75  void flip();
76 
78  const Relop& relop_get() const;
79 
83  virtual std::ostream& tag_print(std::ostream& ostr) const override;
84 
87  private:
90  };
91 
94  symmetrize(const Cjump::Relop& r);
95 
97  std::ostream&
98  operator<<(std::ostream& ostr, const Cjump::Relop& r);
99 
100 }
101 
102 # include <tree/cjump.hxx>
103 
104 #endif // !TREE_CJUMP_HH