Cleanup TType and related classes:
1. Removed unused functions
2. Removed unnecessary virtuality of functions
3. Grouped related functions together
TEST=conformance tests
Review URL: http://codereview.appspot.com/1984047
git-svn-id: https://angleproject.googlecode.com/svn/trunk@400 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/compiler/OutputHLSL.cpp b/src/compiler/OutputHLSL.cpp
index d1e9017..8b8a4e6 100644
--- a/src/compiler/OutputHLSL.cpp
+++ b/src/compiler/OutputHLSL.cpp
@@ -791,11 +791,11 @@
{
if (node->getLeft()->isMatrix())
{
- switch (node->getLeft()->getSize())
+ switch (node->getLeft()->getNominalSize())
{
- case 2 * 2: mUsesEqualMat2 = true; break;
- case 3 * 3: mUsesEqualMat3 = true; break;
- case 4 * 4: mUsesEqualMat4 = true; break;
+ case 2: mUsesEqualMat2 = true; break;
+ case 3: mUsesEqualMat3 = true; break;
+ case 4: mUsesEqualMat4 = true; break;
default: UNREACHABLE();
}
}
@@ -804,7 +804,7 @@
switch (node->getLeft()->getBasicType())
{
case EbtFloat:
- switch (node->getLeft()->getSize())
+ switch (node->getLeft()->getNominalSize())
{
case 2: mUsesEqualVec2 = true; break;
case 3: mUsesEqualVec3 = true; break;
@@ -813,7 +813,7 @@
}
break;
case EbtInt:
- switch (node->getLeft()->getSize())
+ switch (node->getLeft()->getNominalSize())
{
case 2: mUsesEqualIVec2 = true; break;
case 3: mUsesEqualIVec3 = true; break;
@@ -822,7 +822,7 @@
}
break;
case EbtBool:
- switch (node->getLeft()->getSize())
+ switch (node->getLeft()->getNominalSize())
{
case 2: mUsesEqualBVec2 = true; break;
case 3: mUsesEqualBVec3 = true; break;
@@ -1288,7 +1288,7 @@
case EOpVectorNotEqual: outputTriplet(visit, "(", " != ", ")"); break;
case EOpMod:
{
- switch (node->getSequence()[0]->getAsTyped()->getSize()) // Number of components in the first argument
+ switch (node->getSequence()[0]->getAsTyped()->getNominalSize()) // Number of components in the first argument
{
case 1: mUsesMod1 = true; break;
case 2: mUsesMod2 = true; break;
@@ -1317,7 +1317,7 @@
case EOpCross: outputTriplet(visit, "cross(", ", ", ")"); break;
case EOpFaceForward:
{
- switch (node->getSequence()[0]->getAsTyped()->getSize()) // Number of components in the first argument
+ switch (node->getSequence()[0]->getAsTyped()->getNominalSize()) // Number of components in the first argument
{
case 1: mUsesFaceforward1 = true; break;
case 2: mUsesFaceforward2 = true; break;
@@ -1553,7 +1553,7 @@
if (symbol && constant)
{
- if (constant->getBasicType() == EbtInt && constant->getSize() == 1)
+ if (constant->getBasicType() == EbtInt && constant->getNominalSize() == 1)
{
index = symbol;
initial = constant->getUnionArrayPointer()[0].getIConst();
@@ -1575,7 +1575,7 @@
if (constant)
{
- if (constant->getBasicType() == EbtInt && constant->getSize() == 1)
+ if (constant->getBasicType() == EbtInt && constant->getNominalSize() == 1)
{
comparator = test->getOp();
limit = constant->getUnionArrayPointer()[0].getIConst();
@@ -1597,7 +1597,7 @@
if (constant)
{
- if (constant->getBasicType() == EbtInt && constant->getSize() == 1)
+ if (constant->getBasicType() == EbtInt && constant->getNominalSize() == 1)
{
int value = constant->getUnionArrayPointer()[0].getIConst();
@@ -1848,8 +1848,8 @@
TType ctorType = type;
ctorType.clearArrayness();
- ctorType.changePrecision(EbpHigh);
- ctorType.changeQualifier(EvqTemporary);
+ ctorType.setPrecision(EbpHigh);
+ ctorType.setQualifier(EvqTemporary);
TString ctorName = type.getStruct() ? decorate(name) : name;