src/compiler/translator/SymbolTable.cpp


Log

Author Commit Date CI Message
Olli Etuaho 183d7e24 2015-11-20T15:59:09 Remove predefined precision qualifiers from ESSL3 samplers New sampler types in ESSL3 should not have default precision qualifiers. This is specified in ESSL 3.00.4 section 4.5.4. BUG=angleproject:1222 TEST=angle_unittests Change-Id: I9c8e7a5fbb4278db80de79bcaeebaf23e64242a0 Reviewed-on: https://chromium-review.googlesource.com/312048 Tryjob-Request: Olli Etuaho <oetuaho@nvidia.com> Tested-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Cooper Partin 149e6e69 2015-08-07T16:18:18 Fixed compiler warning C4458 'declaration of variable hides class member'. BUG=angleproject:1119 Change-Id: Ibc7cfdea72abe402cbfa1c10e0ada7576fa1cfa2 Reviewed-on: https://chromium-review.googlesource.com/292052 Tested-by: Cooper Partin <coopp@microsoft.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 13e7c7e6 2015-07-30T14:17:29 Revert "Names of built-in functions cannot be redeclared as functions" Causing failures in the WebGL1 test: conformance/glsl/misc/shader-with-non-reserved-words.html This reverts commit b5f88853ea80ea112368bb15999b363db0e4c648. Change-Id: I2105c8040057665abda00435e8c0ff8a83af3645 Reviewed-on: https://chromium-review.googlesource.com/289192 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Arun Patole b5f88853 2015-07-23T17:37:39 Names of built-in functions cannot be redeclared as functions With ESSL 3.00, names of built-in functions cannot be redeclared as functions and therefore overloading or redefining builtin functions is an error. This is fixed by inserting unmangled built-ins into the symbol table and then checking if the new function declaration matches any of the built-in in symbol table. BUG=angleproject:1066 TEST=angle_unittests(new: ParseESSLFunctionsTest), dEQP Tests dEQP-GLES3.functional.shaders.functions.invalid.overload_builtin_function* (2 tests started passing with this change) Change-Id: I0e027e588664e604f29c130028178315c3e21631 Reviewed-on: https://chromium-review.googlesource.com/287801 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Dmitry Skiba 01971113 2015-07-10T14:54:00 Cache TTypes. *re-land with build fix for Win/Release* This change saves us ~70KiB per compiler with just ~3KiB of cache. BUG=492725 Change-Id: I4382c55b2480f70b00c5d117fcb7e0c51d0dfbb4 Reviewed-on: https://chromium-review.googlesource.com/284735 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Dmitry Skiba <dskiba@google.com> Reviewed-by: Alexis Hétu <sugoi@chromium.org>
Jamie Madill 53b76107 2015-07-10T18:52:58 Revert "Cache TTypes." Unused variable warning in Release: warning C4189: 'MaxEnumValue' : local variable is initialized but not referenced I'll handle fixing this. BUG=492725 This reverts commit b25d14e4b39ee273fad3bb585c3a3a929b3f794c. Change-Id: I502fc5288d5d3c48ecd43f84acdf66b7e300ad22 Reviewed-on: https://chromium-review.googlesource.com/284863 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Dmitry Skiba b25d14e4 2015-06-23T17:43:14 Cache TTypes. This change saves us ~70KiB per compiler with just ~3KiB of cache. BUG=492725 Change-Id: I7b8053c032c9c68f646162baf61abf6db3afe52e Reviewed-on: https://chromium-review.googlesource.com/284003 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Dmitry Skiba 58832204 2015-07-06T16:11:13 Calculate TFunction::mangledName lazily. This saves us ~15KiB per compiler instance on 32-bit Android. BUG=492725 Change-Id: I9db2998482941b5ab2eb5cb4925cbd1fb58ab4be Reviewed-on: https://chromium-review.googlesource.com/283584 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 2f232370 2015-07-07T21:57:55 Revert "Cache TTypes." Lots of compile errors. BUG=492725 This reverts commit 5377720aae042c5bfae0e8a37032c90dc3ab78cf. Change-Id: I64889b99b1f1f48d39b87ebb668f6a32a3abac45 Reviewed-on: https://chromium-review.googlesource.com/283945 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Dmitry Skiba 5377720a 2015-06-23T17:43:14 Cache TTypes. This change saves us ~70KiB per compiler with just ~3KiB of cache. BUG=492725 Change-Id: I2ee748f7271b1afe0834083cbff6f0b84104aa53 Reviewed-on: https://chromium-review.googlesource.com/281411 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Dmitry Skiba <dskiba@google.com>
Dmitry Skiba 7f17a50c 2015-06-22T15:08:39 Store TFunction::returnType by a const pointer. On 32-bit Android this change saves ~30KiB per compiler instance. BUG=492725 Change-Id: I8bea48d57ee7eac0a0ee417035085c0d335aea09 Reviewed-on: https://chromium-review.googlesource.com/281047 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Dmitry Skiba <dskiba@google.com>
Dmitry Skiba efa3d8eb 2015-06-22T14:52:10 Change TSymbolTable::insertBuiltIn() TType* pointers to const. Const types make it possible to implement caching and other optimizations. BUG=492725 Change-Id: I64398bb9effcc909dd052a038acbb5ec0ca730e8 Reviewed-on: https://chromium-review.googlesource.com/281046 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org> Tested-by: Dmitry Skiba <dskiba@google.com>
Minmin Gong 794e0009 2015-04-07T18:31:54 Fix and enable warning C4244 (Conversion from 'type1' to 'type2', possible loss of data) Change-Id: Id0e06d7d6600344d858f00dabc219d79289bbc82 Reviewed-on: https://chromium-review.googlesource.com/265020 Tested-by: Minmin Gong <mgong@microsoft.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill b3584fb4 2015-04-09T17:34:21 Revert "Fix and enable warning C4244 (Conversion from 'type1' to 'type2', possible loss of data)" Causing a build failure on Mac/Clang: ./Tokenizer.cpp:551:7: error: extra tokens at end of #else directive [-Werror,-Wextra-tokens] #else if defined(_MSC_VER) http://build.chromium.org/p/chromium.gpu.fyi/builders/GPU%20Mac%20Builder/builds/29136 This reverts commit 3b26e231d99154814eb428f75a67bbe7a21adadc. Change-Id: I2d11ddcc18130d908fd2ec3d6f5ab890cfccd5e7 Reviewed-on: https://chromium-review.googlesource.com/264983 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Minmin Gong 3b26e231 2015-04-07T18:31:54 Fix and enable warning C4244 (Conversion from 'type1' to 'type2', possible loss of data) Change-Id: I73d9a2b9ad16f032be974b9c819de0dc1247c2ea Reviewed-on: https://chromium-review.googlesource.com/264533 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho b2983c95 2015-03-18T14:02:46 Correctly insert unmangled function names to symbol table This fixes detecting some cases of function parameter mismatch (previously a mangled function name corresponding to no function parameters was added to the symbol table for each user-defined function, and this was returned when doing function lookups with no parameters). Also fixes detection of reusing a function name as a variable/struct name. New unit tests are added to ensure that these fixes don't regress. BUG=angleproject:936 TEST=angle_unittests, WebGL conformance tests Change-Id: I2dadde9dcc01c7a4a653c1982c36377b89e6d437 Reviewed-on: https://chromium-review.googlesource.com/260800 Tested-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Nicolas Capens c9d9b30a 2015-02-20T23:02:15 Set symbol extension at insertion. BUG=angle:926 Change-Id: I4c96ae89c79d720d99bde803541c3158ba4629ab Reviewed-on: https://chromium-review.googlesource.com/251662 Tested-by: Nicolas Capens <capn@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Nicolas Capens 482907eb 2015-02-23T16:56:33 Set symbol operations at insertion. BUG=angle:926 Change-Id: Ifc8f62ebe1277214a4d3fbd5c56eb5faeff8e389 Reviewed-on: https://chromium-review.googlesource.com/251650 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Nicolas Capens <capn@chromium.org> Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Nicolas Capens f3cc4aef 2015-02-23T13:51:25 Use generic types to compact the symbol table initialization. Just like in the spec text, use symbolic types that represent multiple concrete types. The few signatures that get generated more than once are only added to the symbol table once because it ignores duplicates. BUG=angle:926 Change-Id: I216f03d22502b724dbefc87c5a021d6021c3a434 Reviewed-on: https://chromium-review.googlesource.com/251620 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Nicolas Capens <capn@chromium.org>
Geoff Lang e371f1d7 2014-11-21T11:25:22 Update the DISALLOW_COPY_AND_ASSIGN macro to use c++ operator deletion. Also remove the TSymbol copy constructor which is not used. BUG=angle:836 Change-Id: I4f35f554c90d01dc2132d244a1974d9a8dc89bbd Reviewed-on: https://chromium-review.googlesource.com/231231 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Zhenyao Mo e740addb 2014-07-18T17:01:01 Add compiler option SH_REGENERATE_STRUCT_NAMES. BUG=angle:701 TEST=webgl conformance tests Change-Id: I13b35900956e7d840d5891a5bab90a400347cd6f Reviewed-on: https://chromium-review.googlesource.com/209229 Tested-by: Zhenyao Mo <zmo@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Nicolas Capens adfffe46 2014-06-17T02:13:36 Duplicate reused symbol table entries. BUG=angle:651 Change-Id: Ifce3c19d41a0a5a5ca5ee90ede528adf397d1da5 Reviewed-on: https://chromium-review.googlesource.com/204290 Tested-by: Nicolas Capens <nicolascapens@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Jamie Madill bfa91f47 2014-06-05T15:45:18 Redesign HLSL scoped structures to a unique ID. A unique ID gives a more flexible renaming scheme than our current method of using nested scope identifiers. The reduced complexity allows for fewer points of breakage and fixes an outstanding bug with scoped structures (with added test). BUG=angle:618 Change-Id: I6551248bb9fa2d185ab67248721f898dd50151f0 Reviewed-on: https://chromium-review.googlesource.com/202183 Reviewed-by: Nicolas Capens <nicolascapens@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Zhenyao Mo 9eedea03 2014-05-12T16:02:35 Fix code styles in OutputGLSLBase, SymbolTable, and Types. I came across these three classes in the last CL, so do some cleanup as I touched these classes. BUG= TEST=webgl conformance, no regressions Change-Id: I2819bab5965fcb4917f85c2eded571a7f95ab9a2 Reviewed-on: https://chromium-review.googlesource.com/199423 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Tested-by: Zhenyao Mo <zmo@chromium.org>
Zhenyao Mo 904a9164 2014-05-09T14:07:45 Fix nested struct scope support in GL backend. Basically we should be able to reuse a struct name once the previous use is out of the scope, or we can reuse it if we are in a inner scope than where it is defined before. BUG=368910 BUG=angle:618 TEST=conformance/glsl/bugs/nested-structs-with-same-name.html Change-Id: Icfac76b844deaca0c8a0501d7426ff3802e657dc Reviewed-on: https://chromium-review.googlesource.com/199137 Reviewed-by: Nicolas Capens <nicolascapens@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Zhenyao Mo <zmo@chromium.org>
Jamie Madill 9bab6d8f 2014-04-10T13:20:13 Insert missing sampler cases in TType::buildMangledName. We were missing the cases for 2D Rect samplers and external OES samplers. This was causing an assert in the WebGL CTS in Debug. BUG=angle:550 Change-Id: Ieefeef6ff0f9a486bf7667c7efc60dee766f03ef Reviewed-on: https://chromium-review.googlesource.com/194122 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 17732823 2013-08-29T13:46:49 Moved the compiler source files into directories based on their project and added a compiler.gypi to generate the compiler projects.