changeset 651bf9238c11 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=651bf9238c11
description:
        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.

diffstat:

 src/sim/serialize.cc  |   7 -------
 src/sim/serialize.hh  |  26 --------------------------
 src/sim/sim_object.cc |   2 +-
 3 files changed, 1 insertions(+), 34 deletions(-)

diffs (65 lines):

diff -r 3be64e1f80ed -r 651bf9238c11 src/sim/serialize.cc
--- a/src/sim/serialize.cc      Fri Dec 04 00:19:05 2015 +0000
+++ b/src/sim/serialize.cc      Fri Dec 04 09:48:48 2015 +0000
@@ -581,13 +581,6 @@
 }
 
 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 -r 3be64e1f80ed -r 651bf9238c11 src/sim/serialize.hh
--- a/src/sim/serialize.hh      Fri Dec 04 00:19:05 2015 +0000
+++ b/src/sim/serialize.hh      Fri Dec 04 09:48:48 2015 +0000
@@ -323,32 +323,6 @@
         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 &currentSection();
 
diff -r 3be64e1f80ed -r 651bf9238c11 src/sim/sim_object.cc
--- a/src/sim/sim_object.cc     Fri Dec 04 00:19:05 2015 +0000
+++ b/src/sim/sim_object.cc     Fri Dec 04 09:48:48 2015 +0000
@@ -151,7 +151,7 @@
         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());
    }
 }
 
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to