src/tests/compiler_tests/IntermNode_test.cpp


Log

Author Commit Date CI Message
Corentin Wallez 76037953 2015-08-20T13:18:44 Fix compilation on Mac, adding a newline in IntermNode_test.cpp BUG= Change-Id: Ie935486bf44bacb89660419c0dabd0ff38838c90 Reviewed-on: https://chromium-review.googlesource.com/294800 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Olli Etuaho d0d59aa4 2015-08-18T13:49:45 Add deep copying support for typed AST nodes Removing dynamic indexing of vectors and matrices will require copying the indexed nodes in case they are written. Any type of l-value node that doesn't have side effects may need to be copied. Add a copying function for all typed node classes so that this copying can be performed. Private copy constructors are used to implement the deepCopy function in order to make maintenance easier. With copy constructors, each subclass only needs to take care of copying its own members, and not the base class members, which reduces the possibility of errors. Copy constructors are disabled for all node classes that don't support deep copying by inheriting TIntermNode from angle::NonCopyable. Assignment operator is disabled for all node classes through inheriting angle::NonCopyable. This applies also to classes that now get the private copy constructor. Explicit copy constructor and assignment operator declarations are added to some classes which show up in node member variables to make code clearer. BUG=angleproject:1116 TEST=angle_unittests Change-Id: Ia757b69397837f8309f0e7511c0cd24ca2c7a721 Reviewed-on: https://chromium-review.googlesource.com/293931 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Olli Etuaho <oetuaho@nvidia.com>