blob: f4cbb149b7b8f88833f0e67e7947a665a6fe6f5c [file] [log] [blame]
Olli Etuahobb5a7e22017-08-30 13:03:12 +03001//
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
20namespace sh
21{
22
23class TIntermBlock;
24
25void RemoveArrayLengthMethod(TIntermBlock *root);
26
27} // namespace sh