|
| DECLARE_TYPEINFO (MethodInstance, InstanceBase) |
|
const IR::ParameterList * | getActualParameters () const |
|
const IR::ParameterList * | getOriginalParameters () const |
|
virtual bool | isApply () const |
|
| DECLARE_TYPEINFO (InstanceBase) |
|
template<typename T > |
T & | as () |
| Tries to convert the class to type T. A BUG occurs if the cast fails.
|
|
template<typename T > |
const T & | as () const |
| Tries to convert the class to type T. A BUG occurs if the cast fails.
|
|
template<typename T > |
T * | checkedTo () |
| Performs a checked cast. A BUG occurs if the cast fails.
|
|
template<typename T > |
const T * | checkedTo () const |
| Performs a checked cast. A BUG occurs if the cast fails.
|
|
template<typename T > |
bool | is () const noexcept |
|
virtual bool | isA (TypeId typeId) const noexcept=0 |
|
template<typename T > |
const T * | to () const noexcept |
| Same as to , but returns const pointer to T.
|
|
template<typename T > |
T * | to () noexcept |
|
virtual TypeId | typeId () const noexcept=0 |
|
|
static MethodInstance * | resolve (const IR::MethodCallExpression *mce, const DeclarationLookup *refMap, const Visitor::Context *ctxt=nullptr) |
|
static MethodInstance * | resolve (const IR::MethodCallExpression *mce, const DeclarationLookup *refMap, TypeMap *typeMap, bool useExpressionType=false, const Visitor::Context *ctxt=nullptr, bool incomplete=false) |
|
static MethodInstance * | resolve (const IR::MethodCallExpression *mce, const DeclarationLookup *refMap, TypeMap *typeMap, const Visitor::Context *ctxt, bool incomplete=false) |
|
static MethodInstance * | resolve (const IR::MethodCallStatement *mcs, const DeclarationLookup *refMap, const Visitor::Context *ctxt=nullptr) |
|
static MethodInstance * | resolve (const IR::MethodCallStatement *mcs, const DeclarationLookup *refMap, TypeMap *typeMap, const Visitor::Context *ctxt=nullptr) |
|
This class is very useful for extracting information out of MethodCallExpressions. Since there are no function pointers in P4, methods can completely be resolved at compilation time. The static method 'resolve' will categorize each method call into one of several kinds:
- apply method, could be of a table, control or parser
- extern function
- extern method (method of an extern object)
- action call
- built-in method (there are five of these: setValid, setInvalid, isValid, push, pop
See also the ConstructorCall class and the MethodCallDescription class below.