GabrielDosReis / ipr

Compiler-neutral Internal Program Representation for C++
BSD 3-Clause "New" or "Revised" License
222 stars 23 forks source link

Representations for values #286

Open Nostracodus opened 1 year ago

Nostracodus commented 1 year ago

IPR needs a representation for values. By values, I mean the objects that result from evaluation of prvalues.

IPR currently has representations for:

IPR does not currently represent:

GabrielDosReis commented 1 year ago

IPR expected clients to use string representation for literals ("universal representation"), but of course that works only in pre-C++03 era, not with compile-time evaluation. Options here range from taking dependencies on external libraries (such as GMP, but with more permissive license) to developing homebrew, purposely-tailored libraries.

aggregate values missing is an oversight. What is needed is not so much the notion of value than that of an "irreducible expression" (which includes values)