src/compiler/translator/FunctionLookup.cpp


Log

Author Commit Date CI Message
Jamie Madill b980c563 2018-11-27T11:34:27 Reformat all cpp and h files. This applies git cl format --full to all ANGLE sources. Bug: angleproject:2986 Change-Id: Ib504e618c1589332a37e97696cdc3515d739308f Reviewed-on: https://chromium-review.googlesource.com/c/1351367 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Olli Etuaho 697bf65c 2018-02-16T11:50:54 Avoid redundant symbol lookup when parsing functions The lexical phase looks up symbols when it encounters an identifier. Instead of duplicating this work when parsing non-constructor functions, we now store the symbol looked up in the lexical phase in TFunctionLookup. This improves scores of the real world shader compiler perf test by 1-2%. BUG=angleproject:2267 TEST=angle_unittests Change-Id: Idc99776571313d8b654910f9daaf9bf34a048228 Reviewed-on: https://chromium-review.googlesource.com/923725 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho fbb1c792 2018-01-19T16:26:59 Store symbol names as a ImmutableString This will enable compile-time initialization of built-in symbols as well as reducing copying strings. Most of the code that deals with names is changed to use ImmutableString where it makes sense to avoid conversions. The lexer/parser now allocate const char pointers into pool memory instead of allocating TStrings. These are then converted to ImmutableString upon entering TParseContext. BUG=angleproject:2267 TEST=angle_unittests, angle_end2end_tests Change-Id: I244d6271ea1ecf7150d4f89dfa388a7745a1150c Reviewed-on: https://chromium-review.googlesource.com/881561 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Olli Etuaho 95ed1947 2018-02-01T14:01:19 Add a class for function lookups Using a purpose-built class for function lookups instead of using a combination of TFunction and a struct container for the this node and arguments makes the code clearer. BUG=angleproject:2267 TEST=angle_unittests Change-Id: I3f345d836abeaa7f84cc46b4b840fd06c7e2e1a7 Reviewed-on: https://chromium-review.googlesource.com/897363 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>