1.1 --- a/optimiser.py Sun Jan 22 21:46:37 2017 +0100
1.2 +++ b/optimiser.py Mon Jan 23 13:03:45 2017 +0100
1.3 @@ -3,7 +3,7 @@
1.4 """
1.5 Optimise object layouts and generate access instruction plans.
1.6
1.7 -Copyright (C) 2014, 2015, 2016 Paul Boddie <paul@boddie.org.uk>
1.8 +Copyright (C) 2014, 2015, 2016, 2017 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 @@ -632,7 +632,10 @@
1.13
1.14 all_names = locations.keys()
1.15 all_names.sort()
1.16 - return all_names, dict([(name, i) for i, name in enumerate(all_names)])
1.17 + d = {}
1.18 + for i, name in enumerate(all_names):
1.19 + d[name] = i
1.20 + return all_names, d
1.21
1.22 def populate_constants(self):
1.23