I'd like to have some sort of indexing that's tied to the translation unit.
Such a counter is too error-prone: it will easily overflow on 2 billion variables constructed in a single compilation session. Moreover, this construct makes it impossible to copy a VariableInfo.
_Originally posted by @ForNeVeR in https://github.com/ForNeVeR/Cesium/pull/617#discussion_r1740190291_
Currently, we have a global static counter,
CurrentIndex
in theCesium.CodeGen.Contexts.VariableInfo
record.https://github.com/ForNeVeR/Cesium/blob/f1b5204e9d1f0869ed8c4ee0caf3c3e41ad6a5a9/Cesium.CodeGen/Contexts/VariableInfo.cs#L7-L11
I'd like to have some sort of indexing that's tied to the translation unit.
Such a counter is too error-prone: it will easily overflow on 2 billion variables constructed in a single compilation session. Moreover, this construct makes it impossible to copy a
VariableInfo
.