# HG changeset patch # User Paul Boddie # Date 1716159912 -7200 # Node ID 16990afa27543e3536114fe5942ed9b3fa1e2756 # Parent e3d77b4d9fa81aada1d25b8a13edc314dfdc678d Eliminated redundant temporary result and attribute reference storage. diff -r e3d77b4d9fa8 -r 16990afa2754 translator.py --- a/translator.py Mon May 20 01:03:20 2024 +0200 +++ b/translator.py Mon May 20 01:05:12 2024 +0200 @@ -612,7 +612,6 @@ elif instruction[0] == "": attribute_ref_stored = True - self.next_attribute_ref() # Collect the encoded instruction, noting any temporary variables # required by it. @@ -1326,8 +1325,11 @@ self.result_target_name = None else: result_target = "__tmp_results[%d]" % self.result_target - self.record_temp("__tmp_results") - self.next_result() + + # Reserve a temporary result target only if it will be used. + + if not literal_instantiation: + self.next_temp("__tmp_results") else: result_target = None