src/compiler/translator/ImmutableStringBuilder.h


Log

Author Commit Date CI Message
Stuart Morgan 9d737966 2019-08-14T12:25:12 Standardize copyright notices to project style For all "ANGLE Project" copyrights, standardize to the format specified by the style guide. Changes: - "Copyright (c)" and "Copyright(c)" changed to just "Copyright". - Removed the second half of date ranges ("Y1Y1-Y2Y2"->"Y1Y1"). - Fixed a small number of files that had no copyright date using the initial commit year from the version control history. - Fixed one instance of copyright being "The ANGLE Project" rather than "The ANGLE Project Authors" These changes are applied both to the copyright of source file, and where applicable to copyright statements that are generated by templates. BUG=angleproject:3811 Change-Id: I973dd65e4ef9deeba232d5be74c768256a0eb2e5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1754397 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
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>
Jamie Madill 84c11c53 2018-07-11T10:12:39 Vulkan: Implement sampler structs as function args. Bug: angleproject:2494 Change-Id: Ia8e374846427b7140ab2565ae5b9b18409a76d96 Reviewed-on: https://chromium-review.googlesource.com/1117323 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho d8b1c5c5 2018-06-20T12:08:46 Return ImmutableString from ArrayString() This makes the compiler a few kilobytes smaller, and prepares getting rid of TString altogether. BUG=angleproject:2267 TEST=angle_unittests Change-Id: I93a003fe27b99bef72f872fa1066e2e108f934c5 Reviewed-on: https://chromium-review.googlesource.com/1107713 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill 10887984 2018-06-20T11:46:41 Vulkan: Sampler structs in arrays. Samplers are extracted from arrays of struct uniforms similarly as with non-arrays. They are named according to the variable name, array element and sampler field name. Nested structs to come later. Bug: angleproject:2494 Change-Id: Ie2f5f7bd1f747e73b3c6b505b2b1043cfe1073b5 Reviewed-on: https://chromium-review.googlesource.com/1101568 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Rafael Cintron 05a449a7 2018-06-20T18:08:04 Replace reinterpret_cast with safer or no cast When casting types to one another in C++, the weaker the cast, the better. This change replaces instances of reinterpret_cast with static_cast or no cast where it safe and correct to do so. BUG=angleproject:2683 Change-Id: I99c9033614a65282ae1d78cf0f4b80fabd75877a Reviewed-on: https://chromium-review.googlesource.com/1109396 Commit-Queue: Rafael Cintron <rafael.cintron@microsoft.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 5ae64c94 2018-04-06T11:27:03 Fix writing hex values in ImmutableStringBuilder The old code was accidentally using letters offset by 10 when writing out hex values >= 10. Now the letters a to f are used as they should. This is one issue that changed shader output when ImmutableString was introduced, so it is a potential cause for a regression detailed in bug 824062, though this has not been verified. BUG=chromium:824062 TEST=angle_unittests Change-Id: Idb871dffba32a3ab20df0fe17b4b1a98ec00b7fa Reviewed-on: https://chromium-review.googlesource.com/999480 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 12c03761 2018-01-25T12:22:33 Resubmit: Use ImmutableString for HLSL texture references This fixes an issue in the original revision of this patch by adding a operator<< to TInfoSinkBase that takes ImmutableString as a parameter. This also adds ImmutableStringBuilder class, which can be used to build ImmutableStrings in place without extra allocations if the maximum length is known in advance. BUG=angleproject:2267 TEST=angle_unittests Change-Id: I52e984657a3aba3e6fe67a82b401c6b8de557d18 Reviewed-on: https://chromium-review.googlesource.com/890522 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill d1434c04 2018-01-29T02:29:53 Revert "Use ImmutableString for HLSL texture references" This reverts commit c13bda8678e86ff75a4acfc94f7a45e58224926d. Reason for revert: May have broken LibFuzzer and AFL builds: https://ci.chromium.org/buildbot/chromium.fyi/Afl%20Upload%20Linux%20ASan/7718 https://build.chromium.org/deprecated/chromium.fyi/builders/Libfuzzer%20Upload%20Linux%20ASan/builds/8691 In file included from ../../third_party/angle/src/compiler/translator/TextureFunctionHLSL.cpp:12: In file included from ../../third_party/angle/src/compiler/translator/TextureFunctionHLSL.h:19: ../../third_party/angle/src/compiler/translator/InfoSink.h:40:16: error: call to function 'operator<<' that is neither visible in the template definition nor found by argument-dependent lookup stream << t; ^ ../../third_party/angle/src/compiler/translator/TextureFunctionHLSL.cpp:111:9: note: in instantiation of function template specialization 'sh::TInfoSinkBase::operator<<<sh::ImmutableString>' requested here out << textureReference; ^ ../../third_party/angle/src/compiler/translator/ImmutableString.h:76:15: note: 'operator<<' should be declared prior to the call site or in namespace 'sh' std::ostream &operator<<(std::ostream &os, const sh::ImmutableString &str); ^ 1 error generated. Bug: chromium:806619 Original change's description: > Use ImmutableString for HLSL texture references > > This also adds ImmutableStringBuilder class, which can be used to > build ImmutableStrings in place without extra allocations if the > maximum length is known in advance. > > BUG=angleproject:2267 > TEST=angle_unittests > > Change-Id: I4dfb78adeb0cffcfad0d25753fb8063466012c92 > Reviewed-on: https://chromium-review.googlesource.com/886362 > Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> > Reviewed-by: Jamie Madill <jmadill@chromium.org> TBR=jmadill@chromium.org,cwallez@chromium.org,oetuaho@nvidia.com # Not skipping CQ checks because original CL landed > 1 day ago. Bug: angleproject:2267 Change-Id: I445f5a786f8b16c3f40f28df09d45fcb215a9c88 Reviewed-on: https://chromium-review.googlesource.com/890542 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Olli Etuaho c13bda86 2018-01-25T12:22:33 Use ImmutableString for HLSL texture references This also adds ImmutableStringBuilder class, which can be used to build ImmutableStrings in place without extra allocations if the maximum length is known in advance. BUG=angleproject:2267 TEST=angle_unittests Change-Id: I4dfb78adeb0cffcfad0d25753fb8063466012c92 Reviewed-on: https://chromium-review.googlesource.com/886362 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>