LRDE Tiger Compiler  1.34a $Id: 7fef12e1f5fa43449d667a0eec1d837c40fc1202 $
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
instr.hh
Go to the documentation of this file.
1 
6 #ifndef ASSEM_INSTR_HH
7 # define ASSEM_INSTR_HH
8 
9 # include <iosfwd>
10 # include <string>
11 
12 # include <misc/xalloc.hh>
13 # include <temp/fwd.hh>
14 # include <temp/temp.hh>
15 
16 namespace assem
17 {
18 
41  class Instr
42  {
43  public:
44  Instr(const std::string& assem,
45  const temp::temp_list_type& used_temps = temp::temp_list_type(),
46  const temp::temp_list_type& defd_temps = temp::temp_list_type(),
47  const temp::label_list_type& jump_labels = temp::label_list_type());
48 
49  virtual ~Instr();
50 
51  const temp::temp_list_type& use() const;
52  const temp::temp_list_type& def() const;
53  const temp::label_list_type& jumps() const;
54 
57 
59  virtual std::ostream& dump(std::ostream& ostr) const;
60 
63  static const misc::xalloc<bool> debug;
64 
65  protected:
66  std::string assem_;
70  }; // class Instr
71 
72 
73  inline std::ostream&
74  operator<<(std::ostream& ostr, const Instr& instr);
75 
76 } // namespace assem
77 
78 # include <assem/instr.hxx>
79 
80 #endif // !ASSEM_INSTR_HH