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/IntermTraverse.cpp b/src/compiler/translator/IntermTraverse.cpp
index e094414..fcb447d 100644
--- a/src/compiler/translator/IntermTraverse.cpp
+++ b/src/compiler/translator/IntermTraverse.cpp
@@ -199,13 +199,14 @@
bool TLValueTrackingTraverser::isInFunctionMap(const TIntermAggregate *callNode) const
{
ASSERT(callNode->getOp() == EOpFunctionCall);
- return (mFunctionMap.find(callNode->getNameObj()) != mFunctionMap.end());
+ return (mFunctionMap.find(callNode->getFunctionSymbolInfo()->getNameObj()) !=
+ mFunctionMap.end());
}
TIntermSequence *TLValueTrackingTraverser::getFunctionParameters(const TIntermAggregate *callNode)
{
ASSERT(isInFunctionMap(callNode));
- return mFunctionMap[callNode->getNameObj()];
+ return mFunctionMap[callNode->getFunctionSymbolInfo()->getNameObj()];
}
void TLValueTrackingTraverser::setInFunctionCallOutParameter(bool inOutParameter)
@@ -507,11 +508,11 @@
TIntermAggregate *params = sequence->front()->getAsAggregate();
ASSERT(params != nullptr);
ASSERT(params->getOp() == EOpParameters);
- addToFunctionMap(node->getNameObj(), params->getSequence());
+ addToFunctionMap(node->getFunctionSymbolInfo()->getNameObj(), params->getSequence());
break;
}
case EOpPrototype:
- addToFunctionMap(node->getNameObj(), sequence);
+ addToFunctionMap(node->getFunctionSymbolInfo()->getNameObj(), sequence);
break;
default:
break;