36 std::vector<IR::Block *> blockStack;
37 IR::ToplevelBlock *toplevelBlock;
40 void pushBlock(IR::Block *block);
41 void popBlock(IR::Block *block);
45 : refMap(refMap), typeMap(typeMap), toplevelBlock(
nullptr) {
51 IR::ToplevelBlock *getToplevelBlock()
const override {
return toplevelBlock; }
53 IR::Block *currentBlock()
const;
60 const IR::CompileTimeValue *getValue(
const IR::Node *node)
const;
71 bool preorder(
const IR::P4Program *program)
override;
72 bool preorder(
const IR::Declaration_Constant *decl)
override;
73 bool preorder(
const IR::P4Table *table)
override;
74 bool preorder(
const IR::Declaration_Instance *inst)
override;
75 bool preorder(
const IR::ConstructorCallExpression *inst)
override;
76 bool preorder(
const IR::MethodCallExpression *expr)
override;
77 bool preorder(
const IR::PathExpression *expression)
override;
78 bool preorder(
const IR::Property *prop)
override;
79 bool preorder(
const IR::Member *expression)
override;
80 bool preorder(
const IR::ListExpression *expression)
override;
81 bool preorder(
const IR::P4ListExpression *expression)
override;
82 bool preorder(
const IR::StructExpression *expression)
override;
83 bool preorder(
const IR::Constant *expression)
override {
87 bool preorder(
const IR::StringLiteral *expression)
override {
91 bool preorder(
const IR::BoolLiteral *expression)
override {
95 bool preorder(
const IR::ListCompileTimeValue *expression)
override {
99 bool preorder(
const IR::StructCompileTimeValue *expression)
override {
103 bool preorder(
const IR::Declaration_ID *expression)
override {
108 const IR::Block *processConstructor(
const IR::Node *node,
const IR::Type *type,
109 const IR::Type *instanceType,
std::vector< const IR::CompileTimeValue * > * evaluateArguments(const IR::ParameterList *parameters, const IR::Vector< IR::Argument > *arguments, IR::Block *context)
Definition evaluator.cpp:111
TODO: this is not really specific to BMV2, it should reside somewhere else.
Definition applyOptionsPragmas.cpp:24