36 virtual void compileEmitField(
const IR::Expression *expr,
cstring field,
unsigned alignment,
40 bool notSupported(
const IR::Expression *expression) {
41 ::error(ErrorType::ERR_UNSUPPORTED_ON_TARGET,
"%1%: not supported in Deparser", expression);
45 bool notSupported(
const IR::StatOrDecl *statOrDecl) {
46 ::error(ErrorType::ERR_UNSUPPORTED_ON_TARGET,
"%1%: not supported in Deparser", statOrDecl);
50 bool preorder(
const IR::MethodCallExpression *expression)
override;
51 bool preorder(
const IR::AssignmentStatement *a)
override {
return notSupported(a); };
52 bool preorder(
const IR::ExitStatement *s)
override {
return notSupported(s); };
53 bool preorder(UNUSED
const IR::BlockStatement *s)
override {
return true; };
54 bool preorder(
const IR::ReturnStatement *s)
override {
return notSupported(s); };
55 bool preorder(
const IR::IfStatement *statement)
override {
return notSupported(statement); };
56 bool preorder(
const IR::SwitchStatement *statement)
override {
57 return notSupported(statement);
59 bool preorder(
const IR::Operation_Binary *b)
override {
return notSupported(b); };
65 const IR::ControlBlock *controlBlock;
66 const IR::Parameter *packet_out;
67 const IR::Parameter *headers;
68 const IR::Parameter *parserHeaders;
73 const IR::Parameter *parserHeaders)
74 : program(program), controlBlock(block), headers(
nullptr), parserHeaders(parserHeaders) {}