1 //
2 // Copyright (c) 2017 The ANGLE Project Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
5 //
6 // RemoveArrayLengthMethod.h:
7 //   Fold array length expressions, including cases where the "this" node has side effects.
8 //   Example:
9 //     int i = (a = b).length();
10 //     int j = (func()).length();
11 //   becomes:
12 //     (a = b);
13 //     int i = <constant array length>;
14 //     func();
15 //     int j = <constant array length>;
16 //
17 //   Must be run after SplitSequenceOperator, SimplifyLoopConditions and SeparateDeclarations steps
18 //   have been done to expressions containing calls of the array length method.
19 //
20 //   Does nothing to length method calls done on runtime-sized arrays.
21 
22 namespace sh
23 {
24 
25 class TIntermBlock;
26 
27 void RemoveArrayLengthMethod(TIntermBlock *root);
28 
29 }  // namespace sh
30