Lines Matching refs:Operator
1 //===- Operator.cpp -------------------------------------------------------===//
9 #include "mcld/Script/Operator.h"
21 // Operator
23 const char* Operator::OpNames[] = {
43 Operator::Operator(Arity pArity, Type pType)
44 : ExprToken(ExprToken::OPERATOR), m_Arity(pArity), m_Type(pType) {
48 Operator::~Operator() {
51 void Operator::dump() const {
55 /* Nullary operator */
57 Operator& Operator::create<Operator::SIZEOF_HEADERS>() {
58 static NullaryOp<Operator::SIZEOF_HEADERS> op;
63 Operator& Operator::create<Operator::MAXPAGESIZE>() {
64 static NullaryOp<Operator::MAXPAGESIZE> op;
69 Operator& Operator::create<Operator::COMMONPAGESIZE>() {
70 static NullaryOp<Operator::COMMONPAGESIZE> op;
74 /* Unary operator */
76 Operator& Operator::create<Operator::UNARY_PLUS>() {
77 static UnaryOp<Operator::UNARY_PLUS> op;
82 Operator& Operator::create<Operator::UNARY_MINUS>() {
83 static UnaryOp<Operator::UNARY_MINUS> op;
88 Operator& Operator::create<Operator::LOGICAL_NOT>() {
89 static UnaryOp<Operator::LOGICAL_NOT> op;
94 Operator& Operator::create<Operator::BITWISE_NOT>() {
95 static UnaryOp<Operator::BITWISE_NOT> op;
100 Operator& Operator::create<Operator::ABSOLUTE>() {
101 static UnaryOp<Operator::ABSOLUTE> op;
106 Operator& Operator::create<Operator::ADDR>() {
107 static UnaryOp<Operator::ADDR> op;
112 Operator& Operator::create<Operator::ALIGNOF>() {
113 static UnaryOp<Operator::ALIGNOF> op;
118 Operator& Operator::create<Operator::DATA_SEGMENT_END>() {
119 static UnaryOp<Operator::DATA_SEGMENT_END> op;
124 Operator& Operator::create<Operator::DEFINED>() {
125 static UnaryOp<Operator::DEFINED> op;
130 Operator& Operator::create<Operator::LENGTH>() {
131 static UnaryOp<Operator::LENGTH> op;
136 Operator& Operator::create<Operator::LOADADDR>() {
137 static UnaryOp<Operator::LOADADDR> op;
142 Operator& Operator::create<Operator::NEXT>() {
143 static UnaryOp<Operator::NEXT> op;
148 Operator& Operator::create<Operator::ORIGIN>() {
149 static UnaryOp<Operator::ORIGIN> op;
154 Operator& Operator::create<Operator::SIZEOF>() {
155 static UnaryOp<Operator::SIZEOF> op;
159 /* Binary operator */
161 Operator& Operator::create<Operator::MUL>() {
162 static BinaryOp<Operator::MUL> op;
167 Operator& Operator::create<Operator::DIV>() {
168 static BinaryOp<Operator::DIV> op;
173 Operator& Operator::create<Operator::MOD>() {
174 static BinaryOp<Operator::MOD> op;
179 Operator& Operator::create<Operator::ADD>() {
180 static BinaryOp<Operator::ADD> op;
185 Operator& Operator::create<Operator::SUB>() {
186 static BinaryOp<Operator::SUB> op;
191 Operator& Operator::create<Operator::LSHIFT>() {
192 static BinaryOp<Operator::LSHIFT> op;
197 Operator& Operator::create<Operator::RSHIFT>() {
198 static BinaryOp<Operator::RSHIFT> op;
203 Operator& Operator::create<Operator::LT>() {
204 static BinaryOp<Operator::LT> op;
209 Operator& Operator::create<Operator::LE>() {
210 static BinaryOp<Operator::LE> op;
215 Operator& Operator::create<Operator::GT>() {
216 static BinaryOp<Operator::GT> op;
221 Operator& Operator::create<Operator::GE>() {
222 static BinaryOp<Operator::GE> op;
227 Operator& Operator::create<Operator::EQ>() {
228 static BinaryOp<Operator::EQ> op;
233 Operator& Operator::create<Operator::NE>() {
234 static BinaryOp<Operator::NE> op;
239 Operator& Operator::create<Operator::BITWISE_AND>() {
240 static BinaryOp<Operator::BITWISE_AND> op;
245 Operator& Operator::create<Operator::BITWISE_XOR>() {
246 static BinaryOp<Operator::BITWISE_XOR> op;
251 Operator& Operator::create<Operator::BITWISE_OR>() {
252 static BinaryOp<Operator::BITWISE_OR> op;
257 Operator& Operator::create<Operator::LOGICAL_AND>() {
258 static BinaryOp<Operator::LOGICAL_AND> op;
263 Operator& Operator::create<Operator::LOGICAL_OR>() {
264 static BinaryOp<Operator::LOGICAL_OR> op;
269 Operator& Operator::create<Operator::ALIGN>() {
270 static BinaryOp<Operator::ALIGN> op;
275 Operator& Operator::create<Operator::DATA_SEGMENT_RELRO_END>() {
276 static BinaryOp<Operator::DATA_SEGMENT_RELRO_END> op;
281 Operator& Operator::create<Operator::MAX>() {
282 static BinaryOp<Operator::MAX> op;
287 Operator& Operator::create<Operator::MIN>() {
288 static BinaryOp<Operator::MIN> op;
293 Operator& Operator::create<Operator::SEGMENT_START>() {
294 static BinaryOp<Operator::SEGMENT_START> op;
298 /* Ternary operator */
300 Operator& Operator::create<Operator::TERNARY_IF>() {
301 static TernaryOp<Operator::TERNARY_IF> op;
306 Operator& Operator::create<Operator::DATA_SEGMENT_ALIGN>() {
307 static TernaryOp<Operator::DATA_SEGMENT_ALIGN> op;