src/compiler/translator/ParseContext.cpp


Log

Author Commit Date CI Message
Jamie Madill 3b5c2dae 2014-08-19T15:23:32 Add a new invariant declaration operator. BUG=angle:711 Change-Id: I54a48b636a68c317b8d44ee2d578847b80095289 Reviewed-on: https://chromium-review.googlesource.com/213500 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Nicolas Capens ffd7387a 2014-08-21T13:49:16 Prevent accessing more arguments than provided. BUG=390111 Change-Id: Iecc2ac2354a82cca937a823e5c588c662264e36c Reviewed-on: https://chromium-review.googlesource.com/213551 Tested-by: Nicolas Capens <capn@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 47e3ec08 2014-08-20T16:38:33 Add a helper method to parse invariant declarations. This pulls out more functionality from the grammar into simple c++ source files. BUG=angle:711 Change-Id: I19121d710dc1543585361cb53a0deb2ea0479db9 Reviewed-on: https://chromium-review.googlesource.com/212938 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Nicolas Capens <capn@chromium.org>
Jamie Madill 5c09702f 2014-08-20T16:38:32 Add a getNamedVariable helper method to TParseContext. This method will be useful in more than one place, since we need to get a TType from an indentifier when parsing invariant declarations. BUG=angle:711 Change-Id: I1c1befbdcc93ea626428fb4e313b8c6326c158f6 Reviewed-on: https://chromium-review.googlesource.com/212937 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Nicolas Capens <capn@chromium.org>
Zhenyao Mo e40d1e9c 2014-07-16T17:40:36 Fix style violations. BUG=angle:650 TEST=no behavior change Change-Id: I3096615a181b1ec2c18ce60566c3d6249975b84e Reviewed-on: https://chromium-review.googlesource.com/208569 Tested-by: Zhenyao Mo <zmo@chromium.org> Reviewed-by: Jamie Madill <jmadill@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>
Nicolas Capens 16004fca 2014-06-11T11:29:11 Eliminate conversion operations. They've been replaced by using constructor nodes, so any code handling conversion operators can be removed. BUG=380353 Change-Id: I70413179e7443efccbf997a5dd0f053c23689589 Reviewed-on: https://chromium-review.googlesource.com/203453 Tested-by: Nicolas Capens <nicolascapens@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Nicolas Capens 6ed8d8af 2014-06-11T11:25:20 Produce constructors instead of conversions. GLSL only supports explicit conversion through constructors. Therefore the conversion nodes are redundant. BUG=380353 Change-Id: Id871c34750191dac431bf72aac9afed7b0db7f8e Reviewed-on: https://chromium-review.googlesource.com/203452 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Nicolas Capens <nicolascapens@chromium.org>
Nicolas Capens 906744ac 2014-06-06T15:18:07 Restrict the size of shader arrays. This prevents overflow issues in the HLSL translator and some drivers. The limit it hard-coded to 65536 to be larger than the Shader Model 5 register limit (4096) to account for register allocation optimizations and future hardware. BUG=379799 Change-Id: I20f05c9dd230fbfc1c92af52533cd2b50f2ff994 Reviewed-on: https://chromium-review.googlesource.com/202939 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Nicolas Capens <nicolascapens@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>
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>
Jamie Madill 41a49272 2014-03-18T16:10:13 Fixed error message for exceeding maximum struct nesting. It got broken in r2423. We were referring to field-name as struct-name. This patch fixes the regression and also improves the error message by adding the field-name. BUG=angle:459 R=kbr@chromium.org Review URL: https://codereview.appspot.com/12891043 Change-Id: I9ac9a8dafcad1857f7d39e6d494e457d1fc50f70 Reviewed-on: https://chromium-review.googlesource.com/190530 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Reviewed-by: Nicolas Capens <nicolascapens@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 5508f39d 2014-02-20T13:31:36 Fix breaking the build with missing GetGlobalMaxTokenSize. Because the preprocessor is used independently from the compiler, we need a way to track max token size when we don't have access to the parse context with the current spec. BUG=angle:550 Change-Id: Idf5035ec2c001ee75f264151ab3c4e92f3cd44d7 Reviewed-on: https://chromium-review.googlesource.com/187140 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Reviewed-by: Nicolas Capens <nicolascapens@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang c6856732 2014-02-11T09:38:55 Fix wrong enum type being compared. Change-Id: I020bbf8179c08574f5fc0a207db03d7456eeeba1 Reviewed-on: https://chromium-review.googlesource.com/185860 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Brendan Long eaa84061 2013-12-08T18:26:50 Remove unnecessary int cast in ParseContext. BUG=angle:536 Change-Id: I72287f5ce9736cd48fc241022e09446db717cf92 Reviewed-on: https://chromium-review.googlesource.com/181770 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Nicolas Capens <nicolascapens@chromium.org> Commit-Queue: Nicolas Capens <nicolascapens@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shannon Woods 7f2d7945 2013-11-19T15:07:58 Manual merge of Ehsan Akhgari's patch to rename Diagnostics enums to avoid collision with Windows.h (See https://chromium-review.googlesource.com/#/c/177181/3) Change-Id: I2978d06ec96789b3ee1696b65a84c2a9f31f7ba4
Jamie Madill 6b9cb259 2013-10-17T10:45:47 Rename ParseHelper.cpp/h to ParseContext.cpp/h. TRAC #24002 Signed-off-by: Shannon Woods Signed-off-by: Geoff Lang