1. 12 Nov, 2015 2 commits
    • Fix constructor constant folding · 1d122789
      Olli Etuaho authored
      The previous solution for constant folding constructors was significantly
      overengineered and partially incorrect. Switch to a much simpler
      constructor folding function that does not use an AST traverser, but
      simply iterates over the constant folded parameters of the constructor
      and doesn't do any unnecessary checks. It also reuses some code for
      constant folding other built-in functions.
      
      This fixes issues with initializing constant matrices with only a single
      parameter. Instead of copying the first component of the constructor
      parameter all over the matrix, passing a vec4 or matrix argument now
      assigns the values correctly.
      
      BUG=angleproject:1193
      TEST=angle_unittests, WebGL conformance tests
      
      Change-Id: I50b10721ea30cb15843fba892c1b1a211f1d72e5
      Reviewed-on: https://chromium-review.googlesource.com/311191
      Tryjob-Request: Olli Etuaho <oetuaho@nvidia.com>
      Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
      Reviewed-by: 's avatarZhenyao Mo <zmo@chromium.org>
      Tested-by: 's avatarOlli Etuaho <oetuaho@nvidia.com>
    • Allow constant folding some non-constant expressions · 7c3848e5
      Olli Etuaho authored
      This requires removing the assumption that constant folding implies
      constness in the constant expression sense from various places in the
      code.
      
      This particularly benefits ternary operators, which can now be simplified
      if just the condition is a compile-time constant.
      
      In the future, the groundwork that is laid here could be used to implement
      more aggressive constant folding of user-defined functions for example.
      
      TEST=angle_unittests
      BUG=angleproject:851
      
      Change-Id: I0eede806570d56746c3dad1e01aa89a91d66013d
      Reviewed-on: https://chromium-review.googlesource.com/310750Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
      Tested-by: 's avatarOlli Etuaho <oetuaho@nvidia.com>
      Reviewed-by: 's avatarZhenyao Mo <zmo@chromium.org>
  2. 11 Nov, 2015 3 commits
  3. 10 Nov, 2015 4 commits
  4. 09 Nov, 2015 5 commits
  5. 06 Nov, 2015 16 commits
  6. 05 Nov, 2015 10 commits