Separate expressions returning arrays for HLSL output

Complex array expressions need to be broken down in HLSL output so that they
are built out of simple combinations of operations and symbols.

In practice this means that array constructors, array assignments and functions
that return arrays inside complex expressions need to be replaced by symbols.

After this change, ANGLE passes all dEQP-GLES3.functional.shaders.arrays
tests.

The old SimplifyArrayAssignment stub is removed, the new name
SeparateExpressionsReturningArrays more closely reflects what the function
needs to do.

BUG=angleproject:971, angleproject:941
TEST=dEQP-GLES3.functional.shaders.arrays.*, WebGL 2 conformance tests

Change-Id: Iab8dde72b1126dc2f958ffb5b1b830fe3ce25912
Reviewed-on: https://chromium-review.googlesource.com/272122
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
diff --git a/src/compiler/translator/IntermNode.h b/src/compiler/translator/IntermNode.h
index 8b91f51..bdfdd67 100644
--- a/src/compiler/translator/IntermNode.h
+++ b/src/compiler/translator/IntermNode.h
@@ -636,6 +636,11 @@
     void incrementParentBlockPos();
     void popParentBlock();
 
+    bool parentNodeIsBlock()
+    {
+        return !mParentBlockStack.empty() && getParentNode() == mParentBlockStack.back().node;
+    }
+
     // Return the original name if hash function pointer is NULL;
     // otherwise return the hashed name.
     static TString hash(const TString& name, ShHashFunction64 hashFunction);