P4C
The P4 Compiler
Loading...
Searching...
No Matches
P4::ActionCall Class Referencefinal

#include <methodInstance.h>

Inheritance diagram for P4::ActionCall:
[legend]

Public Member Functions

 DECLARE_TYPEINFO (ActionCall, MethodInstance)
 
const IR::P4Action * specialize (const DeclarationLookup *refMap) const
 
- Public Member Functions inherited from P4::MethodInstance
 DECLARE_TYPEINFO (MethodInstance, InstanceBase)
 
const IR::ParameterList * getActualParameters () const
 
const IR::ParameterList * getOriginalParameters () const
 
virtual bool isApply () const
 
- Public Member Functions inherited from P4::InstanceBase
 DECLARE_TYPEINFO (InstanceBase)
 
- Public Member Functions inherited from P4::ICastable
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.
 
- Public Member Functions inherited from P4::RTTI::Base
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
 

Public Attributes

const IR::P4Action * action
 
- Public Attributes inherited from P4::MethodInstance
const IR::Type_MethodBase * actualMethodType
 
const IR::MethodCallExpression * expr
 
const IR::IDeclarationobject
 
const IR::Type_MethodBase * originalMethodType
 
- Public Attributes inherited from P4::InstanceBase
ParameterSubstitution substitution
 For each callee parameter the corresponding argument.
 
TypeVariableSubstitution typeSubstitution
 

Friends

class MethodInstance
 

Additional Inherited Members

- Static Public Member Functions inherited from P4::MethodInstance
static MethodInstanceresolve (const IR::MethodCallExpression *mce, const DeclarationLookup *refMap, const Visitor::Context *ctxt=nullptr)
 
static MethodInstanceresolve (const IR::MethodCallExpression *mce, const DeclarationLookup *refMap, TypeMap *typeMap, bool useExpressionType=false, const Visitor::Context *ctxt=nullptr, bool incomplete=false)
 
static MethodInstanceresolve (const IR::MethodCallExpression *mce, const DeclarationLookup *refMap, TypeMap *typeMap, const Visitor::Context *ctxt, bool incomplete=false)
 
static MethodInstanceresolve (const IR::MethodCallStatement *mcs, const DeclarationLookup *refMap, const Visitor::Context *ctxt=nullptr)
 
static MethodInstanceresolve (const IR::MethodCallStatement *mcs, const DeclarationLookup *refMap, TypeMap *typeMap, const Visitor::Context *ctxt=nullptr)
 
- Protected Member Functions inherited from P4::MethodInstance
 MethodInstance (const IR::MethodCallExpression *mce, const IR::IDeclaration *decl, const IR::Type_MethodBase *originalMethodType, const IR::Type_MethodBase *actualMethodType)
 
void bindParameters ()
 
- Protected Member Functions inherited from P4::InstanceBase
- Protected Member Functions inherited from P4::RTTI::Base
virtual const void * toImpl (TypeId typeId) const noexcept=0
 

Detailed Description

Represents the direct call of an action; This also works for correctly for actions declared in a table 'actions' list, and for action instantiations such as the default_action or the list of table entries

Member Function Documentation

◆ specialize()

const IR::P4Action * P4::ActionCall::specialize ( const DeclarationLookup * refMap) const

Generate a version of the action where the parameters in the substitution have been replaced with the arguments.