1.1 --- a/transresults.py Mon Mar 13 18:45:41 2017 +0100
1.2 +++ b/transresults.py Thu Mar 16 18:13:34 2017 +0100
1.3 @@ -70,13 +70,18 @@
1.4 def access_location(self):
1.5 return self.location
1.6
1.7 - def access_locations(self):
1.8 - return self.location and [self.location]
1.9 -
1.10 def __str__(self):
1.11
1.12 "Return an output representation of the referenced name."
1.13
1.14 + # Temporary names are output program locals.
1.15 +
1.16 + if self.name.startswith("$t"):
1.17 + if self.expr:
1.18 + return "%s = %s" % (encode_path(self.name), self.expr)
1.19 + else:
1.20 + return encode_path(self.name)
1.21 +
1.22 # For sources, any identified static origin will be constant and thus
1.23 # usable directly. For targets, no constant should be assigned and thus
1.24 # the alias (or any plain name) will be used.
1.25 @@ -179,9 +184,6 @@
1.26 def access_location(self):
1.27 return self.location
1.28
1.29 - def access_locations(self):
1.30 - return self.location and [self.location]
1.31 -
1.32 def context(self):
1.33 return self.context_identity
1.34
1.35 @@ -209,11 +211,11 @@
1.36
1.37 "An alias for other values."
1.38
1.39 - def __init__(self, name_ref, refs, locations):
1.40 + def __init__(self, name_ref, refs, location):
1.41 NameRef.__init__(self, name_ref.name, is_global=name_ref.is_global_name())
1.42 self.name_ref = name_ref
1.43 self.refs = refs
1.44 - self.locations = locations
1.45 + self.location = location
1.46
1.47 def references(self):
1.48 ref = self.name_ref.reference()
1.49 @@ -224,10 +226,7 @@
1.50 return len(refs) == 1 and first(refs) or None
1.51
1.52 def access_location(self):
1.53 - return len(self.locations) == 1 and first(self.locations) or None
1.54 -
1.55 - def access_locations(self):
1.56 - return self.locations
1.57 + return self.location
1.58
1.59 def get_name(self):
1.60 ref = self.reference()