python: Make iterator handling Python 3 compatible
authorAndreas Sandberg <andreas.sandberg@arm.com>
Sat, 26 Jan 2019 09:19:22 +0000 (09:19 +0000)
committerAndreas Sandberg <andreas.sandberg@arm.com>
Fri, 22 Feb 2019 10:47:36 +0000 (10:47 +0000)
commit7d71f6641fcb660de0f003e2c028b464d7116ca1
treeeab821617b26ce34b0dc834f2e0f11cfee67c2a0
parent8e5d168332c4ac3851aee4f815cff0b62b37cc40
python: Make iterator handling Python 3 compatible

Many functions that used to return lists (e.g., dict.items()) now
return iterators and their iterator counterparts (e.g.,
dict.iteritems()) have been removed. Switch calls to the Python 2.7
iterator methods to use the Python 3 equivalent and add explicit list
conversions where necessary.

Change-Id: I0c18114955af8f4932d81fb689a0adb939dafaba
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/15992
Reviewed-by: Juha Jäykkä <juha.jaykka@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
18 files changed:
src/SConscript
src/cpu/BaseCPU.py
src/cpu/minor/MinorCPU.py
src/mem/ruby/network/simple/SimpleNetwork.py
src/mem/slicc/symbols/Type.py
src/python/m5/SimObject.py
src/python/m5/main.py
src/python/m5/objects/__init__.py
src/python/m5/options.py
src/python/m5/params.py
src/python/m5/util/code_formatter.py
src/python/m5/util/dot_writer.py
src/python/m5/util/jobfile.py
src/python/m5/util/multidict.py
src/python/m5/util/smartdict.py
src/python/m5/util/sorteddict.py
src/python/m5/util/terminal.py
src/systemc/tests/tlm/endian_conv/testall.py