Change comma nodes to TIntermBinary
Comma nodes always have just two parameters. If there's an expression
with several commas in the middle, it's parsed as a tree of comma
operations. It makes more sense to represent it as a binary node
rather than an aggregate node.
After this patch, TIntermAggregate is still used for function
prototypes, function parameter lists, function calls, and variable and
invariant declarations.
BUG=angleproject:1490
TEST=angle_unittests, angle_end2end_tests
Change-Id: I66be10624bf27bcf25987b4d93958d4a07600771
Reviewed-on: https://chromium-review.googlesource.com/397320
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
diff --git a/src/compiler/translator/Intermediate.h b/src/compiler/translator/Intermediate.h
index f5878bd..a4fb7cc 100644
--- a/src/compiler/translator/Intermediate.h
+++ b/src/compiler/translator/Intermediate.h
@@ -48,10 +48,10 @@
const TSourceLoc &line);
TIntermCase *addCase(
TIntermTyped *condition, const TSourceLoc &line);
- TIntermTyped *addComma(TIntermTyped *left,
- TIntermTyped *right,
- const TSourceLoc &line,
- int shaderVersion);
+ static TIntermTyped *AddComma(TIntermTyped *left,
+ TIntermTyped *right,
+ const TSourceLoc &line,
+ int shaderVersion);
TIntermConstantUnion *addConstantUnion(const TConstantUnion *constantUnion,
const TType &type,
const TSourceLoc &line);