1.1 --- a/transresults.py Mon Jul 16 23:00:47 2018 +0200
1.2 +++ b/transresults.py Sat Jul 21 23:19:26 2018 +0200
1.3 @@ -3,7 +3,7 @@
1.4 """
1.5 Translation result abstractions.
1.6
1.7 -Copyright (C) 2016, 2017 Paul Boddie <paul@boddie.org.uk>
1.8 +Copyright (C) 2016, 2017, 2018 Paul Boddie <paul@boddie.org.uk>
1.9
1.10 This program is free software; you can redistribute it and/or modify it under
1.11 the terms of the GNU General Public License as published by the Free Software
1.12 @@ -179,13 +179,15 @@
1.13 "A translation result for an attribute access."
1.14
1.15 def __init__(self, instructions, refs, location, context_identity,
1.16 - context_identity_verified, accessor_test):
1.17 + context_identity_verified, accessor_test, accessor_stored):
1.18 +
1.19 InstructionSequence.__init__(self, instructions)
1.20 self.refs = refs
1.21 self.location = location
1.22 self.context_identity = context_identity
1.23 self.context_identity_verified = context_identity_verified
1.24 self.accessor_test = accessor_test
1.25 + self.accessor_stored = accessor_stored
1.26
1.27 def references(self):
1.28 return self.refs
1.29 @@ -202,6 +204,9 @@
1.30 def tests_accessor(self):
1.31 return self.accessor_test
1.32
1.33 + def stores_accessor(self):
1.34 + return self.accessor_stored
1.35 +
1.36 def get_origin(self):
1.37 return self.refs and len(self.refs) == 1 and first(self.refs).get_origin()
1.38
1.39 @@ -220,8 +225,10 @@
1.40 return encode_instructions(self.instructions)
1.41
1.42 def __repr__(self):
1.43 - return "AttrResult(%r, %r, %r, %r, %r)" % (self.instructions, self.refs,
1.44 - self.location, self.context_identity, self.accessor_test)
1.45 + return "AttrResult(%r, %r, %r, %r, %r, %r, %r)" % (
1.46 + self.instructions, self.refs, self.location,
1.47 + self.context_identity, self.context_identity_verified,
1.48 + self.accessor_test, self.accessor_stored)
1.49
1.50 class AliasResult(NameRef, Result):
1.51