1.1 --- a/transresults.py Thu Nov 04 23:44:29 2021 +0100
1.2 +++ b/transresults.py Tue Aug 29 01:46:23 2023 +0200
1.3 @@ -3,7 +3,7 @@
1.4 """
1.5 Translation result abstractions.
1.6
1.7 -Copyright (C) 2016, 2017, 2018 Paul Boddie <paul@boddie.org.uk>
1.8 +Copyright (C) 2016, 2017, 2018, 2023 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 @@ -20,7 +20,8 @@
1.13 """
1.14
1.15 from common import first, InstructionSequence
1.16 -from encoders import encode_instructions, encode_literal_constant, encode_path
1.17 +from encoders import encode_instructions, encode_literal_constant, encode_path, \
1.18 + encode_symbol
1.19 from results import ConstantValueRef, InstanceRef, LiteralSequenceRef, NameRef, \
1.20 ResolvedNameRef, Result
1.21
1.22 @@ -112,9 +113,10 @@
1.23 encode_path(parent), attrname, self.expr)
1.24
1.25 # All other assignments involve the names as they were given.
1.26 + # To support value replacement, a special operation is used.
1.27
1.28 else:
1.29 - return "%s = %s" % (attrname, self.expr)
1.30 + return "__set_local(&%s, %s)" % (attrname, self.expr)
1.31
1.32 # Expressions.
1.33