src/compiler/preprocessor/Input.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>
Geoff Lang 197d5294 2018-04-25T14:29:00 Wrap all preprocessor code in the angle namespace. BUG=836820 BUG=801364 Change-Id: I08b6a2f9f12b689e09df6efd916c313e71e8a051 Reviewed-on: https://chromium-review.googlesource.com/1028581 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill acf2f3ad 2017-11-21T19:22:44 Apply Chromium style fixes. This addresses several minor code quality issues that are validated in Chromium, but not yet applied to ANGLE: * constructors and destructors must be defined out-of-line * auto is not allowed for simple pointer types * use override everywhere instead of virtual * virtual functions must also be defined out-of-line Slightly reduces binary size for me (~2k on Win, 150k on Linux). Bug: angleproject:1569 Change-Id: I073ca3365188caf5f29fb28d9eb207903c1843e6 Reviewed-on: https://chromium-review.googlesource.com/779959 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill f832c9dd 2016-12-12T17:38:48 Fix style in the preprocessor. Again using git cl format. BUG=angleproject:650 Change-Id: I8898d00bfc6a50db50bffd2cc30c3eda7c08c6c2 Reviewed-on: https://chromium-review.googlesource.com/419097 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Corentin Wallez 054f7ed0 2016-09-20T17:15:59 preprocessor: Miscellaneous cleanups - Use full header paths in includes - Use ASSERT instead of assert - Use angle::NonCopyable instead of PP_DISALLOW_COPY_AND_ASSIGN - Use range-for in a couple places - Remove pp_utils.h BUG=angleproject:1522 Change-Id: If107fef89e8465bca65cf664926d1051c5d1e232 Reviewed-on: https://chromium-review.googlesource.com/387212 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Olli Etuaho 26e355b8 2015-08-14T14:16:19 Add full support for line continuation in the preprocessor Re-landing earlier change with constant signedness fixed (was causing build issues on Linux). Line continuation in ESSL 3.00 needs to be processed before tokenization, since tokens can span the line continuation. On the other hand, ANGLE's tokenizer keeps track of line numbers, and whenever a line continuation appears the line number still needs to be incremented by one, just like on a regular newline. That's why line continuation is now implemented as follows: when the shader strings are concatenated in Input, they are also checked for line continuation. Whenever line continuation is encountered, the string is cut before that point. When the tokenizer asks for more input, the string starting from the character after line continuation is passed to it, and the line number is incremented from Input. This way the tokenizer can parse tokens that span multiple lines - it never sees the line continuation - but still keeps track of the line number correctly. Relevant spec is in ESSL 3.00 section 3.2 "Source strings". Support for line continuation also applies to ESSL 1.00. ESSL 3.00 spec section 1.5 says that line continuation support is mandated when an ESSL 1.00 shader is used with the OpenGL ES 3.0 API, and is optional when ESSL 1.00 is used with the OpenGL ES 2.0 API. TEST=dEQP-GLES3.functional.shaders.preprocessor.line_continuation.* (all pass), angle_unittests BUG=angleproject:1125 Change-Id: Ic086aacac53cd75bf93c0fda782416501d2f842b Reviewed-on: https://chromium-review.googlesource.com/294200 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill 3b040eb8 2015-08-17T16:51:33 Revert "Add full support for line continuation in the preprocessor" Warning in the Linux/Mac builders: In file included from ../../third_party/angle/src/tests/preprocessor_tests/input_test.cpp:7: In file included from ../../third_party/angle/src/tests/preprocessor_tests/PreprocessorTest.h:7: ../../testing/gtest/include/gtest/gtest.h:1392:16: error: comparison of integers of different signs: 'const int' and 'const unsigned long' [-Werror,-Wsign-compare] if (expected == actual) { ~~~~~~~~ ^ ~~~~~~ ../../testing/gtest/include/gtest/gtest.h:1422:12: note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<int, unsigned long>' requested here return CmpHelperEQ(expected_expression, actual_expression, expected, ^ ../../third_party/angle/src/tests/preprocessor_tests/input_test.cpp:171:5: note: in instantiation of function template specialization 'testing::internal::EqHelper<false>::Compare<int, unsigned long>' requested here EXPECT_EQ(3, input.read(buf, maxSize, &lineNo)); ^ BUG=angleproject:1125 This reverts commit c1157d1963170c7411eb6c32e2b2fbce02c5a170. Change-Id: Ic6fa286d190b006cccc5154d86e21ecc03175763 Reviewed-on: https://chromium-review.googlesource.com/294080 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho c1157d19 2015-08-14T14:16:19 Add full support for line continuation in the preprocessor Line continuation in ESSL 3.00 needs to be processed before tokenization, since tokens can span the line continuation. On the other hand, ANGLE's tokenizer keeps track of line numbers, and whenever a line continuation appears the line number still needs to be incremented by one, just like on a regular newline. That's why line continuation is now implemented as follows: when the shader strings are concatenated in Input, they are also checked for line continuation. Whenever line continuation is encountered, the string is cut before that point. When the tokenizer asks for more input, the string starting from the character after line continuation is passed to it, and the line number is incremented from Input. This way the tokenizer can parse tokens that span multiple lines - it never sees the line continuation - but still keeps track of the line number correctly. Relevant spec is in ESSL 3.00 section 3.2 "Source strings". Support for line continuation also applies to ESSL 1.00. ESSL 3.00 spec section 1.5 says that line continuation support is mandated when an ESSL 1.00 shader is used with the OpenGL ES 3.0 API, and is optional when ESSL 1.00 is used with the OpenGL ES 2.0 API. TEST=dEQP-GLES3.functional.shaders.preprocessor.line_continuation.* (all pass), angle_unittests BUG=angleproject:1125 Change-Id: I1c1de49602e7cd755d6072c3c0aa5524cd0313b4 Reviewed-on: https://chromium-review.googlesource.com/293721 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Olli Etuaho <oetuaho@nvidia.com>
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 d526f989 2014-05-13T14:51:19 Fix code style violation in compiler/preprocessor BUG=angle:650 TEST=no behavior change Change-Id: Ib52f15f6471fc7897b66d11baee11216cf08158a Reviewed-on: https://chromium-review.googlesource.com/199591 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org> Tested-by: Zhenyao Mo <zmo@chromium.org>
shannon.woods@transgaming.com d64b3dab 2013-02-28T23:19:26 Fixed 64-bit integer truncation issues in shader translator. This is an incompatible API change, but one which is necessary in order to improve correctness of the code. The API version in ShaderLang.h is updated and, unfortunately, the define renamed to something less ambiguous due to conflicts on some Android buildbots. Temporary patches in Chromium and WebKit will be landed separately to support this upgrade. BUG=403,404,405,406,407,408,409 Review URL: https://codereview.appspot.com/7300058 Conflicts: include/GLSLANG/ShaderLang.h git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1960 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com b401a92b 2012-10-26T18:58:24 Move the new preprocessor out of the 'new' directory. TRAC #21966 Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@1326 736b8ea6-26fd-11df-bfd4-992fa37f6226