MEM: Make port proxies use references rather than pointers
authorAndreas Hansson <andreas.hansson@arm.com>
Fri, 24 Feb 2012 16:45:30 +0000 (11:45 -0500)
committerAndreas Hansson <andreas.hansson@arm.com>
Fri, 24 Feb 2012 16:45:30 +0000 (11:45 -0500)
commit9e3c8de30bafe33f35e4b9e82fb49418941f8cb7
tree016c65f8060c49b31d3fd3c064b97ae09279d689
parent1031b824b975cec999c37cabc8c05c485a4ae5ca
MEM: Make port proxies use references rather than pointers

This patch is adding a clearer design intent to all objects that would
not be complete without a port proxy by making the proxies members
rathen than dynamically allocated. In essence, if NULL would not be a
valid value for the proxy, then we avoid using a pointer to make this
clear.

The same approach is used for the methods using these proxies, such as
loadSections, that now use references rather than pointers to better
reflect the fact that NULL would not be an acceptable value (in fact
the code would break and that is how this patch started out).

Overall the concept of "using a reference to express unconditional
composition where a NULL pointer is never valid" could be done on a
much broader scale throughout the code base, but for now it is only
done in the locations affected by the proxies.
64 files changed:
src/arch/alpha/freebsd/system.cc
src/arch/alpha/linux/system.cc
src/arch/alpha/linux/threadinfo.hh
src/arch/alpha/process.cc
src/arch/alpha/stacktrace.cc
src/arch/alpha/system.cc
src/arch/alpha/tru64/system.cc
src/arch/alpha/utility.cc
src/arch/alpha/vtophys.cc
src/arch/alpha/vtophys.hh
src/arch/arm/linux/process.cc
src/arch/arm/linux/system.cc
src/arch/arm/process.cc
src/arch/arm/stacktrace.cc
src/arch/arm/system.cc
src/arch/arm/utility.cc
src/arch/arm/vtophys.cc
src/arch/mips/linux/threadinfo.hh
src/arch/mips/process.cc
src/arch/mips/stacktrace.cc
src/arch/power/process.cc
src/arch/sparc/process.cc
src/arch/sparc/utility.cc
src/arch/sparc/vtophys.cc
src/arch/x86/bios/e820.cc
src/arch/x86/bios/e820.hh
src/arch/x86/bios/intelmp.cc
src/arch/x86/bios/intelmp.hh
src/arch/x86/bios/smbios.cc
src/arch/x86/bios/smbios.hh
src/arch/x86/linux/syscalls.cc
src/arch/x86/linux/system.cc
src/arch/x86/process.cc
src/arch/x86/stacktrace.cc
src/arch/x86/system.cc
src/base/loader/elf_object.cc
src/base/loader/elf_object.hh
src/base/loader/hex_file.cc
src/base/loader/hex_file.hh
src/base/loader/object_file.cc
src/base/loader/object_file.hh
src/base/remote_gdb.cc
src/cpu/checker/thread_context.hh
src/cpu/inorder/thread_context.cc
src/cpu/inorder/thread_context.hh
src/cpu/o3/thread_context.hh
src/cpu/o3/thread_context_impl.hh
src/cpu/ozone/cpu.hh
src/cpu/simple_thread.hh
src/cpu/thread_context.hh
src/cpu/thread_state.cc
src/cpu/thread_state.hh
src/dev/simple_disk.cc
src/kern/tru64/tru64.hh
src/mem/fs_translating_port_proxy.cc
src/mem/se_translating_port_proxy.hh
src/sim/process.cc
src/sim/process.hh
src/sim/process_impl.hh
src/sim/syscall_emul.cc
src/sim/syscall_emul.hh
src/sim/system.cc
src/sim/system.hh
src/sim/vptr.hh