1.1 --- a/optimiser.py Mon Apr 03 02:24:46 2017 +0200
1.2 +++ b/optimiser.py Mon Apr 03 22:00:06 2017 +0200
1.3 @@ -458,9 +458,23 @@
1.4
1.5 # Allocate positions from 1 onwards, ignoring the context argument.
1.6
1.7 - self.arg_locations = [set()] + get_allocated_locations(
1.8 - self.importer.function_parameters, get_parameters_and_sizes,
1.9 - self.existing_arg_locations[1:])
1.10 + try:
1.11 + self.arg_locations = [set()] + get_allocated_locations(
1.12 + self.importer.function_parameters, get_parameters_and_sizes,
1.13 + self.existing_arg_locations[1:])
1.14 +
1.15 + # Uphold positioning conflicts only if the existing locations were
1.16 + # explicitly specified.
1.17 +
1.18 + except OptimiseError:
1.19 + if self.parameter_locations_filename:
1.20 + raise
1.21 +
1.22 + # Otherwise, reposition parameters, causing the program to be
1.23 + # regenerated.
1.24 +
1.25 + self.arg_locations = [set()] + get_allocated_locations(
1.26 + self.importer.function_parameters, get_parameters_and_sizes)
1.27
1.28 def position_attributes(self):
1.29