Replaced TIntermLoop::testFirst with TIntermLoop::loopType to clearly indicate which type of loop it is. In some cases it is not possble to differentiate between a for-loop and while-loop.
BUG=48
Review URL: http://codereview.appspot.com/3123041

git-svn-id: https://angleproject.googlecode.com/svn/trunk@482 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/compiler/OutputHLSL.cpp b/src/compiler/OutputHLSL.cpp
index 77ea944..aa51ba1 100644
--- a/src/compiler/OutputHLSL.cpp
+++ b/src/compiler/OutputHLSL.cpp
@@ -1425,7 +1425,7 @@
 
     TInfoSinkBase &out = mBody;
 
-    if (!node->testFirst())
+    if (node->getType() == ELoopDoWhile)
     {
         out << "do\n"
                "{\n";
@@ -1437,14 +1437,14 @@
             mUnfoldSelect->traverse(node->getInit());
         }
         
-        if (node->getTest())
+        if (node->getCondition())
         {
-            mUnfoldSelect->traverse(node->getTest());
+            mUnfoldSelect->traverse(node->getCondition());
         }
         
-        if (node->getTerminal())
+        if (node->getExpression())
         {
-            mUnfoldSelect->traverse(node->getTerminal());
+            mUnfoldSelect->traverse(node->getExpression());
         }
 
         out << "for(";
@@ -1456,16 +1456,16 @@
 
         out << "; ";
 
-        if (node->getTest())
+        if (node->getCondition())
         {
-            node->getTest()->traverse(this);
+            node->getCondition()->traverse(this);
         }
 
         out << "; ";
 
-        if (node->getTerminal())
+        if (node->getExpression())
         {
-            node->getTerminal()->traverse(this);
+            node->getExpression()->traverse(this);
         }
 
         out << ")\n"
@@ -1479,11 +1479,11 @@
 
     out << "}\n";
 
-    if (!node->testFirst())
+    if (node->getType() == ELoopDoWhile)
     {
         out << "while(\n";
 
-        node->getTest()->traverse(this);
+        node->getCondition()->traverse(this);
 
         out << ")";
     }
@@ -1598,9 +1598,9 @@
     }
 
     // Parse comparator and limit value
-    if (index != NULL && node->getTest())
+    if (index != NULL && node->getCondition())
     {
-        TIntermBinary *test = node->getTest()->getAsBinaryNode();
+        TIntermBinary *test = node->getCondition()->getAsBinaryNode();
         
         if (test && test->getLeft()->getAsSymbolNode()->getId() == index->getId())
         {
@@ -1618,10 +1618,10 @@
     }
 
     // Parse increment
-    if (index != NULL && comparator != EOpNull && node->getTerminal())
+    if (index != NULL && comparator != EOpNull && node->getExpression())
     {
-        TIntermBinary *binaryTerminal = node->getTerminal()->getAsBinaryNode();
-        TIntermUnary *unaryTerminal = node->getTerminal()->getAsUnaryNode();
+        TIntermBinary *binaryTerminal = node->getExpression()->getAsBinaryNode();
+        TIntermUnary *unaryTerminal = node->getExpression()->getAsUnaryNode();
         
         if (binaryTerminal)
         {