Split TIntermFunctionPrototype from TIntermAggregate

Function prototypes now have their own class TIntermFunctionPrototype.
It's only used for prototypes, not function parameter lists.

TIntermAggregate is still used for parameter lists and function calls.

BUGS=angleproject:1490
TEST=angle_unittests

Change-Id: I6e246ad00a29c2335bd2ab7f61cf73fe463b74bb
Reviewed-on: https://chromium-review.googlesource.com/427944
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/Compiler.cpp b/src/compiler/translator/Compiler.cpp
index 212aa0d..11f63a9 100644
--- a/src/compiler/translator/Compiler.cpp
+++ b/src/compiler/translator/Compiler.cpp
@@ -791,21 +791,18 @@
 
     bool operator()(TIntermNode *node)
     {
-        const TIntermAggregate *asAggregate         = node->getAsAggregate();
-        const TIntermFunctionDefinition *asFunction = node->getAsFunctionDefinition();
+        const TIntermFunctionPrototype *asFunctionPrototype   = node->getAsFunctionPrototypeNode();
+        const TIntermFunctionDefinition *asFunctionDefinition = node->getAsFunctionDefinition();
 
         const TFunctionSymbolInfo *functionInfo = nullptr;
 
-        if (asFunction)
+        if (asFunctionDefinition)
         {
-            functionInfo = asFunction->getFunctionSymbolInfo();
+            functionInfo = asFunctionDefinition->getFunctionSymbolInfo();
         }
-        else if (asAggregate)
+        else if (asFunctionPrototype)
         {
-            if (asAggregate->getOp() == EOpPrototype)
-            {
-                functionInfo = asAggregate->getFunctionSymbolInfo();
-            }
+            functionInfo = asFunctionPrototype->getFunctionSymbolInfo();
         }
         if (functionInfo == nullptr)
         {
@@ -816,7 +813,7 @@
         if (callDagIndex == CallDAG::InvalidIndex)
         {
             // This happens only for unimplemented prototypes which are thus unused
-            ASSERT(asAggregate && asAggregate->getOp() == EOpPrototype);
+            ASSERT(asFunctionPrototype);
             return true;
         }