Lichen

Change of translator.py

1039:16990afa2754
translator.py value-replacement
     1.1 --- a/translator.py	Mon May 20 01:03:20 2024 +0200
     1.2 +++ b/translator.py	Mon May 20 01:05:12 2024 +0200
     1.3 @@ -612,7 +612,6 @@
     1.4  
     1.5              elif instruction[0] == "<set_attr_ref>":
     1.6                  attribute_ref_stored = True
     1.7 -                self.next_attribute_ref()
     1.8  
     1.9              # Collect the encoded instruction, noting any temporary variables
    1.10              # required by it.
    1.11 @@ -1326,8 +1325,11 @@
    1.12                  self.result_target_name = None
    1.13              else:
    1.14                  result_target = "__tmp_results[%d]" % self.result_target
    1.15 -                self.record_temp("__tmp_results")
    1.16 -                self.next_result()
    1.17 +
    1.18 +                # Reserve a temporary result target only if it will be used.
    1.19 +
    1.20 +                if not literal_instantiation:
    1.21 +                    self.next_temp("__tmp_results")
    1.22          else:
    1.23              result_target = None
    1.24