Add a class for function lookups
Using a purpose-built class for function lookups instead of using
a combination of TFunction and a struct container for the this node
and arguments makes the code clearer.
BUG=angleproject:2267
TEST=angle_unittests
Change-Id: I3f345d836abeaa7f84cc46b4b840fd06c7e2e1a7
Reviewed-on: https://chromium-review.googlesource.com/897363
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/EmulatePrecision.cpp b/src/compiler/translator/EmulatePrecision.cpp
index 1470ace..da3ff5a 100644
--- a/src/compiler/translator/EmulatePrecision.cpp
+++ b/src/compiler/translator/EmulatePrecision.cpp
@@ -6,6 +6,8 @@
#include "compiler/translator/EmulatePrecision.h"
+#include "compiler/translator/FunctionLookup.h"
+
#include <memory>
namespace sh
@@ -713,7 +715,7 @@
const TVector<TConstParameter> ¶meters,
bool knownToNotHaveSideEffects)
{
- TString mangledName = TFunction::GetMangledNameFromCall(*functionName, *arguments);
+ TString mangledName = TFunctionLookup::GetMangledName(*functionName, *arguments);
if (mInternalFunctions.find(mangledName) == mInternalFunctions.end())
{
TFunction *func = new TFunction(mSymbolTable, functionName, new TType(returnType),