From: Nathan Binkert Date: Mon, 11 Aug 2008 19:22:17 +0000 (-0700) Subject: params: Get rid of the remnants of the old style parameter configuration stuff. X-Git-Tag: m5_2.0_beta6~58 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9cf8ad3a17894c482968b5055e72f5434740f1f2;p=gem5.git params: Get rid of the remnants of the old style parameter configuration stuff. --- diff --git a/src/mem/mem_object.cc b/src/mem/mem_object.cc index ce2a1107e..20a1b4cd8 100644 --- a/src/mem/mem_object.cc +++ b/src/mem/mem_object.cc @@ -35,14 +35,6 @@ MemObject::MemObject(const Params *params) { } -MemObjectParams * -MemObject::makeParams(const std::string &name) -{ - MemObjectParams *params = new MemObjectParams; - params->name = name; - return params; -} - void MemObject::deletePortRefs(Port *p) { diff --git a/src/mem/mem_object.hh b/src/mem/mem_object.hh index 33b56dfd4..b8bf4b939 100644 --- a/src/mem/mem_object.hh +++ b/src/mem/mem_object.hh @@ -48,17 +48,10 @@ class MemObject : public SimObject { public: typedef MemObjectParams Params; - MemObject(const Params *params); - - const Params * - params() const - { - return dynamic_cast(_params); - } + const Params *params() const + { return dynamic_cast(_params); } - protected: - // static: support for old-style constructors (call manually) - static Params *makeParams(const std::string &name); + MemObject(const Params *params); public: /** Additional function to return the Port of a memory object. */ diff --git a/src/sim/sim_object.cc b/src/sim/sim_object.cc index a835aee5b..2c2213987 100644 --- a/src/sim/sim_object.cc +++ b/src/sim/sim_object.cc @@ -69,14 +69,6 @@ SimObject::SimObject(const Params *p) state = Running; } -SimObjectParams * -SimObject::makeParams(const std::string &name) -{ - SimObjectParams *params = new SimObjectParams; - params->name = name; - return params; -} - void SimObject::init() { diff --git a/src/sim/sim_object.hh b/src/sim/sim_object.hh index 00bb3fee6..0141c16cc 100644 --- a/src/sim/sim_object.hh +++ b/src/sim/sim_object.hh @@ -87,10 +87,6 @@ class SimObject : public Serializable, protected StartupCallback SimObject(const Params *_params); virtual ~SimObject() {} - protected: - // static: support for old-style constructors (call manually) - static Params *makeParams(const std::string &name); - public: virtual const std::string name() const { return params()->name; } diff --git a/src/sim/system.cc b/src/sim/system.cc index 803881539..7b830d0f7 100644 --- a/src/sim/system.cc +++ b/src/sim/system.cc @@ -285,11 +285,7 @@ const char *System::MemoryModeStrings[3] = {"invalid", "atomic", System * SystemParams::create() { - System::Params *p = new System::Params; - p->name = name; - p->physmem = physmem; - p->mem_mode = mem_mode; - return new System(p); + return new System(this); } #endif