Move some validation from IntermBinary::promote to ParseContext
This makes the role of promote() in the system clearer and helps to make
the code more understandable, since more of the checks are in the same
logical place.
BUG=angleproject:952
TEST=angle_unittests, WebGL conformance tests
Change-Id: Idb2de927d872e46210d71cf6de06a6f8c1fc5da1
Reviewed-on: https://chromium-review.googlesource.com/260803
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 3d51d76..f32847e 100644
--- a/src/compiler/translator/ParseContext.h
+++ b/src/compiler/translator/ParseContext.h
@@ -192,8 +192,8 @@
TIntermTyped *createAssign(TOperator op, TIntermTyped *left, TIntermTyped *right,
const TSourceLoc &loc);
- // Return true if array-related checks pass
- bool binaryOpArrayCheck(TOperator op, TIntermTyped *left, TIntermTyped *right,
+ // Return true if the checks pass
+ bool binaryOpCommonCheck(TOperator op, TIntermTyped *left, TIntermTyped *right,
const TSourceLoc &loc);
};