Separate function info from TIntermAggregate

This change will make it easier to split types of TIntermAggregate
nodes representing functions and function calls into different node
classes.

BUG=angleproject:1490
TEST=angle_unittests

Change-Id: I730aa7858fe31fda86218fc685980c6ad486f5e0
Reviewed-on: https://chromium-review.googlesource.com/394706
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
diff --git a/src/compiler/translator/ParseContext.cpp b/src/compiler/translator/ParseContext.cpp
index 6b41588..2fcadba 100644
--- a/src/compiler/translator/ParseContext.cpp
+++ b/src/compiler/translator/ParseContext.cpp
@@ -2026,8 +2026,7 @@
     // TODO(oetuaho@nvidia.com): Instead of converting the function information here, the node could
     // point to the data that already exists in the symbol table.
     prototype->setType(function->getReturnType());
-    prototype->setName(function->getMangledName());
-    prototype->setFunctionId(function->getUniqueId());
+    prototype->getFunctionSymbolInfo()->setFromFunction(*function);
 
     for (size_t i = 0; i < function->getParamCount(); i++)
     {
@@ -2084,9 +2083,8 @@
     }
     functionNode->getSequence()->push_back(functionBody);
 
-    functionNode->setName(function.getMangledName().c_str());
+    functionNode->getFunctionSymbolInfo()->setFromFunction(function);
     functionNode->setType(function.getReturnType());
-    functionNode->setFunctionId(function.getUniqueId());
 
     symbolTable.pop();
     return functionNode;
@@ -3688,7 +3686,7 @@
 void TParseContext::checkTextureOffsetConst(TIntermAggregate *functionCall)
 {
     ASSERT(!functionCall->isUserDefined());
-    const TString &name        = functionCall->getName();
+    const TString &name        = functionCall->getFunctionSymbolInfo()->getName();
     TIntermNode *offset        = nullptr;
     TIntermSequence *arguments = functionCall->getSequence();
     if (name.compare(0, 16, "texelFetchOffset") == 0 ||
@@ -3877,10 +3875,9 @@
                 // if builtIn == true, it's definitely a builtIn function with EOpNull
                 if (!builtIn)
                     aggregate->setUserDefined();
-                aggregate->setName(fnCandidate->getMangledName());
-                aggregate->setFunctionId(fnCandidate->getUniqueId());
+                aggregate->getFunctionSymbolInfo()->setFromFunction(*fnCandidate);
 
-                // This needs to happen after the name is set
+                // This needs to happen after the function info including name is set
                 if (builtIn)
                 {
                     aggregate->setBuiltInFunctionPrecision();