Commit b1a85f48 by Jamie Madill

Rename compiler intermediate source files.

This prevents confusion between "TIntermediate" and "TIntermNode". BUG=angle:711 Change-Id: Ib7a086382a479db3f77bf2ab06ce321aa7b35d13 Reviewed-on: https://chromium-review.googlesource.com/212936Tested-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarZhenyao Mo <zmo@chromium.org> Reviewed-by: 's avatarNicolas Capens <capn@chromium.org>
parent 4f2bf3a5
......@@ -247,9 +247,10 @@
<ClInclude Include="..\..\src\compiler\translator\NodeSearch.h"/>
<ClInclude Include="..\..\src\compiler\translator\TranslatorESSL.h"/>
<ClInclude Include="..\..\src\compiler\translator\InitializeDll.h"/>
<ClInclude Include="..\..\src\compiler\translator\IntermNode.h"/>
<ClInclude Include="..\..\src\compiler\translator\ValidateOutputs.h"/>
<ClInclude Include="..\..\src\compiler\translator\Intermediate.h"/>
<ClInclude Include="..\..\src\compiler\translator\InitializeVariables.h"/>
<ClInclude Include="..\..\src\compiler\translator\localintermediate.h"/>
<ClInclude Include="..\..\src\compiler\translator\OutputGLSLBase.h"/>
<ClInclude Include="..\..\src\compiler\translator\ForLoopUnroll.h"/>
<ClInclude Include="..\..\src\compiler\translator\Pragma.h"/>
......@@ -259,10 +260,10 @@
<ClInclude Include="..\..\src\compiler\translator\StructureHLSL.h"/>
<ClInclude Include="..\..\src\compiler\translator\ValidateLimitations.h"/>
<ClInclude Include="..\..\src\compiler\translator\Types.h"/>
<ClInclude Include="..\..\src\compiler\translator\InfoSink.h"/>
<ClInclude Include="..\..\src\compiler\translator\MMap.h"/>
<ClInclude Include="..\..\src\compiler\translator\RemoveTree.h"/>
<ClInclude Include="..\..\src\compiler\translator\DetectCallDepth.h"/>
<ClInclude Include="..\..\src\compiler\translator\MMap.h"/>
<ClInclude Include="..\..\src\compiler\translator\InfoSink.h"/>
<ClInclude Include="..\..\src\compiler\translator\VariablePacker.h"/>
<ClInclude Include="..\..\src\compiler\translator\glslang.h"/>
<ClInclude Include="..\..\src\compiler\translator\SearchSymbol.h"/>
......@@ -336,6 +337,7 @@
<ClCompile Include="..\..\src\compiler\translator\CodeGen.cpp"/>
<ClCompile Include="..\..\src\compiler\translator\Intermediate.cpp"/>
<ClCompile Include="..\..\src\compiler\translator\IntermTraverse.cpp"/>
<ClCompile Include="..\..\src\compiler\translator\IntermNode.cpp"/>
<ClCompile Include="..\..\src\compiler\translator\intermOut.cpp"/>
<ClCompile Include="..\..\src\compiler\translator\glslang_tab.cpp"/>
<ClCompile Include="..\..\src\compiler\translator\ForLoopUnroll.cpp"/>
......
......@@ -249,13 +249,16 @@
<ClInclude Include="..\..\src\compiler\translator\InitializeDll.h">
<Filter>src\compiler\translator</Filter>
</ClInclude>
<ClInclude Include="..\..\src\compiler\translator\IntermNode.h">
<Filter>src\compiler\translator</Filter>
</ClInclude>
<ClInclude Include="..\..\src\compiler\translator\ValidateOutputs.h">
<Filter>src\compiler\translator</Filter>
</ClInclude>
<ClInclude Include="..\..\src\compiler\translator\InitializeVariables.h">
<ClInclude Include="..\..\src\compiler\translator\Intermediate.h">
<Filter>src\compiler\translator</Filter>
</ClInclude>
<ClInclude Include="..\..\src\compiler\translator\localintermediate.h">
<ClInclude Include="..\..\src\compiler\translator\InitializeVariables.h">
<Filter>src\compiler\translator</Filter>
</ClInclude>
<ClCompile Include="..\..\src\compiler\translator\RegenerateStructNames.cpp">
......@@ -300,7 +303,7 @@
<ClInclude Include="..\..\src\compiler\translator\Types.h">
<Filter>src\compiler\translator</Filter>
</ClInclude>
<ClInclude Include="..\..\src\compiler\translator\InfoSink.h">
<ClInclude Include="..\..\src\compiler\translator\MMap.h">
<Filter>src\compiler\translator</Filter>
</ClInclude>
<ClInclude Include="..\..\src\compiler\translator\RemoveTree.h">
......@@ -315,7 +318,7 @@
<ClInclude Include="..\..\src\compiler\translator\DetectCallDepth.h">
<Filter>src\compiler\translator</Filter>
</ClInclude>
<ClInclude Include="..\..\src\compiler\translator\MMap.h">
<ClInclude Include="..\..\src\compiler\translator\InfoSink.h">
<Filter>src\compiler\translator</Filter>
</ClInclude>
<ClInclude Include="..\..\src\compiler\translator\VariablePacker.h">
......@@ -342,6 +345,9 @@
<ClCompile Include="..\..\src\compiler\translator\IntermTraverse.cpp">
<Filter>src\compiler\translator</Filter>
</ClCompile>
<ClCompile Include="..\..\src\compiler\translator\IntermNode.cpp">
<Filter>src\compiler\translator</Filter>
</ClCompile>
<None Include="..\..\src\compiler\translator\glslang.l">
<Filter>src\compiler\translator</Filter>
</None>
......
......@@ -72,7 +72,10 @@
'compiler/translator/InitializeVariables.cpp',
'compiler/translator/InitializeVariables.h',
'compiler/translator/IntermTraverse.cpp',
'compiler/translator/Intermediate.h',
'compiler/translator/Intermediate.cpp',
'compiler/translator/IntermNode.h',
'compiler/translator/IntermNode.cpp',
'compiler/translator/LoopInfo.cpp',
'compiler/translator/LoopInfo.h',
'compiler/translator/MMap.h',
......@@ -151,7 +154,6 @@
'compiler/translator/intermOut.cpp',
'compiler/translator/intermediate.h',
'compiler/translator/length_limits.h',
'compiler/translator/localintermediate.h',
'compiler/translator/parseConst.cpp',
'compiler/translator/timing/RestrictFragmentShaderTiming.cpp',
'compiler/translator/timing/RestrictFragmentShaderTiming.h',
......
......@@ -8,7 +8,7 @@
#define COMPILIER_BUILT_IN_FUNCTION_EMULATOR_H_
#include "compiler/translator/InfoSink.h"
#include "compiler/translator/intermediate.h"
#include "compiler/translator/IntermNode.h"
//
// This class decides which built-in functions need to be replaced with the
......
......@@ -8,7 +8,7 @@
#define COMPILER_DETECT_RECURSION_H_
#include <limits.h>
#include "compiler/translator/intermediate.h"
#include "compiler/translator/IntermNode.h"
#include "compiler/translator/VariableInfo.h"
class TInfoSink;
......
......@@ -11,7 +11,7 @@
#ifndef COMPILER_DETECTDISCONTINUITY_H_
#define COMPILER_DETECTDISCONTINUITY_H_
#include "compiler/translator/intermediate.h"
#include "compiler/translator/IntermNode.h"
namespace sh
{
......
......@@ -7,7 +7,7 @@
#ifndef COMPILER_FLAGSTD140STRUCTS_H_
#define COMPILER_FLAGSTD140STRUCTS_H_
#include "compiler/translator/intermediate.h"
#include "compiler/translator/IntermNode.h"
namespace sh
{
......
......@@ -9,7 +9,7 @@
#include <map>
#include "compiler/translator/intermediate.h"
#include "compiler/translator/IntermNode.h"
#define HASHED_NAME_PREFIX "webgl_"
......
......@@ -12,7 +12,7 @@
#include "compiler/translator/Initialize.h"
#include "compiler/translator/intermediate.h"
#include "compiler/translator/IntermNode.h"
#include "angle_gl.h"
void InsertBuiltInFunctions(sh::GLenum type, ShShaderSpec spec, const ShBuiltInResources &resources, TSymbolTable &symbolTable)
......
......@@ -7,7 +7,7 @@
#ifndef COMPILER_INITIALIZE_VARIABLES_H_
#define COMPILER_INITIALIZE_VARIABLES_H_
#include "compiler/translator/intermediate.h"
#include "compiler/translator/IntermNode.h"
class InitializeVariables : public TIntermTraverser
{
......
......@@ -4,7 +4,7 @@
// found in the LICENSE file.
//
#include "compiler/translator/intermediate.h"
#include "compiler/translator/IntermNode.h"
//
// Traverse the intermediate representation tree, and
......
......@@ -7,7 +7,7 @@
#ifndef COMPILER_TRANSLATOR_LOOP_INFO_H_
#define COMPILER_TRANSLATOR_LOOP_INFO_H_
#include "compiler/translator/intermediate.h"
#include "compiler/translator/IntermNode.h"
class TLoopIndexInfo
{
......
......@@ -9,7 +9,7 @@
#ifndef TRANSLATOR_NODESEARCH_H_
#define TRANSLATOR_NODESEARCH_H_
#include "compiler/translator/intermediate.h"
#include "compiler/translator/IntermNode.h"
namespace sh
{
......
......@@ -9,7 +9,7 @@
#include <set>
#include "compiler/translator/intermediate.h"
#include "compiler/translator/IntermNode.h"
#include "compiler/translator/LoopInfo.h"
#include "compiler/translator/ParseContext.h"
......
......@@ -13,7 +13,7 @@
#include "angle_gl.h"
#include "compiler/translator/intermediate.h"
#include "compiler/translator/IntermNode.h"
#include "compiler/translator/ParseContext.h"
namespace sh
......
......@@ -9,7 +9,7 @@
#include "compiler/translator/Compiler.h"
#include "compiler/translator/Diagnostics.h"
#include "compiler/translator/DirectiveHandler.h"
#include "compiler/translator/localintermediate.h"
#include "compiler/translator/Intermediate.h"
#include "compiler/translator/SymbolTable.h"
#include "compiler/preprocessor/Preprocessor.h"
......
......@@ -4,7 +4,7 @@
// found in the LICENSE file.
//
#include "compiler/translator/intermediate.h"
#include "compiler/translator/IntermNode.h"
class TAliveTraverser : public TIntermTraverser {
public:
......
......@@ -4,7 +4,7 @@
// found in the LICENSE file.
//
#include "compiler/translator/intermediate.h"
#include "compiler/translator/IntermNode.h"
#include "compiler/translator/RemoveTree.h"
//
......
......@@ -7,7 +7,7 @@
#ifndef COMPILER_RENAME_FUNCTION
#define COMPILER_RENAME_FUNCTION
#include "compiler/translator/intermediate.h"
#include "compiler/translator/IntermNode.h"
//
// Renames a function, including its declaration and any calls to it.
......
......@@ -10,7 +10,7 @@
#ifndef COMPILER_REWRITE_ELSE_BLOCKS_H_
#define COMPILER_REWRITE_ELSE_BLOCKS_H_
#include "compiler/translator/intermediate.h"
#include "compiler/translator/IntermNode.h"
namespace sh
{
......
......@@ -7,7 +7,7 @@
#ifndef COMPILER_TRANSLATOR_SCALARIZE_VEC_AND_MAT_CONSTRUCTOR_ARGS_H_
#define COMPILER_TRANSLATOR_SCALARIZE_VEC_AND_MAT_CONSTRUCTOR_ARGS_H_
#include "compiler/translator/intermediate.h"
#include "compiler/translator/IntermNode.h"
class ScalarizeVecAndMatConstructorArgs : public TIntermTraverser
{
......
......@@ -9,7 +9,7 @@
#ifndef COMPILER_SEARCHSYMBOL_H_
#define COMPILER_SEARCHSYMBOL_H_
#include "compiler/translator/intermediate.h"
#include "compiler/translator/IntermNode.h"
#include "compiler/translator/ParseContext.h"
namespace sh
......
......@@ -11,7 +11,7 @@
#define TRANSLATOR_STRUCTUREHLSL_H_
#include "compiler/translator/Common.h"
#include "compiler/translator/intermediate.h"
#include "compiler/translator/IntermNode.h"
#include <set>
......
......@@ -34,7 +34,7 @@
#include "common/angleutils.h"
#include "compiler/translator/InfoSink.h"
#include "compiler/translator/intermediate.h"
#include "compiler/translator/IntermNode.h"
// Symbol base class. (Can build functions or variables out of these...)
class TSymbol
......
......@@ -9,7 +9,7 @@
#ifndef COMPILER_UNFOLDSHORTCIRCUIT_H_
#define COMPILER_UNFOLDSHORTCIRCUIT_H_
#include "compiler/translator/intermediate.h"
#include "compiler/translator/IntermNode.h"
#include "compiler/translator/ParseContext.h"
namespace sh
......
......@@ -11,7 +11,7 @@
#define COMPILER_UNFOLD_SHORT_CIRCUIT_AST_H_
#include "common/angleutils.h"
#include "compiler/translator/intermediate.h"
#include "compiler/translator/IntermNode.h"
// This traverser identifies all the short circuit binary nodes that need to
// be replaced, and creates the corresponding replacement nodes. However,
......
......@@ -4,7 +4,7 @@
// found in the LICENSE file.
//
#include "compiler/translator/intermediate.h"
#include "compiler/translator/IntermNode.h"
#include "compiler/translator/LoopInfo.h"
class TInfoSinkBase;
......
......@@ -4,7 +4,7 @@
// found in the LICENSE file.
//
#include "compiler/translator/intermediate.h"
#include "compiler/translator/IntermNode.h"
#include <set>
......
......@@ -9,7 +9,7 @@
#include <GLSLANG/ShaderLang.h>
#include "compiler/translator/intermediate.h"
#include "compiler/translator/IntermNode.h"
// Traverses intermediate tree to collect all attributes, uniforms, varyings.
class CollectVariables : public TIntermTraverser
......
......@@ -7,7 +7,7 @@
#ifndef COMPILER_TRANSLATOR_VERSIONGLSL_H_
#define COMPILER_TRANSLATOR_VERSIONGLSL_H_
#include "compiler/translator/intermediate.h"
#include "compiler/translator/IntermNode.h"
// Traverses the intermediate tree to return the minimum GLSL version
// required to legally access all built-in features used in the shader.
......
......@@ -7,7 +7,7 @@
#ifndef COMPILER_DEPGRAPH_DEPENDENCY_GRAPH_H
#define COMPILER_DEPGRAPH_DEPENDENCY_GRAPH_H
#include "compiler/translator/intermediate.h"
#include "compiler/translator/IntermNode.h"
#include <set>
#include <stack>
......
......@@ -4,7 +4,7 @@
// found in the LICENSE file.
//
#include "compiler/translator/localintermediate.h"
#include "compiler/translator/Intermediate.h"
#include "compiler/translator/SymbolTable.h"
namespace
......
//
// Copyright (c) 2002-2014 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_LOCAL_INTERMEDIATE_H_
#define COMPILER_TRANSLATOR_LOCAL_INTERMEDIATE_H_
#include "compiler/translator/intermediate.h"
struct TVectorFields
{
int offsets[4];
int num;
};
//
// Set of helper functions to help parse and build the tree.
//
class TInfoSink;
class TIntermediate
{
public:
POOL_ALLOCATOR_NEW_DELETE();
TIntermediate(TInfoSink &i)
: mInfoSink(i) { }
TIntermSymbol *addSymbol(
int id, const TString &, const TType &, const TSourceLoc &);
TIntermTyped *addBinaryMath(
TOperator op, TIntermTyped *left, TIntermTyped *right, const TSourceLoc &);
TIntermTyped *addAssign(
TOperator op, TIntermTyped *left, TIntermTyped *right, const TSourceLoc &);
TIntermTyped *addIndex(
TOperator op, TIntermTyped *base, TIntermTyped *index, const TSourceLoc &);
TIntermTyped *addUnaryMath(
TOperator op, TIntermNode *child, const TSourceLoc &);
TIntermAggregate *growAggregate(
TIntermNode *left, TIntermNode *right, const TSourceLoc &);
TIntermAggregate *makeAggregate(TIntermNode *node, const TSourceLoc &);
TIntermAggregate *setAggregateOperator(TIntermNode *, TOperator, const TSourceLoc &);
TIntermNode *addSelection(TIntermTyped *cond, TIntermNodePair code, const TSourceLoc &);
TIntermTyped *addSelection(
TIntermTyped *cond, TIntermTyped *trueBlock, TIntermTyped *falseBlock, const TSourceLoc &);
TIntermTyped *addComma(
TIntermTyped *left, TIntermTyped *right, const TSourceLoc &);
TIntermConstantUnion *addConstantUnion(ConstantUnion *, const TType &, const TSourceLoc &);
// TODO(zmo): Get rid of default value.
bool parseConstTree(const TSourceLoc &, TIntermNode *, ConstantUnion *,
TOperator, TType, bool singleConstantParam = false);
TIntermNode *addLoop(TLoopType, TIntermNode *, TIntermTyped *, TIntermTyped *,
TIntermNode *, const TSourceLoc &);
TIntermBranch *addBranch(TOperator, const TSourceLoc &);
TIntermBranch *addBranch(TOperator, TIntermTyped *, const TSourceLoc &);
TIntermTyped *addSwizzle(TVectorFields &, const TSourceLoc &);
bool postProcess(TIntermNode *);
void remove(TIntermNode *);
void outputTree(TIntermNode *);
private:
void operator=(TIntermediate &); // prevent assignments
TInfoSink & mInfoSink;
};
#endif // COMPILER_TRANSLATOR_LOCAL_INTERMEDIATE_H_
......@@ -7,7 +7,7 @@
#ifndef COMPILER_TIMING_RESTRICT_FRAGMENT_SHADER_TIMING_H_
#define COMPILER_TIMING_RESTRICT_FRAGMENT_SHADER_TIMING_H_
#include "compiler/translator/intermediate.h"
#include "compiler/translator/IntermNode.h"
#include "compiler/translator/depgraph/DependencyGraph.h"
class TInfoSinkBase;
......
......@@ -7,7 +7,7 @@
#ifndef COMPILER_TIMING_RESTRICT_VERTEX_SHADER_TIMING_H_
#define COMPILER_TIMING_RESTRICT_VERTEX_SHADER_TIMING_H_
#include "compiler/translator/intermediate.h"
#include "compiler/translator/IntermNode.h"
#include "compiler/translator/InfoSink.h"
class TInfoSinkBase;
......
......@@ -27,7 +27,7 @@
#define THIRD_PARTY_COMPILER_ARRAY_BOUNDS_CLAMPER_H_
#include "compiler/translator/InfoSink.h"
#include "compiler/translator/intermediate.h"
#include "compiler/translator/IntermNode.h"
class ArrayBoundsClamper {
public:
......
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