p4c icon indicating copy to clipboard operation
p4c copied to clipboard

Allow extending ToP4, clean its constructors

Open vlstill opened this issue 1 year ago • 1 comments

  • Replaced the cstring argument in ToP4 with std::filesystem::path. This is the breaking change.
  • Cleaned up its constructors to avoid duplication.
  • Allow re-using the dumper in ParserOptions with a descendant of ToP4 -- the way I did this is not exactly nice, but I don't see other clear way to create the instance on demand.
  • The ToP4 pass is a good candidate for larger refactoring, but I don't have time for that now.

vlstill avatar Sep 04 '24 07:09 vlstill

but I don't see other clear way to create the instance on demand.

We'd probably go with some value-based semantics here. But it seems pretty heavyweight for a task. And essentially the same wrapped smart pointer. :)

asl avatar Sep 04 '24 17:09 asl