Don't use TIntermSymbol nodes for function parameters

Parameter nodes are not needed - it's simpler to just create a
TVariable object for each parameter when the TFunction is initialized.

With this change we also store only one object per each parameter type
used in built-in functions, instead of one array of TConstParameter
entries for each unique parameter sequence.

This simplifies code and reduces binary size and compiler memory use.
Compiler perf does not seem to be significantly affected.

BUG=angleproject:2267
TEST=angle_unittests

Change-Id: I2b82400dd594731074309f92a705e75135a4c82c
Reviewed-on: https://chromium-review.googlesource.com/955589
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/compiler/translator/OutputTree.cpp b/src/compiler/translator/OutputTree.cpp
index f0a1fd0..00b40b1 100644
--- a/src/compiler/translator/OutputTree.cpp
+++ b/src/compiler/translator/OutputTree.cpp
@@ -43,7 +43,7 @@
     bool visitIfElse(Visit visit, TIntermIfElse *node) override;
     bool visitSwitch(Visit visit, TIntermSwitch *node) override;
     bool visitCase(Visit visit, TIntermCase *node) override;
-    bool visitFunctionPrototype(Visit visit, TIntermFunctionPrototype *node) override;
+    void visitFunctionPrototype(TIntermFunctionPrototype *node) override;
     bool visitFunctionDefinition(Visit visit, TIntermFunctionDefinition *node) override;
     bool visitAggregate(Visit visit, TIntermAggregate *) override;
     bool visitBlock(Visit visit, TIntermBlock *) override;
@@ -361,14 +361,20 @@
     return true;
 }
 
-bool TOutputTraverser::visitFunctionPrototype(Visit visit, TIntermFunctionPrototype *node)
+void TOutputTraverser::visitFunctionPrototype(TIntermFunctionPrototype *node)
 {
     OutputTreeText(mOut, node, mDepth);
     OutputFunction(mOut, "Function Prototype", node->getFunction());
     mOut << " (" << node->getCompleteString() << ")";
     mOut << "\n";
-
-    return true;
+    size_t paramCount = node->getFunction()->getParamCount();
+    for (size_t i = 0; i < paramCount; ++i)
+    {
+        const TVariable *param = node->getFunction()->getParam(i);
+        OutputTreeText(mOut, node, mDepth + 1);
+        mOut << "parameter: " << param->name() << " (" << param->getType().getCompleteString()
+             << ")";
+    }
 }
 
 bool TOutputTraverser::visitAggregate(Visit visit, TIntermAggregate *node)