Commit 6ff56fd4 by alokp@chromium.org

Renamed constUnion class to ConstantUnion.

Review URL: http://codereview.appspot.com/1106042 git-svn-id: https://angleproject.googlecode.com/svn/trunk@227 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 428d1587
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#define _CONSTANT_UNION_INCLUDED_ #define _CONSTANT_UNION_INCLUDED_
class constUnion { class ConstantUnion {
public: public:
POOL_ALLOCATOR_NEW_DELETE(GlobalPoolAllocator) POOL_ALLOCATOR_NEW_DELETE(GlobalPoolAllocator)
...@@ -47,7 +47,7 @@ public: ...@@ -47,7 +47,7 @@ public:
return false; return false;
} }
bool operator==(const constUnion& constant) const bool operator==(const ConstantUnion& constant) const
{ {
if (constant.type != type) if (constant.type != type)
return false; return false;
...@@ -88,12 +88,12 @@ public: ...@@ -88,12 +88,12 @@ public:
return !operator==(b); return !operator==(b);
} }
bool operator!=(const constUnion& constant) const bool operator!=(const ConstantUnion& constant) const
{ {
return !operator==(constant); return !operator==(constant);
} }
bool operator>(const constUnion& constant) const bool operator>(const ConstantUnion& constant) const
{ {
assert(type == constant.type); assert(type == constant.type);
switch (type) { switch (type) {
...@@ -115,7 +115,7 @@ public: ...@@ -115,7 +115,7 @@ public:
return false; return false;
} }
bool operator<(const constUnion& constant) const bool operator<(const ConstantUnion& constant) const
{ {
assert(type == constant.type); assert(type == constant.type);
switch (type) { switch (type) {
...@@ -137,9 +137,9 @@ public: ...@@ -137,9 +137,9 @@ public:
return false; return false;
} }
constUnion operator+(const constUnion& constant) const ConstantUnion operator+(const ConstantUnion& constant) const
{ {
constUnion returnValue; ConstantUnion returnValue;
assert(type == constant.type); assert(type == constant.type);
switch (type) { switch (type) {
case EbtInt: returnValue.setIConst(iConst + constant.iConst); break; case EbtInt: returnValue.setIConst(iConst + constant.iConst); break;
...@@ -150,9 +150,9 @@ public: ...@@ -150,9 +150,9 @@ public:
return returnValue; return returnValue;
} }
constUnion operator-(const constUnion& constant) const ConstantUnion operator-(const ConstantUnion& constant) const
{ {
constUnion returnValue; ConstantUnion returnValue;
assert(type == constant.type); assert(type == constant.type);
switch (type) { switch (type) {
case EbtInt: returnValue.setIConst(iConst - constant.iConst); break; case EbtInt: returnValue.setIConst(iConst - constant.iConst); break;
...@@ -163,9 +163,9 @@ public: ...@@ -163,9 +163,9 @@ public:
return returnValue; return returnValue;
} }
constUnion operator*(const constUnion& constant) const ConstantUnion operator*(const ConstantUnion& constant) const
{ {
constUnion returnValue; ConstantUnion returnValue;
assert(type == constant.type); assert(type == constant.type);
switch (type) { switch (type) {
case EbtInt: returnValue.setIConst(iConst * constant.iConst); break; case EbtInt: returnValue.setIConst(iConst * constant.iConst); break;
...@@ -176,9 +176,9 @@ public: ...@@ -176,9 +176,9 @@ public:
return returnValue; return returnValue;
} }
constUnion operator%(const constUnion& constant) const ConstantUnion operator%(const ConstantUnion& constant) const
{ {
constUnion returnValue; ConstantUnion returnValue;
assert(type == constant.type); assert(type == constant.type);
switch (type) { switch (type) {
case EbtInt: returnValue.setIConst(iConst % constant.iConst); break; case EbtInt: returnValue.setIConst(iConst % constant.iConst); break;
...@@ -188,9 +188,9 @@ public: ...@@ -188,9 +188,9 @@ public:
return returnValue; return returnValue;
} }
constUnion operator>>(const constUnion& constant) const ConstantUnion operator>>(const ConstantUnion& constant) const
{ {
constUnion returnValue; ConstantUnion returnValue;
assert(type == constant.type); assert(type == constant.type);
switch (type) { switch (type) {
case EbtInt: returnValue.setIConst(iConst >> constant.iConst); break; case EbtInt: returnValue.setIConst(iConst >> constant.iConst); break;
...@@ -200,9 +200,9 @@ public: ...@@ -200,9 +200,9 @@ public:
return returnValue; return returnValue;
} }
constUnion operator<<(const constUnion& constant) const ConstantUnion operator<<(const ConstantUnion& constant) const
{ {
constUnion returnValue; ConstantUnion returnValue;
assert(type == constant.type); assert(type == constant.type);
switch (type) { switch (type) {
case EbtInt: returnValue.setIConst(iConst << constant.iConst); break; case EbtInt: returnValue.setIConst(iConst << constant.iConst); break;
...@@ -212,9 +212,9 @@ public: ...@@ -212,9 +212,9 @@ public:
return returnValue; return returnValue;
} }
constUnion operator&(const constUnion& constant) const ConstantUnion operator&(const ConstantUnion& constant) const
{ {
constUnion returnValue; ConstantUnion returnValue;
assert(type == constant.type); assert(type == constant.type);
switch (type) { switch (type) {
case EbtInt: returnValue.setIConst(iConst & constant.iConst); break; case EbtInt: returnValue.setIConst(iConst & constant.iConst); break;
...@@ -224,9 +224,9 @@ public: ...@@ -224,9 +224,9 @@ public:
return returnValue; return returnValue;
} }
constUnion operator|(const constUnion& constant) const ConstantUnion operator|(const ConstantUnion& constant) const
{ {
constUnion returnValue; ConstantUnion returnValue;
assert(type == constant.type); assert(type == constant.type);
switch (type) { switch (type) {
case EbtInt: returnValue.setIConst(iConst | constant.iConst); break; case EbtInt: returnValue.setIConst(iConst | constant.iConst); break;
...@@ -236,9 +236,9 @@ public: ...@@ -236,9 +236,9 @@ public:
return returnValue; return returnValue;
} }
constUnion operator^(const constUnion& constant) const ConstantUnion operator^(const ConstantUnion& constant) const
{ {
constUnion returnValue; ConstantUnion returnValue;
assert(type == constant.type); assert(type == constant.type);
switch (type) { switch (type) {
case EbtInt: returnValue.setIConst(iConst ^ constant.iConst); break; case EbtInt: returnValue.setIConst(iConst ^ constant.iConst); break;
...@@ -248,9 +248,9 @@ public: ...@@ -248,9 +248,9 @@ public:
return returnValue; return returnValue;
} }
constUnion operator&&(const constUnion& constant) const ConstantUnion operator&&(const ConstantUnion& constant) const
{ {
constUnion returnValue; ConstantUnion returnValue;
assert(type == constant.type); assert(type == constant.type);
switch (type) { switch (type) {
case EbtBool: returnValue.setBConst(bConst && constant.bConst); break; case EbtBool: returnValue.setBConst(bConst && constant.bConst); break;
...@@ -260,9 +260,9 @@ public: ...@@ -260,9 +260,9 @@ public:
return returnValue; return returnValue;
} }
constUnion operator||(const constUnion& constant) const ConstantUnion operator||(const ConstantUnion& constant) const
{ {
constUnion returnValue; ConstantUnion returnValue;
assert(type == constant.type); assert(type == constant.type);
switch (type) { switch (type) {
case EbtBool: returnValue.setBConst(bConst || constant.bConst); break; case EbtBool: returnValue.setBConst(bConst || constant.bConst); break;
......
...@@ -115,7 +115,7 @@ void TOutputGLSL::visitConstantUnion(TIntermConstantUnion* node) ...@@ -115,7 +115,7 @@ void TOutputGLSL::visitConstantUnion(TIntermConstantUnion* node)
out << getTypeName(type) << "("; out << getTypeName(type) << "(";
for (int i = 0; i < size; ++i) for (int i = 0; i < size; ++i)
{ {
const constUnion& data = node->getUnionArrayPointer()[i]; const ConstantUnion& data = node->getUnionArrayPointer()[i];
switch (data.getType()) switch (data.getType())
{ {
case EbtFloat: out << data.getFConst(); break; case EbtFloat: out << data.getFConst(); break;
...@@ -178,7 +178,7 @@ bool TOutputGLSL::visitBinary(Visit visit, TIntermBinary* node) ...@@ -178,7 +178,7 @@ bool TOutputGLSL::visitBinary(Visit visit, TIntermBinary* node)
TIntermConstantUnion* element = (*sit)->getAsConstantUnion(); TIntermConstantUnion* element = (*sit)->getAsConstantUnion();
ASSERT(element->getBasicType() == EbtInt); ASSERT(element->getBasicType() == EbtInt);
ASSERT(element->getNominalSize() == 1); ASSERT(element->getNominalSize() == 1);
const constUnion& data = element->getUnionArrayPointer()[0]; const ConstantUnion& data = element->getUnionArrayPointer()[0];
ASSERT(data.getType() == EbtInt); ASSERT(data.getType() == EbtInt);
switch (data.getIConst()) switch (data.getIConst())
{ {
......
...@@ -951,7 +951,7 @@ bool TParseContext::executeInitializer(TSourceLoc line, TString& identifier, TPu ...@@ -951,7 +951,7 @@ bool TParseContext::executeInitializer(TSourceLoc line, TString& identifier, TPu
return true; return true;
} }
if (initializer->getAsConstantUnion()) { if (initializer->getAsConstantUnion()) {
constUnion* unionArray = variable->getConstPointer(); ConstantUnion* unionArray = variable->getConstPointer();
if (type.getObjectSize() == 1 && type.getBasicType() != EbtStruct) { if (type.getObjectSize() == 1 && type.getBasicType() != EbtStruct) {
*unionArray = (initializer->getAsConstantUnion()->getUnionArrayPointer())[0]; *unionArray = (initializer->getAsConstantUnion()->getUnionArrayPointer())[0];
...@@ -962,7 +962,7 @@ bool TParseContext::executeInitializer(TSourceLoc line, TString& identifier, TPu ...@@ -962,7 +962,7 @@ bool TParseContext::executeInitializer(TSourceLoc line, TString& identifier, TPu
const TSymbol* symbol = symbolTable.find(initializer->getAsSymbolNode()->getSymbol()); const TSymbol* symbol = symbolTable.find(initializer->getAsSymbolNode()->getSymbol());
const TVariable* tVar = static_cast<const TVariable*>(symbol); const TVariable* tVar = static_cast<const TVariable*>(symbol);
constUnion* constArray = tVar->getConstPointer(); ConstantUnion* constArray = tVar->getConstPointer();
variable->shareConstPointer(constArray); variable->shareConstPointer(constArray);
} else { } else {
error(line, " cannot assign to", "=", "'%s'", variable->getType().getCompleteString().c_str()); error(line, " cannot assign to", "=", "'%s'", variable->getType().getCompleteString().c_str());
...@@ -1095,7 +1095,7 @@ TIntermTyped* TParseContext::foldConstConstructor(TIntermAggregate* aggrNode, co ...@@ -1095,7 +1095,7 @@ TIntermTyped* TParseContext::foldConstConstructor(TIntermAggregate* aggrNode, co
aggrNode->setType(type); aggrNode->setType(type);
if (canBeFolded) { if (canBeFolded) {
bool returnVal = false; bool returnVal = false;
constUnion* unionArray = new constUnion[type.getObjectSize()]; ConstantUnion* unionArray = new ConstantUnion[type.getObjectSize()];
if (aggrNode->getSequence().size() == 1) { if (aggrNode->getSequence().size() == 1) {
returnVal = intermediate.parseConstTree(aggrNode->getLine(), aggrNode, unionArray, aggrNode->getOp(), symbolTable, type, true); returnVal = intermediate.parseConstTree(aggrNode->getLine(), aggrNode, unionArray, aggrNode->getOp(), symbolTable, type, true);
} }
...@@ -1208,12 +1208,12 @@ TIntermTyped* TParseContext::addConstVectorNode(TVectorFields& fields, TIntermTy ...@@ -1208,12 +1208,12 @@ TIntermTyped* TParseContext::addConstVectorNode(TVectorFields& fields, TIntermTy
TIntermTyped* typedNode; TIntermTyped* typedNode;
TIntermConstantUnion* tempConstantNode = node->getAsConstantUnion(); TIntermConstantUnion* tempConstantNode = node->getAsConstantUnion();
constUnion *unionArray; ConstantUnion *unionArray;
if (tempConstantNode) { if (tempConstantNode) {
unionArray = tempConstantNode->getUnionArrayPointer(); unionArray = tempConstantNode->getUnionArrayPointer();
if (!unionArray) { // this error message should never be raised if (!unionArray) { // this error message should never be raised
infoSink.info.message(EPrefixInternalError, "constUnion not initialized in addConstVectorNode function", line); infoSink.info.message(EPrefixInternalError, "ConstantUnion not initialized in addConstVectorNode function", line);
recover(); recover();
return node; return node;
...@@ -1225,7 +1225,7 @@ TIntermTyped* TParseContext::addConstVectorNode(TVectorFields& fields, TIntermTy ...@@ -1225,7 +1225,7 @@ TIntermTyped* TParseContext::addConstVectorNode(TVectorFields& fields, TIntermTy
return 0; return 0;
} }
constUnion* constArray = new constUnion[fields.num]; ConstantUnion* constArray = new ConstantUnion[fields.num];
for (int i = 0; i < fields.num; i++) { for (int i = 0; i < fields.num; i++) {
if (fields.offsets[i] >= node->getType().getObjectSize()) { if (fields.offsets[i] >= node->getType().getObjectSize()) {
...@@ -1259,7 +1259,7 @@ TIntermTyped* TParseContext::addConstMatrixNode(int index, TIntermTyped* node, T ...@@ -1259,7 +1259,7 @@ TIntermTyped* TParseContext::addConstMatrixNode(int index, TIntermTyped* node, T
} }
if (tempConstantNode) { if (tempConstantNode) {
constUnion* unionArray = tempConstantNode->getUnionArrayPointer(); ConstantUnion* unionArray = tempConstantNode->getUnionArrayPointer();
int size = tempConstantNode->getType().getNominalSize(); int size = tempConstantNode->getType().getNominalSize();
typedNode = intermediate.addConstantUnion(&unionArray[size*index], tempConstantNode->getType(), line); typedNode = intermediate.addConstantUnion(&unionArray[size*index], tempConstantNode->getType(), line);
} else { } else {
...@@ -1295,7 +1295,7 @@ TIntermTyped* TParseContext::addConstArrayNode(int index, TIntermTyped* node, TS ...@@ -1295,7 +1295,7 @@ TIntermTyped* TParseContext::addConstArrayNode(int index, TIntermTyped* node, TS
int arrayElementSize = arrayElementType.getObjectSize(); int arrayElementSize = arrayElementType.getObjectSize();
if (tempConstantNode) { if (tempConstantNode) {
constUnion* unionArray = tempConstantNode->getUnionArrayPointer(); ConstantUnion* unionArray = tempConstantNode->getUnionArrayPointer();
typedNode = intermediate.addConstantUnion(&unionArray[arrayElementSize * index], tempConstantNode->getType(), line); typedNode = intermediate.addConstantUnion(&unionArray[arrayElementSize * index], tempConstantNode->getType(), line);
} else { } else {
error(line, "Cannot offset into the array", "Error", ""); error(line, "Cannot offset into the array", "Error", "");
...@@ -1330,7 +1330,7 @@ TIntermTyped* TParseContext::addConstStruct(TString& identifier, TIntermTyped* n ...@@ -1330,7 +1330,7 @@ TIntermTyped* TParseContext::addConstStruct(TString& identifier, TIntermTyped* n
} }
if (tempConstantNode) { if (tempConstantNode) {
constUnion* constArray = tempConstantNode->getUnionArrayPointer(); ConstantUnion* constArray = tempConstantNode->getUnionArrayPointer();
typedNode = intermediate.addConstantUnion(constArray+instanceSize, tempConstantNode->getType(), line); // type will be changed in the calling function typedNode = intermediate.addConstantUnion(constArray+instanceSize, tempConstantNode->getType(), line); // type will be changed in the calling function
} else { } else {
......
...@@ -156,7 +156,7 @@ TVariable::TVariable(const TVariable& copyOf, TStructureMap& remapper) : TSymbol ...@@ -156,7 +156,7 @@ TVariable::TVariable(const TVariable& copyOf, TStructureMap& remapper) : TSymbol
if (copyOf.unionArray) { if (copyOf.unionArray) {
assert(!copyOf.type.getStruct()); assert(!copyOf.type.getStruct());
assert(copyOf.type.getObjectSize() == 1); assert(copyOf.type.getObjectSize() == 1);
unionArray = new constUnion[1]; unionArray = new ConstantUnion[1];
unionArray[0] = copyOf.unionArray[0]; unionArray[0] = copyOf.unionArray[0];
} else } else
unionArray = 0; unionArray = 0;
......
...@@ -81,17 +81,17 @@ public: ...@@ -81,17 +81,17 @@ public:
virtual void dump(TInfoSink &infoSink) const; virtual void dump(TInfoSink &infoSink) const;
constUnion* getConstPointer() ConstantUnion* getConstPointer()
{ {
if (!unionArray) if (!unionArray)
unionArray = new constUnion[type.getObjectSize()]; unionArray = new ConstantUnion[type.getObjectSize()];
return unionArray; return unionArray;
} }
constUnion* getConstPointer() const { return unionArray; } ConstantUnion* getConstPointer() const { return unionArray; }
void shareConstPointer( constUnion *constArray) void shareConstPointer( ConstantUnion *constArray)
{ {
delete unionArray; delete unionArray;
unionArray = constArray; unionArray = constArray;
...@@ -104,7 +104,7 @@ protected: ...@@ -104,7 +104,7 @@ protected:
bool userType; bool userType;
// we are assuming that Pool Allocator will free the memory allocated to unionArray // we are assuming that Pool Allocator will free the memory allocated to unionArray
// when this object is destroyed // when this object is destroyed
constUnion *unionArray; ConstantUnion *unionArray;
TType *arrayInformationType; // this is used for updating maxArraySize in all the references to a given symbol TType *arrayInformationType; // this is used for updating maxArraySize in all the references to a given symbol
}; };
......
...@@ -314,14 +314,14 @@ protected: ...@@ -314,14 +314,14 @@ protected:
class TIntermConstantUnion : public TIntermTyped { class TIntermConstantUnion : public TIntermTyped {
public: public:
TIntermConstantUnion(constUnion *unionPointer, const TType& t) : TIntermTyped(t), unionArrayPointer(unionPointer) { } TIntermConstantUnion(ConstantUnion *unionPointer, const TType& t) : TIntermTyped(t), unionArrayPointer(unionPointer) { }
constUnion* getUnionArrayPointer() const { return unionArrayPointer; } ConstantUnion* getUnionArrayPointer() const { return unionArrayPointer; }
void setUnionArrayPointer(constUnion *c) { unionArrayPointer = c; } void setUnionArrayPointer(ConstantUnion *c) { unionArrayPointer = c; }
virtual TIntermConstantUnion* getAsConstantUnion() { return this; } virtual TIntermConstantUnion* getAsConstantUnion() { return this; }
virtual void traverse(TIntermTraverser* ); virtual void traverse(TIntermTraverser* );
virtual TIntermTyped* fold(TOperator, TIntermTyped*, TInfoSink&); virtual TIntermTyped* fold(TOperator, TIntermTyped*, TInfoSink&);
protected: protected:
constUnion *unionArrayPointer; ConstantUnion *unionArrayPointer;
}; };
// //
......
...@@ -37,9 +37,9 @@ public: ...@@ -37,9 +37,9 @@ public:
TIntermNode* addSelection(TIntermTyped* cond, TIntermNodePair code, TSourceLoc); TIntermNode* addSelection(TIntermTyped* cond, TIntermNodePair code, TSourceLoc);
TIntermTyped* addSelection(TIntermTyped* cond, TIntermTyped* trueBlock, TIntermTyped* falseBlock, TSourceLoc); TIntermTyped* addSelection(TIntermTyped* cond, TIntermTyped* trueBlock, TIntermTyped* falseBlock, TSourceLoc);
TIntermTyped* addComma(TIntermTyped* left, TIntermTyped* right, TSourceLoc); TIntermTyped* addComma(TIntermTyped* left, TIntermTyped* right, TSourceLoc);
TIntermConstantUnion* addConstantUnion(constUnion*, const TType&, TSourceLoc); TIntermConstantUnion* addConstantUnion(ConstantUnion*, const TType&, TSourceLoc);
TIntermTyped* promoteConstantUnion(TBasicType, TIntermConstantUnion*) ; TIntermTyped* promoteConstantUnion(TBasicType, TIntermConstantUnion*) ;
bool parseConstTree(TSourceLoc, TIntermNode*, constUnion*, TOperator, TSymbolTable&, TType, bool singleConstantParam = false); bool parseConstTree(TSourceLoc, TIntermNode*, ConstantUnion*, TOperator, TSymbolTable&, TType, bool singleConstantParam = false);
TIntermNode* addLoop(TIntermNode*, TIntermNode*, TIntermTyped*, TIntermTyped*, bool testFirst, TSourceLoc); TIntermNode* addLoop(TIntermNode*, TIntermNode*, TIntermTyped*, TIntermTyped*, bool testFirst, TSourceLoc);
TIntermBranch* addBranch(TOperator, TSourceLoc); TIntermBranch* addBranch(TOperator, TSourceLoc);
TIntermBranch* addBranch(TOperator, TIntermTyped*, TSourceLoc); TIntermBranch* addBranch(TOperator, TIntermTyped*, TSourceLoc);
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
// //
class TConstTraverser : public TIntermTraverser { class TConstTraverser : public TIntermTraverser {
public: public:
TConstTraverser(constUnion* cUnion, bool singleConstParam, TOperator constructType, TInfoSink& sink, TSymbolTable& symTable, TType& t) : unionArray(cUnion), type(t), TConstTraverser(ConstantUnion* cUnion, bool singleConstParam, TOperator constructType, TInfoSink& sink, TSymbolTable& symTable, TType& t) : unionArray(cUnion), type(t),
constructorType(constructType), singleConstantParam(singleConstParam), infoSink(sink), symbolTable(symTable), error(false), isMatrix(false), matrixSize(0) constructorType(constructType), singleConstantParam(singleConstParam), infoSink(sink), symbolTable(symTable), error(false), isMatrix(false), matrixSize(0)
{ {
index = 0; index = 0;
...@@ -31,7 +31,7 @@ protected: ...@@ -31,7 +31,7 @@ protected:
bool visitBranch(Visit visit, TIntermBranch*); bool visitBranch(Visit visit, TIntermBranch*);
int index; int index;
constUnion *unionArray; ConstantUnion *unionArray;
TType type; TType type;
TOperator constructorType; TOperator constructorType;
bool singleConstantParam; bool singleConstantParam;
...@@ -140,7 +140,7 @@ bool TConstTraverser::visitSelection(Visit visit, TIntermSelection* node) ...@@ -140,7 +140,7 @@ bool TConstTraverser::visitSelection(Visit visit, TIntermSelection* node)
void TConstTraverser::visitConstantUnion(TIntermConstantUnion* node) void TConstTraverser::visitConstantUnion(TIntermConstantUnion* node)
{ {
constUnion* leftUnionArray = unionArray; ConstantUnion* leftUnionArray = unionArray;
int instanceSize = type.getObjectSize(); int instanceSize = type.getObjectSize();
if (index >= instanceSize) if (index >= instanceSize)
...@@ -149,7 +149,7 @@ void TConstTraverser::visitConstantUnion(TIntermConstantUnion* node) ...@@ -149,7 +149,7 @@ void TConstTraverser::visitConstantUnion(TIntermConstantUnion* node)
if (!singleConstantParam) { if (!singleConstantParam) {
int size = node->getType().getObjectSize(); int size = node->getType().getObjectSize();
constUnion *rightUnionArray = node->getUnionArrayPointer(); ConstantUnion *rightUnionArray = node->getUnionArrayPointer();
for (int i=0; i < size; i++) { for (int i=0; i < size; i++) {
if (index >= instanceSize) if (index >= instanceSize)
return; return;
...@@ -159,7 +159,7 @@ void TConstTraverser::visitConstantUnion(TIntermConstantUnion* node) ...@@ -159,7 +159,7 @@ void TConstTraverser::visitConstantUnion(TIntermConstantUnion* node)
} }
} else { } else {
int totalSize = index + size; int totalSize = index + size;
constUnion *rightUnionArray = node->getUnionArrayPointer(); ConstantUnion *rightUnionArray = node->getUnionArrayPointer();
if (!isMatrix) { if (!isMatrix) {
int count = 0; int count = 0;
for (int i = index; i < totalSize; i++) { for (int i = index; i < totalSize; i++) {
...@@ -212,7 +212,7 @@ bool TConstTraverser::visitBranch(Visit visit, TIntermBranch* node) ...@@ -212,7 +212,7 @@ bool TConstTraverser::visitBranch(Visit visit, TIntermBranch* node)
// Individual functions can be initialized to 0 to skip processing of that // Individual functions can be initialized to 0 to skip processing of that
// type of node. It's children will still be processed. // type of node. It's children will still be processed.
// //
bool TIntermediate::parseConstTree(TSourceLoc line, TIntermNode* root, constUnion* unionArray, TOperator constructorType, TSymbolTable& symbolTable, TType t, bool singleConstantParam) bool TIntermediate::parseConstTree(TSourceLoc line, TIntermNode* root, ConstantUnion* unionArray, TOperator constructorType, TSymbolTable& symbolTable, TType t, bool singleConstantParam)
{ {
if (root == 0) if (root == 0)
return false; return false;
......
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