src/compiler/translator/SymbolTable.h


Log

Author Commit Date CI Message
Jamie Madill f0d10f89 2015-03-31T12:56:52 Replace non-copyable macro with a helper class. This class provides a simpler scheme for blocking default copy and assignment operators. It also reduces the amount of code needed since it's inherited to child classes. This also fixes the conflict between our macro and the same-named macro in Chromium code. BUG=angleproject:956 Change-Id: If0dc72aa3f63fbc7b8fa34907418821c64c39e2f Reviewed-on: https://chromium-review.googlesource.com/263257 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Brandon Jones <bajones@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>
Jamie Madill 2c43325d 2014-12-03T12:36:54 Fix double delete with invariant varyings. The compiler would leave some TString variables lying around after the pool gets released, leading to a potential crash. BUG=angle:846 Change-Id: I484ed9b14bba9bf653f6ed4001ae79f87791b0dd Reviewed-on: https://chromium-review.googlesource.com/232780 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Geoff Lang 0a73dd85 2014-11-19T16:18:08 Fix include guards. BUG=angle:733 Change-Id: I08b2c11c4831f1161c178c1842b10e807185aced Reviewed-on: https://chromium-review.googlesource.com/230831 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Zhenyao Mo 94ac7b78 2014-10-15T18:22:08 Invariant related processing. * Fix a bug in PreProcessor for STDGL pragma. * Record all invariant settings and set them in ShaderVariable. * Write #pragma STDGL invariant(all) in GL BUG=angle:776 TEST=https://www.khronos.org/registry/webgl/sdk/tests/conformance/glsl/misc/shaders-with-invariance.html Change-Id: Ie28b75480deed79f0c9f26e3b98f1778d1290182 Reviewed-on: https://chromium-review.googlesource.com/223610 Tested-by: Zhenyao Mo <zmo@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Gus Fernandez 964df49d 2014-10-13T11:54:39 Fix a crash with the WebGL conformance test suite. Undefined behavior caused by an overflowed enum was causing the translator symbol table stack to not get popped correctly when the compiler completed, causing dangling symbols who's storage was reclaimed and reused when the allocation pool was popped. The error occurred in the "shader-with-reserved-words" test, which passes when the compiler fails due to the use of reserved words as identifiers. As such, this test would pass even if the GPU process crashes but further tests in the test suite would fail. BUG=angle::785, 786 Change-Id: I365cb55f962f8dfe409f40532effeb10b8189432 Reviewed-on: https://chromium-review.googlesource.com/223093 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Reviewed-by: Nicolas Capens <capn@chromium.org> Tested-by: Gus Fernandez <gusfernandez@chromium.org>
Jamie Madill b1a85f48 2014-08-19T15:23:24 Rename compiler intermediate source files. This prevents confusion between "TIntermediate" and "TIntermNode". BUG=angle:711 Change-Id: Ib7a086382a479db3f77bf2ab06ce321aa7b35d13 Reviewed-on: https://chromium-review.googlesource.com/212936 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org> Reviewed-by: Nicolas Capens <capn@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 01f85ac8 2014-06-06T11:55:04 Refactor GLSL scoped structure handling. With a unique ID, similar to how we handle scoped structures in the HLSL translator, we can simplify the declared structure check. BUG=angle:618 Change-Id: I5fe61c8d353650ac67a7c7ecdf53a70b91a9b717 Reviewed-on: https://chromium-review.googlesource.com/202500 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Tested-by: Jamie Madill <jmadill@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 ed14b79d 2014-05-08T11:21:07 Shaders should fail compile if a boolean's precision is specified Tested and no regression on WebGL conformance 1.0.3 BUG=angle:628 BUG=368874 TEST=http://www.khronos.org/registry/webgl/sdk/tests/conformance/glsl/misc/boolean_precision.html Change-Id: Ie74616c3ab846eea19f4bd4a041fc0f00d55f151 Reviewed-on: https://chromium-review.googlesource.com/198884 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Nicolas Capens <nicolascapens@chromium.org> Tested-by: Zhenyao Mo <zmo@chromium.org>
Jamie Madill 10567260 2014-04-17T16:40:00 Fix build with Clang. Clang's validation is a bit more thorough than GCC's or MSVC's and picked up a few new errors and warnings. We missed a few default cases in switches and used an improper type for default arguments. BUG=angle:568 Change-Id: I34239c6c5c785ad1e62917fc37c3243f4c5b5f1b Reviewed-on: https://chromium-review.googlesource.com/195472 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Nicolas Capens bf7db103 2014-02-19T17:20:28 Implement textureGradOffset. BUG=angle:564 Change-Id: Iad0e452f53469208d55755e14a350b5d2ca83e9d Reviewed-on: https://chromium-review.googlesource.com/186987 Tested-by: Nicolas Capens <nicolascapens@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Nicolas Capens 759b994b 2014-02-14T17:57:14 Define generic sampler types. BUG=angle:564 Change-Id: I627f55152000371e73f3e5b4ba6938119fab0223 Reviewed-on: https://chromium-review.googlesource.com/186682 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Nicolas Capens <nicolascapens@chromium.org>
Nicolas Capens 1fbc2873 2014-01-03T14:12:09 Add textureOffset intrinsics to the symbol table. BUG=angle:541 Change-Id: Ied96edd073017a507369319a781b8ed23f60790b Reviewed-on: https://chromium-review.googlesource.com/181520 Tested-by: Nicolas Capens <nicolascapens@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@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.