P4C
The P4 Compiler
Loading...
Searching...
No Matches
P4::BMV2::ConversionContext Struct Reference

Public Member Functions

 ConversionContext (P4::ReferenceMap *refMap, P4::TypeMap *typeMap, const IR::ToplevelBlock *toplevel, P4::ProgramStructure *structure, ExpressionConverter *conv, JsonObjects *json)
 
void addToFieldList (const IR::Expression *expr, Util::JsonArray *fl)
 
cstring createCalculation (cstring algo, const IR::Expression *fields, Util::JsonArray *calculations, bool usePayload, const IR::Node *node)
 
int createFieldList (const IR::Expression *expr, cstring listName, bool learn=false)
 
const SelectorInputget_selector_input (const IR::Declaration_Instance *selector)
 

Static Public Member Functions

static void modelError (const char *format, const IR::Node *place)
 

Public Attributes

Util::JsonArrayaction_profiles = nullptr
 For action profile conversion.
 
BlockConverted blockConverted
 Block currently being converted.
 
ExpressionConverterconv
 Expression converter is used in many places.
 
BMV2::JsonObjectsjson
 Final json output.
 
P4::ReferenceMaprefMap
 context
 
std::map< const IR::Declaration_Instance *, SelectorInputselector_input_map
 
P4::ProgramStructurestructure
 ProgramStructure pointer.
 
const IR::ToplevelBlock * toplevel
 
P4::TypeMaptypeMap