Mesa (master): nir/algebraic: Clean up some __str__ cruft

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Dec 5 21:35:36 UTC 2018


Module: Mesa
Branch: master
Commit: d6aac618fb489fdaf11670489567cc95ea891c86
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d6aac618fb489fdaf11670489567cc95ea891c86

Author: Jason Ekstrand <jason.ekstrand at intel.com>
Date:   Thu Nov  8 14:00:07 2018 -0600

nir/algebraic: Clean up some __str__ cruft

Both of these things are already handled in the Value base class so we
don't need to handle them explicitly in Constant.

Reviewed-by: Connor Abbott <cwabbott0 at gmail.com>

---

 src/compiler/nir/nir_algebraic.py | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/src/compiler/nir/nir_algebraic.py b/src/compiler/nir/nir_algebraic.py
index efd6e52cdb..d75a7ce27c 100644
--- a/src/compiler/nir/nir_algebraic.py
+++ b/src/compiler/nir/nir_algebraic.py
@@ -185,7 +185,6 @@ class Constant(Value):
    def __init__(self, val, name):
       Value.__init__(self, val, name, "constant")
 
-      self.in_val = str(val)
       if isinstance(val, (str)):
          m = _constant_re.match(val)
          self.value = ast.literal_eval(m.group('value'))
@@ -251,9 +250,6 @@ class Variable(Value):
 
       self.index = varset[self.var_name]
 
-   def __str__(self):
-      return self.in_val
-
    def type(self):
       if self.required_type == 'bool':
          return "nir_type_bool"




More information about the mesa-commit mailing list