Vladimír Štill

Results 165 comments of Vladimír Štill

> There is also the `clone` operator, which throws a wrench into all of this. Well if the types were really singletons (there was no reason to have two instances)...

> > Well if the types were really singletons (there was no reason to have two instances) that `clone` should just return `this` I think, but that does not work...

> I ran into issues where I created a `IR::Land(new IR::BoolLiteral(new IR::Type_Boolean(), false), new IR::BoolLiteral(new IR::Type_Boolean(), false))` and the resulting type of the `IR::LAnd` was `IR::Type_Unknown`. This happens because https://github.com/p4lang/p4c/blob/main/ir/expression.def#L39...

> The relations all currently set the type to bool unconditionally, and I think LOr/LAnd should do the same (eg, remove the `if` from this change making the ctor just...

OK, so in the end the conditional (as written now by Fabian) and unconditional setting work basically the same, unless someone wants to explicitly set type explicitly to unknown (which...

> Maybe all of these "get" functions should be static class members? Do you mean e.g. `IR::StringLiteral::get`?

> > > Maybe all of these "get" functions should be static class members? > > > > > > Do you mean e.g. `IR::StringLiteral::get`? > > Yes, something in...

If I am correct, LLVM has its built-in preprocessor and they went through quite some trouble making it compatible with the GNU one. So this might be tricky. I'm not...

> I should have said that one alternative that may be reasonable is to bundle a non-macros-with-parameter-capable preprocessor with p4c, and indicate that anyone who really wants macros-with-parameters can use...

> In the longer term, IMHO, it might be beneficial to have a major P4 grammar update that gets rid of preprocessors completely, and replaces them with modern programming language...