Commit 3272a6d3d22ec0ebe13cf7fc97a81fd3948e9b42

Olli Etuaho 2016-08-29T17:54:50

Promote and fold indexing nodes similarly to other binary ops Indexing nodes now get their type set in TIntermBinary::promote, same as math and logic ops. They are also constant folded through TIntermBinary::fold() instead of having special functions for constant folding them in ParseContext. Index nodes for struct and interface block member access now always have integer type, instead of sometimes having the type of the field they were used to access. Usage of TIntermBinary constructor is cleaned up so only the constructor that takes in left and right operands is used. The type of TIntermBinary nodes is always determined automatically. Together these changes make the code considerably cleaner. Note that the code for constant folding for array indexing is actually never hit because constant folding array constructors is still intentionally disabled in the code. BUG=angleproject:1490 TEST=angle_unittests Change-Id: Ifcec45257476cdb0d495c7d72e3cf2f83388e8c5 Reviewed-on: https://chromium-review.googlesource.com/377961 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>