Fix issue for new unique id system. Add level bits to help verifying symbols and split symbol tables.

For intermediates rebuilding, now need manually amending level bits for redeclaring built-ins.
This commit is contained in:
Chow 2020-11-12 15:54:16 +08:00
parent 74e8f05b9f
commit 93b400f267
17 changed files with 110 additions and 71 deletions

View file

@ -63,14 +63,14 @@ namespace glslang {
class TInductiveTraverser : public TIntermTraverser {
public:
TInductiveTraverser(int id, TSymbolTable& st)
TInductiveTraverser(long long id, TSymbolTable& st)
: loopId(id), symbolTable(st), bad(false) { }
virtual bool visitBinary(TVisit, TIntermBinary* node);
virtual bool visitUnary(TVisit, TIntermUnary* node);
virtual bool visitAggregate(TVisit, TIntermAggregate* node);
int loopId; // unique ID of the symbol that's the loop inductive variable
long long loopId; // unique ID of the symbol that's the loop inductive variable
TSymbolTable& symbolTable;
bool bad;
TSourceLoc badLoc;
@ -129,7 +129,7 @@ bool TInductiveTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* n
//
// External function to call for loop check.
//
void TParseContext::inductiveLoopBodyCheck(TIntermNode* body, int loopId, TSymbolTable& symbolTable)
void TParseContext::inductiveLoopBodyCheck(TIntermNode* body, long long loopId, TSymbolTable& symbolTable)
{
TInductiveTraverser it(loopId, symbolTable);