Move most of addBinaryMath from Intermediate to ParseContext
Some type checks for binary math will be different based on the shading
language version, which is easily accessible in ParseContext. Because of
this and also for architectural simplicity it makes more sense to have
the checks in ParseContext.
BUG=angle:941
TEST=angle_unittests, WebGL conformance tests
Change-Id: I92a499f47e1cbc6a7b6391ce0fa04284803e7140
Reviewed-on: https://chromium-review.googlesource.com/260570
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/compiler/translator/ParseContext.h b/src/compiler/translator/ParseContext.h
index 20f3b36..0e62e39 100644
--- a/src/compiler/translator/ParseContext.h
+++ b/src/compiler/translator/ParseContext.h
@@ -183,6 +183,10 @@
TIntermTyped *addFunctionCallOrMethod(TFunction *fnCall, TIntermNode *node,
const TSourceLoc &loc, bool *fatalError);
+
+ private:
+ TIntermTyped *addBinaryMathInternal(TOperator op, TIntermTyped *left, TIntermTyped *right,
+ const TSourceLoc &loc);
};
int PaParseStrings(size_t count, const char* const string[], const int length[],