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/975550
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
diff --git a/src/compiler/translator/Compiler.cpp b/src/compiler/translator/Compiler.cpp
index f6b170c..5b89afd 100644
--- a/src/compiler/translator/Compiler.cpp
+++ b/src/compiler/translator/Compiler.cpp
@@ -10,41 +10,41 @@
#include "angle_gl.h"
#include "common/utilities.h"
-#include "compiler/translator/AddAndTrueToLoopCondition.h"
#include "compiler/translator/CallDAG.h"
-#include "compiler/translator/ClampFragDepth.h"
-#include "compiler/translator/ClampPointSize.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/InitializeVariables.h"
#include "compiler/translator/IsASTDepthBelowLimit.h"
#include "compiler/translator/OutputTree.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/ValidateMaxParameters.h"
#include "compiler/translator/ValidateOutputs.h"
#include "compiler/translator/ValidateVaryingLocations.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/util.h"
#include "third_party/compiler/ArrayBoundsClamper.h"
diff --git a/src/compiler/translator/OutputHLSL.cpp b/src/compiler/translator/OutputHLSL.cpp
index df0b3fa..31beae3 100644
--- a/src/compiler/translator/OutputHLSL.cpp
+++ b/src/compiler/translator/OutputHLSL.cpp
@@ -17,13 +17,13 @@
#include "compiler/translator/BuiltInFunctionEmulatorHLSL.h"
#include "compiler/translator/ImageFunctionHLSL.h"
#include "compiler/translator/InfoSink.h"
-#include "compiler/translator/RemoveSwitchFallThrough.h"
#include "compiler/translator/StructureHLSL.h"
#include "compiler/translator/TextureFunctionHLSL.h"
#include "compiler/translator/TranslatorHLSL.h"
#include "compiler/translator/UniformHLSL.h"
#include "compiler/translator/UtilsHLSL.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/NodeSearch.h"
#include "compiler/translator/util.h"
diff --git a/src/compiler/translator/RemoveInvariantDeclaration.h b/src/compiler/translator/RemoveInvariantDeclaration.h
deleted file mode 100644
index cf9d4aa..0000000
--- a/src/compiler/translator/RemoveInvariantDeclaration.h
+++ /dev/null
@@ -1,18 +0,0 @@
-//
-// Copyright (c) 2016 The ANGLE Project Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-//
-
-#ifndef COMPILER_TRANSLATOR_REMOVEINVARIANTDECLARATION_H_
-#define COMPILER_TRANSLATOR_REMOVEINVARIANTDECLARATION_H_
-
-class TIntermNode;
-namespace sh
-{
-
-void RemoveInvariantDeclaration(TIntermNode *root);
-
-} // namespace sh
-
-#endif // COMPILER_TRANSLATOR_REMOVEINVARIANTDECLARATION_H_
diff --git a/src/compiler/translator/TranslatorESSL.cpp b/src/compiler/translator/TranslatorESSL.cpp
index ddec866..a5ae3ec 100644
--- a/src/compiler/translator/TranslatorESSL.cpp
+++ b/src/compiler/translator/TranslatorESSL.cpp
@@ -6,11 +6,11 @@
#include "compiler/translator/TranslatorESSL.h"
-#include "compiler/translator/BuiltInFunctionEmulatorGLSL.h"
-#include "compiler/translator/EmulatePrecision.h"
-#include "compiler/translator/RecordConstantPrecision.h"
-#include "compiler/translator/OutputESSL.h"
#include "angle_gl.h"
+#include "compiler/translator/BuiltInFunctionEmulatorGLSL.h"
+#include "compiler/translator/OutputESSL.h"
+#include "compiler/translator/tree_ops/EmulatePrecision.h"
+#include "compiler/translator/tree_ops/RecordConstantPrecision.h"
namespace sh
{
diff --git a/src/compiler/translator/TranslatorGLSL.cpp b/src/compiler/translator/TranslatorGLSL.cpp
index 2f450e4..a253578 100644
--- a/src/compiler/translator/TranslatorGLSL.cpp
+++ b/src/compiler/translator/TranslatorGLSL.cpp
@@ -8,12 +8,12 @@
#include "angle_gl.h"
#include "compiler/translator/BuiltInFunctionEmulatorGLSL.h"
-#include "compiler/translator/EmulatePrecision.h"
#include "compiler/translator/ExtensionGLSL.h"
#include "compiler/translator/OutputGLSL.h"
-#include "compiler/translator/RewriteTexelFetchOffset.h"
-#include "compiler/translator/RewriteUnaryMinusOperatorFloat.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
{
diff --git a/src/compiler/translator/TranslatorHLSL.cpp b/src/compiler/translator/TranslatorHLSL.cpp
index a5b5b58..db2af8f 100644
--- a/src/compiler/translator/TranslatorHLSL.cpp
+++ b/src/compiler/translator/TranslatorHLSL.cpp
@@ -6,25 +6,25 @@
#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/PruneEmptyCases.h"
-#include "compiler/translator/RemoveDynamicIndexing.h"
-#include "compiler/translator/RewriteElseBlocks.h"
-#include "compiler/translator/RewriteTexelFetchOffset.h"
-#include "compiler/translator/RewriteUnaryMinusOperatorInt.h"
-#include "compiler/translator/SeparateArrayConstructorStatements.h"
-#include "compiler/translator/SeparateArrayInitialization.h"
-#include "compiler/translator/SeparateDeclarations.h"
-#include "compiler/translator/SeparateExpressionsReturningArrays.h"
-#include "compiler/translator/SimplifyLoopConditions.h"
-#include "compiler/translator/SplitSequenceOperator.h"
-#include "compiler/translator/UnfoldShortCircuitToIf.h"
-#include "compiler/translator/WrapSwitchStatementsInBlocks.h"
+#include "compiler/translator/tree_ops/AddDefaultReturnStatements.h"
+#include "compiler/translator/tree_ops/ArrayReturnValueToOutParameter.h"
+#include "compiler/translator/tree_ops/BreakVariableAliasingInInnerLoops.h"
+#include "compiler/translator/tree_ops/EmulatePrecision.h"
+#include "compiler/translator/tree_ops/ExpandIntegerPowExpressions.h"
+#include "compiler/translator/tree_ops/PruneEmptyCases.h"
+#include "compiler/translator/tree_ops/RemoveDynamicIndexing.h"
+#include "compiler/translator/tree_ops/RewriteElseBlocks.h"
+#include "compiler/translator/tree_ops/RewriteTexelFetchOffset.h"
+#include "compiler/translator/tree_ops/RewriteUnaryMinusOperatorInt.h"
+#include "compiler/translator/tree_ops/SeparateArrayConstructorStatements.h"
+#include "compiler/translator/tree_ops/SeparateArrayInitialization.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"
namespace sh
diff --git a/src/compiler/translator/AddAndTrueToLoopCondition.cpp b/src/compiler/translator/tree_ops/AddAndTrueToLoopCondition.cpp
similarity index 95%
rename from src/compiler/translator/AddAndTrueToLoopCondition.cpp
rename to src/compiler/translator/tree_ops/AddAndTrueToLoopCondition.cpp
index 0cf6821..25a5298 100644
--- a/src/compiler/translator/AddAndTrueToLoopCondition.cpp
+++ b/src/compiler/translator/tree_ops/AddAndTrueToLoopCondition.cpp
@@ -4,7 +4,7 @@
// 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/IntermTraverse.h"
diff --git a/src/compiler/translator/AddAndTrueToLoopCondition.h b/src/compiler/translator/tree_ops/AddAndTrueToLoopCondition.h
similarity index 65%
rename from src/compiler/translator/AddAndTrueToLoopCondition.h
rename to src/compiler/translator/tree_ops/AddAndTrueToLoopCondition.h
index 34debe0..3a9efc2 100644
--- a/src/compiler/translator/AddAndTrueToLoopCondition.h
+++ b/src/compiler/translator/tree_ops/AddAndTrueToLoopCondition.h
@@ -6,8 +6,8 @@
// Rewrite condition in for and while loops to work around driver bug on Intel Mac.
-#ifndef COMPILER_TRANSLATOR_ADDANDTRUETOLOOPCONDITION_H_
-#define COMPILER_TRANSLATOR_ADDANDTRUETOLOOPCONDITION_H_
+#ifndef COMPILER_TRANSLATOR_TREEOPS_ADDANDTRUETOLOOPCONDITION_H_
+#define COMPILER_TRANSLATOR_TREEOPS_ADDANDTRUETOLOOPCONDITION_H_
class TIntermNode;
namespace sh
@@ -17,4 +17,4 @@
} // namespace sh
-#endif // COMPILER_TRANSLATOR_ADDANDTRUETOLOOPCONDITION_H_
+#endif // COMPILER_TRANSLATOR_TREEOPS_ADDANDTRUETOLOOPCONDITION_H_
diff --git a/src/compiler/translator/AddDefaultReturnStatements.cpp b/src/compiler/translator/tree_ops/AddDefaultReturnStatements.cpp
similarity index 95%
rename from src/compiler/translator/AddDefaultReturnStatements.cpp
rename to src/compiler/translator/tree_ops/AddDefaultReturnStatements.cpp
index 839fd34..636ce37 100644
--- a/src/compiler/translator/AddDefaultReturnStatements.cpp
+++ b/src/compiler/translator/tree_ops/AddDefaultReturnStatements.cpp
@@ -7,7 +7,7 @@
// return.
//
-#include "compiler/translator/AddDefaultReturnStatements.h"
+#include "compiler/translator/tree_ops/AddDefaultReturnStatements.h"
#include "compiler/translator/IntermNode.h"
#include "compiler/translator/tree_util/IntermNode_util.h"
diff --git a/src/compiler/translator/AddDefaultReturnStatements.h b/src/compiler/translator/tree_ops/AddDefaultReturnStatements.h
similarity index 68%
rename from src/compiler/translator/AddDefaultReturnStatements.h
rename to src/compiler/translator/tree_ops/AddDefaultReturnStatements.h
index 40a70ad..6d53797 100644
--- a/src/compiler/translator/AddDefaultReturnStatements.h
+++ b/src/compiler/translator/tree_ops/AddDefaultReturnStatements.h
@@ -7,8 +7,8 @@
// return.
//
-#ifndef COMPILER_TRANSLATOR_ADDDEFAULTRETURNSTATEMENTS_H_
-#define COMPILER_TRANSLATOR_ADDDEFAULTRETURNSTATEMENTS_H_
+#ifndef COMPILER_TRANSLATOR_TREEOPS_ADDDEFAULTRETURNSTATEMENTS_H_
+#define COMPILER_TRANSLATOR_TREEOPS_ADDDEFAULTRETURNSTATEMENTS_H_
class TIntermBlock;
@@ -19,4 +19,4 @@
} // namespace sh
-#endif // COMPILER_TRANSLATOR_ADDDEFAULTRETURNSTATEMENTS_H_
+#endif // COMPILER_TRANSLATOR_TREEOPS_ADDDEFAULTRETURNSTATEMENTS_H_
diff --git a/src/compiler/translator/ArrayReturnValueToOutParameter.cpp b/src/compiler/translator/tree_ops/ArrayReturnValueToOutParameter.cpp
similarity index 98%
rename from src/compiler/translator/ArrayReturnValueToOutParameter.cpp
rename to src/compiler/translator/tree_ops/ArrayReturnValueToOutParameter.cpp
index 9617fac..8dfedc2 100644
--- a/src/compiler/translator/ArrayReturnValueToOutParameter.cpp
+++ b/src/compiler/translator/tree_ops/ArrayReturnValueToOutParameter.cpp
@@ -6,7 +6,7 @@
// The ArrayReturnValueToOutParameter function changes return values of an array type to out
// parameters in function definitions, prototypes, and call sites.
-#include "compiler/translator/ArrayReturnValueToOutParameter.h"
+#include "compiler/translator/tree_ops/ArrayReturnValueToOutParameter.h"
#include <map>
diff --git a/src/compiler/translator/ArrayReturnValueToOutParameter.h b/src/compiler/translator/tree_ops/ArrayReturnValueToOutParameter.h
similarity index 70%
rename from src/compiler/translator/ArrayReturnValueToOutParameter.h
rename to src/compiler/translator/tree_ops/ArrayReturnValueToOutParameter.h
index 469c7a3..9ceb02c 100644
--- a/src/compiler/translator/ArrayReturnValueToOutParameter.h
+++ b/src/compiler/translator/tree_ops/ArrayReturnValueToOutParameter.h
@@ -6,8 +6,8 @@
// The ArrayReturnValueToOutParameter function changes return values of an array type to out
// parameters in function definitions, prototypes and call sites.
-#ifndef COMPILER_TRANSLATOR_ARRAYRETURNVALUETOOUTPARAMETER_H_
-#define COMPILER_TRANSLATOR_ARRAYRETURNVALUETOOUTPARAMETER_H_
+#ifndef COMPILER_TRANSLATOR_TREEOPS_ARRAYRETURNVALUETOOUTPARAMETER_H_
+#define COMPILER_TRANSLATOR_TREEOPS_ARRAYRETURNVALUETOOUTPARAMETER_H_
namespace sh
{
@@ -19,4 +19,4 @@
} // namespace sh
-#endif // COMPILER_TRANSLATOR_ARRAYRETURNVALUETOOUTPARAMETER_H_
+#endif // COMPILER_TRANSLATOR_TREEOPS_ARRAYRETURNVALUETOOUTPARAMETER_H_
diff --git a/src/compiler/translator/BreakVariableAliasingInInnerLoops.cpp b/src/compiler/translator/tree_ops/BreakVariableAliasingInInnerLoops.cpp
similarity index 100%
rename from src/compiler/translator/BreakVariableAliasingInInnerLoops.cpp
rename to src/compiler/translator/tree_ops/BreakVariableAliasingInInnerLoops.cpp
diff --git a/src/compiler/translator/BreakVariableAliasingInInnerLoops.h b/src/compiler/translator/tree_ops/BreakVariableAliasingInInnerLoops.h
similarity index 72%
rename from src/compiler/translator/BreakVariableAliasingInInnerLoops.h
rename to src/compiler/translator/tree_ops/BreakVariableAliasingInInnerLoops.h
index b1d906f..cdbdb7a 100644
--- a/src/compiler/translator/BreakVariableAliasingInInnerLoops.h
+++ b/src/compiler/translator/tree_ops/BreakVariableAliasingInInnerLoops.h
@@ -8,8 +8,8 @@
// 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.
-#ifndef COMPILER_TRANSLATOR_BREAKVARIABLEALIASINGININNERLOOPS_H_
-#define COMPILER_TRANSLATOR_BREAKVARIABLEALIASINGININNERLOOPS_H_
+#ifndef COMPILER_TRANSLATOR_TREEOPS_BREAKVARIABLEALIASINGININNERLOOPS_H_
+#define COMPILER_TRANSLATOR_TREEOPS_BREAKVARIABLEALIASINGININNERLOOPS_H_
class TIntermNode;
@@ -20,4 +20,4 @@
} // namespace sh
-#endif // COMPILER_TRANSLATOR_BREAKVARIABLEALIASINGININNERLOOPS_H_
+#endif // COMPILER_TRANSLATOR_TREEOPS_BREAKVARIABLEALIASINGININNERLOOPS_H_
diff --git a/src/compiler/translator/ClampFragDepth.cpp b/src/compiler/translator/tree_ops/ClampFragDepth.cpp
similarity index 96%
rename from src/compiler/translator/ClampFragDepth.cpp
rename to src/compiler/translator/tree_ops/ClampFragDepth.cpp
index e76f7fd..d721160 100644
--- a/src/compiler/translator/ClampFragDepth.cpp
+++ b/src/compiler/translator/tree_ops/ClampFragDepth.cpp
@@ -8,7 +8,7 @@
// statically accesses gl_FragDepth.
//
-#include "compiler/translator/ClampFragDepth.h"
+#include "compiler/translator/tree_ops/ClampFragDepth.h"
#include "compiler/translator/ImmutableString.h"
#include "compiler/translator/SymbolTable.h"
diff --git a/src/compiler/translator/ClampFragDepth.h b/src/compiler/translator/tree_ops/ClampFragDepth.h
similarity index 77%
rename from src/compiler/translator/ClampFragDepth.h
rename to src/compiler/translator/tree_ops/ClampFragDepth.h
index aa0ed1a..70d1f73 100644
--- a/src/compiler/translator/ClampFragDepth.h
+++ b/src/compiler/translator/tree_ops/ClampFragDepth.h
@@ -8,8 +8,8 @@
// statically accesses gl_FragDepth.
//
-#ifndef COMPILER_TRANSLATOR_CLAMPFRAGDEPTH_H_
-#define COMPILER_TRANSLATOR_CLAMPFRAGDEPTH_H_
+#ifndef COMPILER_TRANSLATOR_TREEOPS_CLAMPFRAGDEPTH_H_
+#define COMPILER_TRANSLATOR_TREEOPS_CLAMPFRAGDEPTH_H_
namespace sh
{
@@ -21,4 +21,4 @@
} // namespace sh
-#endif // COMPILER_TRANSLATOR_CLAMPFRAGDEPTH_H_
+#endif // COMPILER_TRANSLATOR_TREEOPS_CLAMPFRAGDEPTH_H_
diff --git a/src/compiler/translator/ClampPointSize.cpp b/src/compiler/translator/tree_ops/ClampPointSize.cpp
similarity index 96%
rename from src/compiler/translator/ClampPointSize.cpp
rename to src/compiler/translator/tree_ops/ClampPointSize.cpp
index c97fed4..3966aab 100644
--- a/src/compiler/translator/ClampPointSize.cpp
+++ b/src/compiler/translator/tree_ops/ClampPointSize.cpp
@@ -6,7 +6,7 @@
// 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/tree_util/BuiltIn_autogen.h"
diff --git a/src/compiler/translator/ClampPointSize.h b/src/compiler/translator/tree_ops/ClampPointSize.h
similarity index 71%
rename from src/compiler/translator/ClampPointSize.h
rename to src/compiler/translator/tree_ops/ClampPointSize.h
index 0c71ae6..5bc7cd4 100644
--- a/src/compiler/translator/ClampPointSize.h
+++ b/src/compiler/translator/tree_ops/ClampPointSize.h
@@ -6,8 +6,8 @@
// ClampPointSize.h: Limit the value that is written to gl_PointSize.
//
-#ifndef COMPILER_TRANSLATOR_CLAMPPOINTSIZE_H_
-#define COMPILER_TRANSLATOR_CLAMPPOINTSIZE_H_
+#ifndef COMPILER_TRANSLATOR_TREEOPS_CLAMPPOINTSIZE_H_
+#define COMPILER_TRANSLATOR_TREEOPS_CLAMPPOINTSIZE_H_
namespace sh
{
@@ -19,4 +19,4 @@
} // namespace sh
-#endif // COMPILER_TRANSLATOR_CLAMPPOINTSIZE_H_
+#endif // COMPILER_TRANSLATOR_TREEOPS_CLAMPPOINTSIZE_H_
diff --git a/src/compiler/translator/DeclareAndInitBuiltinsForInstancedMultiview.cpp b/src/compiler/translator/tree_ops/DeclareAndInitBuiltinsForInstancedMultiview.cpp
similarity index 96%
rename from src/compiler/translator/DeclareAndInitBuiltinsForInstancedMultiview.cpp
rename to src/compiler/translator/tree_ops/DeclareAndInitBuiltinsForInstancedMultiview.cpp
index 2655bc8..bb36f92 100644
--- a/src/compiler/translator/DeclareAndInitBuiltinsForInstancedMultiview.cpp
+++ b/src/compiler/translator/tree_ops/DeclareAndInitBuiltinsForInstancedMultiview.cpp
@@ -7,12 +7,12 @@
// 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/StaticType.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/FindMain.h"
#include "compiler/translator/tree_util/IntermNode_util.h"
@@ -140,7 +140,7 @@
{
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 =
new TVariable(symbolTable, kViewIDVariableName,
new TType(EbtUInt, EbpHigh, viewIDQualifier), SymbolType::AngleInternal);
@@ -151,7 +151,7 @@
{
// Replacing gl_InstanceID with InstanceID should happen before adding the initializers of
// 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 =
new TVariable(symbolTable, kInstanceIDVariableName, instanceIDVariableType,
SymbolType::AngleInternal);
diff --git a/src/compiler/translator/DeclareAndInitBuiltinsForInstancedMultiview.h b/src/compiler/translator/tree_ops/DeclareAndInitBuiltinsForInstancedMultiview.h
similarity index 87%
rename from src/compiler/translator/DeclareAndInitBuiltinsForInstancedMultiview.h
rename to src/compiler/translator/tree_ops/DeclareAndInitBuiltinsForInstancedMultiview.h
index b4ab05f..9501ea5 100644
--- a/src/compiler/translator/DeclareAndInitBuiltinsForInstancedMultiview.h
+++ b/src/compiler/translator/tree_ops/DeclareAndInitBuiltinsForInstancedMultiview.h
@@ -24,8 +24,8 @@
// uniform.
//
-#ifndef COMPILER_TRANSLATOR_DECLAREANDINITBUILTINSFORINSTANCEDMULTIVIEW_H_
-#define COMPILER_TRANSLATOR_DECLAREANDINITBUILTINSFORINSTANCEDMULTIVIEW_H_
+#ifndef COMPILER_TRANSLATOR_TREEOPS_DECLAREANDINITBUILTINSFORINSTANCEDMULTIVIEW_H_
+#define COMPILER_TRANSLATOR_TREEOPS_DECLAREANDINITBUILTINSFORINSTANCEDMULTIVIEW_H_
#include "GLSLANG/ShaderLang.h"
#include "angle_gl.h"
@@ -45,4 +45,4 @@
} // namespace sh
-#endif // COMPILER_TRANSLATOR_DECLAREANDINITBUILTINSFORINSTANCEDMULTIVIEW_H_
\ No newline at end of file
+#endif // COMPILER_TRANSLATOR_TREEOPS_DECLAREANDINITBUILTINSFORINSTANCEDMULTIVIEW_H_
\ No newline at end of file
diff --git a/src/compiler/translator/DeferGlobalInitializers.cpp b/src/compiler/translator/tree_ops/DeferGlobalInitializers.cpp
similarity index 97%
rename from src/compiler/translator/DeferGlobalInitializers.cpp
rename to src/compiler/translator/tree_ops/DeferGlobalInitializers.cpp
index ef74585..8605a93 100644
--- a/src/compiler/translator/DeferGlobalInitializers.cpp
+++ b/src/compiler/translator/tree_ops/DeferGlobalInitializers.cpp
@@ -13,15 +13,15 @@
// It can also initialize all uninitialized globals.
//
-#include "compiler/translator/DeferGlobalInitializers.h"
+#include "compiler/translator/tree_ops/DeferGlobalInitializers.h"
#include <vector>
-#include "compiler/translator/InitializeVariables.h"
#include "compiler/translator/IntermNode.h"
#include "compiler/translator/ReplaceVariable.h"
#include "compiler/translator/StaticType.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/IntermNode_util.h"
diff --git a/src/compiler/translator/DeferGlobalInitializers.h b/src/compiler/translator/tree_ops/DeferGlobalInitializers.h
similarity index 85%
rename from src/compiler/translator/DeferGlobalInitializers.h
rename to src/compiler/translator/tree_ops/DeferGlobalInitializers.h
index 0ca2c4d..b0e4547 100644
--- a/src/compiler/translator/DeferGlobalInitializers.h
+++ b/src/compiler/translator/tree_ops/DeferGlobalInitializers.h
@@ -13,8 +13,8 @@
// It can also initialize all uninitialized globals.
//
-#ifndef COMPILER_TRANSLATOR_DEFERGLOBALINITIALIZERS_H_
-#define COMPILER_TRANSLATOR_DEFERGLOBALINITIALIZERS_H_
+#ifndef COMPILER_TRANSLATOR_TREEOPS_DEFERGLOBALINITIALIZERS_H_
+#define COMPILER_TRANSLATOR_TREEOPS_DEFERGLOBALINITIALIZERS_H_
namespace sh
{
@@ -30,4 +30,4 @@
} // namespace sh
-#endif // COMPILER_TRANSLATOR_DEFERGLOBALINITIALIZERS_H_
+#endif // COMPILER_TRANSLATOR_TREEOPS_DEFERGLOBALINITIALIZERS_H_
diff --git a/src/compiler/translator/EmulateGLFragColorBroadcast.cpp b/src/compiler/translator/tree_ops/EmulateGLFragColorBroadcast.cpp
similarity index 98%
rename from src/compiler/translator/EmulateGLFragColorBroadcast.cpp
rename to src/compiler/translator/tree_ops/EmulateGLFragColorBroadcast.cpp
index 08cc11b..a0ed2b2 100644
--- a/src/compiler/translator/EmulateGLFragColorBroadcast.cpp
+++ b/src/compiler/translator/tree_ops/EmulateGLFragColorBroadcast.cpp
@@ -11,7 +11,7 @@
// with gl_FragData[0].
//
-#include "compiler/translator/EmulateGLFragColorBroadcast.h"
+#include "compiler/translator/tree_ops/EmulateGLFragColorBroadcast.h"
#include "compiler/translator/Symbol.h"
#include "compiler/translator/tree_util/IntermNode_util.h"
diff --git a/src/compiler/translator/EmulateGLFragColorBroadcast.h b/src/compiler/translator/tree_ops/EmulateGLFragColorBroadcast.h
similarity index 82%
rename from src/compiler/translator/EmulateGLFragColorBroadcast.h
rename to src/compiler/translator/tree_ops/EmulateGLFragColorBroadcast.h
index e652b7e..f44ae28 100644
--- a/src/compiler/translator/EmulateGLFragColorBroadcast.h
+++ b/src/compiler/translator/tree_ops/EmulateGLFragColorBroadcast.h
@@ -7,8 +7,8 @@
// GL_EXT_draw_buffers is explicitly enabled in a fragment shader.
//
-#ifndef COMPILER_TRANSLATOR_EMULATEGLFRAGCOLORBROADCAST_H_
-#define COMPILER_TRANSLATOR_EMULATEGLFRAGCOLORBROADCAST_H_
+#ifndef COMPILER_TRANSLATOR_TREEOPS_EMULATEGLFRAGCOLORBROADCAST_H_
+#define COMPILER_TRANSLATOR_TREEOPS_EMULATEGLFRAGCOLORBROADCAST_H_
#include <vector>
@@ -28,4 +28,4 @@
int shaderVersion);
}
-#endif // COMPILER_TRANSLATOR_EMULATEGLFRAGCOLORBROADCAST_H_
+#endif // COMPILER_TRANSLATOR_TREEOPS_EMULATEGLFRAGCOLORBROADCAST_H_
diff --git a/src/compiler/translator/EmulatePrecision.cpp b/src/compiler/translator/tree_ops/EmulatePrecision.cpp
similarity index 98%
rename from src/compiler/translator/EmulatePrecision.cpp
rename to src/compiler/translator/tree_ops/EmulatePrecision.cpp
index 9813f86..30d6456 100644
--- a/src/compiler/translator/EmulatePrecision.cpp
+++ b/src/compiler/translator/tree_ops/EmulatePrecision.cpp
@@ -4,7 +4,7 @@
// found in the LICENSE file.
//
-#include "compiler/translator/EmulatePrecision.h"
+#include "compiler/translator/tree_ops/EmulatePrecision.h"
#include "compiler/translator/FunctionLookup.h"
@@ -42,13 +42,13 @@
const ShShaderOutput mOutputLanguage;
private:
- virtual std::string getTypeString(const char *glslType) = 0;
- virtual void writeFloatRoundingHelpers(TInfoSinkBase &sink) = 0;
+ virtual std::string getTypeString(const char *glslType) = 0;
+ virtual void writeFloatRoundingHelpers(TInfoSinkBase &sink) = 0;
virtual void writeVectorRoundingHelpers(TInfoSinkBase &sink, const unsigned int size) = 0;
virtual void writeMatrixRoundingHelper(TInfoSinkBase &sink,
const unsigned int columns,
const unsigned int rows,
- const char *functionName) = 0;
+ const char *functionName) = 0;
};
class RoundingHelperWriterGLSL : public RoundingHelperWriter
@@ -754,7 +754,7 @@
else
strstr << "angle_compound_" << opNameStr << "_frl";
ImmutableString functionName = ImmutableString(strstr.str());
- TIntermSequence *arguments = new TIntermSequence();
+ TIntermSequence *arguments = new TIntermSequence();
arguments->push_back(left);
arguments->push_back(right);
diff --git a/src/compiler/translator/EmulatePrecision.h b/src/compiler/translator/tree_ops/EmulatePrecision.h
similarity index 94%
rename from src/compiler/translator/EmulatePrecision.h
rename to src/compiler/translator/tree_ops/EmulatePrecision.h
index cbfd035..10501fa 100644
--- a/src/compiler/translator/EmulatePrecision.h
+++ b/src/compiler/translator/tree_ops/EmulatePrecision.h
@@ -4,8 +4,8 @@
// found in the LICENSE file.
//
-#ifndef COMPILER_TRANSLATOR_EMULATE_PRECISION_H_
-#define COMPILER_TRANSLATOR_EMULATE_PRECISION_H_
+#ifndef COMPILER_TRANSLATOR_TREEOPS_EMULATE_PRECISION_H_
+#define COMPILER_TRANSLATOR_TREEOPS_EMULATE_PRECISION_H_
#include "GLSLANG/ShaderLang.h"
#include "common/angleutils.h"
@@ -82,4 +82,4 @@
} // namespace sh
-#endif // COMPILER_TRANSLATOR_EMULATE_PRECISION_H_
+#endif // COMPILER_TRANSLATOR_TREEOPS_EMULATE_PRECISION_H_
diff --git a/src/compiler/translator/ExpandIntegerPowExpressions.cpp b/src/compiler/translator/tree_ops/ExpandIntegerPowExpressions.cpp
similarity index 97%
rename from src/compiler/translator/ExpandIntegerPowExpressions.cpp
rename to src/compiler/translator/tree_ops/ExpandIntegerPowExpressions.cpp
index b219971..6c5c49d 100644
--- a/src/compiler/translator/ExpandIntegerPowExpressions.cpp
+++ b/src/compiler/translator/tree_ops/ExpandIntegerPowExpressions.cpp
@@ -6,7 +6,7 @@
// Implementation of the integer pow expressions HLSL bug workaround.
// See header for more info.
-#include "compiler/translator/ExpandIntegerPowExpressions.h"
+#include "compiler/translator/tree_ops/ExpandIntegerPowExpressions.h"
#include <cmath>
#include <cstdlib>
diff --git a/src/compiler/translator/ExpandIntegerPowExpressions.h b/src/compiler/translator/tree_ops/ExpandIntegerPowExpressions.h
similarity index 78%
rename from src/compiler/translator/ExpandIntegerPowExpressions.h
rename to src/compiler/translator/tree_ops/ExpandIntegerPowExpressions.h
index 0074e5d..7ee5ada 100644
--- a/src/compiler/translator/ExpandIntegerPowExpressions.h
+++ b/src/compiler/translator/tree_ops/ExpandIntegerPowExpressions.h
@@ -13,8 +13,8 @@
// The workaround is to replace the pow with a series of multiplies.
// See http://anglebug.com/851
-#ifndef COMPILER_TRANSLATOR_EXPANDINTEGERPOWEXPRESSIONS_H_
-#define COMPILER_TRANSLATOR_EXPANDINTEGERPOWEXPRESSIONS_H_
+#ifndef COMPILER_TRANSLATOR_TREEOPS_EXPANDINTEGERPOWEXPRESSIONS_H_
+#define COMPILER_TRANSLATOR_TREEOPS_EXPANDINTEGERPOWEXPRESSIONS_H_
namespace sh
{
@@ -26,4 +26,4 @@
} // namespace sh
-#endif // COMPILER_TRANSLATOR_EXPANDINTEGERPOWEXPRESSIONS_H_
+#endif // COMPILER_TRANSLATOR_TREEOPS_EXPANDINTEGERPOWEXPRESSIONS_H_
diff --git a/src/compiler/translator/FoldExpressions.cpp b/src/compiler/translator/tree_ops/FoldExpressions.cpp
similarity index 97%
rename from src/compiler/translator/FoldExpressions.cpp
rename to src/compiler/translator/tree_ops/FoldExpressions.cpp
index 231f6d1..e17bc9e 100644
--- a/src/compiler/translator/FoldExpressions.cpp
+++ b/src/compiler/translator/tree_ops/FoldExpressions.cpp
@@ -10,7 +10,7 @@
// 2. Sequence aka comma ops where the left side has no side effects.
// 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/IntermNode.h"
diff --git a/src/compiler/translator/FoldExpressions.h b/src/compiler/translator/tree_ops/FoldExpressions.h
similarity index 79%
rename from src/compiler/translator/FoldExpressions.h
rename to src/compiler/translator/tree_ops/FoldExpressions.h
index 357547a..42d026a 100644
--- a/src/compiler/translator/FoldExpressions.h
+++ b/src/compiler/translator/tree_ops/FoldExpressions.h
@@ -8,8 +8,8 @@
// parsing and validation of qualifiers is complete. Expressions that are folded: 1. Ternary ops
// with a constant condition.
-#ifndef COMPILER_TRANSLATOR_FOLDEXPRESSIONS_H_
-#define COMPILER_TRANSLATOR_FOLDEXPRESSIONS_H_
+#ifndef COMPILER_TRANSLATOR_TREEOPS_FOLDEXPRESSIONS_H_
+#define COMPILER_TRANSLATOR_TREEOPS_FOLDEXPRESSIONS_H_
namespace sh
{
@@ -21,4 +21,4 @@
} // namespace sh
-#endif // COMPILER_TRANSLATOR_FOLDEXPRESSIONS_H_
+#endif // COMPILER_TRANSLATOR_TREEOPS_FOLDEXPRESSIONS_H_
diff --git a/src/compiler/translator/InitializeVariables.cpp b/src/compiler/translator/tree_ops/InitializeVariables.cpp
similarity index 99%
rename from src/compiler/translator/InitializeVariables.cpp
rename to src/compiler/translator/tree_ops/InitializeVariables.cpp
index 6914f02..835fd88 100644
--- a/src/compiler/translator/InitializeVariables.cpp
+++ b/src/compiler/translator/tree_ops/InitializeVariables.cpp
@@ -4,7 +4,7 @@
// found in the LICENSE file.
//
-#include "compiler/translator/InitializeVariables.h"
+#include "compiler/translator/tree_ops/InitializeVariables.h"
#include "angle_gl.h"
#include "common/debug.h"
diff --git a/src/compiler/translator/InitializeVariables.h b/src/compiler/translator/tree_ops/InitializeVariables.h
similarity index 92%
rename from src/compiler/translator/InitializeVariables.h
rename to src/compiler/translator/tree_ops/InitializeVariables.h
index f9a83f1..06695f9 100644
--- a/src/compiler/translator/InitializeVariables.h
+++ b/src/compiler/translator/tree_ops/InitializeVariables.h
@@ -4,8 +4,8 @@
// found in the LICENSE file.
//
-#ifndef COMPILER_TRANSLATOR_INITIALIZEVARIABLES_H_
-#define COMPILER_TRANSLATOR_INITIALIZEVARIABLES_H_
+#ifndef COMPILER_TRANSLATOR_TREEOPS_INITIALIZEVARIABLES_H_
+#define COMPILER_TRANSLATOR_TREEOPS_INITIALIZEVARIABLES_H_
#include <GLSLANG/ShaderLang.h>
@@ -53,4 +53,4 @@
} // namespace sh
-#endif // COMPILER_TRANSLATOR_INITIALIZEVARIABLES_H_
+#endif // COMPILER_TRANSLATOR_TREEOPS_INITIALIZEVARIABLES_H_
diff --git a/src/compiler/translator/PruneEmptyCases.cpp b/src/compiler/translator/tree_ops/PruneEmptyCases.cpp
similarity index 98%
rename from src/compiler/translator/PruneEmptyCases.cpp
rename to src/compiler/translator/tree_ops/PruneEmptyCases.cpp
index a5fb007..8249dd8 100644
--- a/src/compiler/translator/PruneEmptyCases.cpp
+++ b/src/compiler/translator/tree_ops/PruneEmptyCases.cpp
@@ -6,7 +6,7 @@
// PruneEmptyCases.cpp: The PruneEmptyCases function prunes cases that are followed by nothing from
// the AST.
-#include "compiler/translator/PruneEmptyCases.h"
+#include "compiler/translator/tree_ops/PruneEmptyCases.h"
#include "compiler/translator/Symbol.h"
#include "compiler/translator/tree_util/IntermTraverse.h"
diff --git a/src/compiler/translator/PruneEmptyCases.h b/src/compiler/translator/tree_ops/PruneEmptyCases.h
similarity index 69%
rename from src/compiler/translator/PruneEmptyCases.h
rename to src/compiler/translator/tree_ops/PruneEmptyCases.h
index 3c4b208..0b88ac1 100644
--- a/src/compiler/translator/PruneEmptyCases.h
+++ b/src/compiler/translator/tree_ops/PruneEmptyCases.h
@@ -6,8 +6,8 @@
// PruneEmptyCases.h: The PruneEmptyCases function prunes cases that are followed by nothing from
// the AST.
-#ifndef COMPILER_TRANSLATOR_PRUNEEMPTYCASES_H_
-#define COMPILER_TRANSLATOR_PRUNEEMPTYCASES_H_
+#ifndef COMPILER_TRANSLATOR_TREEOPS_PRUNEEMPTYCASES_H_
+#define COMPILER_TRANSLATOR_TREEOPS_PRUNEEMPTYCASES_H_
namespace sh
{
@@ -16,4 +16,4 @@
void PruneEmptyCases(TIntermBlock *root);
} // namespace sh
-#endif // COMPILER_TRANSLATOR_PRUNEEMPTYCASES_H_
+#endif // COMPILER_TRANSLATOR_TREEOPS_PRUNEEMPTYCASES_H_
diff --git a/src/compiler/translator/PruneNoOps.cpp b/src/compiler/translator/tree_ops/PruneNoOps.cpp
similarity index 98%
rename from src/compiler/translator/PruneNoOps.cpp
rename to src/compiler/translator/tree_ops/PruneNoOps.cpp
index 8b2613a..9e80c38 100644
--- a/src/compiler/translator/PruneNoOps.cpp
+++ b/src/compiler/translator/tree_ops/PruneNoOps.cpp
@@ -11,7 +11,7 @@
// 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.
-#include "compiler/translator/PruneNoOps.h"
+#include "compiler/translator/tree_ops/PruneNoOps.h"
#include "compiler/translator/Symbol.h"
#include "compiler/translator/tree_util/IntermTraverse.h"
diff --git a/src/compiler/translator/PruneNoOps.h b/src/compiler/translator/tree_ops/PruneNoOps.h
similarity index 81%
rename from src/compiler/translator/PruneNoOps.h
rename to src/compiler/translator/tree_ops/PruneNoOps.h
index 5f1b3d1..571340a 100644
--- a/src/compiler/translator/PruneNoOps.h
+++ b/src/compiler/translator/tree_ops/PruneNoOps.h
@@ -11,8 +11,8 @@
// 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.
-#ifndef COMPILER_TRANSLATOR_PRUNENOOPS_H_
-#define COMPILER_TRANSLATOR_PRUNENOOPS_H_
+#ifndef COMPILER_TRANSLATOR_TREEOPS_PRUNENOOPS_H_
+#define COMPILER_TRANSLATOR_TREEOPS_PRUNENOOPS_H_
namespace sh
{
@@ -22,4 +22,4 @@
void PruneNoOps(TIntermBlock *root, TSymbolTable *symbolTable);
}
-#endif // COMPILER_TRANSLATOR_PRUNENOOPS_H_
+#endif // COMPILER_TRANSLATOR_TREEOPS_PRUNENOOPS_H_
diff --git a/src/compiler/translator/RecordConstantPrecision.cpp b/src/compiler/translator/tree_ops/RecordConstantPrecision.cpp
similarity index 98%
rename from src/compiler/translator/RecordConstantPrecision.cpp
rename to src/compiler/translator/tree_ops/RecordConstantPrecision.cpp
index 71afbda..0dd57c3 100644
--- a/src/compiler/translator/RecordConstantPrecision.cpp
+++ b/src/compiler/translator/tree_ops/RecordConstantPrecision.cpp
@@ -14,7 +14,7 @@
// 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/tree_util/IntermNode_util.h"
@@ -36,6 +36,7 @@
void nextIteration();
bool foundHigherPrecisionConstant() const { return mFoundHigherPrecisionConstant; }
+
protected:
bool operandAffectsParentOperationPrecision(TIntermTyped *operand);
diff --git a/src/compiler/translator/RecordConstantPrecision.h b/src/compiler/translator/tree_ops/RecordConstantPrecision.h
similarity index 83%
rename from src/compiler/translator/RecordConstantPrecision.h
rename to src/compiler/translator/tree_ops/RecordConstantPrecision.h
index f86c2a8..5b15db5 100644
--- a/src/compiler/translator/RecordConstantPrecision.h
+++ b/src/compiler/translator/tree_ops/RecordConstantPrecision.h
@@ -14,8 +14,8 @@
// in case that is required for correct precision propagation.
//
-#ifndef COMPILER_TRANSLATOR_RECORDCONSTANTPRECISION_H_
-#define COMPILER_TRANSLATOR_RECORDCONSTANTPRECISION_H_
+#ifndef COMPILER_TRANSLATOR_TREEOPS_RECORDCONSTANTPRECISION_H_
+#define COMPILER_TRANSLATOR_TREEOPS_RECORDCONSTANTPRECISION_H_
namespace sh
{
@@ -25,4 +25,4 @@
void RecordConstantPrecision(TIntermNode *root, TSymbolTable *symbolTable);
} // namespace sh
-#endif // COMPILER_TRANSLATOR_RECORDCONSTANTPRECISION_H_
+#endif // COMPILER_TRANSLATOR_TREEOPS_RECORDCONSTANTPRECISION_H_
diff --git a/src/compiler/translator/RegenerateStructNames.cpp b/src/compiler/translator/tree_ops/RegenerateStructNames.cpp
similarity index 97%
rename from src/compiler/translator/RegenerateStructNames.cpp
rename to src/compiler/translator/tree_ops/RegenerateStructNames.cpp
index 536f521..dd70024 100644
--- a/src/compiler/translator/RegenerateStructNames.cpp
+++ b/src/compiler/translator/tree_ops/RegenerateStructNames.cpp
@@ -4,7 +4,7 @@
// found in the LICENSE file.
//
-#include "compiler/translator/RegenerateStructNames.h"
+#include "compiler/translator/tree_ops/RegenerateStructNames.h"
#include "common/debug.h"
#include "compiler/translator/ImmutableStringBuilder.h"
diff --git a/src/compiler/translator/RegenerateStructNames.h b/src/compiler/translator/tree_ops/RegenerateStructNames.h
similarity index 82%
rename from src/compiler/translator/RegenerateStructNames.h
rename to src/compiler/translator/tree_ops/RegenerateStructNames.h
index 2be465b..13b323a 100644
--- a/src/compiler/translator/RegenerateStructNames.h
+++ b/src/compiler/translator/tree_ops/RegenerateStructNames.h
@@ -4,8 +4,8 @@
// found in the LICENSE file.
//
-#ifndef COMPILER_TRANSLATOR_REGENERATESTRUCTNAMES_H_
-#define COMPILER_TRANSLATOR_REGENERATESTRUCTNAMES_H_
+#ifndef COMPILER_TRANSLATOR_TREEOPS_REGENERATESTRUCTNAMES_H_
+#define COMPILER_TRANSLATOR_TREEOPS_REGENERATESTRUCTNAMES_H_
#include "compiler/translator/SymbolTable.h"
#include "compiler/translator/tree_util/IntermTraverse.h"
@@ -38,4 +38,4 @@
} // namespace sh
-#endif // COMPILER_TRANSLATOR_REGENERATESTRUCTNAMES_H_
+#endif // COMPILER_TRANSLATOR_TREEOPS_REGENERATESTRUCTNAMES_H_
diff --git a/src/compiler/translator/RemoveArrayLengthMethod.cpp b/src/compiler/translator/tree_ops/RemoveArrayLengthMethod.cpp
similarity index 97%
rename from src/compiler/translator/RemoveArrayLengthMethod.cpp
rename to src/compiler/translator/tree_ops/RemoveArrayLengthMethod.cpp
index 02d7f35..473159f 100644
--- a/src/compiler/translator/RemoveArrayLengthMethod.cpp
+++ b/src/compiler/translator/tree_ops/RemoveArrayLengthMethod.cpp
@@ -19,7 +19,7 @@
//
// 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/tree_util/IntermTraverse.h"
diff --git a/src/compiler/translator/RemoveArrayLengthMethod.h b/src/compiler/translator/tree_ops/RemoveArrayLengthMethod.h
similarity index 81%
rename from src/compiler/translator/RemoveArrayLengthMethod.h
rename to src/compiler/translator/tree_ops/RemoveArrayLengthMethod.h
index 3b2c6df..6376828 100644
--- a/src/compiler/translator/RemoveArrayLengthMethod.h
+++ b/src/compiler/translator/tree_ops/RemoveArrayLengthMethod.h
@@ -19,6 +19,9 @@
//
// 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
{
@@ -27,3 +30,5 @@
void RemoveArrayLengthMethod(TIntermBlock *root);
} // namespace sh
+
+#endif // COMPILER_TRANSLATOR_TREEOPS_REMOVEARRAYLENGTHMETHOD_H_
diff --git a/src/compiler/translator/RemoveDynamicIndexing.cpp b/src/compiler/translator/tree_ops/RemoveDynamicIndexing.cpp
similarity index 98%
rename from src/compiler/translator/RemoveDynamicIndexing.cpp
rename to src/compiler/translator/tree_ops/RemoveDynamicIndexing.cpp
index 00fec22..61f6860 100644
--- a/src/compiler/translator/RemoveDynamicIndexing.cpp
+++ b/src/compiler/translator/tree_ops/RemoveDynamicIndexing.cpp
@@ -7,7 +7,7 @@
// 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/InfoSink.h"
@@ -160,7 +160,7 @@
{
ASSERT(!type.isArray());
- int numCases = 0;
+ int numCases = 0;
if (type.isMatrix())
{
numCases = type.getCols();
@@ -471,7 +471,7 @@
// Store the index in a temporary signed int variable.
// s0 = index_expr;
- TIntermTyped *indexInitializer = EnsureSignedInt(node->getRight());
+ TIntermTyped *indexInitializer = EnsureSignedInt(node->getRight());
TIntermDeclaration *indexVariableDeclaration = nullptr;
TVariable *indexVariable = DeclareTempVariable(
mSymbolTable, indexInitializer, EvqTemporary, &indexVariableDeclaration);
diff --git a/src/compiler/translator/RemoveDynamicIndexing.h b/src/compiler/translator/tree_ops/RemoveDynamicIndexing.h
similarity index 77%
rename from src/compiler/translator/RemoveDynamicIndexing.h
rename to src/compiler/translator/tree_ops/RemoveDynamicIndexing.h
index 3365470..93343c0 100644
--- a/src/compiler/translator/RemoveDynamicIndexing.h
+++ b/src/compiler/translator/tree_ops/RemoveDynamicIndexing.h
@@ -7,8 +7,8 @@
// replacing them with calls to functions that choose which component to return or write.
//
-#ifndef COMPILER_TRANSLATOR_REMOVEDYNAMICINDEXING_H_
-#define COMPILER_TRANSLATOR_REMOVEDYNAMICINDEXING_H_
+#ifndef COMPILER_TRANSLATOR_TREEOPS_REMOVEDYNAMICINDEXING_H_
+#define COMPILER_TRANSLATOR_TREEOPS_REMOVEDYNAMICINDEXING_H_
namespace sh
{
@@ -23,4 +23,4 @@
} // namespace sh
-#endif // COMPILER_TRANSLATOR_REMOVEDYNAMICINDEXING_H_
+#endif // COMPILER_TRANSLATOR_TREEOPS_REMOVEDYNAMICINDEXING_H_
diff --git a/src/compiler/translator/RemoveInvariantDeclaration.cpp b/src/compiler/translator/tree_ops/RemoveInvariantDeclaration.cpp
similarity index 93%
rename from src/compiler/translator/RemoveInvariantDeclaration.cpp
rename to src/compiler/translator/tree_ops/RemoveInvariantDeclaration.cpp
index 6a026c8..e40fe95 100644
--- a/src/compiler/translator/RemoveInvariantDeclaration.cpp
+++ b/src/compiler/translator/tree_ops/RemoveInvariantDeclaration.cpp
@@ -4,7 +4,7 @@
// found in the LICENSE file.
//
-#include "compiler/translator/RemoveInvariantDeclaration.h"
+#include "compiler/translator/tree_ops/RemoveInvariantDeclaration.h"
#include "compiler/translator/tree_util/IntermTraverse.h"
diff --git a/src/compiler/translator/tree_ops/RemoveInvariantDeclaration.h b/src/compiler/translator/tree_ops/RemoveInvariantDeclaration.h
new file mode 100644
index 0000000..3281014
--- /dev/null
+++ b/src/compiler/translator/tree_ops/RemoveInvariantDeclaration.h
@@ -0,0 +1,18 @@
+//
+// Copyright (c) 2016 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+
+#ifndef COMPILER_TRANSLATOR_TREEOPS_REMOVEINVARIANTDECLARATION_H_
+#define COMPILER_TRANSLATOR_TREEOPS_REMOVEINVARIANTDECLARATION_H_
+
+class TIntermNode;
+namespace sh
+{
+
+void RemoveInvariantDeclaration(TIntermNode *root);
+
+} // namespace sh
+
+#endif // COMPILER_TRANSLATOR_TREEOPS_REMOVEINVARIANTDECLARATION_H_
diff --git a/src/compiler/translator/RemovePow.cpp b/src/compiler/translator/tree_ops/RemovePow.cpp
similarity index 97%
rename from src/compiler/translator/RemovePow.cpp
rename to src/compiler/translator/tree_ops/RemovePow.cpp
index c5cab90..44ff6e9 100644
--- a/src/compiler/translator/RemovePow.cpp
+++ b/src/compiler/translator/tree_ops/RemovePow.cpp
@@ -8,7 +8,7 @@
// OpenGL drivers.
//
-#include "compiler/translator/RemovePow.h"
+#include "compiler/translator/tree_ops/RemovePow.h"
#include "compiler/translator/InfoSink.h"
#include "compiler/translator/tree_util/IntermTraverse.h"
diff --git a/src/compiler/translator/RemovePow.h b/src/compiler/translator/tree_ops/RemovePow.h
similarity index 75%
rename from src/compiler/translator/RemovePow.h
rename to src/compiler/translator/tree_ops/RemovePow.h
index 3cd8498..bbc9e72 100644
--- a/src/compiler/translator/RemovePow.h
+++ b/src/compiler/translator/tree_ops/RemovePow.h
@@ -8,8 +8,8 @@
// OpenGL drivers.
//
-#ifndef COMPILER_TRANSLATOR_REMOVEPOW_H_
-#define COMPILER_TRANSLATOR_REMOVEPOW_H_
+#ifndef COMPILER_TRANSLATOR_TREEOPS_REMOVEPOW_H_
+#define COMPILER_TRANSLATOR_TREEOPS_REMOVEPOW_H_
namespace sh
{
@@ -18,4 +18,4 @@
void RemovePow(TIntermNode *root);
} // namespace sh
-#endif // COMPILER_TRANSLATOR_REMOVEPOW_H_
+#endif // COMPILER_TRANSLATOR_TREEOPS_REMOVEPOW_H_
diff --git a/src/compiler/translator/RemoveSwitchFallThrough.cpp b/src/compiler/translator/tree_ops/RemoveSwitchFallThrough.cpp
similarity index 98%
rename from src/compiler/translator/RemoveSwitchFallThrough.cpp
rename to src/compiler/translator/tree_ops/RemoveSwitchFallThrough.cpp
index 9ac55e9..9af4677 100644
--- a/src/compiler/translator/RemoveSwitchFallThrough.cpp
+++ b/src/compiler/translator/tree_ops/RemoveSwitchFallThrough.cpp
@@ -8,7 +8,7 @@
// by this function. It leaves duplicate nodes in the AST making replacements
// unreliable.
-#include "compiler/translator/RemoveSwitchFallThrough.h"
+#include "compiler/translator/tree_ops/RemoveSwitchFallThrough.h"
#include "compiler/translator/Diagnostics.h"
#include "compiler/translator/tree_util/IntermTraverse.h"
diff --git a/src/compiler/translator/RemoveSwitchFallThrough.h b/src/compiler/translator/tree_ops/RemoveSwitchFallThrough.h
similarity index 80%
rename from src/compiler/translator/RemoveSwitchFallThrough.h
rename to src/compiler/translator/tree_ops/RemoveSwitchFallThrough.h
index 7a3b196..58cad0c 100644
--- a/src/compiler/translator/RemoveSwitchFallThrough.h
+++ b/src/compiler/translator/tree_ops/RemoveSwitchFallThrough.h
@@ -8,8 +8,8 @@
// by this function. It leaves duplicate nodes in the AST making replacements
// unreliable.
-#ifndef COMPILER_TRANSLATOR_REMOVESWITCHFALLTHROUGH_H_
-#define COMPILER_TRANSLATOR_REMOVESWITCHFALLTHROUGH_H_
+#ifndef COMPILER_TRANSLATOR_TREEOPS_REMOVESWITCHFALLTHROUGH_H_
+#define COMPILER_TRANSLATOR_TREEOPS_REMOVESWITCHFALLTHROUGH_H_
namespace sh
{
@@ -24,4 +24,4 @@
} // namespace sh
-#endif // COMPILER_TRANSLATOR_REMOVESWITCHFALLTHROUGH_H_
+#endif // COMPILER_TRANSLATOR_TREEOPS_REMOVESWITCHFALLTHROUGH_H_
diff --git a/src/compiler/translator/RemoveUnreferencedVariables.cpp b/src/compiler/translator/tree_ops/RemoveUnreferencedVariables.cpp
similarity index 99%
rename from src/compiler/translator/RemoveUnreferencedVariables.cpp
rename to src/compiler/translator/tree_ops/RemoveUnreferencedVariables.cpp
index 3ba66c5..2a14e0f 100644
--- a/src/compiler/translator/RemoveUnreferencedVariables.cpp
+++ b/src/compiler/translator/tree_ops/RemoveUnreferencedVariables.cpp
@@ -8,7 +8,7 @@
// 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/tree_util/IntermTraverse.h"
diff --git a/src/compiler/translator/RemoveUnreferencedVariables.h b/src/compiler/translator/tree_ops/RemoveUnreferencedVariables.h
similarity index 72%
rename from src/compiler/translator/RemoveUnreferencedVariables.h
rename to src/compiler/translator/tree_ops/RemoveUnreferencedVariables.h
index 39c8327..6888b2f 100644
--- a/src/compiler/translator/RemoveUnreferencedVariables.h
+++ b/src/compiler/translator/tree_ops/RemoveUnreferencedVariables.h
@@ -8,8 +8,8 @@
// initialization code for them. Also removes unreferenced struct types.
//
-#ifndef COMPILER_TRANSLATOR_REMOVEUNREFERENCEDVARIABLES_H_
-#define COMPILER_TRANSLATOR_REMOVEUNREFERENCEDVARIABLES_H_
+#ifndef COMPILER_TRANSLATOR_TREEOPS_REMOVEUNREFERENCEDVARIABLES_H_
+#define COMPILER_TRANSLATOR_TREEOPS_REMOVEUNREFERENCEDVARIABLES_H_
namespace sh
{
@@ -21,4 +21,4 @@
} // namespace sh
-#endif // COMPILER_TRANSLATOR_REMOVEUNREFERENCEDVARIABLES_H_
+#endif // COMPILER_TRANSLATOR_TREEOPS_REMOVEUNREFERENCEDVARIABLES_H_
diff --git a/src/compiler/translator/RewriteDoWhile.cpp b/src/compiler/translator/tree_ops/RewriteDoWhile.cpp
similarity index 98%
rename from src/compiler/translator/RewriteDoWhile.cpp
rename to src/compiler/translator/tree_ops/RewriteDoWhile.cpp
index 4a0f542..5d3c8bd 100644
--- a/src/compiler/translator/RewriteDoWhile.cpp
+++ b/src/compiler/translator/tree_ops/RewriteDoWhile.cpp
@@ -7,7 +7,7 @@
// RewriteDoWhile.cpp: rewrites do-while loops using another equivalent
// construct.
-#include "compiler/translator/RewriteDoWhile.h"
+#include "compiler/translator/tree_ops/RewriteDoWhile.h"
#include "compiler/translator/StaticType.h"
#include "compiler/translator/tree_util/IntermNode_util.h"
diff --git a/src/compiler/translator/RewriteDoWhile.h b/src/compiler/translator/tree_ops/RewriteDoWhile.h
similarity index 71%
rename from src/compiler/translator/RewriteDoWhile.h
rename to src/compiler/translator/tree_ops/RewriteDoWhile.h
index e83bfc4..c91d7de 100644
--- a/src/compiler/translator/RewriteDoWhile.h
+++ b/src/compiler/translator/tree_ops/RewriteDoWhile.h
@@ -7,8 +7,8 @@
// RewriteDoWhile.h: rewrite do-while loops as while loops to work around
// driver bugs
-#ifndef COMPILER_TRANSLATOR_REWRITEDOWHILE_H_
-#define COMPILER_TRANSLATOR_REWRITEDOWHILE_H_
+#ifndef COMPILER_TRANSLATOR_TREEOPS_REWRITEDOWHILE_H_
+#define COMPILER_TRANSLATOR_TREEOPS_REWRITEDOWHILE_H_
namespace sh
{
@@ -20,4 +20,4 @@
} // namespace sh
-#endif // COMPILER_TRANSLATOR_REWRITEDOWHILE_H_
+#endif // COMPILER_TRANSLATOR_TREEOPS_REWRITEDOWHILE_H_
diff --git a/src/compiler/translator/RewriteElseBlocks.cpp b/src/compiler/translator/tree_ops/RewriteElseBlocks.cpp
similarity index 96%
rename from src/compiler/translator/RewriteElseBlocks.cpp
rename to src/compiler/translator/tree_ops/RewriteElseBlocks.cpp
index 489cc9d..850d729 100644
--- a/src/compiler/translator/RewriteElseBlocks.cpp
+++ b/src/compiler/translator/tree_ops/RewriteElseBlocks.cpp
@@ -7,7 +7,7 @@
// 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/SymbolTable.h"
@@ -87,7 +87,7 @@
if (mFunctionType && mFunctionType->getBasicType() != EbtVoid)
{
TIntermNode *returnNode = new TIntermBranch(EOpReturn, CreateZeroNode(*mFunctionType));
- negatedElse = new TIntermBlock();
+ negatedElse = new TIntermBlock();
negatedElse->appendStatement(returnNode);
}
diff --git a/src/compiler/translator/RewriteElseBlocks.h b/src/compiler/translator/tree_ops/RewriteElseBlocks.h
similarity index 70%
rename from src/compiler/translator/RewriteElseBlocks.h
rename to src/compiler/translator/tree_ops/RewriteElseBlocks.h
index 2586b54..9297311 100644
--- a/src/compiler/translator/RewriteElseBlocks.h
+++ b/src/compiler/translator/tree_ops/RewriteElseBlocks.h
@@ -7,8 +7,8 @@
// all if-else blocks to if-if blocks.
//
-#ifndef COMPILER_TRANSLATOR_REWRITEELSEBLOCKS_H_
-#define COMPILER_TRANSLATOR_REWRITEELSEBLOCKS_H_
+#ifndef COMPILER_TRANSLATOR_TREEOPS_REWRITEELSEBLOCKS_H_
+#define COMPILER_TRANSLATOR_TREEOPS_REWRITEELSEBLOCKS_H_
namespace sh
{
@@ -19,4 +19,4 @@
void RewriteElseBlocks(TIntermNode *node, TSymbolTable *symbolTable);
}
-#endif // COMPILER_TRANSLATOR_REWRITEELSEBLOCKS_H_
+#endif // COMPILER_TRANSLATOR_TREEOPS_REWRITEELSEBLOCKS_H_
diff --git a/src/compiler/translator/RewriteTexelFetchOffset.cpp b/src/compiler/translator/tree_ops/RewriteTexelFetchOffset.cpp
similarity index 98%
rename from src/compiler/translator/RewriteTexelFetchOffset.cpp
rename to src/compiler/translator/tree_ops/RewriteTexelFetchOffset.cpp
index a0892c3..f57e5df 100644
--- a/src/compiler/translator/RewriteTexelFetchOffset.cpp
+++ b/src/compiler/translator/tree_ops/RewriteTexelFetchOffset.cpp
@@ -6,7 +6,7 @@
// Implementation of texelFetchOffset translation issue workaround.
// See header for more info.
-#include "compiler/translator/RewriteTexelFetchOffset.h"
+#include "compiler/translator/tree_ops/RewriteTexelFetchOffset.h"
#include "common/angleutils.h"
#include "compiler/translator/SymbolTable.h"
diff --git a/src/compiler/translator/RewriteTexelFetchOffset.h b/src/compiler/translator/tree_ops/RewriteTexelFetchOffset.h
similarity index 78%
rename from src/compiler/translator/RewriteTexelFetchOffset.h
rename to src/compiler/translator/tree_ops/RewriteTexelFetchOffset.h
index 694d709..45e224d 100644
--- a/src/compiler/translator/RewriteTexelFetchOffset.h
+++ b/src/compiler/translator/tree_ops/RewriteTexelFetchOffset.h
@@ -12,8 +12,8 @@
//
// See http://anglebug.com/1469
-#ifndef COMPILER_TRANSLATOR_REWRITE_TEXELFETCHOFFSET_H_
-#define COMPILER_TRANSLATOR_REWRITE_TEXELFETCHOFFSET_H_
+#ifndef COMPILER_TRANSLATOR_TREEOPS_REWRITE_TEXELFETCHOFFSET_H_
+#define COMPILER_TRANSLATOR_TREEOPS_REWRITE_TEXELFETCHOFFSET_H_
class TIntermNode;
class TSymbolTable;
@@ -25,4 +25,4 @@
} // namespace sh
-#endif // COMPILER_TRANSLATOR_REWRITE_TEXELFETCHOFFSET_H_
\ No newline at end of file
+#endif // COMPILER_TRANSLATOR_TREEOPS_REWRITE_TEXELFETCHOFFSET_H_
\ No newline at end of file
diff --git a/src/compiler/translator/RewriteUnaryMinusOperatorFloat.cpp b/src/compiler/translator/tree_ops/RewriteUnaryMinusOperatorFloat.cpp
similarity index 95%
rename from src/compiler/translator/RewriteUnaryMinusOperatorFloat.cpp
rename to src/compiler/translator/tree_ops/RewriteUnaryMinusOperatorFloat.cpp
index fe7bf94..c75fd33 100644
--- a/src/compiler/translator/RewriteUnaryMinusOperatorFloat.cpp
+++ b/src/compiler/translator/tree_ops/RewriteUnaryMinusOperatorFloat.cpp
@@ -4,7 +4,7 @@
// 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/IntermTraverse.h"
diff --git a/src/compiler/translator/RewriteUnaryMinusOperatorFloat.h b/src/compiler/translator/tree_ops/RewriteUnaryMinusOperatorFloat.h
similarity index 65%
rename from src/compiler/translator/RewriteUnaryMinusOperatorFloat.h
rename to src/compiler/translator/tree_ops/RewriteUnaryMinusOperatorFloat.h
index ccbfbcb..2df592a 100644
--- a/src/compiler/translator/RewriteUnaryMinusOperatorFloat.h
+++ b/src/compiler/translator/tree_ops/RewriteUnaryMinusOperatorFloat.h
@@ -5,8 +5,8 @@
// Rewrite "-float" to "0.0 - float" to work around unary minus operator on float issue on Intel Mac
// OSX 10.11.
-#ifndef COMPILER_TRANSLATOR_REWRITEUNARYMINUSOPERATORFLOAT_H_
-#define COMPILER_TRANSLATOR_REWRITEUNARYMINUSOPERATORFLOAT_H_
+#ifndef COMPILER_TRANSLATOR_TREEOPS_REWRITEUNARYMINUSOPERATORFLOAT_H_
+#define COMPILER_TRANSLATOR_TREEOPS_REWRITEUNARYMINUSOPERATORFLOAT_H_
class TIntermNode;
namespace sh
@@ -16,4 +16,4 @@
} // namespace sh
-#endif // COMPILER_TRANSLATOR_REWRITEUNARYMINUSOPERATORFLOAT_H_
+#endif // COMPILER_TRANSLATOR_TREEOPS_REWRITEUNARYMINUSOPERATORFLOAT_H_
diff --git a/src/compiler/translator/RewriteUnaryMinusOperatorInt.cpp b/src/compiler/translator/tree_ops/RewriteUnaryMinusOperatorInt.cpp
similarity index 96%
rename from src/compiler/translator/RewriteUnaryMinusOperatorInt.cpp
rename to src/compiler/translator/tree_ops/RewriteUnaryMinusOperatorInt.cpp
index 069214c..60b0b11 100644
--- a/src/compiler/translator/RewriteUnaryMinusOperatorInt.cpp
+++ b/src/compiler/translator/tree_ops/RewriteUnaryMinusOperatorInt.cpp
@@ -6,7 +6,7 @@
// Implementation of evaluating unary integer variable bug workaround.
// See header for more info.
-#include "compiler/translator/RewriteUnaryMinusOperatorInt.h"
+#include "compiler/translator/tree_ops/RewriteUnaryMinusOperatorInt.h"
#include "compiler/translator/tree_util/IntermTraverse.h"
diff --git a/src/compiler/translator/RewriteUnaryMinusOperatorInt.h b/src/compiler/translator/tree_ops/RewriteUnaryMinusOperatorInt.h
similarity index 70%
rename from src/compiler/translator/RewriteUnaryMinusOperatorInt.h
rename to src/compiler/translator/tree_ops/RewriteUnaryMinusOperatorInt.h
index 50f0c44..6619217 100644
--- a/src/compiler/translator/RewriteUnaryMinusOperatorInt.h
+++ b/src/compiler/translator/tree_ops/RewriteUnaryMinusOperatorInt.h
@@ -6,8 +6,8 @@
// integer variable on Intel D3D driver. It works by rewriting -(int) to
// ~(int) + 1 when evaluating unary integer variables.
-#ifndef COMPILER_TRANSLATOR_REWRITEUNARYMINUSOPERATORINT_H_
-#define COMPILER_TRANSLATOR_REWRITEUNARYMINUSOPERATORINT_H_
+#ifndef COMPILER_TRANSLATOR_TREEOPS_REWRITEUNARYMINUSOPERATORINT_H_
+#define COMPILER_TRANSLATOR_TREEOPS_REWRITEUNARYMINUSOPERATORINT_H_
class TIntermNode;
namespace sh
@@ -17,4 +17,4 @@
} // namespace sh
-#endif // COMPILER_TRANSLATOR_REWRITEUNARYMINUSOPERATORINT_H_
\ No newline at end of file
+#endif // COMPILER_TRANSLATOR_TREEOPS_REWRITEUNARYMINUSOPERATORINT_H_
\ No newline at end of file
diff --git a/src/compiler/translator/ScalarizeVecAndMatConstructorArgs.cpp b/src/compiler/translator/tree_ops/ScalarizeVecAndMatConstructorArgs.cpp
similarity index 97%
rename from src/compiler/translator/ScalarizeVecAndMatConstructorArgs.cpp
rename to src/compiler/translator/tree_ops/ScalarizeVecAndMatConstructorArgs.cpp
index 7a9648c..2fab729 100644
--- a/src/compiler/translator/ScalarizeVecAndMatConstructorArgs.cpp
+++ b/src/compiler/translator/tree_ops/ScalarizeVecAndMatConstructorArgs.cpp
@@ -8,8 +8,8 @@
// driver bugs around vector and matrix constructors.
//
+#include "compiler/translator/tree_ops/ScalarizeVecAndMatConstructorArgs.h"
#include "common/debug.h"
-#include "compiler/translator/ScalarizeVecAndMatConstructorArgs.h"
#include <algorithm>
@@ -206,7 +206,7 @@
TVariable *variable = CreateTempVariable(mSymbolTable, type);
ASSERT(mBlockStack.size() > 0);
- TIntermSequence &sequence = mBlockStack.back();
+ TIntermSequence &sequence = mBlockStack.back();
TIntermDeclaration *declaration = CreateTempInitDeclarationNode(variable, original);
sequence.push_back(declaration);
diff --git a/src/compiler/translator/ScalarizeVecAndMatConstructorArgs.h b/src/compiler/translator/tree_ops/ScalarizeVecAndMatConstructorArgs.h
similarity index 78%
rename from src/compiler/translator/ScalarizeVecAndMatConstructorArgs.h
rename to src/compiler/translator/tree_ops/ScalarizeVecAndMatConstructorArgs.h
index b8f782d..e66908d 100644
--- a/src/compiler/translator/ScalarizeVecAndMatConstructorArgs.h
+++ b/src/compiler/translator/tree_ops/ScalarizeVecAndMatConstructorArgs.h
@@ -8,8 +8,8 @@
// driver bugs around vector and matrix constructors.
//
-#ifndef COMPILER_TRANSLATOR_SCALARIZEVECANDMATCONSTRUCTORARGS_H_
-#define COMPILER_TRANSLATOR_SCALARIZEVECANDMATCONSTRUCTORARGS_H_
+#ifndef COMPILER_TRANSLATOR_TREEOPS_SCALARIZEVECANDMATCONSTRUCTORARGS_H_
+#define COMPILER_TRANSLATOR_TREEOPS_SCALARIZEVECANDMATCONSTRUCTORARGS_H_
#include "GLSLANG/ShaderLang.h"
@@ -24,4 +24,4 @@
TSymbolTable *symbolTable);
} // namespace sh
-#endif // COMPILER_TRANSLATOR_SCALARIZEVECANDMATCONSTRUCTORARGS_H_
+#endif // COMPILER_TRANSLATOR_TREEOPS_SCALARIZEVECANDMATCONSTRUCTORARGS_H_
diff --git a/src/compiler/translator/SeparateArrayConstructorStatements.cpp b/src/compiler/translator/tree_ops/SeparateArrayConstructorStatements.cpp
similarity index 96%
rename from src/compiler/translator/SeparateArrayConstructorStatements.cpp
rename to src/compiler/translator/tree_ops/SeparateArrayConstructorStatements.cpp
index 0aaa6cc..98150ce 100644
--- a/src/compiler/translator/SeparateArrayConstructorStatements.cpp
+++ b/src/compiler/translator/tree_ops/SeparateArrayConstructorStatements.cpp
@@ -9,7 +9,7 @@
// Will be changed to:
// i++;
-#include "compiler/translator/SeparateArrayConstructorStatements.h"
+#include "compiler/translator/tree_ops/SeparateArrayConstructorStatements.h"
#include "compiler/translator/tree_util/IntermTraverse.h"
diff --git a/src/compiler/translator/SeparateArrayConstructorStatements.h b/src/compiler/translator/tree_ops/SeparateArrayConstructorStatements.h
similarity index 69%
rename from src/compiler/translator/SeparateArrayConstructorStatements.h
rename to src/compiler/translator/tree_ops/SeparateArrayConstructorStatements.h
index 0db93b1..740ba95 100644
--- a/src/compiler/translator/SeparateArrayConstructorStatements.h
+++ b/src/compiler/translator/tree_ops/SeparateArrayConstructorStatements.h
@@ -9,8 +9,8 @@
// Will be changed to:
// i++;
-#ifndef COMPILER_TRANSLATOR_SEPARATEARRAYCONSTRUCTORSTATEMENTS_H_
-#define COMPILER_TRANSLATOR_SEPARATEARRAYCONSTRUCTORSTATEMENTS_H_
+#ifndef COMPILER_TRANSLATOR_TREEOPS_SEPARATEARRAYCONSTRUCTORSTATEMENTS_H_
+#define COMPILER_TRANSLATOR_TREEOPS_SEPARATEARRAYCONSTRUCTORSTATEMENTS_H_
namespace sh
{
@@ -19,4 +19,4 @@
void SeparateArrayConstructorStatements(TIntermBlock *root);
} // namespace sh
-#endif // COMPILER_TRANSLATOR_SEPARATEARRAYCONSTRUCTORSTATEMENTS_H_
+#endif // COMPILER_TRANSLATOR_TREEOPS_SEPARATEARRAYCONSTRUCTORSTATEMENTS_H_
diff --git a/src/compiler/translator/SeparateArrayInitialization.cpp b/src/compiler/translator/tree_ops/SeparateArrayInitialization.cpp
similarity index 97%
rename from src/compiler/translator/SeparateArrayInitialization.cpp
rename to src/compiler/translator/tree_ops/SeparateArrayInitialization.cpp
index e1026cb..ee1d91b 100644
--- a/src/compiler/translator/SeparateArrayInitialization.cpp
+++ b/src/compiler/translator/tree_ops/SeparateArrayInitialization.cpp
@@ -16,7 +16,7 @@
// stages don't care about const qualifiers. However, the initialization will not be split if the
// 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/OutputHLSL.h"
diff --git a/src/compiler/translator/SeparateArrayInitialization.h b/src/compiler/translator/tree_ops/SeparateArrayInitialization.h
similarity index 80%
rename from src/compiler/translator/SeparateArrayInitialization.h
rename to src/compiler/translator/tree_ops/SeparateArrayInitialization.h
index 3a9bb55..a197ff5 100644
--- a/src/compiler/translator/SeparateArrayInitialization.h
+++ b/src/compiler/translator/tree_ops/SeparateArrayInitialization.h
@@ -16,8 +16,8 @@
// stages don't care about const qualifiers. However, the initialization will not be split if the
// initializer can be written as a HLSL literal.
-#ifndef COMPILER_TRANSLATOR_SEPARATEARRAYINITIALIZATION_H_
-#define COMPILER_TRANSLATOR_SEPARATEARRAYINITIALIZATION_H_
+#ifndef COMPILER_TRANSLATOR_TREEOPS_SEPARATEARRAYINITIALIZATION_H_
+#define COMPILER_TRANSLATOR_TREEOPS_SEPARATEARRAYINITIALIZATION_H_
namespace sh
{
@@ -26,4 +26,4 @@
void SeparateArrayInitialization(TIntermNode *root);
} // namespace sh
-#endif // COMPILER_TRANSLATOR_SEPARATEARRAYINITIALIZATION_H_
+#endif // COMPILER_TRANSLATOR_TREEOPS_SEPARATEARRAYINITIALIZATION_H_
diff --git a/src/compiler/translator/SeparateDeclarations.cpp b/src/compiler/translator/tree_ops/SeparateDeclarations.cpp
similarity index 97%
rename from src/compiler/translator/SeparateDeclarations.cpp
rename to src/compiler/translator/tree_ops/SeparateDeclarations.cpp
index 30713c6..c241419 100644
--- a/src/compiler/translator/SeparateDeclarations.cpp
+++ b/src/compiler/translator/tree_ops/SeparateDeclarations.cpp
@@ -13,7 +13,7 @@
// int a[1] = int[1](1);
// 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"
diff --git a/src/compiler/translator/SeparateDeclarations.h b/src/compiler/translator/tree_ops/SeparateDeclarations.h
similarity index 80%
rename from src/compiler/translator/SeparateDeclarations.h
rename to src/compiler/translator/tree_ops/SeparateDeclarations.h
index 8142fae..1e7f967 100644
--- a/src/compiler/translator/SeparateDeclarations.h
+++ b/src/compiler/translator/tree_ops/SeparateDeclarations.h
@@ -13,8 +13,8 @@
// int a[1] = int[1](1);
// int b[1] = int[1](2);
-#ifndef COMPILER_TRANSLATOR_SEPARATEDECLARATIONS_H_
-#define COMPILER_TRANSLATOR_SEPARATEDECLARATIONS_H_
+#ifndef COMPILER_TRANSLATOR_TREEOPS_SEPARATEDECLARATIONS_H_
+#define COMPILER_TRANSLATOR_TREEOPS_SEPARATEDECLARATIONS_H_
namespace sh
{
@@ -23,4 +23,4 @@
void SeparateDeclarations(TIntermNode *root);
} // namespace sh
-#endif // COMPILER_TRANSLATOR_SEPARATEDECLARATIONS_H_
+#endif // COMPILER_TRANSLATOR_TREEOPS_SEPARATEDECLARATIONS_H_
diff --git a/src/compiler/translator/SeparateExpressionsReturningArrays.cpp b/src/compiler/translator/tree_ops/SeparateExpressionsReturningArrays.cpp
similarity index 98%
rename from src/compiler/translator/SeparateExpressionsReturningArrays.cpp
rename to src/compiler/translator/tree_ops/SeparateExpressionsReturningArrays.cpp
index 30124e6..42f2166 100644
--- a/src/compiler/translator/SeparateExpressionsReturningArrays.cpp
+++ b/src/compiler/translator/tree_ops/SeparateExpressionsReturningArrays.cpp
@@ -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;
// 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/IntermNode_util.h"
diff --git a/src/compiler/translator/SeparateExpressionsReturningArrays.h b/src/compiler/translator/tree_ops/SeparateExpressionsReturningArrays.h
similarity index 76%
rename from src/compiler/translator/SeparateExpressionsReturningArrays.h
rename to src/compiler/translator/tree_ops/SeparateExpressionsReturningArrays.h
index f8eb438..9b09f7c 100644
--- a/src/compiler/translator/SeparateExpressionsReturningArrays.h
+++ b/src/compiler/translator/tree_ops/SeparateExpressionsReturningArrays.h
@@ -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;
// type d = type[n](...)[i]; is split into type[n] a1 = type[n](...); type d = a1[i];
-#ifndef COMPILER_TRANSLATOR_SEPARATEEXPRESSIONSRETURNINGARRAYS_H_
-#define COMPILER_TRANSLATOR_SEPARATEEXPRESSIONSRETURNINGARRAYS_H_
+#ifndef COMPILER_TRANSLATOR_TREEOPS_SEPARATEEXPRESSIONSRETURNINGARRAYS_H_
+#define COMPILER_TRANSLATOR_TREEOPS_SEPARATEEXPRESSIONSRETURNINGARRAYS_H_
namespace sh
{
@@ -20,4 +20,4 @@
void SeparateExpressionsReturningArrays(TIntermNode *root, TSymbolTable *symbolTable);
} // namespace sh
-#endif // COMPILER_TRANSLATOR_SEPARATEEXPRESSIONSRETURNINGARRAYS_H_
+#endif // COMPILER_TRANSLATOR_TREEOPS_SEPARATEEXPRESSIONSRETURNINGARRAYS_H_
diff --git a/src/compiler/translator/SimplifyLoopConditions.cpp b/src/compiler/translator/tree_ops/SimplifyLoopConditions.cpp
similarity index 99%
rename from src/compiler/translator/SimplifyLoopConditions.cpp
rename to src/compiler/translator/tree_ops/SimplifyLoopConditions.cpp
index acbb50c..751975a 100644
--- a/src/compiler/translator/SimplifyLoopConditions.cpp
+++ b/src/compiler/translator/tree_ops/SimplifyLoopConditions.cpp
@@ -8,7 +8,7 @@
// 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/tree_util/IntermNodePatternMatcher.h"
diff --git a/src/compiler/translator/SimplifyLoopConditions.h b/src/compiler/translator/tree_ops/SimplifyLoopConditions.h
similarity index 78%
rename from src/compiler/translator/SimplifyLoopConditions.h
rename to src/compiler/translator/tree_ops/SimplifyLoopConditions.h
index 367487d..15265bb 100644
--- a/src/compiler/translator/SimplifyLoopConditions.h
+++ b/src/compiler/translator/tree_ops/SimplifyLoopConditions.h
@@ -8,8 +8,8 @@
// from loop conditions and loop expressions work correctly.
//
-#ifndef COMPILER_TRANSLATOR_SIMPLIFYLOOPCONDITIONS_H_
-#define COMPILER_TRANSLATOR_SIMPLIFYLOOPCONDITIONS_H_
+#ifndef COMPILER_TRANSLATOR_TREEOPS_SIMPLIFYLOOPCONDITIONS_H_
+#define COMPILER_TRANSLATOR_TREEOPS_SIMPLIFYLOOPCONDITIONS_H_
namespace sh
{
@@ -21,4 +21,4 @@
TSymbolTable *symbolTable);
} // namespace sh
-#endif // COMPILER_TRANSLATOR_SIMPLIFYLOOPCONDITIONS_H_
+#endif // COMPILER_TRANSLATOR_TREEOPS_SIMPLIFYLOOPCONDITIONS_H_
diff --git a/src/compiler/translator/SplitSequenceOperator.cpp b/src/compiler/translator/tree_ops/SplitSequenceOperator.cpp
similarity index 98%
rename from src/compiler/translator/SplitSequenceOperator.cpp
rename to src/compiler/translator/tree_ops/SplitSequenceOperator.cpp
index c35e73c..c22c85e 100644
--- a/src/compiler/translator/SplitSequenceOperator.cpp
+++ b/src/compiler/translator/tree_ops/SplitSequenceOperator.cpp
@@ -9,7 +9,7 @@
// 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/IntermTraverse.h"
diff --git a/src/compiler/translator/SplitSequenceOperator.h b/src/compiler/translator/tree_ops/SplitSequenceOperator.h
similarity index 79%
rename from src/compiler/translator/SplitSequenceOperator.h
rename to src/compiler/translator/tree_ops/SplitSequenceOperator.h
index fb9d551..fc341c9 100644
--- a/src/compiler/translator/SplitSequenceOperator.h
+++ b/src/compiler/translator/tree_ops/SplitSequenceOperator.h
@@ -9,8 +9,8 @@
// evaluated before the latter parts of the sequence operator expression are evaluated.
//
-#ifndef COMPILER_TRANSLATOR_SPLITSEQUENCEOPERATOR_H_
-#define COMPILER_TRANSLATOR_SPLITSEQUENCEOPERATOR_H_
+#ifndef COMPILER_TRANSLATOR_TREEOPS_SPLITSEQUENCEOPERATOR_H_
+#define COMPILER_TRANSLATOR_TREEOPS_SPLITSEQUENCEOPERATOR_H_
namespace sh
{
@@ -22,4 +22,4 @@
} // namespace sh
-#endif // COMPILER_TRANSLATOR_SPLITSEQUENCEOPERATOR_H_
+#endif // COMPILER_TRANSLATOR_TREEOPS_SPLITSEQUENCEOPERATOR_H_
diff --git a/src/compiler/translator/UnfoldShortCircuitAST.cpp b/src/compiler/translator/tree_ops/UnfoldShortCircuitAST.cpp
similarity index 96%
rename from src/compiler/translator/UnfoldShortCircuitAST.cpp
rename to src/compiler/translator/tree_ops/UnfoldShortCircuitAST.cpp
index 4fb643a..e408714 100644
--- a/src/compiler/translator/UnfoldShortCircuitAST.cpp
+++ b/src/compiler/translator/tree_ops/UnfoldShortCircuitAST.cpp
@@ -4,7 +4,7 @@
// 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/tree_util/IntermNode_util.h"
diff --git a/src/compiler/translator/UnfoldShortCircuitAST.h b/src/compiler/translator/tree_ops/UnfoldShortCircuitAST.h
similarity index 68%
rename from src/compiler/translator/UnfoldShortCircuitAST.h
rename to src/compiler/translator/tree_ops/UnfoldShortCircuitAST.h
index 582df02..7f492a9 100644
--- a/src/compiler/translator/UnfoldShortCircuitAST.h
+++ b/src/compiler/translator/tree_ops/UnfoldShortCircuitAST.h
@@ -7,8 +7,8 @@
// operations with ternary operations.
//
-#ifndef COMPILER_TRANSLATOR_UNFOLDSHORTCIRCUITAST_H_
-#define COMPILER_TRANSLATOR_UNFOLDSHORTCIRCUITAST_H_
+#ifndef COMPILER_TRANSLATOR_TREEOPS_UNFOLDSHORTCIRCUITAST_H_
+#define COMPILER_TRANSLATOR_TREEOPS_UNFOLDSHORTCIRCUITAST_H_
namespace sh
{
@@ -19,4 +19,4 @@
} // namespace sh
-#endif // COMPILER_TRANSLATOR_UNFOLDSHORTCIRCUITAST_H_
+#endif // COMPILER_TRANSLATOR_TREEOPS_UNFOLDSHORTCIRCUITAST_H_
diff --git a/src/compiler/translator/UnfoldShortCircuitToIf.cpp b/src/compiler/translator/tree_ops/UnfoldShortCircuitToIf.cpp
similarity index 97%
rename from src/compiler/translator/UnfoldShortCircuitToIf.cpp
rename to src/compiler/translator/tree_ops/UnfoldShortCircuitToIf.cpp
index 3c6d81a..06982f2 100644
--- a/src/compiler/translator/UnfoldShortCircuitToIf.cpp
+++ b/src/compiler/translator/tree_ops/UnfoldShortCircuitToIf.cpp
@@ -9,7 +9,7 @@
// the original expression.
//
-#include "compiler/translator/UnfoldShortCircuitToIf.h"
+#include "compiler/translator/tree_ops/UnfoldShortCircuitToIf.h"
#include "compiler/translator/StaticType.h"
#include "compiler/translator/tree_util/IntermNodePatternMatcher.h"
@@ -149,12 +149,12 @@
EvqTemporary, &tempDeclaration);
insertions.push_back(tempDeclaration);
- TIntermBlock *trueBlock = new TIntermBlock();
+ TIntermBlock *trueBlock = new TIntermBlock();
TIntermBinary *trueAssignment =
CreateTempAssignmentNode(resultVariable, node->getTrueExpression());
trueBlock->getSequence()->push_back(trueAssignment);
- TIntermBlock *falseBlock = new TIntermBlock();
+ TIntermBlock *falseBlock = new TIntermBlock();
TIntermBinary *falseAssignment =
CreateTempAssignmentNode(resultVariable, node->getFalseExpression());
falseBlock->getSequence()->push_back(falseAssignment);
diff --git a/src/compiler/translator/UnfoldShortCircuitToIf.h b/src/compiler/translator/tree_ops/UnfoldShortCircuitToIf.h
similarity index 76%
rename from src/compiler/translator/UnfoldShortCircuitToIf.h
rename to src/compiler/translator/tree_ops/UnfoldShortCircuitToIf.h
index 37dd83a..3458cd2 100644
--- a/src/compiler/translator/UnfoldShortCircuitToIf.h
+++ b/src/compiler/translator/tree_ops/UnfoldShortCircuitToIf.h
@@ -9,8 +9,8 @@
// the original expression.
//
-#ifndef COMPILER_TRANSLATOR_UNFOLDSHORTCIRCUIT_H_
-#define COMPILER_TRANSLATOR_UNFOLDSHORTCIRCUIT_H_
+#ifndef COMPILER_TRANSLATOR_TREEOPS_UNFOLDSHORTCIRCUIT_H_
+#define COMPILER_TRANSLATOR_TREEOPS_UNFOLDSHORTCIRCUIT_H_
namespace sh
{
@@ -22,4 +22,4 @@
} // namespace sh
-#endif // COMPILER_TRANSLATOR_UNFOLDSHORTCIRCUIT_H_
+#endif // COMPILER_TRANSLATOR_TREEOPS_UNFOLDSHORTCIRCUIT_H_
diff --git a/src/compiler/translator/UseInterfaceBlockFields.cpp b/src/compiler/translator/tree_ops/UseInterfaceBlockFields.cpp
similarity index 97%
rename from src/compiler/translator/UseInterfaceBlockFields.cpp
rename to src/compiler/translator/tree_ops/UseInterfaceBlockFields.cpp
index eee1117..394a414 100644
--- a/src/compiler/translator/UseInterfaceBlockFields.cpp
+++ b/src/compiler/translator/tree_ops/UseInterfaceBlockFields.cpp
@@ -8,7 +8,7 @@
// the beginning of main. This is to work around a Mac driver that treats unused standard/shared
// uniform blocks as inactive.
-#include "compiler/translator/UseInterfaceBlockFields.h"
+#include "compiler/translator/tree_ops/UseInterfaceBlockFields.h"
#include "compiler/translator/IntermNode.h"
#include "compiler/translator/SymbolTable.h"
diff --git a/src/compiler/translator/UseInterfaceBlockFields.h b/src/compiler/translator/tree_ops/UseInterfaceBlockFields.h
similarity index 79%
rename from src/compiler/translator/UseInterfaceBlockFields.h
rename to src/compiler/translator/tree_ops/UseInterfaceBlockFields.h
index 3e2a481..37f0ba0 100644
--- a/src/compiler/translator/UseInterfaceBlockFields.h
+++ b/src/compiler/translator/tree_ops/UseInterfaceBlockFields.h
@@ -8,8 +8,8 @@
// the beginning of main. This is to work around a Mac driver that treats unused standard/shared
// uniform blocks as inactive.
-#ifndef COMPILER_TRANSLATOR_USEINTERFACEBLOCKFIELDS_H_
-#define COMPILER_TRANSLATOR_USEINTERFACEBLOCKFIELDS_H_
+#ifndef COMPILER_TRANSLATOR_TREEOPS_USEINTERFACEBLOCKFIELDS_H_
+#define COMPILER_TRANSLATOR_TREEOPS_USEINTERFACEBLOCKFIELDS_H_
#include <GLSLANG/ShaderLang.h>
@@ -27,4 +27,4 @@
} // namespace sh
-#endif // COMPILER_TRANSLATOR_USEINTERFACEBLOCKFIELDS_H_
+#endif // COMPILER_TRANSLATOR_TREEOPS_USEINTERFACEBLOCKFIELDS_H_
diff --git a/src/compiler/translator/VectorizeVectorScalarArithmetic.cpp b/src/compiler/translator/tree_ops/VectorizeVectorScalarArithmetic.cpp
similarity index 98%
rename from src/compiler/translator/VectorizeVectorScalarArithmetic.cpp
rename to src/compiler/translator/tree_ops/VectorizeVectorScalarArithmetic.cpp
index 20ba15a..e365d8b 100644
--- a/src/compiler/translator/VectorizeVectorScalarArithmetic.cpp
+++ b/src/compiler/translator/tree_ops/VectorizeVectorScalarArithmetic.cpp
@@ -9,7 +9,7 @@
// 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.
-#include "compiler/translator/VectorizeVectorScalarArithmetic.h"
+#include "compiler/translator/tree_ops/VectorizeVectorScalarArithmetic.h"
#include <set>
diff --git a/src/compiler/translator/VectorizeVectorScalarArithmetic.h b/src/compiler/translator/tree_ops/VectorizeVectorScalarArithmetic.h
similarity index 78%
rename from src/compiler/translator/VectorizeVectorScalarArithmetic.h
rename to src/compiler/translator/tree_ops/VectorizeVectorScalarArithmetic.h
index 69f092e..e648064 100644
--- a/src/compiler/translator/VectorizeVectorScalarArithmetic.h
+++ b/src/compiler/translator/tree_ops/VectorizeVectorScalarArithmetic.h
@@ -9,8 +9,8 @@
// 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.
-#ifndef COMPILER_TRANSLATOR_VECTORIZEVECTORSCALARARITHMETIC_H_
-#define COMPILER_TRANSLATOR_VECTORIZEVECTORSCALARARITHMETIC_H_
+#ifndef COMPILER_TRANSLATOR_TREEOPS_VECTORIZEVECTORSCALARARITHMETIC_H_
+#define COMPILER_TRANSLATOR_TREEOPS_VECTORIZEVECTORSCALARARITHMETIC_H_
namespace sh
{
@@ -22,4 +22,4 @@
} // namespace sh
-#endif // COMPILER_TRANSLATOR_VECTORIZEVECTORSCALARARITHMETIC_H_
\ No newline at end of file
+#endif // COMPILER_TRANSLATOR_TREEOPS_VECTORIZEVECTORSCALARARITHMETIC_H_
\ No newline at end of file
diff --git a/src/compiler/translator/WrapSwitchStatementsInBlocks.cpp b/src/compiler/translator/tree_ops/WrapSwitchStatementsInBlocks.cpp
similarity index 97%
rename from src/compiler/translator/WrapSwitchStatementsInBlocks.cpp
rename to src/compiler/translator/tree_ops/WrapSwitchStatementsInBlocks.cpp
index 6397cb5..5a4dd30 100644
--- a/src/compiler/translator/WrapSwitchStatementsInBlocks.cpp
+++ b/src/compiler/translator/tree_ops/WrapSwitchStatementsInBlocks.cpp
@@ -26,7 +26,7 @@
// }
// }
-#include "compiler/translator/WrapSwitchStatementsInBlocks.h"
+#include "compiler/translator/tree_ops/WrapSwitchStatementsInBlocks.h"
#include "compiler/translator/IntermNode.h"
#include "compiler/translator/tree_util/IntermTraverse.h"
diff --git a/src/compiler/translator/WrapSwitchStatementsInBlocks.h b/src/compiler/translator/tree_ops/WrapSwitchStatementsInBlocks.h
similarity index 72%
rename from src/compiler/translator/WrapSwitchStatementsInBlocks.h
rename to src/compiler/translator/tree_ops/WrapSwitchStatementsInBlocks.h
index efd50f9..d04893c 100644
--- a/src/compiler/translator/WrapSwitchStatementsInBlocks.h
+++ b/src/compiler/translator/tree_ops/WrapSwitchStatementsInBlocks.h
@@ -6,8 +6,8 @@
// WrapSwitchStatementsInBlocks.h: Wrap switch statements in blocks and declare all switch-scoped
// variables there to make the AST compatible with HLSL output.
-#ifndef COMPILER_TRANSLATOR_WRAPSWITCHSTATEMENTSINBLOCKS_H_
-#define COMPILER_TRANSLATOR_WRAPSWITCHSTATEMENTSINBLOCKS_H_
+#ifndef COMPILER_TRANSLATOR_TREEOPS_WRAPSWITCHSTATEMENTSINBLOCKS_H_
+#define COMPILER_TRANSLATOR_TREEOPS_WRAPSWITCHSTATEMENTSINBLOCKS_H_
namespace sh
{
@@ -19,4 +19,4 @@
} // namespace sh
-#endif // COMPILER_TRANSLATOR_WRAPSWITCHSTATEMENTSINBLOCKS_H_
+#endif // COMPILER_TRANSLATOR_TREEOPS_WRAPSWITCHSTATEMENTSINBLOCKS_H_