LRDE Tiger Compiler
1.34a $Id: 7fef12e1f5fa43449d667a0eec1d837c40fc1202 $
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
fragment.hxx
Go to the documentation of this file.
1
6
#ifndef ASSEM_FRAGMENT_HXX
7
# define ASSEM_FRAGMENT_HXX
8
9
# include <
misc/contract.hh
>
10
11
# include <
assem/fragment.hh
>
12
13
namespace
assem
14
{
15
16
/*-----------.
17
| Fragment. |
18
`-----------*/
19
20
inline
21
Fragment::Fragment
()
22
{}
23
24
inline
std::ostream&
25
operator<<
(std::ostream& ostr,
26
const
Fragment
& fragment)
27
{
28
return
fragment.
dump
(ostr);
29
}
30
31
32
/*-----------.
33
| DataFrag. |
34
`-----------*/
35
36
inline
37
DataFrag::DataFrag
(
const
tree::DataFrag
& frag)
38
: data_frag_(frag)
39
{}
40
41
inline
const
tree::DataFrag
&
42
DataFrag::data_get
()
const
43
{
44
return
data_frag_
;
45
}
46
47
48
/*-----------.
49
| ProcFrag. |
50
`-----------*/
51
52
inline
53
ProcFrag::ProcFrag
(
const
tree::ProcFrag
& frag)
54
: frame_(frag.frame_get())
55
, name_(frag.name_get())
56
, label_(frag.label_get())
57
{}
58
59
inline
frame::Frame
&
60
ProcFrag::frame_get
()
61
{
62
return
frame_
;
63
}
64
65
inline
const
misc::symbol
&
66
ProcFrag::name_get
()
const
67
{
68
return
name_
;
69
}
70
71
inline
temp::Label
72
ProcFrag::label_get
()
const
73
{
74
return
label_
;
75
}
76
77
inline
void
78
ProcFrag::instrs_set
(
assem::Instrs
& instrs)
79
{
80
precondition
(
instrs_
.empty());
81
std::swap(
instrs_
, instrs);
82
}
83
84
inline
assem::Instrs
&
85
ProcFrag::instrs_get
()
86
{
87
return
instrs_
;
88
}
89
90
inline
const
assem::Instrs
&
91
ProcFrag::instrs_get
()
const
92
{
93
return
instrs_
;
94
}
95
96
}
// namespace assem
97
98
#endif // !ASSEM_FRAGMENT_HXX
assem
fragment.hxx
Generated on Wed Mar 5 2014 15:47:36 for LRDE Tiger Compiler by
1.8.1.2