diff options
Diffstat (limited to 'gfx/angle/src/compiler/translator/Intermediate.h')
-rwxr-xr-x | gfx/angle/src/compiler/translator/Intermediate.h | 52 |
1 files changed, 22 insertions, 30 deletions
diff --git a/gfx/angle/src/compiler/translator/Intermediate.h b/gfx/angle/src/compiler/translator/Intermediate.h index d712bf953..339daa3e8 100755 --- a/gfx/angle/src/compiler/translator/Intermediate.h +++ b/gfx/angle/src/compiler/translator/Intermediate.h @@ -9,9 +9,6 @@ #include "compiler/translator/IntermNode.h" -namespace sh -{ - struct TVectorFields { int offsets[4]; @@ -19,42 +16,38 @@ struct TVectorFields }; // -// Set of helper functions to help build the tree. +// Set of helper functions to help parse and build the tree. // +class TInfoSink; class TIntermediate { public: POOL_ALLOCATOR_NEW_DELETE(); - TIntermediate() {} + TIntermediate(TInfoSink &i) + : mInfoSink(i) { } TIntermSymbol *addSymbol( int id, const TString &, const TType &, const TSourceLoc &); - TIntermTyped *addIndex(TOperator op, - TIntermTyped *base, - TIntermTyped *index, - const TSourceLoc &line, - TDiagnostics *diagnostics); + TIntermTyped *addIndex( + TOperator op, TIntermTyped *base, TIntermTyped *index, const TSourceLoc &); TIntermTyped *addUnaryMath( TOperator op, TIntermTyped *child, const TSourceLoc &line, const TType *funcReturnType); TIntermAggregate *growAggregate( TIntermNode *left, TIntermNode *right, const TSourceLoc &); - static TIntermAggregate *MakeAggregate(TIntermNode *node, const TSourceLoc &line); - static TIntermBlock *EnsureBlock(TIntermNode *node); + TIntermAggregate *makeAggregate(TIntermNode *node, const TSourceLoc &); + TIntermAggregate *ensureSequence(TIntermNode *node); TIntermAggregate *setAggregateOperator(TIntermNode *, TOperator, const TSourceLoc &); - TIntermNode *addIfElse(TIntermTyped *cond, TIntermNodePair code, const TSourceLoc &line); - static TIntermTyped *AddTernarySelection(TIntermTyped *cond, - TIntermTyped *trueExpression, - TIntermTyped *falseExpression, - const TSourceLoc &line); - TIntermSwitch *addSwitch(TIntermTyped *init, - TIntermBlock *statementList, - const TSourceLoc &line); + TIntermNode *addSelection(TIntermTyped *cond, TIntermNodePair code, const TSourceLoc &); + TIntermTyped *addSelection(TIntermTyped *cond, TIntermTyped *trueBlock, TIntermTyped *falseBlock, + const TSourceLoc &line); + TIntermSwitch *addSwitch( + TIntermTyped *init, TIntermAggregate *statementList, const TSourceLoc &line); TIntermCase *addCase( TIntermTyped *condition, const TSourceLoc &line); - static TIntermTyped *AddComma(TIntermTyped *left, - TIntermTyped *right, - const TSourceLoc &line, - int shaderVersion); + TIntermTyped *addComma(TIntermTyped *left, + TIntermTyped *right, + const TSourceLoc &line, + int shaderVersion); TIntermConstantUnion *addConstantUnion(const TConstantUnion *constantUnion, const TType &type, const TSourceLoc &line); @@ -62,18 +55,17 @@ class TIntermediate TIntermNode *, const TSourceLoc &); TIntermBranch *addBranch(TOperator, const TSourceLoc &); TIntermBranch *addBranch(TOperator, TIntermTyped *, const TSourceLoc &); - static TIntermTyped *AddSwizzle(TIntermTyped *baseExpression, - const TVectorFields &fields, - const TSourceLoc &dotLocation); + TIntermTyped *addSwizzle(TVectorFields &, const TSourceLoc &); + TIntermAggregate *postProcess(TIntermNode *root); static void outputTree(TIntermNode *, TInfoSinkBase &); - TIntermTyped *foldAggregateBuiltIn(TIntermAggregate *aggregate, TDiagnostics *diagnostics); + TIntermTyped *foldAggregateBuiltIn(TIntermAggregate *aggregate); private: void operator=(TIntermediate &); // prevent assignments -}; -} // namespace sh + TInfoSink & mInfoSink; +}; #endif // COMPILER_TRANSLATOR_INTERMEDIATE_H_ |