Front-end infrastructure: Encapsulate semantic-level questions/actions about const/temp.

Much about const or temp is mechanical, about actual declaration,
while much is semantic, about something higher level.  This commit
checks every use everywhere, and for the high-level ones, substitutes
an encapsulated version instead.
This commit is contained in:
John Kessenich 2016-03-20 00:46:02 -06:00
parent 952543e757
commit 7cc0e2896e
5 changed files with 45 additions and 25 deletions

View file

@ -411,6 +411,19 @@ public:
clearLayout();
}
// Drop just the storage qualification, which perhaps should
// never be done, as it is fundamentally inconsistent, but need to
// explore what downstream consumers need.
// E.g., in a deference, it is an inconsistency between:
// A) partially dereferenced resource is still in the storage class it started in
// B) partially dereferenced resource is a new temporary object
// If A, then nothing should change, if B, then everything should change, but this is half way.
void makePartialTemporary()
{
storage = EvqTemporary;
specConstant = false;
}
TStorageQualifier storage : 6;
TBuiltInVariable builtIn : 8;
TPrecisionQualifier precision : 3;