Set proper symbol ids on temporary symbol nodes

Temporary symbols used to all have symbol id 0. Now they get assigned
unique symbol ids. This makes it possible to keep track of them
according to the symbol id instead of their name, paving way to more
robust AST handling in the future.

BUG=angleproject:1490
TEST=angle_unittests

Change-Id: I292e2e483cc39173524fd30a30b48c4c808442e5
Reviewed-on: https://chromium-review.googlesource.com/559335
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
diff --git a/src/compiler/translator/ExpandIntegerPowExpressions.cpp b/src/compiler/translator/ExpandIntegerPowExpressions.cpp
index 9ff2f12..8261e86 100644
--- a/src/compiler/translator/ExpandIntegerPowExpressions.cpp
+++ b/src/compiler/translator/ExpandIntegerPowExpressions.cpp
@@ -22,7 +22,7 @@
 class Traverser : public TIntermTraverser
 {
   public:
-    static void Apply(TIntermNode *root, unsigned int *tempIndex);
+    static void Apply(TIntermNode *root, TSymbolUniqueId *temporaryId);
 
   private:
     Traverser();
@@ -33,10 +33,10 @@
 };
 
 // static
-void Traverser::Apply(TIntermNode *root, unsigned int *tempIndex)
+void Traverser::Apply(TIntermNode *root, TSymbolUniqueId *temporaryId)
 {
     Traverser traverser;
-    traverser.useTemporaryIndex(tempIndex);
+    traverser.useTemporaryId(temporaryId);
     do
     {
         traverser.nextIteration();
@@ -55,7 +55,7 @@
 void Traverser::nextIteration()
 {
     mFound = false;
-    nextTemporaryIndex();
+    nextTemporaryId();
 }
 
 bool Traverser::visitAggregate(Visit visit, TIntermAggregate *node)
@@ -111,7 +111,7 @@
     }
 
     // Potential problem case detected, apply workaround.
-    nextTemporaryIndex();
+    nextTemporaryId();
 
     TIntermTyped *lhs = sequence->at(0)->getAsTyped();
     ASSERT(lhs);
@@ -146,9 +146,9 @@
 
 }  // anonymous namespace
 
-void ExpandIntegerPowExpressions(TIntermNode *root, unsigned int *tempIndex)
+void ExpandIntegerPowExpressions(TIntermNode *root, TSymbolUniqueId *temporaryId)
 {
-    Traverser::Apply(root, tempIndex);
+    Traverser::Apply(root, temporaryId);
 }
 
 }  // namespace sh