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@gmail.com>
This commit is contained in:
@@ -185,7 +185,6 @@ class Constant(Value):
|
|||||||
def __init__(self, val, name):
|
def __init__(self, val, name):
|
||||||
Value.__init__(self, val, name, "constant")
|
Value.__init__(self, val, name, "constant")
|
||||||
|
|
||||||
self.in_val = str(val)
|
|
||||||
if isinstance(val, (str)):
|
if isinstance(val, (str)):
|
||||||
m = _constant_re.match(val)
|
m = _constant_re.match(val)
|
||||||
self.value = ast.literal_eval(m.group('value'))
|
self.value = ast.literal_eval(m.group('value'))
|
||||||
@@ -251,9 +250,6 @@ class Variable(Value):
|
|||||||
|
|
||||||
self.index = varset[self.var_name]
|
self.index = varset[self.var_name]
|
||||||
|
|
||||||
def __str__(self):
|
|
||||||
return self.in_val
|
|
||||||
|
|
||||||
def type(self):
|
def type(self):
|
||||||
if self.required_type == 'bool':
|
if self.required_type == 'bool':
|
||||||
return "nir_type_bool"
|
return "nir_type_bool"
|
||||||
|
Reference in New Issue
Block a user