Refactor l-value tracking to a separate traverser parent class
This makes TIntermTraverser implementation easier to understand and
removes the overhead of maintaining the user-defined GLSL function table
from the traversers that don't need it.
Some logic is duplicated between TIntermTraverser and its new subclass
TLValueTrackingTraverser, but duplication is hard to eliminate completely
since there are some differences scattered throughout the code.
BUG=angleproject:1116
TEST=angle_unittests
Change-Id: Iab4a0c1d4320ecfafaf18ea3a45824d756890774
Reviewed-on: https://chromium-review.googlesource.com/292721
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
diff --git a/src/compiler/translator/EmulatePrecision.cpp b/src/compiler/translator/EmulatePrecision.cpp
index befb319..a4cb028 100644
--- a/src/compiler/translator/EmulatePrecision.cpp
+++ b/src/compiler/translator/EmulatePrecision.cpp
@@ -292,7 +292,7 @@
} // namespace anonymous
EmulatePrecision::EmulatePrecision()
- : TIntermTraverser(true, true, true), mDeclaringVariables(false)
+ : TLValueTrackingTraverser(true, true, true), mDeclaringVariables(false)
{}
void EmulatePrecision::visitSymbol(TIntermSymbol *node)