mirror of
https://github.com/catseye/SixtyPical.git
synced 2024-11-29 18:49:22 +00:00
When backpatching constraints, don't strip ones we've already done.
This commit is contained in:
parent
612ae588f7
commit
44ee8efbef
@ -18,14 +18,18 @@ class Type(object):
|
|||||||
return hash(self.name)
|
return hash(self.name)
|
||||||
|
|
||||||
def backpatch_constraint_labels(self, resolver):
|
def backpatch_constraint_labels(self, resolver):
|
||||||
|
def resolve(w):
|
||||||
|
if not isinstance(w, basestring):
|
||||||
|
return w
|
||||||
|
return resolver(w)
|
||||||
if isinstance(self, TableType):
|
if isinstance(self, TableType):
|
||||||
self.of_type.backpatch_constraint_labels(resolver)
|
self.of_type.backpatch_constraint_labels(resolver)
|
||||||
elif isinstance(self, VectorType):
|
elif isinstance(self, VectorType):
|
||||||
self.of_type.backpatch_constraint_labels(resolver)
|
self.of_type.backpatch_constraint_labels(resolver)
|
||||||
elif isinstance(self, RoutineType):
|
elif isinstance(self, RoutineType):
|
||||||
self.inputs = set([resolver(w) for w in self.inputs if isinstance(w, basestring)])
|
self.inputs = set([resolve(w) for w in self.inputs])
|
||||||
self.outputs = set([resolver(w) for w in self.outputs if isinstance(w, basestring)])
|
self.outputs = set([resolve(w) for w in self.outputs])
|
||||||
self.trashes = set([resolver(w) for w in self.trashes if isinstance(w, basestring)])
|
self.trashes = set([resolve(w) for w in self.trashes])
|
||||||
|
|
||||||
|
|
||||||
TYPE_BIT = Type('bit')
|
TYPE_BIT = Type('bit')
|
||||||
|
Loading…
Reference in New Issue
Block a user