Remove TIntermediate's dependency on infoSink, simplify folding of constant aggregates, and infoSink use in constant folding.

Added a few deep aggregate constant folding testing cases.


git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22912 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich 2013-09-03 22:14:59 +00:00
parent fca7534044
commit 807b8e3b82
11 changed files with 79 additions and 173 deletions

View file

@ -54,7 +54,7 @@ class TIntermediate {
public:
POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator())
TIntermediate(TInfoSink& i, int v, EProfile p) : infoSink(i), version(v), profile(p) { }
TIntermediate(int v, EProfile p) : version(v), profile(p) { }
TIntermSymbol* addSymbol(int Id, const TString&, const TType&, TSourceLoc);
TIntermTyped* addConversion(TOperator, const TType&, TIntermTyped*);
TIntermTyped* addBinaryMath(TOperator, TIntermTyped* left, TIntermTyped* right, TSourceLoc);
@ -87,10 +87,9 @@ public:
void addSymbolLinkageNode(TIntermAggregate*& linkage, TSymbolTable&, const TString&);
void addSymbolLinkageNode(TIntermAggregate*& linkage, const TVariable&);
void remove(TIntermNode*);
void outputTree(TIntermNode*);
void outputTree(TIntermNode*, TInfoSink&);
protected:
TInfoSink& infoSink;
EProfile profile;
int version;