Commit a07b4213 by Olli Etuaho Committed by Commit Bot

Move AST transformations to a subdirectory

Move AST transformations to compiler/translator/tree_ops. BUG=angleproject:2409 TEST=angle_unittests Change-Id: I9c620e98707d22d005da6192fe7d1b4e8030aadd Reviewed-on: https://chromium-review.googlesource.com/975550Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
parent 4ba4a82b
...@@ -10,41 +10,41 @@ ...@@ -10,41 +10,41 @@
#include "angle_gl.h" #include "angle_gl.h"
#include "common/utilities.h" #include "common/utilities.h"
#include "compiler/translator/AddAndTrueToLoopCondition.h"
#include "compiler/translator/CallDAG.h" #include "compiler/translator/CallDAG.h"
#include "compiler/translator/ClampFragDepth.h"
#include "compiler/translator/ClampPointSize.h"
#include "compiler/translator/CollectVariables.h" #include "compiler/translator/CollectVariables.h"
#include "compiler/translator/DeclareAndInitBuiltinsForInstancedMultiview.h"
#include "compiler/translator/DeferGlobalInitializers.h"
#include "compiler/translator/EmulateGLFragColorBroadcast.h"
#include "compiler/translator/EmulatePrecision.h"
#include "compiler/translator/FoldExpressions.h"
#include "compiler/translator/Initialize.h" #include "compiler/translator/Initialize.h"
#include "compiler/translator/InitializeVariables.h"
#include "compiler/translator/IsASTDepthBelowLimit.h" #include "compiler/translator/IsASTDepthBelowLimit.h"
#include "compiler/translator/OutputTree.h" #include "compiler/translator/OutputTree.h"
#include "compiler/translator/ParseContext.h" #include "compiler/translator/ParseContext.h"
#include "compiler/translator/PruneEmptyCases.h"
#include "compiler/translator/PruneNoOps.h"
#include "compiler/translator/RegenerateStructNames.h"
#include "compiler/translator/RemoveArrayLengthMethod.h"
#include "compiler/translator/RemoveInvariantDeclaration.h"
#include "compiler/translator/RemovePow.h"
#include "compiler/translator/RemoveUnreferencedVariables.h"
#include "compiler/translator/RewriteDoWhile.h"
#include "compiler/translator/ScalarizeVecAndMatConstructorArgs.h"
#include "compiler/translator/SeparateDeclarations.h"
#include "compiler/translator/SimplifyLoopConditions.h"
#include "compiler/translator/SplitSequenceOperator.h"
#include "compiler/translator/UnfoldShortCircuitAST.h"
#include "compiler/translator/UseInterfaceBlockFields.h"
#include "compiler/translator/ValidateLimitations.h" #include "compiler/translator/ValidateLimitations.h"
#include "compiler/translator/ValidateMaxParameters.h" #include "compiler/translator/ValidateMaxParameters.h"
#include "compiler/translator/ValidateOutputs.h" #include "compiler/translator/ValidateOutputs.h"
#include "compiler/translator/ValidateVaryingLocations.h" #include "compiler/translator/ValidateVaryingLocations.h"
#include "compiler/translator/VariablePacker.h" #include "compiler/translator/VariablePacker.h"
#include "compiler/translator/VectorizeVectorScalarArithmetic.h" #include "compiler/translator/tree_ops/AddAndTrueToLoopCondition.h"
#include "compiler/translator/tree_ops/ClampFragDepth.h"
#include "compiler/translator/tree_ops/ClampPointSize.h"
#include "compiler/translator/tree_ops/DeclareAndInitBuiltinsForInstancedMultiview.h"
#include "compiler/translator/tree_ops/DeferGlobalInitializers.h"
#include "compiler/translator/tree_ops/EmulateGLFragColorBroadcast.h"
#include "compiler/translator/tree_ops/EmulatePrecision.h"
#include "compiler/translator/tree_ops/FoldExpressions.h"
#include "compiler/translator/tree_ops/InitializeVariables.h"
#include "compiler/translator/tree_ops/PruneEmptyCases.h"
#include "compiler/translator/tree_ops/PruneNoOps.h"
#include "compiler/translator/tree_ops/RegenerateStructNames.h"
#include "compiler/translator/tree_ops/RemoveArrayLengthMethod.h"
#include "compiler/translator/tree_ops/RemoveInvariantDeclaration.h"
#include "compiler/translator/tree_ops/RemovePow.h"
#include "compiler/translator/tree_ops/RemoveUnreferencedVariables.h"
#include "compiler/translator/tree_ops/RewriteDoWhile.h"
#include "compiler/translator/tree_ops/ScalarizeVecAndMatConstructorArgs.h"
#include "compiler/translator/tree_ops/SeparateDeclarations.h"
#include "compiler/translator/tree_ops/SimplifyLoopConditions.h"
#include "compiler/translator/tree_ops/SplitSequenceOperator.h"
#include "compiler/translator/tree_ops/UnfoldShortCircuitAST.h"
#include "compiler/translator/tree_ops/UseInterfaceBlockFields.h"
#include "compiler/translator/tree_ops/VectorizeVectorScalarArithmetic.h"
#include "compiler/translator/tree_util/IntermNodePatternMatcher.h" #include "compiler/translator/tree_util/IntermNodePatternMatcher.h"
#include "compiler/translator/util.h" #include "compiler/translator/util.h"
#include "third_party/compiler/ArrayBoundsClamper.h" #include "third_party/compiler/ArrayBoundsClamper.h"
......
...@@ -17,13 +17,13 @@ ...@@ -17,13 +17,13 @@
#include "compiler/translator/BuiltInFunctionEmulatorHLSL.h" #include "compiler/translator/BuiltInFunctionEmulatorHLSL.h"
#include "compiler/translator/ImageFunctionHLSL.h" #include "compiler/translator/ImageFunctionHLSL.h"
#include "compiler/translator/InfoSink.h" #include "compiler/translator/InfoSink.h"
#include "compiler/translator/RemoveSwitchFallThrough.h"
#include "compiler/translator/StructureHLSL.h" #include "compiler/translator/StructureHLSL.h"
#include "compiler/translator/TextureFunctionHLSL.h" #include "compiler/translator/TextureFunctionHLSL.h"
#include "compiler/translator/TranslatorHLSL.h" #include "compiler/translator/TranslatorHLSL.h"
#include "compiler/translator/UniformHLSL.h" #include "compiler/translator/UniformHLSL.h"
#include "compiler/translator/UtilsHLSL.h" #include "compiler/translator/UtilsHLSL.h"
#include "compiler/translator/blocklayout.h" #include "compiler/translator/blocklayout.h"
#include "compiler/translator/tree_ops/RemoveSwitchFallThrough.h"
#include "compiler/translator/tree_util/FindSymbolNode.h" #include "compiler/translator/tree_util/FindSymbolNode.h"
#include "compiler/translator/tree_util/NodeSearch.h" #include "compiler/translator/tree_util/NodeSearch.h"
#include "compiler/translator/util.h" #include "compiler/translator/util.h"
......
...@@ -6,11 +6,11 @@ ...@@ -6,11 +6,11 @@
#include "compiler/translator/TranslatorESSL.h" #include "compiler/translator/TranslatorESSL.h"
#include "angle_gl.h"
#include "compiler/translator/BuiltInFunctionEmulatorGLSL.h" #include "compiler/translator/BuiltInFunctionEmulatorGLSL.h"
#include "compiler/translator/EmulatePrecision.h"
#include "compiler/translator/RecordConstantPrecision.h"
#include "compiler/translator/OutputESSL.h" #include "compiler/translator/OutputESSL.h"
#include "angle_gl.h" #include "compiler/translator/tree_ops/EmulatePrecision.h"
#include "compiler/translator/tree_ops/RecordConstantPrecision.h"
namespace sh namespace sh
{ {
......
...@@ -8,12 +8,12 @@ ...@@ -8,12 +8,12 @@
#include "angle_gl.h" #include "angle_gl.h"
#include "compiler/translator/BuiltInFunctionEmulatorGLSL.h" #include "compiler/translator/BuiltInFunctionEmulatorGLSL.h"
#include "compiler/translator/EmulatePrecision.h"
#include "compiler/translator/ExtensionGLSL.h" #include "compiler/translator/ExtensionGLSL.h"
#include "compiler/translator/OutputGLSL.h" #include "compiler/translator/OutputGLSL.h"
#include "compiler/translator/RewriteTexelFetchOffset.h"
#include "compiler/translator/RewriteUnaryMinusOperatorFloat.h"
#include "compiler/translator/VersionGLSL.h" #include "compiler/translator/VersionGLSL.h"
#include "compiler/translator/tree_ops/EmulatePrecision.h"
#include "compiler/translator/tree_ops/RewriteTexelFetchOffset.h"
#include "compiler/translator/tree_ops/RewriteUnaryMinusOperatorFloat.h"
namespace sh namespace sh
{ {
......
...@@ -6,25 +6,25 @@ ...@@ -6,25 +6,25 @@
#include "compiler/translator/TranslatorHLSL.h" #include "compiler/translator/TranslatorHLSL.h"
#include "compiler/translator/AddDefaultReturnStatements.h"
#include "compiler/translator/ArrayReturnValueToOutParameter.h"
#include "compiler/translator/BreakVariableAliasingInInnerLoops.h"
#include "compiler/translator/EmulatePrecision.h"
#include "compiler/translator/ExpandIntegerPowExpressions.h"
#include "compiler/translator/OutputHLSL.h" #include "compiler/translator/OutputHLSL.h"
#include "compiler/translator/PruneEmptyCases.h" #include "compiler/translator/tree_ops/AddDefaultReturnStatements.h"
#include "compiler/translator/RemoveDynamicIndexing.h" #include "compiler/translator/tree_ops/ArrayReturnValueToOutParameter.h"
#include "compiler/translator/RewriteElseBlocks.h" #include "compiler/translator/tree_ops/BreakVariableAliasingInInnerLoops.h"
#include "compiler/translator/RewriteTexelFetchOffset.h" #include "compiler/translator/tree_ops/EmulatePrecision.h"
#include "compiler/translator/RewriteUnaryMinusOperatorInt.h" #include "compiler/translator/tree_ops/ExpandIntegerPowExpressions.h"
#include "compiler/translator/SeparateArrayConstructorStatements.h" #include "compiler/translator/tree_ops/PruneEmptyCases.h"
#include "compiler/translator/SeparateArrayInitialization.h" #include "compiler/translator/tree_ops/RemoveDynamicIndexing.h"
#include "compiler/translator/SeparateDeclarations.h" #include "compiler/translator/tree_ops/RewriteElseBlocks.h"
#include "compiler/translator/SeparateExpressionsReturningArrays.h" #include "compiler/translator/tree_ops/RewriteTexelFetchOffset.h"
#include "compiler/translator/SimplifyLoopConditions.h" #include "compiler/translator/tree_ops/RewriteUnaryMinusOperatorInt.h"
#include "compiler/translator/SplitSequenceOperator.h" #include "compiler/translator/tree_ops/SeparateArrayConstructorStatements.h"
#include "compiler/translator/UnfoldShortCircuitToIf.h" #include "compiler/translator/tree_ops/SeparateArrayInitialization.h"
#include "compiler/translator/WrapSwitchStatementsInBlocks.h" #include "compiler/translator/tree_ops/SeparateDeclarations.h"
#include "compiler/translator/tree_ops/SeparateExpressionsReturningArrays.h"
#include "compiler/translator/tree_ops/SimplifyLoopConditions.h"
#include "compiler/translator/tree_ops/SplitSequenceOperator.h"
#include "compiler/translator/tree_ops/UnfoldShortCircuitToIf.h"
#include "compiler/translator/tree_ops/WrapSwitchStatementsInBlocks.h"
#include "compiler/translator/tree_util/IntermNodePatternMatcher.h" #include "compiler/translator/tree_util/IntermNodePatternMatcher.h"
namespace sh namespace sh
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
#include "compiler/translator/AddAndTrueToLoopCondition.h" #include "compiler/translator/tree_ops/AddAndTrueToLoopCondition.h"
#include "compiler/translator/tree_util/IntermNode_util.h" #include "compiler/translator/tree_util/IntermNode_util.h"
#include "compiler/translator/tree_util/IntermTraverse.h" #include "compiler/translator/tree_util/IntermTraverse.h"
......
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
// Rewrite condition in for and while loops to work around driver bug on Intel Mac. // Rewrite condition in for and while loops to work around driver bug on Intel Mac.
#ifndef COMPILER_TRANSLATOR_ADDANDTRUETOLOOPCONDITION_H_ #ifndef COMPILER_TRANSLATOR_TREEOPS_ADDANDTRUETOLOOPCONDITION_H_
#define COMPILER_TRANSLATOR_ADDANDTRUETOLOOPCONDITION_H_ #define COMPILER_TRANSLATOR_TREEOPS_ADDANDTRUETOLOOPCONDITION_H_
class TIntermNode; class TIntermNode;
namespace sh namespace sh
...@@ -17,4 +17,4 @@ void AddAndTrueToLoopCondition(TIntermNode *root); ...@@ -17,4 +17,4 @@ void AddAndTrueToLoopCondition(TIntermNode *root);
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_ADDANDTRUETOLOOPCONDITION_H_ #endif // COMPILER_TRANSLATOR_TREEOPS_ADDANDTRUETOLOOPCONDITION_H_
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
// return. // return.
// //
#include "compiler/translator/AddDefaultReturnStatements.h" #include "compiler/translator/tree_ops/AddDefaultReturnStatements.h"
#include "compiler/translator/IntermNode.h" #include "compiler/translator/IntermNode.h"
#include "compiler/translator/tree_util/IntermNode_util.h" #include "compiler/translator/tree_util/IntermNode_util.h"
......
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
// return. // return.
// //
#ifndef COMPILER_TRANSLATOR_ADDDEFAULTRETURNSTATEMENTS_H_ #ifndef COMPILER_TRANSLATOR_TREEOPS_ADDDEFAULTRETURNSTATEMENTS_H_
#define COMPILER_TRANSLATOR_ADDDEFAULTRETURNSTATEMENTS_H_ #define COMPILER_TRANSLATOR_TREEOPS_ADDDEFAULTRETURNSTATEMENTS_H_
class TIntermBlock; class TIntermBlock;
...@@ -19,4 +19,4 @@ void AddDefaultReturnStatements(TIntermBlock *root); ...@@ -19,4 +19,4 @@ void AddDefaultReturnStatements(TIntermBlock *root);
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_ADDDEFAULTRETURNSTATEMENTS_H_ #endif // COMPILER_TRANSLATOR_TREEOPS_ADDDEFAULTRETURNSTATEMENTS_H_
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
// The ArrayReturnValueToOutParameter function changes return values of an array type to out // The ArrayReturnValueToOutParameter function changes return values of an array type to out
// parameters in function definitions, prototypes, and call sites. // parameters in function definitions, prototypes, and call sites.
#include "compiler/translator/ArrayReturnValueToOutParameter.h" #include "compiler/translator/tree_ops/ArrayReturnValueToOutParameter.h"
#include <map> #include <map>
......
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
// The ArrayReturnValueToOutParameter function changes return values of an array type to out // The ArrayReturnValueToOutParameter function changes return values of an array type to out
// parameters in function definitions, prototypes and call sites. // parameters in function definitions, prototypes and call sites.
#ifndef COMPILER_TRANSLATOR_ARRAYRETURNVALUETOOUTPARAMETER_H_ #ifndef COMPILER_TRANSLATOR_TREEOPS_ARRAYRETURNVALUETOOUTPARAMETER_H_
#define COMPILER_TRANSLATOR_ARRAYRETURNVALUETOOUTPARAMETER_H_ #define COMPILER_TRANSLATOR_TREEOPS_ARRAYRETURNVALUETOOUTPARAMETER_H_
namespace sh namespace sh
{ {
...@@ -19,4 +19,4 @@ void ArrayReturnValueToOutParameter(TIntermNode *root, TSymbolTable *symbolTable ...@@ -19,4 +19,4 @@ void ArrayReturnValueToOutParameter(TIntermNode *root, TSymbolTable *symbolTable
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_ARRAYRETURNVALUETOOUTPARAMETER_H_ #endif // COMPILER_TRANSLATOR_TREEOPS_ARRAYRETURNVALUETOOUTPARAMETER_H_
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
// may record a variable as aliasing another. Sometimes the alias information gets garbled // may record a variable as aliasing another. Sometimes the alias information gets garbled
// so we work around this issue by breaking the aliasing chain in inner loops. // so we work around this issue by breaking the aliasing chain in inner loops.
#ifndef COMPILER_TRANSLATOR_BREAKVARIABLEALIASINGININNERLOOPS_H_ #ifndef COMPILER_TRANSLATOR_TREEOPS_BREAKVARIABLEALIASINGININNERLOOPS_H_
#define COMPILER_TRANSLATOR_BREAKVARIABLEALIASINGININNERLOOPS_H_ #define COMPILER_TRANSLATOR_TREEOPS_BREAKVARIABLEALIASINGININNERLOOPS_H_
class TIntermNode; class TIntermNode;
...@@ -20,4 +20,4 @@ void BreakVariableAliasingInInnerLoops(TIntermNode *root); ...@@ -20,4 +20,4 @@ void BreakVariableAliasingInInnerLoops(TIntermNode *root);
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_BREAKVARIABLEALIASINGININNERLOOPS_H_ #endif // COMPILER_TRANSLATOR_TREEOPS_BREAKVARIABLEALIASINGININNERLOOPS_H_
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
// statically accesses gl_FragDepth. // statically accesses gl_FragDepth.
// //
#include "compiler/translator/ClampFragDepth.h" #include "compiler/translator/tree_ops/ClampFragDepth.h"
#include "compiler/translator/ImmutableString.h" #include "compiler/translator/ImmutableString.h"
#include "compiler/translator/SymbolTable.h" #include "compiler/translator/SymbolTable.h"
......
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
// statically accesses gl_FragDepth. // statically accesses gl_FragDepth.
// //
#ifndef COMPILER_TRANSLATOR_CLAMPFRAGDEPTH_H_ #ifndef COMPILER_TRANSLATOR_TREEOPS_CLAMPFRAGDEPTH_H_
#define COMPILER_TRANSLATOR_CLAMPFRAGDEPTH_H_ #define COMPILER_TRANSLATOR_TREEOPS_CLAMPFRAGDEPTH_H_
namespace sh namespace sh
{ {
...@@ -21,4 +21,4 @@ void ClampFragDepth(TIntermBlock *root, TSymbolTable *symbolTable); ...@@ -21,4 +21,4 @@ void ClampFragDepth(TIntermBlock *root, TSymbolTable *symbolTable);
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_CLAMPFRAGDEPTH_H_ #endif // COMPILER_TRANSLATOR_TREEOPS_CLAMPFRAGDEPTH_H_
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
// ClampPointSize.cpp: Limit the value that is written to gl_PointSize. // ClampPointSize.cpp: Limit the value that is written to gl_PointSize.
// //
#include "compiler/translator/ClampPointSize.h" #include "compiler/translator/tree_ops/ClampPointSize.h"
#include "compiler/translator/SymbolTable.h" #include "compiler/translator/SymbolTable.h"
#include "compiler/translator/tree_util/BuiltIn_autogen.h" #include "compiler/translator/tree_util/BuiltIn_autogen.h"
......
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
// ClampPointSize.h: Limit the value that is written to gl_PointSize. // ClampPointSize.h: Limit the value that is written to gl_PointSize.
// //
#ifndef COMPILER_TRANSLATOR_CLAMPPOINTSIZE_H_ #ifndef COMPILER_TRANSLATOR_TREEOPS_CLAMPPOINTSIZE_H_
#define COMPILER_TRANSLATOR_CLAMPPOINTSIZE_H_ #define COMPILER_TRANSLATOR_TREEOPS_CLAMPPOINTSIZE_H_
namespace sh namespace sh
{ {
...@@ -19,4 +19,4 @@ void ClampPointSize(TIntermBlock *root, float maxPointSize, TSymbolTable *symbol ...@@ -19,4 +19,4 @@ void ClampPointSize(TIntermBlock *root, float maxPointSize, TSymbolTable *symbol
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_CLAMPPOINTSIZE_H_ #endif // COMPILER_TRANSLATOR_TREEOPS_CLAMPPOINTSIZE_H_
...@@ -7,12 +7,12 @@ ...@@ -7,12 +7,12 @@
// Check the header file For more information. // Check the header file For more information.
// //
#include "compiler/translator/DeclareAndInitBuiltinsForInstancedMultiview.h" #include "compiler/translator/tree_ops/DeclareAndInitBuiltinsForInstancedMultiview.h"
#include "compiler/translator/InitializeVariables.h"
#include "compiler/translator/ReplaceVariable.h" #include "compiler/translator/ReplaceVariable.h"
#include "compiler/translator/StaticType.h" #include "compiler/translator/StaticType.h"
#include "compiler/translator/SymbolTable.h" #include "compiler/translator/SymbolTable.h"
#include "compiler/translator/tree_ops/InitializeVariables.h"
#include "compiler/translator/tree_util/BuiltIn_autogen.h" #include "compiler/translator/tree_util/BuiltIn_autogen.h"
#include "compiler/translator/tree_util/FindMain.h" #include "compiler/translator/tree_util/FindMain.h"
#include "compiler/translator/tree_util/IntermNode_util.h" #include "compiler/translator/tree_util/IntermNode_util.h"
...@@ -140,7 +140,7 @@ void DeclareAndInitBuiltinsForInstancedMultiview(TIntermBlock *root, ...@@ -140,7 +140,7 @@ void DeclareAndInitBuiltinsForInstancedMultiview(TIntermBlock *root,
{ {
ASSERT(shaderType == GL_VERTEX_SHADER || shaderType == GL_FRAGMENT_SHADER); ASSERT(shaderType == GL_VERTEX_SHADER || shaderType == GL_FRAGMENT_SHADER);
TQualifier viewIDQualifier = (shaderType == GL_VERTEX_SHADER) ? EvqFlatOut : EvqFlatIn; TQualifier viewIDQualifier = (shaderType == GL_VERTEX_SHADER) ? EvqFlatOut : EvqFlatIn;
const TVariable *viewID = const TVariable *viewID =
new TVariable(symbolTable, kViewIDVariableName, new TVariable(symbolTable, kViewIDVariableName,
new TType(EbtUInt, EbpHigh, viewIDQualifier), SymbolType::AngleInternal); new TType(EbtUInt, EbpHigh, viewIDQualifier), SymbolType::AngleInternal);
...@@ -151,7 +151,7 @@ void DeclareAndInitBuiltinsForInstancedMultiview(TIntermBlock *root, ...@@ -151,7 +151,7 @@ void DeclareAndInitBuiltinsForInstancedMultiview(TIntermBlock *root,
{ {
// Replacing gl_InstanceID with InstanceID should happen before adding the initializers of // Replacing gl_InstanceID with InstanceID should happen before adding the initializers of
// InstanceID and ViewID. // InstanceID and ViewID.
const TType *instanceIDVariableType = StaticType::Get<EbtInt, EbpHigh, EvqGlobal, 1, 1>(); const TType *instanceIDVariableType = StaticType::Get<EbtInt, EbpHigh, EvqGlobal, 1, 1>();
const TVariable *instanceID = const TVariable *instanceID =
new TVariable(symbolTable, kInstanceIDVariableName, instanceIDVariableType, new TVariable(symbolTable, kInstanceIDVariableName, instanceIDVariableType,
SymbolType::AngleInternal); SymbolType::AngleInternal);
......
...@@ -24,8 +24,8 @@ ...@@ -24,8 +24,8 @@
// uniform. // uniform.
// //
#ifndef COMPILER_TRANSLATOR_DECLAREANDINITBUILTINSFORINSTANCEDMULTIVIEW_H_ #ifndef COMPILER_TRANSLATOR_TREEOPS_DECLAREANDINITBUILTINSFORINSTANCEDMULTIVIEW_H_
#define COMPILER_TRANSLATOR_DECLAREANDINITBUILTINSFORINSTANCEDMULTIVIEW_H_ #define COMPILER_TRANSLATOR_TREEOPS_DECLAREANDINITBUILTINSFORINSTANCEDMULTIVIEW_H_
#include "GLSLANG/ShaderLang.h" #include "GLSLANG/ShaderLang.h"
#include "angle_gl.h" #include "angle_gl.h"
...@@ -45,4 +45,4 @@ void DeclareAndInitBuiltinsForInstancedMultiview(TIntermBlock *root, ...@@ -45,4 +45,4 @@ void DeclareAndInitBuiltinsForInstancedMultiview(TIntermBlock *root,
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_DECLAREANDINITBUILTINSFORINSTANCEDMULTIVIEW_H_ #endif // COMPILER_TRANSLATOR_TREEOPS_DECLAREANDINITBUILTINSFORINSTANCEDMULTIVIEW_H_
\ No newline at end of file \ No newline at end of file
...@@ -13,15 +13,15 @@ ...@@ -13,15 +13,15 @@
// It can also initialize all uninitialized globals. // It can also initialize all uninitialized globals.
// //
#include "compiler/translator/DeferGlobalInitializers.h" #include "compiler/translator/tree_ops/DeferGlobalInitializers.h"
#include <vector> #include <vector>
#include "compiler/translator/InitializeVariables.h"
#include "compiler/translator/IntermNode.h" #include "compiler/translator/IntermNode.h"
#include "compiler/translator/ReplaceVariable.h" #include "compiler/translator/ReplaceVariable.h"
#include "compiler/translator/StaticType.h" #include "compiler/translator/StaticType.h"
#include "compiler/translator/SymbolTable.h" #include "compiler/translator/SymbolTable.h"
#include "compiler/translator/tree_ops/InitializeVariables.h"
#include "compiler/translator/tree_util/FindMain.h" #include "compiler/translator/tree_util/FindMain.h"
#include "compiler/translator/tree_util/IntermNode_util.h" #include "compiler/translator/tree_util/IntermNode_util.h"
......
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
// It can also initialize all uninitialized globals. // It can also initialize all uninitialized globals.
// //
#ifndef COMPILER_TRANSLATOR_DEFERGLOBALINITIALIZERS_H_ #ifndef COMPILER_TRANSLATOR_TREEOPS_DEFERGLOBALINITIALIZERS_H_
#define COMPILER_TRANSLATOR_DEFERGLOBALINITIALIZERS_H_ #define COMPILER_TRANSLATOR_TREEOPS_DEFERGLOBALINITIALIZERS_H_
namespace sh namespace sh
{ {
...@@ -30,4 +30,4 @@ void DeferGlobalInitializers(TIntermBlock *root, ...@@ -30,4 +30,4 @@ void DeferGlobalInitializers(TIntermBlock *root,
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_DEFERGLOBALINITIALIZERS_H_ #endif // COMPILER_TRANSLATOR_TREEOPS_DEFERGLOBALINITIALIZERS_H_
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
// with gl_FragData[0]. // with gl_FragData[0].
// //
#include "compiler/translator/EmulateGLFragColorBroadcast.h" #include "compiler/translator/tree_ops/EmulateGLFragColorBroadcast.h"
#include "compiler/translator/Symbol.h" #include "compiler/translator/Symbol.h"
#include "compiler/translator/tree_util/IntermNode_util.h" #include "compiler/translator/tree_util/IntermNode_util.h"
......
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
// GL_EXT_draw_buffers is explicitly enabled in a fragment shader. // GL_EXT_draw_buffers is explicitly enabled in a fragment shader.
// //
#ifndef COMPILER_TRANSLATOR_EMULATEGLFRAGCOLORBROADCAST_H_ #ifndef COMPILER_TRANSLATOR_TREEOPS_EMULATEGLFRAGCOLORBROADCAST_H_
#define COMPILER_TRANSLATOR_EMULATEGLFRAGCOLORBROADCAST_H_ #define COMPILER_TRANSLATOR_TREEOPS_EMULATEGLFRAGCOLORBROADCAST_H_
#include <vector> #include <vector>
...@@ -28,4 +28,4 @@ void EmulateGLFragColorBroadcast(TIntermBlock *root, ...@@ -28,4 +28,4 @@ void EmulateGLFragColorBroadcast(TIntermBlock *root,
int shaderVersion); int shaderVersion);
} }
#endif // COMPILER_TRANSLATOR_EMULATEGLFRAGCOLORBROADCAST_H_ #endif // COMPILER_TRANSLATOR_TREEOPS_EMULATEGLFRAGCOLORBROADCAST_H_
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
#include "compiler/translator/EmulatePrecision.h" #include "compiler/translator/tree_ops/EmulatePrecision.h"
#include "compiler/translator/FunctionLookup.h" #include "compiler/translator/FunctionLookup.h"
...@@ -42,13 +42,13 @@ class RoundingHelperWriter : angle::NonCopyable ...@@ -42,13 +42,13 @@ class RoundingHelperWriter : angle::NonCopyable
const ShShaderOutput mOutputLanguage; const ShShaderOutput mOutputLanguage;
private: private:
virtual std::string getTypeString(const char *glslType) = 0; virtual std::string getTypeString(const char *glslType) = 0;
virtual void writeFloatRoundingHelpers(TInfoSinkBase &sink) = 0; virtual void writeFloatRoundingHelpers(TInfoSinkBase &sink) = 0;
virtual void writeVectorRoundingHelpers(TInfoSinkBase &sink, const unsigned int size) = 0; virtual void writeVectorRoundingHelpers(TInfoSinkBase &sink, const unsigned int size) = 0;
virtual void writeMatrixRoundingHelper(TInfoSinkBase &sink, virtual void writeMatrixRoundingHelper(TInfoSinkBase &sink,
const unsigned int columns, const unsigned int columns,
const unsigned int rows, const unsigned int rows,
const char *functionName) = 0; const char *functionName) = 0;
}; };
class RoundingHelperWriterGLSL : public RoundingHelperWriter class RoundingHelperWriterGLSL : public RoundingHelperWriter
...@@ -754,7 +754,7 @@ TIntermAggregate *EmulatePrecision::createCompoundAssignmentFunctionCallNode(TIn ...@@ -754,7 +754,7 @@ TIntermAggregate *EmulatePrecision::createCompoundAssignmentFunctionCallNode(TIn
else else
strstr << "angle_compound_" << opNameStr << "_frl"; strstr << "angle_compound_" << opNameStr << "_frl";
ImmutableString functionName = ImmutableString(strstr.str()); ImmutableString functionName = ImmutableString(strstr.str());
TIntermSequence *arguments = new TIntermSequence(); TIntermSequence *arguments = new TIntermSequence();
arguments->push_back(left); arguments->push_back(left);
arguments->push_back(right); arguments->push_back(right);
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
#ifndef COMPILER_TRANSLATOR_EMULATE_PRECISION_H_ #ifndef COMPILER_TRANSLATOR_TREEOPS_EMULATE_PRECISION_H_
#define COMPILER_TRANSLATOR_EMULATE_PRECISION_H_ #define COMPILER_TRANSLATOR_TREEOPS_EMULATE_PRECISION_H_
#include "GLSLANG/ShaderLang.h" #include "GLSLANG/ShaderLang.h"
#include "common/angleutils.h" #include "common/angleutils.h"
...@@ -82,4 +82,4 @@ class EmulatePrecision : public TLValueTrackingTraverser ...@@ -82,4 +82,4 @@ class EmulatePrecision : public TLValueTrackingTraverser
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_EMULATE_PRECISION_H_ #endif // COMPILER_TRANSLATOR_TREEOPS_EMULATE_PRECISION_H_
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
// Implementation of the integer pow expressions HLSL bug workaround. // Implementation of the integer pow expressions HLSL bug workaround.
// See header for more info. // See header for more info.
#include "compiler/translator/ExpandIntegerPowExpressions.h" #include "compiler/translator/tree_ops/ExpandIntegerPowExpressions.h"
#include <cmath> #include <cmath>
#include <cstdlib> #include <cstdlib>
......
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
// The workaround is to replace the pow with a series of multiplies. // The workaround is to replace the pow with a series of multiplies.
// See http://anglebug.com/851 // See http://anglebug.com/851
#ifndef COMPILER_TRANSLATOR_EXPANDINTEGERPOWEXPRESSIONS_H_ #ifndef COMPILER_TRANSLATOR_TREEOPS_EXPANDINTEGERPOWEXPRESSIONS_H_
#define COMPILER_TRANSLATOR_EXPANDINTEGERPOWEXPRESSIONS_H_ #define COMPILER_TRANSLATOR_TREEOPS_EXPANDINTEGERPOWEXPRESSIONS_H_
namespace sh namespace sh
{ {
...@@ -26,4 +26,4 @@ void ExpandIntegerPowExpressions(TIntermNode *root, TSymbolTable *symbolTable); ...@@ -26,4 +26,4 @@ void ExpandIntegerPowExpressions(TIntermNode *root, TSymbolTable *symbolTable);
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_EXPANDINTEGERPOWEXPRESSIONS_H_ #endif // COMPILER_TRANSLATOR_TREEOPS_EXPANDINTEGERPOWEXPRESSIONS_H_
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
// 2. Sequence aka comma ops where the left side has no side effects. // 2. Sequence aka comma ops where the left side has no side effects.
// 3. Any expressions containing any of the above. // 3. Any expressions containing any of the above.
#include "compiler/translator/FoldExpressions.h" #include "compiler/translator/tree_ops/FoldExpressions.h"
#include "compiler/translator/Diagnostics.h" #include "compiler/translator/Diagnostics.h"
#include "compiler/translator/IntermNode.h" #include "compiler/translator/IntermNode.h"
......
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
// parsing and validation of qualifiers is complete. Expressions that are folded: 1. Ternary ops // parsing and validation of qualifiers is complete. Expressions that are folded: 1. Ternary ops
// with a constant condition. // with a constant condition.
#ifndef COMPILER_TRANSLATOR_FOLDEXPRESSIONS_H_ #ifndef COMPILER_TRANSLATOR_TREEOPS_FOLDEXPRESSIONS_H_
#define COMPILER_TRANSLATOR_FOLDEXPRESSIONS_H_ #define COMPILER_TRANSLATOR_TREEOPS_FOLDEXPRESSIONS_H_
namespace sh namespace sh
{ {
...@@ -21,4 +21,4 @@ void FoldExpressions(TIntermBlock *root, TDiagnostics *diagnostics); ...@@ -21,4 +21,4 @@ void FoldExpressions(TIntermBlock *root, TDiagnostics *diagnostics);
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_FOLDEXPRESSIONS_H_ #endif // COMPILER_TRANSLATOR_TREEOPS_FOLDEXPRESSIONS_H_
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
#include "compiler/translator/InitializeVariables.h" #include "compiler/translator/tree_ops/InitializeVariables.h"
#include "angle_gl.h" #include "angle_gl.h"
#include "common/debug.h" #include "common/debug.h"
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
#ifndef COMPILER_TRANSLATOR_INITIALIZEVARIABLES_H_ #ifndef COMPILER_TRANSLATOR_TREEOPS_INITIALIZEVARIABLES_H_
#define COMPILER_TRANSLATOR_INITIALIZEVARIABLES_H_ #define COMPILER_TRANSLATOR_TREEOPS_INITIALIZEVARIABLES_H_
#include <GLSLANG/ShaderLang.h> #include <GLSLANG/ShaderLang.h>
...@@ -53,4 +53,4 @@ void InitializeVariables(TIntermBlock *root, ...@@ -53,4 +53,4 @@ void InitializeVariables(TIntermBlock *root,
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_INITIALIZEVARIABLES_H_ #endif // COMPILER_TRANSLATOR_TREEOPS_INITIALIZEVARIABLES_H_
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
// PruneEmptyCases.cpp: The PruneEmptyCases function prunes cases that are followed by nothing from // PruneEmptyCases.cpp: The PruneEmptyCases function prunes cases that are followed by nothing from
// the AST. // the AST.
#include "compiler/translator/PruneEmptyCases.h" #include "compiler/translator/tree_ops/PruneEmptyCases.h"
#include "compiler/translator/Symbol.h" #include "compiler/translator/Symbol.h"
#include "compiler/translator/tree_util/IntermTraverse.h" #include "compiler/translator/tree_util/IntermTraverse.h"
......
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
// PruneEmptyCases.h: The PruneEmptyCases function prunes cases that are followed by nothing from // PruneEmptyCases.h: The PruneEmptyCases function prunes cases that are followed by nothing from
// the AST. // the AST.
#ifndef COMPILER_TRANSLATOR_PRUNEEMPTYCASES_H_ #ifndef COMPILER_TRANSLATOR_TREEOPS_PRUNEEMPTYCASES_H_
#define COMPILER_TRANSLATOR_PRUNEEMPTYCASES_H_ #define COMPILER_TRANSLATOR_TREEOPS_PRUNEEMPTYCASES_H_
namespace sh namespace sh
{ {
...@@ -16,4 +16,4 @@ class TIntermBlock; ...@@ -16,4 +16,4 @@ class TIntermBlock;
void PruneEmptyCases(TIntermBlock *root); void PruneEmptyCases(TIntermBlock *root);
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_PRUNEEMPTYCASES_H_ #endif // COMPILER_TRANSLATOR_TREEOPS_PRUNEEMPTYCASES_H_
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
// 2. Literal statements: "1.0;". The ESSL output doesn't define a default precision for float, // 2. Literal statements: "1.0;". The ESSL output doesn't define a default precision for float,
// so float literal statements would end up with no precision which is invalid ESSL. // so float literal statements would end up with no precision which is invalid ESSL.
#include "compiler/translator/PruneNoOps.h" #include "compiler/translator/tree_ops/PruneNoOps.h"
#include "compiler/translator/Symbol.h" #include "compiler/translator/Symbol.h"
#include "compiler/translator/tree_util/IntermTraverse.h" #include "compiler/translator/tree_util/IntermTraverse.h"
......
...@@ -11,8 +11,8 @@ ...@@ -11,8 +11,8 @@
// 2. Literal statements: "1.0;". The ESSL output doesn't define a default precision for float, // 2. Literal statements: "1.0;". The ESSL output doesn't define a default precision for float,
// so float literal statements would end up with no precision which is invalid ESSL. // so float literal statements would end up with no precision which is invalid ESSL.
#ifndef COMPILER_TRANSLATOR_PRUNENOOPS_H_ #ifndef COMPILER_TRANSLATOR_TREEOPS_PRUNENOOPS_H_
#define COMPILER_TRANSLATOR_PRUNENOOPS_H_ #define COMPILER_TRANSLATOR_TREEOPS_PRUNENOOPS_H_
namespace sh namespace sh
{ {
...@@ -22,4 +22,4 @@ class TSymbolTable; ...@@ -22,4 +22,4 @@ class TSymbolTable;
void PruneNoOps(TIntermBlock *root, TSymbolTable *symbolTable); void PruneNoOps(TIntermBlock *root, TSymbolTable *symbolTable);
} }
#endif // COMPILER_TRANSLATOR_PRUNENOOPS_H_ #endif // COMPILER_TRANSLATOR_TREEOPS_PRUNENOOPS_H_
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
// in case that is required for correct precision propagation. // in case that is required for correct precision propagation.
// //
#include "compiler/translator/RecordConstantPrecision.h" #include "compiler/translator/tree_ops/RecordConstantPrecision.h"
#include "compiler/translator/InfoSink.h" #include "compiler/translator/InfoSink.h"
#include "compiler/translator/tree_util/IntermNode_util.h" #include "compiler/translator/tree_util/IntermNode_util.h"
...@@ -36,6 +36,7 @@ class RecordConstantPrecisionTraverser : public TIntermTraverser ...@@ -36,6 +36,7 @@ class RecordConstantPrecisionTraverser : public TIntermTraverser
void nextIteration(); void nextIteration();
bool foundHigherPrecisionConstant() const { return mFoundHigherPrecisionConstant; } bool foundHigherPrecisionConstant() const { return mFoundHigherPrecisionConstant; }
protected: protected:
bool operandAffectsParentOperationPrecision(TIntermTyped *operand); bool operandAffectsParentOperationPrecision(TIntermTyped *operand);
......
...@@ -14,8 +14,8 @@ ...@@ -14,8 +14,8 @@
// in case that is required for correct precision propagation. // in case that is required for correct precision propagation.
// //
#ifndef COMPILER_TRANSLATOR_RECORDCONSTANTPRECISION_H_ #ifndef COMPILER_TRANSLATOR_TREEOPS_RECORDCONSTANTPRECISION_H_
#define COMPILER_TRANSLATOR_RECORDCONSTANTPRECISION_H_ #define COMPILER_TRANSLATOR_TREEOPS_RECORDCONSTANTPRECISION_H_
namespace sh namespace sh
{ {
...@@ -25,4 +25,4 @@ class TSymbolTable; ...@@ -25,4 +25,4 @@ class TSymbolTable;
void RecordConstantPrecision(TIntermNode *root, TSymbolTable *symbolTable); void RecordConstantPrecision(TIntermNode *root, TSymbolTable *symbolTable);
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_RECORDCONSTANTPRECISION_H_ #endif // COMPILER_TRANSLATOR_TREEOPS_RECORDCONSTANTPRECISION_H_
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
#include "compiler/translator/RegenerateStructNames.h" #include "compiler/translator/tree_ops/RegenerateStructNames.h"
#include "common/debug.h" #include "common/debug.h"
#include "compiler/translator/ImmutableStringBuilder.h" #include "compiler/translator/ImmutableStringBuilder.h"
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
#ifndef COMPILER_TRANSLATOR_REGENERATESTRUCTNAMES_H_ #ifndef COMPILER_TRANSLATOR_TREEOPS_REGENERATESTRUCTNAMES_H_
#define COMPILER_TRANSLATOR_REGENERATESTRUCTNAMES_H_ #define COMPILER_TRANSLATOR_TREEOPS_REGENERATESTRUCTNAMES_H_
#include "compiler/translator/SymbolTable.h" #include "compiler/translator/SymbolTable.h"
#include "compiler/translator/tree_util/IntermTraverse.h" #include "compiler/translator/tree_util/IntermTraverse.h"
...@@ -38,4 +38,4 @@ class RegenerateStructNames : public TIntermTraverser ...@@ -38,4 +38,4 @@ class RegenerateStructNames : public TIntermTraverser
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_REGENERATESTRUCTNAMES_H_ #endif // COMPILER_TRANSLATOR_TREEOPS_REGENERATESTRUCTNAMES_H_
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
// //
// Does nothing to length method calls done on runtime-sized arrays. // Does nothing to length method calls done on runtime-sized arrays.
#include "compiler/translator/RemoveArrayLengthMethod.h" #include "compiler/translator/tree_ops/RemoveArrayLengthMethod.h"
#include "compiler/translator/IntermNode.h" #include "compiler/translator/IntermNode.h"
#include "compiler/translator/tree_util/IntermTraverse.h" #include "compiler/translator/tree_util/IntermTraverse.h"
......
...@@ -19,6 +19,9 @@ ...@@ -19,6 +19,9 @@
// //
// Does nothing to length method calls done on runtime-sized arrays. // Does nothing to length method calls done on runtime-sized arrays.
#ifndef COMPILER_TRANSLATOR_TREEOPS_REMOVEARRAYLENGTHMETHOD_H_
#define COMPILER_TRANSLATOR_TREEOPS_REMOVEARRAYLENGTHMETHOD_H_
namespace sh namespace sh
{ {
...@@ -27,3 +30,5 @@ class TIntermBlock; ...@@ -27,3 +30,5 @@ class TIntermBlock;
void RemoveArrayLengthMethod(TIntermBlock *root); void RemoveArrayLengthMethod(TIntermBlock *root);
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_TREEOPS_REMOVEARRAYLENGTHMETHOD_H_
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
// replacing them with calls to functions that choose which component to return or write. // replacing them with calls to functions that choose which component to return or write.
// //
#include "compiler/translator/RemoveDynamicIndexing.h" #include "compiler/translator/tree_ops/RemoveDynamicIndexing.h"
#include "compiler/translator/Diagnostics.h" #include "compiler/translator/Diagnostics.h"
#include "compiler/translator/InfoSink.h" #include "compiler/translator/InfoSink.h"
...@@ -160,7 +160,7 @@ TIntermFunctionDefinition *GetIndexFunctionDefinition(const TType &type, ...@@ -160,7 +160,7 @@ TIntermFunctionDefinition *GetIndexFunctionDefinition(const TType &type,
{ {
ASSERT(!type.isArray()); ASSERT(!type.isArray());
int numCases = 0; int numCases = 0;
if (type.isMatrix()) if (type.isMatrix())
{ {
numCases = type.getCols(); numCases = type.getCols();
...@@ -471,7 +471,7 @@ bool RemoveDynamicIndexingTraverser::visitBinary(Visit visit, TIntermBinary *nod ...@@ -471,7 +471,7 @@ bool RemoveDynamicIndexingTraverser::visitBinary(Visit visit, TIntermBinary *nod
// Store the index in a temporary signed int variable. // Store the index in a temporary signed int variable.
// s0 = index_expr; // s0 = index_expr;
TIntermTyped *indexInitializer = EnsureSignedInt(node->getRight()); TIntermTyped *indexInitializer = EnsureSignedInt(node->getRight());
TIntermDeclaration *indexVariableDeclaration = nullptr; TIntermDeclaration *indexVariableDeclaration = nullptr;
TVariable *indexVariable = DeclareTempVariable( TVariable *indexVariable = DeclareTempVariable(
mSymbolTable, indexInitializer, EvqTemporary, &indexVariableDeclaration); mSymbolTable, indexInitializer, EvqTemporary, &indexVariableDeclaration);
......
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
// replacing them with calls to functions that choose which component to return or write. // replacing them with calls to functions that choose which component to return or write.
// //
#ifndef COMPILER_TRANSLATOR_REMOVEDYNAMICINDEXING_H_ #ifndef COMPILER_TRANSLATOR_TREEOPS_REMOVEDYNAMICINDEXING_H_
#define COMPILER_TRANSLATOR_REMOVEDYNAMICINDEXING_H_ #define COMPILER_TRANSLATOR_TREEOPS_REMOVEDYNAMICINDEXING_H_
namespace sh namespace sh
{ {
...@@ -23,4 +23,4 @@ void RemoveDynamicIndexing(TIntermNode *root, ...@@ -23,4 +23,4 @@ void RemoveDynamicIndexing(TIntermNode *root,
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_REMOVEDYNAMICINDEXING_H_ #endif // COMPILER_TRANSLATOR_TREEOPS_REMOVEDYNAMICINDEXING_H_
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
#include "compiler/translator/RemoveInvariantDeclaration.h" #include "compiler/translator/tree_ops/RemoveInvariantDeclaration.h"
#include "compiler/translator/tree_util/IntermTraverse.h" #include "compiler/translator/tree_util/IntermTraverse.h"
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
#ifndef COMPILER_TRANSLATOR_REMOVEINVARIANTDECLARATION_H_ #ifndef COMPILER_TRANSLATOR_TREEOPS_REMOVEINVARIANTDECLARATION_H_
#define COMPILER_TRANSLATOR_REMOVEINVARIANTDECLARATION_H_ #define COMPILER_TRANSLATOR_TREEOPS_REMOVEINVARIANTDECLARATION_H_
class TIntermNode; class TIntermNode;
namespace sh namespace sh
...@@ -15,4 +15,4 @@ void RemoveInvariantDeclaration(TIntermNode *root); ...@@ -15,4 +15,4 @@ void RemoveInvariantDeclaration(TIntermNode *root);
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_REMOVEINVARIANTDECLARATION_H_ #endif // COMPILER_TRANSLATOR_TREEOPS_REMOVEINVARIANTDECLARATION_H_
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
// OpenGL drivers. // OpenGL drivers.
// //
#include "compiler/translator/RemovePow.h" #include "compiler/translator/tree_ops/RemovePow.h"
#include "compiler/translator/InfoSink.h" #include "compiler/translator/InfoSink.h"
#include "compiler/translator/tree_util/IntermTraverse.h" #include "compiler/translator/tree_util/IntermTraverse.h"
......
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
// OpenGL drivers. // OpenGL drivers.
// //
#ifndef COMPILER_TRANSLATOR_REMOVEPOW_H_ #ifndef COMPILER_TRANSLATOR_TREEOPS_REMOVEPOW_H_
#define COMPILER_TRANSLATOR_REMOVEPOW_H_ #define COMPILER_TRANSLATOR_TREEOPS_REMOVEPOW_H_
namespace sh namespace sh
{ {
...@@ -18,4 +18,4 @@ class TIntermNode; ...@@ -18,4 +18,4 @@ class TIntermNode;
void RemovePow(TIntermNode *root); void RemovePow(TIntermNode *root);
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_REMOVEPOW_H_ #endif // COMPILER_TRANSLATOR_TREEOPS_REMOVEPOW_H_
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
// by this function. It leaves duplicate nodes in the AST making replacements // by this function. It leaves duplicate nodes in the AST making replacements
// unreliable. // unreliable.
#include "compiler/translator/RemoveSwitchFallThrough.h" #include "compiler/translator/tree_ops/RemoveSwitchFallThrough.h"
#include "compiler/translator/Diagnostics.h" #include "compiler/translator/Diagnostics.h"
#include "compiler/translator/tree_util/IntermTraverse.h" #include "compiler/translator/tree_util/IntermTraverse.h"
......
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
// by this function. It leaves duplicate nodes in the AST making replacements // by this function. It leaves duplicate nodes in the AST making replacements
// unreliable. // unreliable.
#ifndef COMPILER_TRANSLATOR_REMOVESWITCHFALLTHROUGH_H_ #ifndef COMPILER_TRANSLATOR_TREEOPS_REMOVESWITCHFALLTHROUGH_H_
#define COMPILER_TRANSLATOR_REMOVESWITCHFALLTHROUGH_H_ #define COMPILER_TRANSLATOR_TREEOPS_REMOVESWITCHFALLTHROUGH_H_
namespace sh namespace sh
{ {
...@@ -24,4 +24,4 @@ TIntermBlock *RemoveSwitchFallThrough(TIntermBlock *statementList, ...@@ -24,4 +24,4 @@ TIntermBlock *RemoveSwitchFallThrough(TIntermBlock *statementList,
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_REMOVESWITCHFALLTHROUGH_H_ #endif // COMPILER_TRANSLATOR_TREEOPS_REMOVESWITCHFALLTHROUGH_H_
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
// initialization code for them. Also removes unreferenced struct types. // initialization code for them. Also removes unreferenced struct types.
// //
#include "compiler/translator/RemoveUnreferencedVariables.h" #include "compiler/translator/tree_ops/RemoveUnreferencedVariables.h"
#include "compiler/translator/SymbolTable.h" #include "compiler/translator/SymbolTable.h"
#include "compiler/translator/tree_util/IntermTraverse.h" #include "compiler/translator/tree_util/IntermTraverse.h"
......
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
// initialization code for them. Also removes unreferenced struct types. // initialization code for them. Also removes unreferenced struct types.
// //
#ifndef COMPILER_TRANSLATOR_REMOVEUNREFERENCEDVARIABLES_H_ #ifndef COMPILER_TRANSLATOR_TREEOPS_REMOVEUNREFERENCEDVARIABLES_H_
#define COMPILER_TRANSLATOR_REMOVEUNREFERENCEDVARIABLES_H_ #define COMPILER_TRANSLATOR_TREEOPS_REMOVEUNREFERENCEDVARIABLES_H_
namespace sh namespace sh
{ {
...@@ -21,4 +21,4 @@ void RemoveUnreferencedVariables(TIntermBlock *root, TSymbolTable *symbolTable); ...@@ -21,4 +21,4 @@ void RemoveUnreferencedVariables(TIntermBlock *root, TSymbolTable *symbolTable);
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_REMOVEUNREFERENCEDVARIABLES_H_ #endif // COMPILER_TRANSLATOR_TREEOPS_REMOVEUNREFERENCEDVARIABLES_H_
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
// RewriteDoWhile.cpp: rewrites do-while loops using another equivalent // RewriteDoWhile.cpp: rewrites do-while loops using another equivalent
// construct. // construct.
#include "compiler/translator/RewriteDoWhile.h" #include "compiler/translator/tree_ops/RewriteDoWhile.h"
#include "compiler/translator/StaticType.h" #include "compiler/translator/StaticType.h"
#include "compiler/translator/tree_util/IntermNode_util.h" #include "compiler/translator/tree_util/IntermNode_util.h"
......
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
// RewriteDoWhile.h: rewrite do-while loops as while loops to work around // RewriteDoWhile.h: rewrite do-while loops as while loops to work around
// driver bugs // driver bugs
#ifndef COMPILER_TRANSLATOR_REWRITEDOWHILE_H_ #ifndef COMPILER_TRANSLATOR_TREEOPS_REWRITEDOWHILE_H_
#define COMPILER_TRANSLATOR_REWRITEDOWHILE_H_ #define COMPILER_TRANSLATOR_TREEOPS_REWRITEDOWHILE_H_
namespace sh namespace sh
{ {
...@@ -20,4 +20,4 @@ void RewriteDoWhile(TIntermNode *root, TSymbolTable *symbolTable); ...@@ -20,4 +20,4 @@ void RewriteDoWhile(TIntermNode *root, TSymbolTable *symbolTable);
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_REWRITEDOWHILE_H_ #endif // COMPILER_TRANSLATOR_TREEOPS_REWRITEDOWHILE_H_
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
// all if-else blocks to if-if blocks. // all if-else blocks to if-if blocks.
// //
#include "compiler/translator/RewriteElseBlocks.h" #include "compiler/translator/tree_ops/RewriteElseBlocks.h"
#include "compiler/translator/IntermNode.h" #include "compiler/translator/IntermNode.h"
#include "compiler/translator/SymbolTable.h" #include "compiler/translator/SymbolTable.h"
...@@ -87,7 +87,7 @@ TIntermNode *ElseBlockRewriter::rewriteIfElse(TIntermIfElse *ifElse) ...@@ -87,7 +87,7 @@ TIntermNode *ElseBlockRewriter::rewriteIfElse(TIntermIfElse *ifElse)
if (mFunctionType && mFunctionType->getBasicType() != EbtVoid) if (mFunctionType && mFunctionType->getBasicType() != EbtVoid)
{ {
TIntermNode *returnNode = new TIntermBranch(EOpReturn, CreateZeroNode(*mFunctionType)); TIntermNode *returnNode = new TIntermBranch(EOpReturn, CreateZeroNode(*mFunctionType));
negatedElse = new TIntermBlock(); negatedElse = new TIntermBlock();
negatedElse->appendStatement(returnNode); negatedElse->appendStatement(returnNode);
} }
......
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
// all if-else blocks to if-if blocks. // all if-else blocks to if-if blocks.
// //
#ifndef COMPILER_TRANSLATOR_REWRITEELSEBLOCKS_H_ #ifndef COMPILER_TRANSLATOR_TREEOPS_REWRITEELSEBLOCKS_H_
#define COMPILER_TRANSLATOR_REWRITEELSEBLOCKS_H_ #define COMPILER_TRANSLATOR_TREEOPS_REWRITEELSEBLOCKS_H_
namespace sh namespace sh
{ {
...@@ -19,4 +19,4 @@ class TSymbolTable; ...@@ -19,4 +19,4 @@ class TSymbolTable;
void RewriteElseBlocks(TIntermNode *node, TSymbolTable *symbolTable); void RewriteElseBlocks(TIntermNode *node, TSymbolTable *symbolTable);
} }
#endif // COMPILER_TRANSLATOR_REWRITEELSEBLOCKS_H_ #endif // COMPILER_TRANSLATOR_TREEOPS_REWRITEELSEBLOCKS_H_
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
// Implementation of texelFetchOffset translation issue workaround. // Implementation of texelFetchOffset translation issue workaround.
// See header for more info. // See header for more info.
#include "compiler/translator/RewriteTexelFetchOffset.h" #include "compiler/translator/tree_ops/RewriteTexelFetchOffset.h"
#include "common/angleutils.h" #include "common/angleutils.h"
#include "compiler/translator/SymbolTable.h" #include "compiler/translator/SymbolTable.h"
......
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
// //
// See http://anglebug.com/1469 // See http://anglebug.com/1469
#ifndef COMPILER_TRANSLATOR_REWRITE_TEXELFETCHOFFSET_H_ #ifndef COMPILER_TRANSLATOR_TREEOPS_REWRITE_TEXELFETCHOFFSET_H_
#define COMPILER_TRANSLATOR_REWRITE_TEXELFETCHOFFSET_H_ #define COMPILER_TRANSLATOR_TREEOPS_REWRITE_TEXELFETCHOFFSET_H_
class TIntermNode; class TIntermNode;
class TSymbolTable; class TSymbolTable;
...@@ -25,4 +25,4 @@ void RewriteTexelFetchOffset(TIntermNode *root, const TSymbolTable &symbolTable, ...@@ -25,4 +25,4 @@ void RewriteTexelFetchOffset(TIntermNode *root, const TSymbolTable &symbolTable,
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_REWRITE_TEXELFETCHOFFSET_H_ #endif // COMPILER_TRANSLATOR_TREEOPS_REWRITE_TEXELFETCHOFFSET_H_
\ No newline at end of file \ No newline at end of file
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
#include "compiler/translator/RewriteUnaryMinusOperatorFloat.h" #include "compiler/translator/tree_ops/RewriteUnaryMinusOperatorFloat.h"
#include "compiler/translator/tree_util/IntermNode_util.h" #include "compiler/translator/tree_util/IntermNode_util.h"
#include "compiler/translator/tree_util/IntermTraverse.h" #include "compiler/translator/tree_util/IntermTraverse.h"
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
// Rewrite "-float" to "0.0 - float" to work around unary minus operator on float issue on Intel Mac // Rewrite "-float" to "0.0 - float" to work around unary minus operator on float issue on Intel Mac
// OSX 10.11. // OSX 10.11.
#ifndef COMPILER_TRANSLATOR_REWRITEUNARYMINUSOPERATORFLOAT_H_ #ifndef COMPILER_TRANSLATOR_TREEOPS_REWRITEUNARYMINUSOPERATORFLOAT_H_
#define COMPILER_TRANSLATOR_REWRITEUNARYMINUSOPERATORFLOAT_H_ #define COMPILER_TRANSLATOR_TREEOPS_REWRITEUNARYMINUSOPERATORFLOAT_H_
class TIntermNode; class TIntermNode;
namespace sh namespace sh
...@@ -16,4 +16,4 @@ void RewriteUnaryMinusOperatorFloat(TIntermNode *root); ...@@ -16,4 +16,4 @@ void RewriteUnaryMinusOperatorFloat(TIntermNode *root);
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_REWRITEUNARYMINUSOPERATORFLOAT_H_ #endif // COMPILER_TRANSLATOR_TREEOPS_REWRITEUNARYMINUSOPERATORFLOAT_H_
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
// Implementation of evaluating unary integer variable bug workaround. // Implementation of evaluating unary integer variable bug workaround.
// See header for more info. // See header for more info.
#include "compiler/translator/RewriteUnaryMinusOperatorInt.h" #include "compiler/translator/tree_ops/RewriteUnaryMinusOperatorInt.h"
#include "compiler/translator/tree_util/IntermTraverse.h" #include "compiler/translator/tree_util/IntermTraverse.h"
......
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
// integer variable on Intel D3D driver. It works by rewriting -(int) to // integer variable on Intel D3D driver. It works by rewriting -(int) to
// ~(int) + 1 when evaluating unary integer variables. // ~(int) + 1 when evaluating unary integer variables.
#ifndef COMPILER_TRANSLATOR_REWRITEUNARYMINUSOPERATORINT_H_ #ifndef COMPILER_TRANSLATOR_TREEOPS_REWRITEUNARYMINUSOPERATORINT_H_
#define COMPILER_TRANSLATOR_REWRITEUNARYMINUSOPERATORINT_H_ #define COMPILER_TRANSLATOR_TREEOPS_REWRITEUNARYMINUSOPERATORINT_H_
class TIntermNode; class TIntermNode;
namespace sh namespace sh
...@@ -17,4 +17,4 @@ void RewriteUnaryMinusOperatorInt(TIntermNode *root); ...@@ -17,4 +17,4 @@ void RewriteUnaryMinusOperatorInt(TIntermNode *root);
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_REWRITEUNARYMINUSOPERATORINT_H_ #endif // COMPILER_TRANSLATOR_TREEOPS_REWRITEUNARYMINUSOPERATORINT_H_
\ No newline at end of file \ No newline at end of file
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
// driver bugs around vector and matrix constructors. // driver bugs around vector and matrix constructors.
// //
#include "compiler/translator/tree_ops/ScalarizeVecAndMatConstructorArgs.h"
#include "common/debug.h" #include "common/debug.h"
#include "compiler/translator/ScalarizeVecAndMatConstructorArgs.h"
#include <algorithm> #include <algorithm>
...@@ -206,7 +206,7 @@ TVariable *ScalarizeArgsTraverser::createTempVariable(TIntermTyped *original) ...@@ -206,7 +206,7 @@ TVariable *ScalarizeArgsTraverser::createTempVariable(TIntermTyped *original)
TVariable *variable = CreateTempVariable(mSymbolTable, type); TVariable *variable = CreateTempVariable(mSymbolTable, type);
ASSERT(mBlockStack.size() > 0); ASSERT(mBlockStack.size() > 0);
TIntermSequence &sequence = mBlockStack.back(); TIntermSequence &sequence = mBlockStack.back();
TIntermDeclaration *declaration = CreateTempInitDeclarationNode(variable, original); TIntermDeclaration *declaration = CreateTempInitDeclarationNode(variable, original);
sequence.push_back(declaration); sequence.push_back(declaration);
......
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
// driver bugs around vector and matrix constructors. // driver bugs around vector and matrix constructors.
// //
#ifndef COMPILER_TRANSLATOR_SCALARIZEVECANDMATCONSTRUCTORARGS_H_ #ifndef COMPILER_TRANSLATOR_TREEOPS_SCALARIZEVECANDMATCONSTRUCTORARGS_H_
#define COMPILER_TRANSLATOR_SCALARIZEVECANDMATCONSTRUCTORARGS_H_ #define COMPILER_TRANSLATOR_TREEOPS_SCALARIZEVECANDMATCONSTRUCTORARGS_H_
#include "GLSLANG/ShaderLang.h" #include "GLSLANG/ShaderLang.h"
...@@ -24,4 +24,4 @@ void ScalarizeVecAndMatConstructorArgs(TIntermBlock *root, ...@@ -24,4 +24,4 @@ void ScalarizeVecAndMatConstructorArgs(TIntermBlock *root,
TSymbolTable *symbolTable); TSymbolTable *symbolTable);
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_SCALARIZEVECANDMATCONSTRUCTORARGS_H_ #endif // COMPILER_TRANSLATOR_TREEOPS_SCALARIZEVECANDMATCONSTRUCTORARGS_H_
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
// Will be changed to: // Will be changed to:
// i++; // i++;
#include "compiler/translator/SeparateArrayConstructorStatements.h" #include "compiler/translator/tree_ops/SeparateArrayConstructorStatements.h"
#include "compiler/translator/tree_util/IntermTraverse.h" #include "compiler/translator/tree_util/IntermTraverse.h"
......
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
// Will be changed to: // Will be changed to:
// i++; // i++;
#ifndef COMPILER_TRANSLATOR_SEPARATEARRAYCONSTRUCTORSTATEMENTS_H_ #ifndef COMPILER_TRANSLATOR_TREEOPS_SEPARATEARRAYCONSTRUCTORSTATEMENTS_H_
#define COMPILER_TRANSLATOR_SEPARATEARRAYCONSTRUCTORSTATEMENTS_H_ #define COMPILER_TRANSLATOR_TREEOPS_SEPARATEARRAYCONSTRUCTORSTATEMENTS_H_
namespace sh namespace sh
{ {
...@@ -19,4 +19,4 @@ class TIntermBlock; ...@@ -19,4 +19,4 @@ class TIntermBlock;
void SeparateArrayConstructorStatements(TIntermBlock *root); void SeparateArrayConstructorStatements(TIntermBlock *root);
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_SEPARATEARRAYCONSTRUCTORSTATEMENTS_H_ #endif // COMPILER_TRANSLATOR_TREEOPS_SEPARATEARRAYCONSTRUCTORSTATEMENTS_H_
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
// stages don't care about const qualifiers. However, the initialization will not be split if the // stages don't care about const qualifiers. However, the initialization will not be split if the
// initializer can be written as a HLSL literal. // initializer can be written as a HLSL literal.
#include "compiler/translator/SeparateArrayInitialization.h" #include "compiler/translator/tree_ops/SeparateArrayInitialization.h"
#include "compiler/translator/IntermNode.h" #include "compiler/translator/IntermNode.h"
#include "compiler/translator/OutputHLSL.h" #include "compiler/translator/OutputHLSL.h"
......
...@@ -16,8 +16,8 @@ ...@@ -16,8 +16,8 @@
// stages don't care about const qualifiers. However, the initialization will not be split if the // stages don't care about const qualifiers. However, the initialization will not be split if the
// initializer can be written as a HLSL literal. // initializer can be written as a HLSL literal.
#ifndef COMPILER_TRANSLATOR_SEPARATEARRAYINITIALIZATION_H_ #ifndef COMPILER_TRANSLATOR_TREEOPS_SEPARATEARRAYINITIALIZATION_H_
#define COMPILER_TRANSLATOR_SEPARATEARRAYINITIALIZATION_H_ #define COMPILER_TRANSLATOR_TREEOPS_SEPARATEARRAYINITIALIZATION_H_
namespace sh namespace sh
{ {
...@@ -26,4 +26,4 @@ class TIntermNode; ...@@ -26,4 +26,4 @@ class TIntermNode;
void SeparateArrayInitialization(TIntermNode *root); void SeparateArrayInitialization(TIntermNode *root);
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_SEPARATEARRAYINITIALIZATION_H_ #endif // COMPILER_TRANSLATOR_TREEOPS_SEPARATEARRAYINITIALIZATION_H_
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
// int a[1] = int[1](1); // int a[1] = int[1](1);
// int b[1] = int[1](2); // int b[1] = int[1](2);
#include "compiler/translator/SeparateDeclarations.h" #include "compiler/translator/tree_ops/SeparateDeclarations.h"
#include "compiler/translator/tree_util/IntermTraverse.h" #include "compiler/translator/tree_util/IntermTraverse.h"
......
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
// int a[1] = int[1](1); // int a[1] = int[1](1);
// int b[1] = int[1](2); // int b[1] = int[1](2);
#ifndef COMPILER_TRANSLATOR_SEPARATEDECLARATIONS_H_ #ifndef COMPILER_TRANSLATOR_TREEOPS_SEPARATEDECLARATIONS_H_
#define COMPILER_TRANSLATOR_SEPARATEDECLARATIONS_H_ #define COMPILER_TRANSLATOR_TREEOPS_SEPARATEDECLARATIONS_H_
namespace sh namespace sh
{ {
...@@ -23,4 +23,4 @@ class TIntermNode; ...@@ -23,4 +23,4 @@ class TIntermNode;
void SeparateDeclarations(TIntermNode *root); void SeparateDeclarations(TIntermNode *root);
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_SEPARATEDECLARATIONS_H_ #endif // COMPILER_TRANSLATOR_TREEOPS_SEPARATEDECLARATIONS_H_
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
// (a = b) == (a = c) is split into a = b; type[n] a1 = a; a = c; type[n] a2 = a; a1 == a2; // (a = b) == (a = c) is split into a = b; type[n] a1 = a; a = c; type[n] a2 = a; a1 == a2;
// type d = type[n](...)[i]; is split into type[n] a1 = type[n](...); type d = a1[i]; // type d = type[n](...)[i]; is split into type[n] a1 = type[n](...); type d = a1[i];
#include "compiler/translator/SeparateExpressionsReturningArrays.h" #include "compiler/translator/tree_ops/SeparateExpressionsReturningArrays.h"
#include "compiler/translator/tree_util/IntermNodePatternMatcher.h" #include "compiler/translator/tree_util/IntermNodePatternMatcher.h"
#include "compiler/translator/tree_util/IntermNode_util.h" #include "compiler/translator/tree_util/IntermNode_util.h"
......
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
// (a = b) == (a = c) is split into a = b; type[n] a1 = a; a = c; type[n] a2 = a; a1 == a2; // (a = b) == (a = c) is split into a = b; type[n] a1 = a; a = c; type[n] a2 = a; a1 == a2;
// type d = type[n](...)[i]; is split into type[n] a1 = type[n](...); type d = a1[i]; // type d = type[n](...)[i]; is split into type[n] a1 = type[n](...); type d = a1[i];
#ifndef COMPILER_TRANSLATOR_SEPARATEEXPRESSIONSRETURNINGARRAYS_H_ #ifndef COMPILER_TRANSLATOR_TREEOPS_SEPARATEEXPRESSIONSRETURNINGARRAYS_H_
#define COMPILER_TRANSLATOR_SEPARATEEXPRESSIONSRETURNINGARRAYS_H_ #define COMPILER_TRANSLATOR_TREEOPS_SEPARATEEXPRESSIONSRETURNINGARRAYS_H_
namespace sh namespace sh
{ {
...@@ -20,4 +20,4 @@ class TSymbolTable; ...@@ -20,4 +20,4 @@ class TSymbolTable;
void SeparateExpressionsReturningArrays(TIntermNode *root, TSymbolTable *symbolTable); void SeparateExpressionsReturningArrays(TIntermNode *root, TSymbolTable *symbolTable);
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_SEPARATEEXPRESSIONSRETURNINGARRAYS_H_ #endif // COMPILER_TRANSLATOR_TREEOPS_SEPARATEEXPRESSIONSRETURNINGARRAYS_H_
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
// from loop conditions and loop expressions work correctly. // from loop conditions and loop expressions work correctly.
// //
#include "compiler/translator/SimplifyLoopConditions.h" #include "compiler/translator/tree_ops/SimplifyLoopConditions.h"
#include "compiler/translator/StaticType.h" #include "compiler/translator/StaticType.h"
#include "compiler/translator/tree_util/IntermNodePatternMatcher.h" #include "compiler/translator/tree_util/IntermNodePatternMatcher.h"
......
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
// from loop conditions and loop expressions work correctly. // from loop conditions and loop expressions work correctly.
// //
#ifndef COMPILER_TRANSLATOR_SIMPLIFYLOOPCONDITIONS_H_ #ifndef COMPILER_TRANSLATOR_TREEOPS_SIMPLIFYLOOPCONDITIONS_H_
#define COMPILER_TRANSLATOR_SIMPLIFYLOOPCONDITIONS_H_ #define COMPILER_TRANSLATOR_TREEOPS_SIMPLIFYLOOPCONDITIONS_H_
namespace sh namespace sh
{ {
...@@ -21,4 +21,4 @@ void SimplifyLoopConditions(TIntermNode *root, ...@@ -21,4 +21,4 @@ void SimplifyLoopConditions(TIntermNode *root,
TSymbolTable *symbolTable); TSymbolTable *symbolTable);
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_SIMPLIFYLOOPCONDITIONS_H_ #endif // COMPILER_TRANSLATOR_TREEOPS_SIMPLIFYLOOPCONDITIONS_H_
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
// evaluated before the latter parts of the sequence operator expression are evaluated. // evaluated before the latter parts of the sequence operator expression are evaluated.
// //
#include "compiler/translator/SplitSequenceOperator.h" #include "compiler/translator/tree_ops/SplitSequenceOperator.h"
#include "compiler/translator/tree_util/IntermNodePatternMatcher.h" #include "compiler/translator/tree_util/IntermNodePatternMatcher.h"
#include "compiler/translator/tree_util/IntermTraverse.h" #include "compiler/translator/tree_util/IntermTraverse.h"
......
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
// evaluated before the latter parts of the sequence operator expression are evaluated. // evaluated before the latter parts of the sequence operator expression are evaluated.
// //
#ifndef COMPILER_TRANSLATOR_SPLITSEQUENCEOPERATOR_H_ #ifndef COMPILER_TRANSLATOR_TREEOPS_SPLITSEQUENCEOPERATOR_H_
#define COMPILER_TRANSLATOR_SPLITSEQUENCEOPERATOR_H_ #define COMPILER_TRANSLATOR_TREEOPS_SPLITSEQUENCEOPERATOR_H_
namespace sh namespace sh
{ {
...@@ -22,4 +22,4 @@ void SplitSequenceOperator(TIntermNode *root, int patternsToSplitMask, TSymbolTa ...@@ -22,4 +22,4 @@ void SplitSequenceOperator(TIntermNode *root, int patternsToSplitMask, TSymbolTa
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_SPLITSEQUENCEOPERATOR_H_ #endif // COMPILER_TRANSLATOR_TREEOPS_SPLITSEQUENCEOPERATOR_H_
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
// found in the LICENSE file. // found in the LICENSE file.
// //
#include "compiler/translator/UnfoldShortCircuitAST.h" #include "compiler/translator/tree_ops/UnfoldShortCircuitAST.h"
#include "compiler/translator/IntermNode.h" #include "compiler/translator/IntermNode.h"
#include "compiler/translator/tree_util/IntermNode_util.h" #include "compiler/translator/tree_util/IntermNode_util.h"
......
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
// operations with ternary operations. // operations with ternary operations.
// //
#ifndef COMPILER_TRANSLATOR_UNFOLDSHORTCIRCUITAST_H_ #ifndef COMPILER_TRANSLATOR_TREEOPS_UNFOLDSHORTCIRCUITAST_H_
#define COMPILER_TRANSLATOR_UNFOLDSHORTCIRCUITAST_H_ #define COMPILER_TRANSLATOR_TREEOPS_UNFOLDSHORTCIRCUITAST_H_
namespace sh namespace sh
{ {
...@@ -19,4 +19,4 @@ void UnfoldShortCircuitAST(TIntermBlock *root); ...@@ -19,4 +19,4 @@ void UnfoldShortCircuitAST(TIntermBlock *root);
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_UNFOLDSHORTCIRCUITAST_H_ #endif // COMPILER_TRANSLATOR_TREEOPS_UNFOLDSHORTCIRCUITAST_H_
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
// the original expression. // the original expression.
// //
#include "compiler/translator/UnfoldShortCircuitToIf.h" #include "compiler/translator/tree_ops/UnfoldShortCircuitToIf.h"
#include "compiler/translator/StaticType.h" #include "compiler/translator/StaticType.h"
#include "compiler/translator/tree_util/IntermNodePatternMatcher.h" #include "compiler/translator/tree_util/IntermNodePatternMatcher.h"
...@@ -149,12 +149,12 @@ bool UnfoldShortCircuitTraverser::visitTernary(Visit visit, TIntermTernary *node ...@@ -149,12 +149,12 @@ bool UnfoldShortCircuitTraverser::visitTernary(Visit visit, TIntermTernary *node
EvqTemporary, &tempDeclaration); EvqTemporary, &tempDeclaration);
insertions.push_back(tempDeclaration); insertions.push_back(tempDeclaration);
TIntermBlock *trueBlock = new TIntermBlock(); TIntermBlock *trueBlock = new TIntermBlock();
TIntermBinary *trueAssignment = TIntermBinary *trueAssignment =
CreateTempAssignmentNode(resultVariable, node->getTrueExpression()); CreateTempAssignmentNode(resultVariable, node->getTrueExpression());
trueBlock->getSequence()->push_back(trueAssignment); trueBlock->getSequence()->push_back(trueAssignment);
TIntermBlock *falseBlock = new TIntermBlock(); TIntermBlock *falseBlock = new TIntermBlock();
TIntermBinary *falseAssignment = TIntermBinary *falseAssignment =
CreateTempAssignmentNode(resultVariable, node->getFalseExpression()); CreateTempAssignmentNode(resultVariable, node->getFalseExpression());
falseBlock->getSequence()->push_back(falseAssignment); falseBlock->getSequence()->push_back(falseAssignment);
......
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
// the original expression. // the original expression.
// //
#ifndef COMPILER_TRANSLATOR_UNFOLDSHORTCIRCUIT_H_ #ifndef COMPILER_TRANSLATOR_TREEOPS_UNFOLDSHORTCIRCUIT_H_
#define COMPILER_TRANSLATOR_UNFOLDSHORTCIRCUIT_H_ #define COMPILER_TRANSLATOR_TREEOPS_UNFOLDSHORTCIRCUIT_H_
namespace sh namespace sh
{ {
...@@ -22,4 +22,4 @@ void UnfoldShortCircuitToIf(TIntermNode *root, TSymbolTable *symbolTable); ...@@ -22,4 +22,4 @@ void UnfoldShortCircuitToIf(TIntermNode *root, TSymbolTable *symbolTable);
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_UNFOLDSHORTCIRCUIT_H_ #endif // COMPILER_TRANSLATOR_TREEOPS_UNFOLDSHORTCIRCUIT_H_
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
// the beginning of main. This is to work around a Mac driver that treats unused standard/shared // the beginning of main. This is to work around a Mac driver that treats unused standard/shared
// uniform blocks as inactive. // uniform blocks as inactive.
#include "compiler/translator/UseInterfaceBlockFields.h" #include "compiler/translator/tree_ops/UseInterfaceBlockFields.h"
#include "compiler/translator/IntermNode.h" #include "compiler/translator/IntermNode.h"
#include "compiler/translator/SymbolTable.h" #include "compiler/translator/SymbolTable.h"
......
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
// the beginning of main. This is to work around a Mac driver that treats unused standard/shared // the beginning of main. This is to work around a Mac driver that treats unused standard/shared
// uniform blocks as inactive. // uniform blocks as inactive.
#ifndef COMPILER_TRANSLATOR_USEINTERFACEBLOCKFIELDS_H_ #ifndef COMPILER_TRANSLATOR_TREEOPS_USEINTERFACEBLOCKFIELDS_H_
#define COMPILER_TRANSLATOR_USEINTERFACEBLOCKFIELDS_H_ #define COMPILER_TRANSLATOR_TREEOPS_USEINTERFACEBLOCKFIELDS_H_
#include <GLSLANG/ShaderLang.h> #include <GLSLANG/ShaderLang.h>
...@@ -27,4 +27,4 @@ void UseInterfaceBlockFields(TIntermBlock *root, ...@@ -27,4 +27,4 @@ void UseInterfaceBlockFields(TIntermBlock *root,
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_USEINTERFACEBLOCKFIELDS_H_ #endif // COMPILER_TRANSLATOR_TREEOPS_USEINTERFACEBLOCKFIELDS_H_
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
// This is targeted to work around a bug in NVIDIA OpenGL drivers that was reproducible on NVIDIA // This is targeted to work around a bug in NVIDIA OpenGL drivers that was reproducible on NVIDIA
// driver version 387.92. It works around the most common occurrences of the bug. // driver version 387.92. It works around the most common occurrences of the bug.
#include "compiler/translator/VectorizeVectorScalarArithmetic.h" #include "compiler/translator/tree_ops/VectorizeVectorScalarArithmetic.h"
#include <set> #include <set>
......
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
// This is targeted to work around a bug in NVIDIA OpenGL drivers that was reproducible on NVIDIA // This is targeted to work around a bug in NVIDIA OpenGL drivers that was reproducible on NVIDIA
// driver version 387.92. It works around the most common occurrences of the bug. // driver version 387.92. It works around the most common occurrences of the bug.
#ifndef COMPILER_TRANSLATOR_VECTORIZEVECTORSCALARARITHMETIC_H_ #ifndef COMPILER_TRANSLATOR_TREEOPS_VECTORIZEVECTORSCALARARITHMETIC_H_
#define COMPILER_TRANSLATOR_VECTORIZEVECTORSCALARARITHMETIC_H_ #define COMPILER_TRANSLATOR_TREEOPS_VECTORIZEVECTORSCALARARITHMETIC_H_
namespace sh namespace sh
{ {
...@@ -22,4 +22,4 @@ void VectorizeVectorScalarArithmetic(TIntermBlock *root, TSymbolTable *symbolTab ...@@ -22,4 +22,4 @@ void VectorizeVectorScalarArithmetic(TIntermBlock *root, TSymbolTable *symbolTab
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_VECTORIZEVECTORSCALARARITHMETIC_H_ #endif // COMPILER_TRANSLATOR_TREEOPS_VECTORIZEVECTORSCALARARITHMETIC_H_
\ No newline at end of file \ No newline at end of file
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
// } // }
// } // }
#include "compiler/translator/WrapSwitchStatementsInBlocks.h" #include "compiler/translator/tree_ops/WrapSwitchStatementsInBlocks.h"
#include "compiler/translator/IntermNode.h" #include "compiler/translator/IntermNode.h"
#include "compiler/translator/tree_util/IntermTraverse.h" #include "compiler/translator/tree_util/IntermTraverse.h"
......
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
// WrapSwitchStatementsInBlocks.h: Wrap switch statements in blocks and declare all switch-scoped // WrapSwitchStatementsInBlocks.h: Wrap switch statements in blocks and declare all switch-scoped
// variables there to make the AST compatible with HLSL output. // variables there to make the AST compatible with HLSL output.
#ifndef COMPILER_TRANSLATOR_WRAPSWITCHSTATEMENTSINBLOCKS_H_ #ifndef COMPILER_TRANSLATOR_TREEOPS_WRAPSWITCHSTATEMENTSINBLOCKS_H_
#define COMPILER_TRANSLATOR_WRAPSWITCHSTATEMENTSINBLOCKS_H_ #define COMPILER_TRANSLATOR_TREEOPS_WRAPSWITCHSTATEMENTSINBLOCKS_H_
namespace sh namespace sh
{ {
...@@ -19,4 +19,4 @@ void WrapSwitchStatementsInBlocks(TIntermBlock *root); ...@@ -19,4 +19,4 @@ void WrapSwitchStatementsInBlocks(TIntermBlock *root);
} // namespace sh } // namespace sh
#endif // COMPILER_TRANSLATOR_WRAPSWITCHSTATEMENTSINBLOCKS_H_ #endif // COMPILER_TRANSLATOR_TREEOPS_WRAPSWITCHSTATEMENTSINBLOCKS_H_
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment