diff options
author | Andreas Sandberg <andreas.sandberg@arm.com> | 2015-12-04 09:48:48 +0000 |
---|---|---|
committer | Andreas Sandberg <andreas.sandberg@arm.com> | 2015-12-04 09:48:48 +0000 |
commit | 1a34e23603441cf123db0218308f136f44986e73 (patch) | |
tree | 4f77433b7d62fb294b5e76826f11064eef5b98ef | |
parent | 5a249e03a4efa79d5513a5e2ebdd27159a14dbb9 (diff) | |
download | gem5-1a34e23603441cf123db0218308f136f44986e73.tar.xz |
sim: Get rid of the non-const serialize() method
The last SimObject using the legacy serialize API with non-const
methods has now been transitioned to the new API. This changeset
removes the serializeOld() methods from the serialization base class
as they are no longer used.
-rw-r--r-- | src/sim/serialize.cc | 7 | ||||
-rw-r--r-- | src/sim/serialize.hh | 26 | ||||
-rw-r--r-- | src/sim/sim_object.cc | 2 |
3 files changed, 1 insertions, 34 deletions
diff --git a/src/sim/serialize.cc b/src/sim/serialize.cc index 90cb5e288..e55107b79 100644 --- a/src/sim/serialize.cc +++ b/src/sim/serialize.cc @@ -581,13 +581,6 @@ Serializable::serializeSection(CheckpointOut &cp, const char *name) const } void -Serializable::serializeSectionOld(CheckpointOut &cp, const char *name) -{ - Serializable::ScopedCheckpointSection sec(cp, name); - serializeOld(cp); -} - -void Serializable::unserializeSection(CheckpointIn &cp, const char *name) { Serializable::ScopedCheckpointSection sec(cp, name); diff --git a/src/sim/serialize.hh b/src/sim/serialize.hh index 9a1170a9e..376df9ec0 100644 --- a/src/sim/serialize.hh +++ b/src/sim/serialize.hh @@ -323,32 +323,6 @@ class Serializable unserializeSection(cp, name.c_str()); } - /** - * @{ - * @name Legacy interface - * - * Interface for objects that insist on changing their state when - * serializing. Such state change should be done in drain(), - * memWriteback(), or memInvalidate() and not in the serialization - * method. In general, if state changes occur in serialize, it - * complicates testing since it breaks assumptions about draining - * and serialization. It potentially also makes components more - * fragile since they there are no ordering guarantees when - * serializing SimObjects. - * - * @warn This interface is considered deprecated and should never - * be used. - */ - - virtual void serializeOld(CheckpointOut &cp) { - serialize(cp); - } - void serializeSectionOld(CheckpointOut &cp, const char *name); - void serializeSectionOld(CheckpointOut &cp, const std::string &name) { - serializeSectionOld(cp, name.c_str()); - } - /** @} */ - /** Get the fully-qualified name of the active section */ static const std::string ¤tSection(); diff --git a/src/sim/sim_object.cc b/src/sim/sim_object.cc index e87b7240f..af0ef3c2f 100644 --- a/src/sim/sim_object.cc +++ b/src/sim/sim_object.cc @@ -151,7 +151,7 @@ SimObject::serializeAll(CheckpointOut &cp) SimObject *obj = *ri; // This works despite name() returning a fully qualified name // since we are at the top level. - obj->serializeSectionOld(cp, obj->name()); + obj->serializeSection(cp, obj->name()); } } |