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
diff --git a/src/compiler/ConstantUnion.h b/src/compiler/ConstantUnion.h
index d2a1ef8..1fdb61d 100644
--- a/src/compiler/ConstantUnion.h
+++ b/src/compiler/ConstantUnion.h
@@ -8,7 +8,7 @@
 #define _CONSTANT_UNION_INCLUDED_
 
 
-class constUnion {
+class ConstantUnion {
 public:
 
     POOL_ALLOCATOR_NEW_DELETE(GlobalPoolAllocator)        
@@ -47,7 +47,7 @@
         return false;
     }
 
-    bool operator==(const constUnion& constant) const
+    bool operator==(const ConstantUnion& constant) const
     {
         if (constant.type != type)
             return false;
@@ -88,12 +88,12 @@
         return !operator==(b);
     }
 
-    bool operator!=(const constUnion& constant) const
+    bool operator!=(const ConstantUnion& constant) const
     {
         return !operator==(constant);
     }
 
-    bool operator>(const constUnion& constant) const
+    bool operator>(const ConstantUnion& constant) const
     { 
         assert(type == constant.type);
         switch (type) {
@@ -115,7 +115,7 @@
         return false;
     }
 
-    bool operator<(const constUnion& constant) const
+    bool operator<(const ConstantUnion& constant) const
     { 
         assert(type == constant.type);
         switch (type) {
@@ -137,9 +137,9 @@
         return false;
     }
 
-    constUnion operator+(const constUnion& constant) const
+    ConstantUnion operator+(const ConstantUnion& constant) const
     { 
-        constUnion returnValue;
+        ConstantUnion returnValue;
         assert(type == constant.type);
         switch (type) {
         case EbtInt: returnValue.setIConst(iConst + constant.iConst); break;
@@ -150,9 +150,9 @@
         return returnValue;
     }
 
-    constUnion operator-(const constUnion& constant) const
+    ConstantUnion operator-(const ConstantUnion& constant) const
     { 
-        constUnion returnValue;
+        ConstantUnion returnValue;
         assert(type == constant.type);
         switch (type) {
         case EbtInt: returnValue.setIConst(iConst - constant.iConst); break;
@@ -163,9 +163,9 @@
         return returnValue;
     }
 
-    constUnion operator*(const constUnion& constant) const
+    ConstantUnion operator*(const ConstantUnion& constant) const
     { 
-        constUnion returnValue;
+        ConstantUnion returnValue;
         assert(type == constant.type);
         switch (type) {
         case EbtInt: returnValue.setIConst(iConst * constant.iConst); break;
@@ -176,9 +176,9 @@
         return returnValue;
     }
 
-    constUnion operator%(const constUnion& constant) const
+    ConstantUnion operator%(const ConstantUnion& constant) const
     { 
-        constUnion returnValue;
+        ConstantUnion returnValue;
         assert(type == constant.type);
         switch (type) {
         case EbtInt: returnValue.setIConst(iConst % constant.iConst); break;
@@ -188,9 +188,9 @@
         return returnValue;
     }
 
-    constUnion operator>>(const constUnion& constant) const
+    ConstantUnion operator>>(const ConstantUnion& constant) const
     { 
-        constUnion returnValue;
+        ConstantUnion returnValue;
         assert(type == constant.type);
         switch (type) {
         case EbtInt: returnValue.setIConst(iConst >> constant.iConst); break;
@@ -200,9 +200,9 @@
         return returnValue;
     }
 
-    constUnion operator<<(const constUnion& constant) const
+    ConstantUnion operator<<(const ConstantUnion& constant) const
     { 
-        constUnion returnValue;
+        ConstantUnion returnValue;
         assert(type == constant.type);
         switch (type) {
         case EbtInt: returnValue.setIConst(iConst << constant.iConst); break;
@@ -212,9 +212,9 @@
         return returnValue;
     }
 
-    constUnion operator&(const constUnion& constant) const
+    ConstantUnion operator&(const ConstantUnion& constant) const
     { 
-        constUnion returnValue;
+        ConstantUnion returnValue;
         assert(type == constant.type);
         switch (type) {
         case EbtInt:  returnValue.setIConst(iConst & constant.iConst); break;
@@ -224,9 +224,9 @@
         return returnValue;
     }
 
-    constUnion operator|(const constUnion& constant) const
+    ConstantUnion operator|(const ConstantUnion& constant) const
     { 
-        constUnion returnValue;
+        ConstantUnion returnValue;
         assert(type == constant.type);
         switch (type) {
         case EbtInt:  returnValue.setIConst(iConst | constant.iConst); break;
@@ -236,9 +236,9 @@
         return returnValue;
     }
 
-    constUnion operator^(const constUnion& constant) const
+    ConstantUnion operator^(const ConstantUnion& constant) const
     { 
-        constUnion returnValue;
+        ConstantUnion returnValue;
         assert(type == constant.type);
         switch (type) {
         case EbtInt:  returnValue.setIConst(iConst ^ constant.iConst); break;
@@ -248,9 +248,9 @@
         return returnValue;
     }
 
-    constUnion operator&&(const constUnion& constant) const
+    ConstantUnion operator&&(const ConstantUnion& constant) const
     { 
-        constUnion returnValue;
+        ConstantUnion returnValue;
         assert(type == constant.type);
         switch (type) {
         case EbtBool: returnValue.setBConst(bConst && constant.bConst); break;
@@ -260,9 +260,9 @@
         return returnValue;
     }
 
-    constUnion operator||(const constUnion& constant) const
+    ConstantUnion operator||(const ConstantUnion& constant) const
     { 
-        constUnion returnValue;
+        ConstantUnion returnValue;
         assert(type == constant.type);
         switch (type) {
         case EbtBool: returnValue.setBConst(bConst || constant.bConst); break;
diff --git a/src/compiler/Intermediate.cpp b/src/compiler/Intermediate.cpp
index 5b42233..4a228f5 100644
--- a/src/compiler/Intermediate.cpp
+++ b/src/compiler/Intermediate.cpp
@@ -14,7 +14,7 @@
 #include "compiler/QualifierAlive.h"
 #include "compiler/RemoveTree.h"
 
-bool CompareStructure(const TType& leftNodeType, constUnion* rightUnionArray, constUnion* leftUnionArray);
+bool CompareStructure(const TType& leftNodeType, ConstantUnion* rightUnionArray, ConstantUnion* leftUnionArray);
 
 ////////////////////////////////////////////////////////////////////////////
 //
@@ -570,7 +570,7 @@
 // Returns the constant union node created.
 //
 
-TIntermConstantUnion* TIntermediate::addConstantUnion(constUnion* unionArrayPointer, const TType& t, TSourceLoc line)
+TIntermConstantUnion* TIntermediate::addConstantUnion(ConstantUnion* unionArrayPointer, const TType& t, TSourceLoc line)
 {
     TIntermConstantUnion* node = new TIntermConstantUnion(unionArrayPointer, t);
     node->setLine(line);
@@ -586,10 +586,10 @@
     node->setLine(line);
     TIntermConstantUnion* constIntNode;
     TIntermSequence &sequenceVector = node->getSequence();
-    constUnion* unionArray;
+    ConstantUnion* unionArray;
 
     for (int i = 0; i < fields.num; i++) {
-        unionArray = new constUnion[1];
+        unionArray = new ConstantUnion[1];
         unionArray->setIConst(fields.offsets[i]);
         constIntNode = addConstantUnion(unionArray, TType(EbtInt, EvqConst), line);
         sequenceVector.push_back(constIntNode);
@@ -973,7 +973,7 @@
     return true;
 }
 
-bool CompareStruct(const TType& leftNodeType, constUnion* rightUnionArray, constUnion* leftUnionArray)
+bool CompareStruct(const TType& leftNodeType, ConstantUnion* rightUnionArray, ConstantUnion* leftUnionArray)
 {
     TTypeList* fields = leftNodeType.getStruct();
 
@@ -997,7 +997,7 @@
     return true;
 }
 
-bool CompareStructure(const TType& leftNodeType, constUnion* rightUnionArray, constUnion* leftUnionArray)
+bool CompareStructure(const TType& leftNodeType, ConstantUnion* rightUnionArray, ConstantUnion* leftUnionArray)
 {
     if (leftNodeType.isArray()) {
         TType typeWithoutArrayness = leftNodeType;
@@ -1025,43 +1025,43 @@
 
 TIntermTyped* TIntermConstantUnion::fold(TOperator op, TIntermTyped* constantNode, TInfoSink& infoSink)
 {
-    constUnion *unionArray = getUnionArrayPointer();
+    ConstantUnion *unionArray = getUnionArrayPointer();
     int objectSize = getType().getObjectSize();
 
     if (constantNode) {  // binary operations
         TIntermConstantUnion *node = constantNode->getAsConstantUnion();
-        constUnion *rightUnionArray = node->getUnionArrayPointer();
+        ConstantUnion *rightUnionArray = node->getUnionArrayPointer();
         TType returnType = getType();
 
         // for a case like float f = 1.2 + vec4(2,3,4,5);
         if (constantNode->getType().getObjectSize() == 1 && objectSize > 1) {
-            rightUnionArray = new constUnion[objectSize];
+            rightUnionArray = new ConstantUnion[objectSize];
             for (int i = 0; i < objectSize; ++i)
                 rightUnionArray[i] = *node->getUnionArrayPointer();
             returnType = getType();
         } else if (constantNode->getType().getObjectSize() > 1 && objectSize == 1) {
             // for a case like float f = vec4(2,3,4,5) + 1.2;
-            unionArray = new constUnion[constantNode->getType().getObjectSize()];
+            unionArray = new ConstantUnion[constantNode->getType().getObjectSize()];
             for (int i = 0; i < constantNode->getType().getObjectSize(); ++i)
                 unionArray[i] = *getUnionArrayPointer();
             returnType = node->getType();
             objectSize = constantNode->getType().getObjectSize();
         }
 
-        constUnion* tempConstArray = 0;
+        ConstantUnion* tempConstArray = 0;
         TIntermConstantUnion *tempNode;
 
         bool boolNodeFlag = false;
         switch(op) {
             case EOpAdd:
-                tempConstArray = new constUnion[objectSize];
+                tempConstArray = new ConstantUnion[objectSize];
                 {// support MSVC++6.0
                     for (int i = 0; i < objectSize; i++)
                         tempConstArray[i] = unionArray[i] + rightUnionArray[i];
                 }
                 break;
             case EOpSub:
-                tempConstArray = new constUnion[objectSize];
+                tempConstArray = new ConstantUnion[objectSize];
                 {// support MSVC++6.0
                     for (int i = 0; i < objectSize; i++)
                         tempConstArray[i] = unionArray[i] - rightUnionArray[i];
@@ -1071,7 +1071,7 @@
             case EOpMul:
             case EOpVectorTimesScalar:
             case EOpMatrixTimesScalar:
-                tempConstArray = new constUnion[objectSize];
+                tempConstArray = new ConstantUnion[objectSize];
                 {// support MSVC++6.0
                     for (int i = 0; i < objectSize; i++)
                         tempConstArray[i] = unionArray[i] * rightUnionArray[i];
@@ -1084,7 +1084,7 @@
                 }
                 {// support MSVC++6.0
                     int size = getNominalSize();
-                    tempConstArray = new constUnion[size*size];
+                    tempConstArray = new ConstantUnion[size*size];
                     for (int row = 0; row < size; row++) {
                         for (int column = 0; column < size; column++) {
                             tempConstArray[size * column + row].setFConst(0.0f);
@@ -1096,7 +1096,7 @@
                 }
                 break;
             case EOpDiv:
-                tempConstArray = new constUnion[objectSize];
+                tempConstArray = new ConstantUnion[objectSize];
                 {// support MSVC++6.0
                     for (int i = 0; i < objectSize; i++) {
                         switch (getType().getBasicType()) {
@@ -1128,7 +1128,7 @@
                     infoSink.info.message(EPrefixInternalError, "Constant Folding cannot be done for matrix times vector", getLine());
                     return 0;
                 }
-                tempConstArray = new constUnion[getNominalSize()];
+                tempConstArray = new ConstantUnion[getNominalSize()];
 
                 {// support MSVC++6.0
                     for (int size = getNominalSize(), i = 0; i < size; i++) {
@@ -1150,7 +1150,7 @@
                     return 0;
                 }
 
-                tempConstArray = new constUnion[getNominalSize()];
+                tempConstArray = new ConstantUnion[getNominalSize()];
                 {// support MSVC++6.0
                     for (int size = getNominalSize(), i = 0; i < size; i++) {
                         tempConstArray[i].setFConst(0.0f);
@@ -1162,7 +1162,7 @@
                 break;
 
             case EOpLogicalAnd: // this code is written for possible future use, will not get executed currently
-                tempConstArray = new constUnion[objectSize];
+                tempConstArray = new ConstantUnion[objectSize];
                 {// support MSVC++6.0
                     for (int i = 0; i < objectSize; i++)
                         tempConstArray[i] = unionArray[i] && rightUnionArray[i];
@@ -1170,7 +1170,7 @@
                 break;
 
             case EOpLogicalOr: // this code is written for possible future use, will not get executed currently
-                tempConstArray = new constUnion[objectSize];
+                tempConstArray = new ConstantUnion[objectSize];
                 {// support MSVC++6.0
                     for (int i = 0; i < objectSize; i++)
                         tempConstArray[i] = unionArray[i] || rightUnionArray[i];
@@ -1178,7 +1178,7 @@
                 break;
 
             case EOpLogicalXor:
-                tempConstArray = new constUnion[objectSize];
+                tempConstArray = new ConstantUnion[objectSize];
                 {// support MSVC++6.0
                     for (int i = 0; i < objectSize; i++)
                         switch (getType().getBasicType()) {
@@ -1190,22 +1190,22 @@
 
             case EOpLessThan:
                 assert(objectSize == 1);
-                tempConstArray = new constUnion[1];
+                tempConstArray = new ConstantUnion[1];
                 tempConstArray->setBConst(*unionArray < *rightUnionArray);
                 returnType = TType(EbtBool, EvqConst);
                 break;
             case EOpGreaterThan:
                 assert(objectSize == 1);
-                tempConstArray = new constUnion[1];
+                tempConstArray = new ConstantUnion[1];
                 tempConstArray->setBConst(*unionArray > *rightUnionArray);
                 returnType = TType(EbtBool, EvqConst);
                 break;
             case EOpLessThanEqual:
                 {
                     assert(objectSize == 1);
-                    constUnion constant;
+                    ConstantUnion constant;
                     constant.setBConst(*unionArray > *rightUnionArray);
-                    tempConstArray = new constUnion[1];
+                    tempConstArray = new ConstantUnion[1];
                     tempConstArray->setBConst(!constant.getBConst());
                     returnType = TType(EbtBool, EvqConst);
                     break;
@@ -1213,9 +1213,9 @@
             case EOpGreaterThanEqual:
                 {
                     assert(objectSize == 1);
-                    constUnion constant;
+                    ConstantUnion constant;
                     constant.setBConst(*unionArray < *rightUnionArray);
-                    tempConstArray = new constUnion[1];
+                    tempConstArray = new ConstantUnion[1];
                     tempConstArray->setBConst(!constant.getBConst());
                     returnType = TType(EbtBool, EvqConst);
                     break;
@@ -1234,7 +1234,7 @@
                     }
                 }
 
-                tempConstArray = new constUnion[1];
+                tempConstArray = new ConstantUnion[1];
                 if (!boolNodeFlag) {
                     tempConstArray->setBConst(true);
                 }
@@ -1260,7 +1260,7 @@
                     }
                 }
 
-                tempConstArray = new constUnion[1];
+                tempConstArray = new ConstantUnion[1];
                 if (!boolNodeFlag) {
                     tempConstArray->setBConst(true);
                 }
@@ -1286,7 +1286,7 @@
         // Do unary operations
         //
         TIntermConstantUnion *newNode = 0;
-        constUnion* tempConstArray = new constUnion[objectSize];
+        ConstantUnion* tempConstArray = new ConstantUnion[objectSize];
         for (int i = 0; i < objectSize; i++) {
             switch(op) {
                 case EOpNegative:
@@ -1320,10 +1320,10 @@
 
 TIntermTyped* TIntermediate::promoteConstantUnion(TBasicType promoteTo, TIntermConstantUnion* node)
 {
-    constUnion *rightUnionArray = node->getUnionArrayPointer();
+    ConstantUnion *rightUnionArray = node->getUnionArrayPointer();
     int size = node->getType().getObjectSize();
 
-    constUnion *leftUnionArray = new constUnion[size];
+    ConstantUnion *leftUnionArray = new ConstantUnion[size];
 
     for (int i=0; i < size; i++) {
 
diff --git a/src/compiler/OutputGLSL.cpp b/src/compiler/OutputGLSL.cpp
index 0453af7..3b639e9 100644
--- a/src/compiler/OutputGLSL.cpp
+++ b/src/compiler/OutputGLSL.cpp
@@ -115,7 +115,7 @@
         out << getTypeName(type) << "(";
     for (int i = 0; i < size; ++i)
     {
-        const constUnion& data = node->getUnionArrayPointer()[i];
+        const ConstantUnion& data = node->getUnionArrayPointer()[i];
         switch (data.getType())
         {
             case EbtFloat: out << data.getFConst(); break;
@@ -178,7 +178,7 @@
                     TIntermConstantUnion* element = (*sit)->getAsConstantUnion();
                     ASSERT(element->getBasicType() == EbtInt);
                     ASSERT(element->getNominalSize() == 1);
-                    const constUnion& data = element->getUnionArrayPointer()[0];
+                    const ConstantUnion& data = element->getUnionArrayPointer()[0];
                     ASSERT(data.getType() == EbtInt);
                     switch (data.getIConst())
                     {
diff --git a/src/compiler/ParseHelper.cpp b/src/compiler/ParseHelper.cpp
index c6b398f..63b9684 100644
--- a/src/compiler/ParseHelper.cpp
+++ b/src/compiler/ParseHelper.cpp
@@ -951,7 +951,7 @@
             return true;
         }
         if (initializer->getAsConstantUnion()) { 
-            constUnion* unionArray = variable->getConstPointer();
+            ConstantUnion* unionArray = variable->getConstPointer();
 
             if (type.getObjectSize() == 1 && type.getBasicType() != EbtStruct) {
                 *unionArray = (initializer->getAsConstantUnion()->getUnionArrayPointer())[0];
@@ -962,7 +962,7 @@
             const TSymbol* symbol = symbolTable.find(initializer->getAsSymbolNode()->getSymbol());
             const TVariable* tVar = static_cast<const TVariable*>(symbol);
 
-            constUnion* constArray = tVar->getConstPointer();
+            ConstantUnion* constArray = tVar->getConstPointer();
             variable->shareConstPointer(constArray);
         } else {
             error(line, " cannot assign to", "=", "'%s'", variable->getType().getCompleteString().c_str());
@@ -1095,7 +1095,7 @@
     aggrNode->setType(type);
     if (canBeFolded) {
         bool returnVal = false;
-        constUnion* unionArray = new constUnion[type.getObjectSize()];
+        ConstantUnion* unionArray = new ConstantUnion[type.getObjectSize()];
         if (aggrNode->getSequence().size() == 1)  {
             returnVal = intermediate.parseConstTree(aggrNode->getLine(), aggrNode, unionArray, aggrNode->getOp(), symbolTable,  type, true);
         }
@@ -1208,12 +1208,12 @@
     TIntermTyped* typedNode;
     TIntermConstantUnion* tempConstantNode = node->getAsConstantUnion();
 
-    constUnion *unionArray;
+    ConstantUnion *unionArray;
     if (tempConstantNode) {
         unionArray = tempConstantNode->getUnionArrayPointer();
 
         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();
 
             return node;
@@ -1225,7 +1225,7 @@
         return 0;
     }
 
-    constUnion* constArray = new constUnion[fields.num];
+    ConstantUnion* constArray = new ConstantUnion[fields.num];
 
     for (int i = 0; i < fields.num; i++) {
         if (fields.offsets[i] >= node->getType().getObjectSize()) {
@@ -1259,7 +1259,7 @@
     }
 
     if (tempConstantNode) {
-         constUnion* unionArray = tempConstantNode->getUnionArrayPointer();
+         ConstantUnion* unionArray = tempConstantNode->getUnionArrayPointer();
          int size = tempConstantNode->getType().getNominalSize();
          typedNode = intermediate.addConstantUnion(&unionArray[size*index], tempConstantNode->getType(), line);
     } else {
@@ -1295,7 +1295,7 @@
     int arrayElementSize = arrayElementType.getObjectSize();
 
     if (tempConstantNode) {
-         constUnion* unionArray = tempConstantNode->getUnionArrayPointer();
+         ConstantUnion* unionArray = tempConstantNode->getUnionArrayPointer();
          typedNode = intermediate.addConstantUnion(&unionArray[arrayElementSize * index], tempConstantNode->getType(), line);
     } else {
         error(line, "Cannot offset into the array", "Error", "");
@@ -1330,7 +1330,7 @@
     }
 
     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
     } else {
diff --git a/src/compiler/SymbolTable.cpp b/src/compiler/SymbolTable.cpp
index d44537a..5ac6e66 100644
--- a/src/compiler/SymbolTable.cpp
+++ b/src/compiler/SymbolTable.cpp
@@ -156,7 +156,7 @@
 	if (copyOf.unionArray) {
 		assert(!copyOf.type.getStruct());
 		assert(copyOf.type.getObjectSize() == 1);
-		unionArray = new constUnion[1];
+		unionArray = new ConstantUnion[1];
 		unionArray[0] = copyOf.unionArray[0];
 	} else
 		unionArray = 0;
diff --git a/src/compiler/SymbolTable.h b/src/compiler/SymbolTable.h
index 0340d19..b7aa989 100644
--- a/src/compiler/SymbolTable.h
+++ b/src/compiler/SymbolTable.h
@@ -81,17 +81,17 @@
 
     virtual void dump(TInfoSink &infoSink) const;
 
-    constUnion* getConstPointer()
+    ConstantUnion* getConstPointer()
     { 
         if (!unionArray)
-            unionArray = new constUnion[type.getObjectSize()];
+            unionArray = new ConstantUnion[type.getObjectSize()];
 
         return unionArray;
     }
 
-    constUnion* getConstPointer() const { return unionArray; }
+    ConstantUnion* getConstPointer() const { return unionArray; }
 
-    void shareConstPointer( constUnion *constArray)
+    void shareConstPointer( ConstantUnion *constArray)
     {
         delete unionArray;
         unionArray = constArray;  
@@ -104,7 +104,7 @@
     bool userType;
     // we are assuming that Pool Allocator will free the memory allocated to unionArray
     // 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
 };
 
diff --git a/src/compiler/intermediate.h b/src/compiler/intermediate.h
index 1208b07..ea7a962 100644
--- a/src/compiler/intermediate.h
+++ b/src/compiler/intermediate.h
@@ -314,14 +314,14 @@
 
 class TIntermConstantUnion : public TIntermTyped {
 public:
-    TIntermConstantUnion(constUnion *unionPointer, const TType& t) : TIntermTyped(t), unionArrayPointer(unionPointer) { }
-    constUnion* getUnionArrayPointer() const { return unionArrayPointer; }
-    void setUnionArrayPointer(constUnion *c) { unionArrayPointer = c; }
+    TIntermConstantUnion(ConstantUnion *unionPointer, const TType& t) : TIntermTyped(t), unionArrayPointer(unionPointer) { }
+    ConstantUnion* getUnionArrayPointer() const { return unionArrayPointer; }
+    void setUnionArrayPointer(ConstantUnion *c) { unionArrayPointer = c; }
     virtual TIntermConstantUnion* getAsConstantUnion()  { return this; }
     virtual void traverse(TIntermTraverser* );
     virtual TIntermTyped* fold(TOperator, TIntermTyped*, TInfoSink&);
 protected:
-    constUnion *unionArrayPointer;
+    ConstantUnion *unionArrayPointer;
 };
 
 //
diff --git a/src/compiler/localintermediate.h b/src/compiler/localintermediate.h
index a4b5416..5fd4c69 100644
--- a/src/compiler/localintermediate.h
+++ b/src/compiler/localintermediate.h
@@ -37,9 +37,9 @@
     TIntermNode*  addSelection(TIntermTyped* cond, TIntermNodePair code, TSourceLoc);
     TIntermTyped* addSelection(TIntermTyped* cond, TIntermTyped* trueBlock, TIntermTyped* falseBlock, TSourceLoc);
     TIntermTyped* addComma(TIntermTyped* left, TIntermTyped* right, TSourceLoc);
-    TIntermConstantUnion* addConstantUnion(constUnion*, const TType&, TSourceLoc);
+    TIntermConstantUnion* addConstantUnion(ConstantUnion*, const TType&, TSourceLoc);
     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);
     TIntermBranch* addBranch(TOperator, TSourceLoc);
     TIntermBranch* addBranch(TOperator, TIntermTyped*, TSourceLoc);
diff --git a/src/compiler/parseConst.cpp b/src/compiler/parseConst.cpp
index f2fd4a5..4b130e9 100644
--- a/src/compiler/parseConst.cpp
+++ b/src/compiler/parseConst.cpp
@@ -12,7 +12,7 @@
 //
 class TConstTraverser : public TIntermTraverser {
 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)
 	{
 		index = 0;
@@ -31,7 +31,7 @@
 	bool visitBranch(Visit visit, TIntermBranch*);
 
     int index;
-    constUnion *unionArray;
+    ConstantUnion *unionArray;
     TType type;
     TOperator constructorType;
     bool singleConstantParam;
@@ -140,7 +140,7 @@
 
 void TConstTraverser::visitConstantUnion(TIntermConstantUnion* node)
 {
-    constUnion* leftUnionArray = unionArray;
+    ConstantUnion* leftUnionArray = unionArray;
     int instanceSize = type.getObjectSize();
 
     if (index >= instanceSize)
@@ -149,7 +149,7 @@
     if (!singleConstantParam) {
         int size = node->getType().getObjectSize();
     
-        constUnion *rightUnionArray = node->getUnionArrayPointer();
+        ConstantUnion *rightUnionArray = node->getUnionArrayPointer();
         for (int i=0; i < size; i++) {
             if (index >= instanceSize)
                 return;
@@ -159,7 +159,7 @@
         }
     } else {
         int totalSize = index + size;
-        constUnion *rightUnionArray = node->getUnionArrayPointer();
+        ConstantUnion *rightUnionArray = node->getUnionArrayPointer();
         if (!isMatrix) {
             int count = 0;
             for (int i = index; i < totalSize; i++) {
@@ -212,7 +212,7 @@
 // Individual functions can be initialized to 0 to skip processing of that
 // 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)
         return false;