changes regarding fs.py
[gem5.git] / src / sim / param.cc
index 8998d7d7722530bf3a308a3c182d8d3ea09b8add..b1c50946be166bdc18582cd3b289b11f3ea3c566 100644 (file)
@@ -24,6 +24,8 @@
  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * Authors: Steve Reinhardt
  */
 
 #include <algorithm>
@@ -37,8 +39,6 @@
 #include "base/range.hh"
 #include "base/str.hh"
 #include "base/trace.hh"
-#include "sim/config_node.hh"
-#include "sim/configfile.hh"
 #include "sim/param.hh"
 #include "sim/sim_object.hh"
 
@@ -519,7 +519,9 @@ parseSimObjectParam(ParamContext *context, const string &s, SimObject *&value)
         obj = NULL;
     }
     else {
-        obj = context->resolveSimObject(s);
+        // defined in main.cc
+        extern SimObject *resolveSimObject(const string &);
+        obj = resolveSimObject(s);
 
         if (obj == NULL)
             return false;
@@ -693,22 +695,6 @@ ParamContext::printErrorProlog(ostream &os)
     os << "Parameter error in section [" << iniSection << "]: " << endl;
 }
 
-//
-// Resolve an object name to a SimObject pointer.  The object will be
-// created as a side-effect if necessary.  If the name contains a
-// colon (e.g., "iq:IQ"), then the object is local (invisible to
-// outside this context).  If there is no colon, the name needs to be
-// resolved through the configuration hierarchy (only possible for
-// SimObjectBuilder objects, which return non-NULL for configNode()).
-//
-SimObject *
-ParamContext::resolveSimObject(const string &name)
-{
-    ConfigNode *n = getConfigNode();
-    return n ? n->resolveSimObject(name) : NULL;
-}
-
-
 //
 // static method: call parseParams() on all registered contexts
 //