P4C
The P4 Compiler
|
TODO: this is not really specific to BMV2, it should reside somewhere else. More...
Typedefs | |
using | BlockTypeMap = std::map<const IR::Block *, const IR::Type *> |
using | BMV2Context = P4CContextWithOptions<BMV2Options> |
using | PnaNicContext = P4CContextWithOptions<PnaNicOptions> |
using | PsaSwitchContext = P4CContextWithOptions<PsaSwitchOptions> |
using | SelectorInput = std::vector<const IR::Expression *> |
using | SimpleSwitchContext = P4CContextWithOptions<SimpleSwitchOptions> |
Functions | |
const IR::ListExpression * | convertToList (const IR::Expression *expr, P4::TypeMap *typeMap) |
Converts expr into a ListExpression or returns nullptr if not possible. | |
Util::JsonArray * | mkArrayField (Util::JsonObject *parent, cstring name) |
Util::JsonArray * | mkParameters (Util::JsonObject *object) |
Util::JsonObject * | mkPrimitive (cstring name) |
Util::JsonObject * | mkPrimitive (cstring name, Util::JsonArray *appendTo) |
unsigned | nextId (cstring group) |
Util::IJson * | nodeName (const CFG::Node *node) |
cstring | stringRepr (big_int value, unsigned bytes) |
Variables | |
const int | JSON_MAJOR_VERSION = 2 |
const int | JSON_MINOR_VERSION = 23 |
TODO: this is not really specific to BMV2, it should reside somewhere else.
typedef std::vector< const IR::Expression * > P4::BMV2::SelectorInput = std::vector<const IR::Expression *> |
XXX(hanw): This convenience class stores pointers to the data structures that are commonly used during the program translation. Due to the limitation of current IR structure, these data structure are only refreshed by the evaluator pass. In the long term, integrating these data structures as part of the IR tree would simplify this kind of bookkeeping effort.
const IR::ListExpression * P4::BMV2::convertToList | ( | const IR::Expression * | expr, |
P4::TypeMap * | typeMap ) |
Converts expr into a ListExpression or returns nullptr if not possible.
Converts expr into a ListExpression or returns nullptr if not possible