84 std::shared_ptr<MinimalNameGenerator> nameGen;
88 using PreorderResult = std::pair<const IR::Node *, bool>;
93 bool errorOnNullDecls =
false);
99 bool readOnly =
false;
100 bool checkArrays =
true;
101 bool errorOnNullDecls =
false;
102 const IR::Node *getInitialNode()
const {
return initialNode; }
103 const IR::Type *getType(
const IR::Node *element)
const;
104 const IR::Type *getTypeType(
const IR::Node *element)
const;
105 void setType(
const IR::Node *element,
const IR::Type *type);
106 void setLeftValue(
const IR::Expression *expression) { typeMap->setLeftValue(expression); }
107 bool isLeftValue(
const IR::Expression *expression)
const {
108 return typeMap->isLeftValue(expression) || expression->is<IR::DefaultExpression>();
110 void setCompileTimeConstant(
const IR::Expression *expression) {
111 typeMap->setCompileTimeConstant(expression);
113 bool isCompileTimeConstant(
const IR::Expression *expression)
const {
114 return typeMap->isCompileTimeConstant(expression);
122 const IR::Type *destType,
const IR::Type *srcType,
123 std::string_view errorFormat,
124 std::initializer_list<const IR::Node *> errorArgs);
130 const IR::Type *srcType, std::string_view errorFormat = {},
131 std::initializer_list<const IR::Node *> errorArgs = {}) {
132 return unifyBase(
true, errorPosition, destType, srcType, errorFormat, errorArgs);
136 const IR::Type *srcType, std::string_view errorFormat = {},
137 std::initializer_list<const IR::Node *> errorArgs = {}) {
138 return unifyBase(
false, errorPosition, destType, srcType, errorFormat, errorArgs);
145 const IR::Expression *
assignment(
const IR::Node *errorPosition,
const IR::Type *destType,
146 const IR::Expression *sourceExpression);
147 const IR::SelectCase *matchCase(
const IR::SelectExpression *select,
148 const IR::Type_BaseList *selectType,
149 const IR::SelectCase *selectCase,
const IR::Type *caseType);
150 bool canCastBetween(
const IR::Type *dest,
const IR::Type *src)
const;
151 bool checkAbstractMethods(
const IR::Declaration_Instance *inst,
const IR::Type_Extern *type);
152 void addSubstitutions(
const TypeVariableSubstitution *tvs);
154 const IR::Expression *constantFold(
const IR::Expression *expression);
159 virtual const IR::Type *
canonicalize(
const IR::Type *type);
160 template <
class Ctor>
161 const IR::Type *canonicalizeFields(
const IR::Type_StructLike *type, Ctor constructor);
162 virtual const IR::ParameterList *canonicalizeParameters(
const IR::ParameterList *params);
165 bool onlyBitsOrBitStructs(
const IR::Type *type)
const;
166 bool containsHeader(
const IR::Type *canonType);
167 bool validateFields(
const IR::Type *type, std::function<
bool(
const IR::Type *)> checker)
const;
168 const IR::Node *binaryBool(
const IR::Operation_Binary *op);
169 const IR::Node *binaryArith(
const IR::Operation_Binary *op);
170 const IR::Node *unsBinaryArith(
const IR::Operation_Binary *op);
171 const IR::Node *shift(
const IR::Operation_Binary *op);
172 const IR::Node *typeSet(
const IR::Operation_Binary *op);
174 const IR::Type *cloneWithFreshTypeVariables(
const IR::IMayBeGenericType *type);
176 const IR::Node *node,
const IR::Vector<IR::Argument> *args,
177 const IR::IContainer *container);
178 const IR::Expression *actionCall(
180 const IR::MethodCallExpression *actionCall);
181 std::pair<const IR::Type *, const IR::Vector<IR::Argument> *> checkExternConstructor(
182 const IR::Node *errorPosition,
const IR::Type_Extern *ext,
183 const IR::Vector<IR::Argument> *arguments);
185 static constexpr bool forbidModules =
true;
186 static constexpr bool forbidPackages =
true;
187 bool checkParameters(
const IR::ParameterList *paramList,
bool forbidModules =
false,
188 bool forbidPackage =
false)
const;
189 virtual const IR::Type *setTypeType(
const IR::Type *type,
bool learn =
true);
197 bool containsActionEnum(
const IR::Type *type)
const;
205 template <
class Node>
206 PreorderResult preorderFunctionImpl(Node *function);
207 template <
class Node>
208 PreorderResult preorderDeclarationInstanceImpl(Node *decl);
211 static const IR::Type *
specialize(
const IR::IMayBeGenericType *type,
216 const IR::Expression *left;
217 const IR::Expression *right;
221 bool compare(
const IR::Node *errorPosition,
const IR::Type *ltype,
const IR::Type *rtype,
226 PreorderResult preorder(IR::Function *function);
227 PreorderResult preorder(
const IR::Function *function);
228 PreorderResult preorder(
const IR::P4Program *program);
229 PreorderResult preorder(IR::Declaration_Instance *decl);
230 PreorderResult preorder(
const IR::Declaration_Instance *decl);
232 PreorderResult preorder(
const IR::EntriesList *el);
233 PreorderResult preorder(
const IR::Type_SerEnum *type);
235 const IR::Node *postorder(
const IR::Declaration_MatchKind *decl);
236 const IR::Node *postorder(
const IR::Declaration_Variable *decl);
237 const IR::Node *postorder(
const IR::Declaration_Constant *constant);
238 const IR::Node *postorder(
const IR::P4Control *cont);
239 const IR::Node *postorder(
const IR::P4Parser *cont);
240 const IR::Node *postorder(
const IR::Method *method);
242 const IR::Node *postorder(
const IR::Type_Type *type);
243 const IR::Node *postorder(
const IR::Type_Table *type);
244 const IR::Node *postorder(
const IR::Type_Error *decl);
245 const IR::Node *postorder(
const IR::Type_InfInt *type);
246 const IR::Node *postorder(
const IR::Type_Method *type);
247 const IR::Node *postorder(
const IR::Type_Action *type);
248 const IR::Node *postorder(
const IR::Type_Name *type);
249 const IR::Node *postorder(
const IR::Type_Base *type);
250 const IR::Node *postorder(
const IR::Type_Var *type);
251 const IR::Node *postorder(
const IR::Type_Enum *type);
252 const IR::Node *postorder(
const IR::Type_Extern *type);
253 const IR::Node *postorder(
const IR::StructField *field);
254 const IR::Node *postorder(
const IR::Type_Header *type);
255 const IR::Node *postorder(
const IR::Type_Stack *type);
256 const IR::Node *postorder(
const IR::Type_Struct *type);
257 const IR::Node *postorder(
const IR::Type_HeaderUnion *type);
258 const IR::Node *postorder(
const IR::Type_Typedef *type);
259 const IR::Node *postorder(
const IR::Type_Specialized *type);
260 const IR::Node *postorder(
const IR::Type_SpecializedCanonical *type);
261 const IR::Node *postorder(
const IR::Type_Tuple *type);
262 const IR::Node *postorder(
const IR::Type_P4List *type);
263 const IR::Node *postorder(
const IR::Type_List *type);
264 const IR::Node *postorder(
const IR::Type_Set *type);
265 const IR::Node *postorder(
const IR::Type_ArchBlock *type);
266 const IR::Node *postorder(
const IR::Type_Newtype *type);
267 const IR::Node *postorder(
const IR::Type_Package *type);
268 const IR::Node *postorder(
const IR::Type_ActionEnum *type);
269 const IR::Node *postorder(
const IR::P4Table *type);
270 const IR::Node *postorder(
const IR::P4Action *type);
271 const IR::Node *postorder(
const IR::P4ValueSet *type);
272 const IR::Node *postorder(
const IR::Key *key);
273 const IR::Node *postorder(
const IR::Entry *e);
275 const IR::Node *postorder(
const IR::Dots *expression);
276 const IR::Node *postorder(
const IR::Argument *arg);
277 const IR::Node *postorder(
const IR::SerEnumMember *member);
278 const IR::Node *postorder(
const IR::Parameter *param);
279 const IR::Node *postorder(
const IR::Constant *expression);
280 const IR::Node *postorder(
const IR::BoolLiteral *expression);
281 const IR::Node *postorder(
const IR::StringLiteral *expression);
282 const IR::Node *postorder(
const IR::Operation_Relation *expression);
283 const IR::Node *postorder(
const IR::Concat *expression);
284 const IR::Node *postorder(
const IR::ArrayIndex *expression);
285 const IR::Node *postorder(
const IR::LAnd *expression) {
return binaryBool(expression); }
286 const IR::Node *postorder(
const IR::LOr *expression) {
return binaryBool(expression); }
287 const IR::Node *postorder(
const IR::Add *expression) {
return binaryArith(expression); }
288 const IR::Node *postorder(
const IR::Sub *expression) {
return binaryArith(expression); }
289 const IR::Node *postorder(
const IR::AddSat *expression) {
return binaryArith(expression); }
290 const IR::Node *postorder(
const IR::SubSat *expression) {
return binaryArith(expression); }
291 const IR::Node *postorder(
const IR::Mul *expression) {
return binaryArith(expression); }
292 const IR::Node *postorder(
const IR::Div *expression) {
return unsBinaryArith(expression); }
293 const IR::Node *postorder(
const IR::Mod *expression) {
return unsBinaryArith(expression); }
294 const IR::Node *postorder(
const IR::Shl *expression) {
return shift(expression); }
295 const IR::Node *postorder(
const IR::Shr *expression) {
return shift(expression); }
296 const IR::Node *postorder(
const IR::BXor *expression) {
return binaryArith(expression); }
297 const IR::Node *postorder(
const IR::BAnd *expression) {
return binaryArith(expression); }
298 const IR::Node *postorder(
const IR::BOr *expression) {
return binaryArith(expression); }
299 const IR::Node *postorder(
const IR::Mask *expression) {
return typeSet(expression); }
300 const IR::Node *postorder(
const IR::Range *expression) {
return typeSet(expression); }
301 const IR::Node *postorder(
const IR::LNot *expression);
302 const IR::Node *postorder(
const IR::Neg *expression);
303 const IR::Node *postorder(
const IR::UPlus *expression);
304 const IR::Node *postorder(
const IR::Cmpl *expression);
305 const IR::Node *postorder(
const IR::Cast *expression);
306 const IR::Node *postorder(
const IR::Mux *expression);
307 const IR::Node *postorder(
const IR::Slice *expression);
308 const IR::Node *postorder(
const IR::PlusSlice *expression);
309 const IR::Node *postorder(
const IR::PathExpression *expression);
310 const IR::Node *postorder(
const IR::Member *expression);
311 const IR::Node *postorder(
const IR::TypeNameExpression *expression);
312 const IR::Node *postorder(
const IR::ListExpression *expression);
313 const IR::Node *postorder(
const IR::InvalidHeader *expression);
314 const IR::Node *postorder(
const IR::InvalidHeaderUnion *expression);
315 const IR::Node *postorder(
const IR::Invalid *expression);
316 const IR::Node *postorder(
const IR::P4ListExpression *expression);
317 const IR::Node *postorder(
const IR::StructExpression *expression);
318 const IR::Node *postorder(
const IR::HeaderStackExpression *expression);
319 const IR::Node *postorder(
const IR::MethodCallStatement *mcs);
320 const IR::Node *postorder(
const IR::MethodCallExpression *expression);
321 const IR::Node *postorder(
const IR::ConstructorCallExpression *expression);
322 const IR::Node *postorder(
const IR::SelectExpression *expression);
323 const IR::Node *postorder(
const IR::DefaultExpression *expression);
324 const IR::Node *postorder(
const IR::This *expression);
325 const IR::Node *postorder(
const IR::AttribLocal *local);
326 const IR::Node *postorder(
const IR::ActionList *al);
328 const IR::Node *postorder(
const IR::ReturnStatement *stat);
329 const IR::Node *postorder(
const IR::IfStatement *stat);
330 const IR::Node *postorder(
const IR::SwitchStatement *stat);
331 const IR::Node *postorder(
const IR::AssignmentStatement *stat);
332 const IR::Node *postorder(
const IR::ForInStatement *stat);
333 const IR::Node *postorder(
const IR::ActionListElement *elem);
334 const IR::Node *postorder(
const IR::KeyElement *elem);
335 const IR::Node *postorder(
const IR::Property *elem);
336 const IR::Node *postorder(
const IR::SelectCase *elem);
337 const IR::Node *postorder(
const IR::Annotation *annotation);
339 void start(
const IR::Node *node);
340 void finish(
const IR::Node *Node);
342 ReadOnlyTypeInference *readOnlyClone()
const;
346 bool learn(
const IR::Node *node, Visitor *caller,
const Visitor::Context *ctxt);
356 using Inspector::postorder;
357 using Inspector::preorder;
360 bool errorOnNullDecls =
false)
364 void end_apply(
const IR::Node *Node)
override;
366 bool preorder(
const IR::Expression *)
override {
return !done(); }
367 bool preorder(
const IR::Type *)
override {
return !done(); }
371 bool preorder(
const IR::Function *function)
override;
372 bool preorder(
const IR::P4Program *program)
override;
373 bool preorder(
const IR::Declaration_Instance *decl)
override;
375 bool preorder(
const IR::EntriesList *el)
override;
376 bool preorder(
const IR::Type_SerEnum *type)
override;
378 void postorder(
const IR::Declaration_MatchKind *decl)
override;
379 void postorder(
const IR::Declaration_Variable *decl)
override;
380 void postorder(
const IR::Declaration_Constant *constant)
override;
381 void postorder(
const IR::P4Control *cont)
override;
382 void postorder(
const IR::P4Parser *cont)
override;
383 void postorder(
const IR::Method *method)
override;
385 void postorder(
const IR::Type_Type *type)
override;
386 void postorder(
const IR::Type_Table *type)
override;
387 void postorder(
const IR::Type_Error *decl)
override;
388 void postorder(
const IR::Type_InfInt *type)
override;
389 void postorder(
const IR::Type_Method *type)
override;
390 void postorder(
const IR::Type_Action *type)
override;
391 void postorder(
const IR::Type_Name *type)
override;
392 void postorder(
const IR::Type_Base *type)
override;
393 void postorder(
const IR::Type_Var *type)
override;
394 void postorder(
const IR::Type_Enum *type)
override;
395 void postorder(
const IR::Type_Extern *type)
override;
396 void postorder(
const IR::StructField *field)
override;
397 void postorder(
const IR::Type_Header *type)
override;
398 void postorder(
const IR::Type_Stack *type)
override;
399 void postorder(
const IR::Type_Struct *type)
override;
400 void postorder(
const IR::Type_HeaderUnion *type)
override;
401 void postorder(
const IR::Type_Typedef *type)
override;
402 void postorder(
const IR::Type_Specialized *type)
override;
403 void postorder(
const IR::Type_SpecializedCanonical *type)
override;
404 void postorder(
const IR::Type_Tuple *type)
override;
405 void postorder(
const IR::Type_P4List *type)
override;
406 void postorder(
const IR::Type_List *type)
override;
407 void postorder(
const IR::Type_Set *type)
override;
408 void postorder(
const IR::Type_ArchBlock *type)
override;
409 void postorder(
const IR::Type_Newtype *type)
override;
410 void postorder(
const IR::Type_Package *type)
override;
411 void postorder(
const IR::Type_ActionEnum *type)
override;
412 void postorder(
const IR::P4Table *type)
override;
413 void postorder(
const IR::P4Action *type)
override;
414 void postorder(
const IR::P4ValueSet *type)
override;
415 void postorder(
const IR::Key *key)
override;
416 void postorder(
const IR::Entry *e)
override;
418 void postorder(
const IR::Dots *expression)
override;
419 void postorder(
const IR::Argument *arg)
override;
420 void postorder(
const IR::SerEnumMember *member)
override;
421 void postorder(
const IR::Parameter *param)
override;
422 void postorder(
const IR::Constant *expression)
override;
423 void postorder(
const IR::BoolLiteral *expression)
override;
424 void postorder(
const IR::StringLiteral *expression)
override;
425 void postorder(
const IR::Operation_Relation *expression)
override;
426 void postorder(
const IR::Concat *expression)
override;
427 void postorder(
const IR::ArrayIndex *expression)
override;
428 void postorder(
const IR::LAnd *expression)
override;
429 void postorder(
const IR::LOr *expression)
override;
430 void postorder(
const IR::Add *expression)
override;
431 void postorder(
const IR::Sub *expression)
override;
432 void postorder(
const IR::AddSat *expression)
override;
433 void postorder(
const IR::SubSat *expression)
override;
434 void postorder(
const IR::Mul *expression)
override;
435 void postorder(
const IR::Div *expression)
override;
436 void postorder(
const IR::Mod *expression)
override;
437 void postorder(
const IR::Shl *expression)
override;
438 void postorder(
const IR::Shr *expression)
override;
439 void postorder(
const IR::BXor *expression)
override;
440 void postorder(
const IR::BAnd *expression)
override;
441 void postorder(
const IR::BOr *expression)
override;
442 void postorder(
const IR::Mask *expression)
override;
443 void postorder(
const IR::Range *expression)
override;
444 void postorder(
const IR::LNot *expression)
override;
445 void postorder(
const IR::Neg *expression)
override;
446 void postorder(
const IR::UPlus *expression)
override;
447 void postorder(
const IR::Cmpl *expression)
override;
448 void postorder(
const IR::Cast *expression)
override;
449 void postorder(
const IR::Mux *expression)
override;
450 void postorder(
const IR::Slice *expression)
override;
451 void postorder(
const IR::PlusSlice *expression)
override;
452 void postorder(
const IR::PathExpression *expression)
override;
453 void postorder(
const IR::Member *expression)
override;
454 void postorder(
const IR::TypeNameExpression *expression)
override;
455 void postorder(
const IR::ListExpression *expression)
override;
456 void postorder(
const IR::InvalidHeader *expression)
override;
457 void postorder(
const IR::InvalidHeaderUnion *expression)
override;
458 void postorder(
const IR::Invalid *expression)
override;
459 void postorder(
const IR::P4ListExpression *expression)
override;
460 void postorder(
const IR::StructExpression *expression)
override;
461 void postorder(
const IR::HeaderStackExpression *expression)
override;
462 void postorder(
const IR::MethodCallStatement *mcs)
override;
463 void postorder(
const IR::MethodCallExpression *expression)
override;
464 void postorder(
const IR::ConstructorCallExpression *expression)
override;
465 void postorder(
const IR::SelectExpression *expression)
override;
466 void postorder(
const IR::DefaultExpression *expression)
override;
467 void postorder(
const IR::This *expression)
override;
468 void postorder(
const IR::AttribLocal *local)
override;
469 void postorder(
const IR::ActionList *al)
override;
471 void postorder(
const IR::ReturnStatement *stat)
override;
472 void postorder(
const IR::IfStatement *stat)
override;
473 void postorder(
const IR::SwitchStatement *stat)
override;
474 void postorder(
const IR::AssignmentStatement *stat)
override;
475 void postorder(
const IR::ForInStatement *stat)
override;
476 void postorder(
const IR::ActionListElement *elem)
override;
477 void postorder(
const IR::KeyElement *elem)
override;
478 void postorder(
const IR::Property *elem)
override;
479 void postorder(
const IR::SelectCase *elem)
override;
480 void postorder(
const IR::Annotation *annotation)
override;
485 using Transform::postorder;
486 using Transform::preorder;
489 bool errorOnNullDecls =
false)
493 const IR::Node *apply_visitor(
const IR::Node *,
const char *name =
nullptr)
override;
494 void end_apply(
const IR::Node *Node)
override;
497 if (done()) Transform::prune();
500 const IR::Node *preorder(IR::Expression *expression)
override {
501 return pruneIfDone(expression);
503 const IR::Node *preorder(IR::Type *type)
override {
return pruneIfDone(type); }
507 const IR::Node *preorder(IR::Function *function)
override;
508 const IR::Node *preorder(IR::P4Program *program)
override;
509 const IR::Node *preorder(IR::Declaration_Instance *decl)
override;
511 const IR::Node *preorder(IR::EntriesList *el)
override;
512 const IR::Node *preorder(IR::Type_SerEnum *type)
override;
514 const IR::Node *postorder(IR::Declaration_MatchKind *decl)
override;
515 const IR::Node *postorder(IR::Declaration_Variable *decl)
override;
516 const IR::Node *postorder(IR::Declaration_Constant *constant)
override;
517 const IR::Node *postorder(IR::P4Control *cont)
override;
518 const IR::Node *postorder(IR::P4Parser *cont)
override;
519 const IR::Node *postorder(IR::Method *method)
override;
521 const IR::Node *postorder(IR::Type_Type *type)
override;
522 const IR::Node *postorder(IR::Type_Table *type)
override;
523 const IR::Node *postorder(IR::Type_Error *decl)
override;
524 const IR::Node *postorder(IR::Type_InfInt *type)
override;
525 const IR::Node *postorder(IR::Type_Method *type)
override;
526 const IR::Node *postorder(IR::Type_Action *type)
override;
527 const IR::Node *postorder(IR::Type_Name *type)
override;
528 const IR::Node *postorder(IR::Type_Base *type)
override;
529 const IR::Node *postorder(IR::Type_Var *type)
override;
530 const IR::Node *postorder(IR::Type_Enum *type)
override;
531 const IR::Node *postorder(IR::Type_Extern *type)
override;
532 const IR::Node *postorder(IR::StructField *field)
override;
533 const IR::Node *postorder(IR::Type_Header *type)
override;
534 const IR::Node *postorder(IR::Type_Stack *type)
override;
535 const IR::Node *postorder(IR::Type_Struct *type)
override;
536 const IR::Node *postorder(IR::Type_HeaderUnion *type)
override;
537 const IR::Node *postorder(IR::Type_Typedef *type)
override;
538 const IR::Node *postorder(IR::Type_Specialized *type)
override;
539 const IR::Node *postorder(IR::Type_SpecializedCanonical *type)
override;
540 const IR::Node *postorder(IR::Type_Tuple *type)
override;
541 const IR::Node *postorder(IR::Type_P4List *type)
override;
542 const IR::Node *postorder(IR::Type_List *type)
override;
543 const IR::Node *postorder(IR::Type_Set *type)
override;
544 const IR::Node *postorder(IR::Type_ArchBlock *type)
override;
545 const IR::Node *postorder(IR::Type_Newtype *type)
override;
546 const IR::Node *postorder(IR::Type_Package *type)
override;
547 const IR::Node *postorder(IR::Type_ActionEnum *type)
override;
548 const IR::Node *postorder(IR::P4Table *type)
override;
549 const IR::Node *postorder(IR::P4Action *type)
override;
550 const IR::Node *postorder(IR::P4ValueSet *type)
override;
551 const IR::Node *postorder(IR::Key *key)
override;
552 const IR::Node *postorder(IR::Entry *e)
override;
554 const IR::Node *postorder(IR::Dots *expression)
override;
555 const IR::Node *postorder(IR::Argument *arg)
override;
556 const IR::Node *postorder(IR::SerEnumMember *member)
override;
557 const IR::Node *postorder(IR::Parameter *param)
override;
558 const IR::Node *postorder(IR::Constant *expression)
override;
559 const IR::Node *postorder(IR::BoolLiteral *expression)
override;
560 const IR::Node *postorder(IR::StringLiteral *expression)
override;
561 const IR::Node *postorder(IR::Operation_Relation *expression)
override;
562 const IR::Node *postorder(IR::Concat *expression)
override;
563 const IR::Node *postorder(IR::ArrayIndex *expression)
override;
564 const IR::Node *postorder(IR::LAnd *expression)
override;
565 const IR::Node *postorder(IR::LOr *expression)
override;
566 const IR::Node *postorder(IR::Add *expression)
override;
567 const IR::Node *postorder(IR::Sub *expression)
override;
568 const IR::Node *postorder(IR::AddSat *expression)
override;
569 const IR::Node *postorder(IR::SubSat *expression)
override;
570 const IR::Node *postorder(IR::Mul *expression)
override;
571 const IR::Node *postorder(IR::Div *expression)
override;
572 const IR::Node *postorder(IR::Mod *expression)
override;
573 const IR::Node *postorder(IR::Shl *expression)
override;
574 const IR::Node *postorder(IR::Shr *expression)
override;
575 const IR::Node *postorder(IR::BXor *expression)
override;
576 const IR::Node *postorder(IR::BAnd *expression)
override;
577 const IR::Node *postorder(IR::BOr *expression)
override;
578 const IR::Node *postorder(IR::Mask *expression)
override;
579 const IR::Node *postorder(IR::Range *expression)
override;
580 const IR::Node *postorder(IR::LNot *expression)
override;
581 const IR::Node *postorder(IR::Neg *expression)
override;
582 const IR::Node *postorder(IR::UPlus *expression)
override;
583 const IR::Node *postorder(IR::Cmpl *expression)
override;
584 const IR::Node *postorder(IR::Cast *expression)
override;
585 const IR::Node *postorder(IR::Mux *expression)
override;
586 const IR::Node *postorder(IR::Slice *expression)
override;
587 const IR::Node *postorder(IR::PlusSlice *expression)
override;
588 const IR::Node *postorder(IR::PathExpression *expression)
override;
589 const IR::Node *postorder(IR::Member *expression)
override;
590 const IR::Node *postorder(IR::TypeNameExpression *expression)
override;
591 const IR::Node *postorder(IR::ListExpression *expression)
override;
592 const IR::Node *postorder(IR::InvalidHeader *expression)
override;
593 const IR::Node *postorder(IR::InvalidHeaderUnion *expression)
override;
594 const IR::Node *postorder(IR::Invalid *expression)
override;
595 const IR::Node *postorder(IR::P4ListExpression *expression)
override;
596 const IR::Node *postorder(IR::StructExpression *expression)
override;
597 const IR::Node *postorder(IR::HeaderStackExpression *expression)
override;
598 const IR::Node *postorder(IR::MethodCallStatement *mcs)
override;
599 const IR::Node *postorder(IR::MethodCallExpression *expression)
override;
600 const IR::Node *postorder(IR::ConstructorCallExpression *expression)
override;
601 const IR::Node *postorder(IR::SelectExpression *expression)
override;
602 const IR::Node *postorder(IR::DefaultExpression *expression)
override;
603 const IR::Node *postorder(IR::This *expression)
override;
604 const IR::Node *postorder(IR::AttribLocal *local)
override;
605 const IR::Node *postorder(IR::ActionList *al)
override;
607 const IR::Node *postorder(IR::ReturnStatement *stat)
override;
608 const IR::Node *postorder(IR::IfStatement *stat)
override;
609 const IR::Node *postorder(IR::SwitchStatement *stat)
override;
610 const IR::Node *postorder(IR::AssignmentStatement *stat)
override;
611 const IR::Node *postorder(IR::ForInStatement *stat)
override;
612 const IR::Node *postorder(IR::ActionListElement *elem)
override;
613 const IR::Node *postorder(IR::KeyElement *elem)
override;
614 const IR::Node *postorder(IR::Property *elem)
override;
615 const IR::Node *postorder(IR::SelectCase *elem)
override;
616 const IR::Node *postorder(IR::Annotation *annotation)
override;
Visitor mixin for looking up names in enclosing scopes from the Visitor::Context.
Definition resolveReferences.h:35