[Mesa-dev] [PATCH 05/15] nir/algebraic: Clean up some __str__ cruft

Jason Ekstrand jason at jlekstrand.net
Fri Nov 9 03:45:06 UTC 2018


Both of these things are already handled in the Value base class so we
don't need to handle them explicitly in Constant.
---
 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 1f20203764e..474d913e722 100644
--- a/src/compiler/nir/nir_algebraic.py
+++ b/src/compiler/nir/nir_algebraic.py
@@ -136,7 +136,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'))
@@ -202,9 +201,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"
-- 
2.19.1



More information about the mesa-dev mailing list