success = translate(root);
}
- // Cleanup memory.
- intermediate.remove(parseContext.treeRoot);
// Ensure symbol table is returned to the built-in level,
// throwing away all but the built-ins.
while (!symbolTable.atBuiltInLevel())
<ClCompile Include="parseConst.cpp" />\r
<ClCompile Include="ParseHelper.cpp" />\r
<ClCompile Include="PoolAlloc.cpp" />\r
- <ClCompile Include="RemoveTree.cpp" />\r
<ClCompile Include="ShaderLang.cpp" />\r
<ClCompile Include="SymbolTable.cpp" />\r
<ClCompile Include="TranslatorASM.cpp" />\r
<ClInclude Include="ParseHelper.h" />\r
<ClInclude Include="PoolAlloc.h" />\r
<ClInclude Include="Pragma.h" />\r
- <ClInclude Include="RemoveTree.h" />\r
<ClInclude Include="ShHandle.h" />\r
<ClInclude Include="SymbolTable.h" />\r
<ClInclude Include="TranslatorASM.h" />\r
<ClCompile Include="PoolAlloc.cpp">\r
<Filter>Source Files</Filter>\r
</ClCompile>\r
- <ClCompile Include="RemoveTree.cpp">\r
- <Filter>Source Files</Filter>\r
- </ClCompile>\r
<ClCompile Include="ShaderLang.cpp">\r
<Filter>Source Files</Filter>\r
</ClCompile>\r
<ClInclude Include="PoolAlloc.h">\r
<Filter>Header Files</Filter>\r
</ClInclude>\r
- <ClInclude Include="RemoveTree.h">\r
- <Filter>Header Files</Filter>\r
- </ClInclude>\r
<ClInclude Include="ShHandle.h">\r
<Filter>Header Files</Filter>\r
</ClInclude>\r
#include <algorithm>
#include "compiler/localintermediate.h"
-#include "compiler/RemoveTree.h"
#include "compiler/SymbolTable.h"
bool CompareStructure(const TType& leftNodeType, ConstantUnion* rightUnionArray, ConstantUnion* leftUnionArray);
return true;
}
-//
-// This deletes the tree.
-//
-void TIntermediate::remove(TIntermNode* root)
-{
- if (root)
- RemoveAllTreeNodes(root);
-}
-
////////////////////////////////////////////////////////////////
//
// Member functions of the nodes used for building the tree.
+++ /dev/null
-//
-// Copyright (c) 2002-2010 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.
-//
-
-#include "compiler/intermediate.h"
-#include "compiler/RemoveTree.h"
-
-//
-// Code to recursively delete the intermediate tree.
-//
-
-class RemoveTree : public TIntermTraverser
-{
-public:
- RemoveTree() : TIntermTraverser(false, false, true)
- {
- }
-
-protected:
- void visitSymbol(TIntermSymbol*);
- void visitConstantUnion(TIntermConstantUnion*);
- bool visitBinary(Visit visit, TIntermBinary*);
- bool visitUnary(Visit visit, TIntermUnary*);
- bool visitSelection(Visit visit, TIntermSelection*);
- bool visitAggregate(Visit visit, TIntermAggregate*);
-};
-
-void RemoveTree::visitSymbol(TIntermSymbol* node)
-{
- delete node;
-}
-
-bool RemoveTree::visitBinary(Visit visit, TIntermBinary* node)
-{
- delete node;
-
- return true;
-}
-
-bool RemoveTree::visitUnary(Visit visit, TIntermUnary* node)
-{
- delete node;
-
- return true;
-}
-
-bool RemoveTree::visitAggregate(Visit visit, TIntermAggregate* node)
-{
- delete node;
-
- return true;
-}
-
-bool RemoveTree::visitSelection(Visit visit, TIntermSelection* node)
-{
- delete node;
-
- return true;
-}
-
-void RemoveTree::visitConstantUnion(TIntermConstantUnion* node)
-{
- delete node;
-}
-
-//
-// Entry point.
-//
-void RemoveAllTreeNodes(TIntermNode* root)
-{
- RemoveTree it;
-
- root->traverse(&it);
-}
-
+++ /dev/null
-//
-// Copyright (c) 2002-2010 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.
-//
-
-void RemoveAllTreeNodes(TIntermNode*);
TIntermBranch* addBranch(TOperator, TIntermTyped*, TSourceLoc);
TIntermTyped* addSwizzle(TVectorFields&, TSourceLoc);
bool postProcess(TIntermNode*);
- void remove(TIntermNode*);
void outputTree(TIntermNode*);
protected:
<Unit filename="../compiler/PoolAlloc.cpp" />
<Unit filename="../compiler/PoolAlloc.h" />
<Unit filename="../compiler/Pragma.h" />
- <Unit filename="../compiler/RemoveTree.cpp" />
- <Unit filename="../compiler/RemoveTree.h" />
<Unit filename="../compiler/ShHandle.h" />
<Unit filename="../compiler/ShaderLang.cpp" />
<Unit filename="../compiler/SymbolTable.cpp" />
\r
if(context)\r
{\r
- if (renderbuffer != 0 && !context->getRenderbuffer(renderbuffer))
- {
+ if(renderbuffer != 0 && !context->getRenderbuffer(renderbuffer))\r
+ {\r
// [OpenGL ES 2.0.25] Section 4.4.3 page 112\r
// [OpenGL ES 3.0.2] Section 4.4.2 page 201\r
// 'renderbuffer' must be either zero or the name of an existing renderbuffer object of\r
// type 'renderbuffertarget', otherwise an INVALID_OPERATION error is generated.\r
- return error(GL_INVALID_OPERATION);
+ return error(GL_INVALID_OPERATION);\r
}\r
\r
context->bindRenderbuffer(renderbuffer);\r
success = translate(root);
}
- // Cleanup memory.
- intermediate.remove(parseContext.treeRoot);
// Ensure symbol table is returned to the built-in level,
// throwing away all but the built-ins.
while (!symbolTable.atBuiltInLevel())
<ClCompile Include="parseConst.cpp" />\r
<ClCompile Include="ParseHelper.cpp" />\r
<ClCompile Include="PoolAlloc.cpp" />\r
- <ClCompile Include="RemoveTree.cpp" />\r
<ClCompile Include="ShaderLang.cpp" />\r
<ClCompile Include="SymbolTable.cpp" />\r
<ClCompile Include="TranslatorASM.cpp" />\r
<ClInclude Include="ParseHelper.h" />\r
<ClInclude Include="PoolAlloc.h" />\r
<ClInclude Include="Pragma.h" />\r
- <ClInclude Include="RemoveTree.h" />\r
<ClInclude Include="ShHandle.h" />\r
<ClInclude Include="SymbolTable.h" />\r
<ClInclude Include="TranslatorASM.h" />\r
<ClCompile Include="PoolAlloc.cpp">\r
<Filter>Source Files</Filter>\r
</ClCompile>\r
- <ClCompile Include="RemoveTree.cpp">\r
- <Filter>Source Files</Filter>\r
- </ClCompile>\r
<ClCompile Include="ShaderLang.cpp">\r
<Filter>Source Files</Filter>\r
</ClCompile>\r
<ClInclude Include="PoolAlloc.h">\r
<Filter>Header Files</Filter>\r
</ClInclude>\r
- <ClInclude Include="RemoveTree.h">\r
- <Filter>Header Files</Filter>\r
- </ClInclude>\r
<ClInclude Include="ShHandle.h">\r
<Filter>Header Files</Filter>\r
</ClInclude>\r
#include <algorithm>
#include "compiler/localintermediate.h"
-#include "compiler/RemoveTree.h"
#include "compiler/SymbolTable.h"
bool CompareStructure(const TType& leftNodeType, ConstantUnion* rightUnionArray, ConstantUnion* leftUnionArray);
return true;
}
-//
-// This deletes the tree.
-//
-void TIntermediate::remove(TIntermNode* root)
-{
- if (root)
- RemoveAllTreeNodes(root);
-}
-
////////////////////////////////////////////////////////////////
//
// Member functions of the nodes used for building the tree.
+++ /dev/null
-//
-// Copyright (c) 2002-2010 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.
-//
-
-#include "compiler/intermediate.h"
-#include "compiler/RemoveTree.h"
-
-//
-// Code to recursively delete the intermediate tree.
-//
-
-class RemoveTree : public TIntermTraverser
-{
-public:
- RemoveTree() : TIntermTraverser(false, false, true)
- {
- }
-
-protected:
- void visitSymbol(TIntermSymbol*);
- void visitConstantUnion(TIntermConstantUnion*);
- bool visitBinary(Visit visit, TIntermBinary*);
- bool visitUnary(Visit visit, TIntermUnary*);
- bool visitSelection(Visit visit, TIntermSelection*);
- bool visitAggregate(Visit visit, TIntermAggregate*);
-};
-
-void RemoveTree::visitSymbol(TIntermSymbol* node)
-{
- delete node;
-}
-
-bool RemoveTree::visitBinary(Visit visit, TIntermBinary* node)
-{
- delete node;
-
- return true;
-}
-
-bool RemoveTree::visitUnary(Visit visit, TIntermUnary* node)
-{
- delete node;
-
- return true;
-}
-
-bool RemoveTree::visitAggregate(Visit visit, TIntermAggregate* node)
-{
- delete node;
-
- return true;
-}
-
-bool RemoveTree::visitSelection(Visit visit, TIntermSelection* node)
-{
- delete node;
-
- return true;
-}
-
-void RemoveTree::visitConstantUnion(TIntermConstantUnion* node)
-{
- delete node;
-}
-
-//
-// Entry point.
-//
-void RemoveAllTreeNodes(TIntermNode* root)
-{
- RemoveTree it;
-
- root->traverse(&it);
-}
-
+++ /dev/null
-//
-// Copyright (c) 2002-2010 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.
-//
-
-void RemoveAllTreeNodes(TIntermNode*);
TIntermBranch* addBranch(TOperator, TIntermTyped*, TSourceLoc);
TIntermTyped* addSwizzle(TVectorFields&, TSourceLoc);
bool postProcess(TIntermNode*);
- void remove(TIntermNode*);
void outputTree(TIntermNode*);
protected: