LRDE Tiger Compiler  1.34a $Id: 7fef12e1f5fa43449d667a0eec1d837c40fc1202 $
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
access.hh
Go to the documentation of this file.
1 
6 #ifndef FRAME_ACCESS_HH
7 # define FRAME_ACCESS_HH
8 
9 # include <iosfwd>
10 
11 # include <temp/fwd.hh>
12 # include <temp/temp.hh>
13 # include <tree/fwd.hh>
14 # include <frame/fwd.hh>
15 
16 namespace frame
17 {
18 
31  class Access
32  {
33  public:
34  Access();
35  virtual ~Access();
36 
38  virtual std::ostream& dump(std::ostream& ostr) const = 0;
39 
43  virtual tree::rExp exp() const;
44 
47  virtual tree::rExp exp(const tree::rExp& fp) const = 0;
48 
50  virtual Access* clone() const = 0;
51  };
52 
54  std::ostream& operator<< (std::ostream& ostr, const Access& acc);
55 
56 
57 
58  /*--------------.
59  | In_Register. |
60  `--------------*/
61 
62 
64  class In_Register : public Access
65  {
66  public:
67  // Import overloaded virtual method.
68  using Access::exp;
69 
70  In_Register();
71 
73  In_Register(const temp::Temp& temp);
74 
76  temp::Temp temp_get() const;
77 
78  virtual std::ostream& dump(std::ostream& ostr) const override;
79 
82  virtual tree::rExp exp(const tree::rExp& fp) const override;
83 
86  virtual In_Register* clone() const override;
87 
88  private:
91  };
92 
93 
94  /*-----------.
95  | In_Frame. |
96  `-----------*/
97 
99  class In_Frame : public Access
100  {
101  public:
102  // Import overloaded virtual method.
103  using Access::exp;
104 
105  In_Frame(int offset);
106 
108  int offset_get() const;
109 
110  virtual std::ostream& dump(std::ostream& ostr) const override;
111 
114  virtual tree::rExp exp(const tree::rExp& fp) const override;
115 
118  virtual In_Frame* clone() const override;
119 
120  private:
122  int offset_;
123  };
124 
125 }
126 
127 # include <frame/access.hxx>
128 
129 #endif // !FRAME_ACCESS_HH