src/compiler/translator/Declarator.cpp


Log

Author Commit Date CI Message
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 d5f44c98 2017-11-29T17:15:40 Simplify parsing struct field declarators This removes the dummy type that was attached to struct declarators while parsing. This makes TParseContext::addStructDeclaratorList in particular simpler to understand. The new TDeclarator data type is the parsed representation of the struct_declarator grammar rule. It is completely immutable. The name and location stored in TField can also be qualified as constant now. BUG=angleproject:2267 TEST=angle_unittests Change-Id: I2834f87fc0eee0bdb7673ef495a55fb463023c55 Reviewed-on: https://chromium-review.googlesource.com/797033 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>