Anton Korobeynikov
Anton Korobeynikov
> ... that could be done by override nested `operator new` I believe. That should also be more robust as it does not rely on function interposition as replacing `malloc`...
> I'm afraid that would be a very unpopular change as it would require changes to a lot of passes, including downstream once. What would you want to solve by...
> (although they are not a direct replacement in many cases I guess -- partially because Util::Enumerator does type erasure). Yes. I think the modelling example here is `getDeclarations`. The...
This is odd. Any chance to reproduce the issue with mainline code?
The code in question is weird: ```c++ PrimitiveConverter::PrimitiveConverter(cstring name, int prio) : prim_name(name), priority(prio) { static std::map converters; all_converters = &converters; auto &vec = converters[name]; auto it = vec.begin(); while...
And we are having inside frontend: ```c++ CONVERT_PRIMITIVE(modify_field) { auto args = convertArgs(structure, primitive); if (args.size() == 2) { return structure->assign(primitive->srcInfo, args[0], args[1], primitive->operands.at(0)->type); } else if (args.size() == 3)...
> No, no further usage. Could be a unity build problem? Yes, if the `p4/fromv1.0/programStructure.cpp` is included twice somehow. So, if you're having a build directory, I would check where...
> The big problem I think is the children forwarding and seeing the right children in postorder. Which seems to be reasonable requirement, but makes the general case quite hard...
> > That said, these are not something easy or isolated changes as Visitors are everywhere :) > > One thing to start with this is to introduce a new...
So, I tried to understand the logic behind `shared_ptr` for `visited` trackers inside Visitors. And it seems it does nothing wrt flow clones, etc. `shared_ptrs` were introduced in https://github.com/p4lang/p4c/pull/3168 as...