Lichen

Change of translator.py

1031:aa1826243f0c
translator.py
     1.1 --- a/translator.py	Sun May 19 22:18:46 2024 +0200
     1.2 +++ b/translator.py	Sun May 19 22:53:43 2024 +0200
     1.3 @@ -3,7 +3,7 @@
     1.4  """
     1.5  Translate programs.
     1.6  
     1.7 -Copyright (C) 2015, 2016, 2017, 2018 Paul Boddie <paul@boddie.org.uk>
     1.8 +Copyright (C) 2015, 2016, 2017, 2018, 2024 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 @@ -2168,13 +2168,13 @@
    1.13  
    1.14          # Provide space for the recorded number of temporary variables.
    1.15  
    1.16 -        if self.uses_temp(name, "__tmp_targets"):
    1.17 +        if self.uses_temp(name, "__tmp_targets") and self.max_function_target:
    1.18              self.writeline("__attr __tmp_targets[%d];" % self.max_function_target)
    1.19  
    1.20 -        if self.uses_temp(name, "__tmp_contexts"):
    1.21 +        if self.uses_temp(name, "__tmp_contexts") and self.max_context_index:
    1.22              self.writeline("__attr __tmp_contexts[%d];" % self.max_context_index)
    1.23  
    1.24 -        if self.uses_temp(name, "__tmp_values"):
    1.25 +        if self.uses_temp(name, "__tmp_values") and self.max_accessor_index:
    1.26              self.writeline("__attr __tmp_values[%d];" % self.max_accessor_index)
    1.27  
    1.28          # Add temporary variable usage details.