From b2d3cc00e84a07ac209f8357cd9c64235ce6abd3 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Tue, 1 May 2018 15:40:04 -0700 Subject: [PATCH] sim: Rename the SimObject cxx_bases field to cxx_extra_bases. cxx_bases adds in additional c++ base classes beyond those implied by the python SimObject inheritance hierarchy. To imply the fact that these are additional bases, and to disambiguate a future mechanism which changes the implied bases, this flag/field is being renamed from cxx_bases to cxx_extra_bases. As far as I can tell, this field was only used internally in SimObject.py. Change-Id: Ie7cc3d0107ff71cc31424d6e20c9a2f430022ab9 Reviewed-on: https://gem5-review.googlesource.com/10661 Reviewed-by: Andreas Sandberg Reviewed-by: Jason Lowe-Power Maintainer: Andreas Sandberg --- src/python/m5/SimObject.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/python/m5/SimObject.py b/src/python/m5/SimObject.py index 6e61961bd..e051a972b 100644 --- a/src/python/m5/SimObject.py +++ b/src/python/m5/SimObject.py @@ -407,7 +407,7 @@ class MetaSimObject(type): 'cxx_type' : str, 'cxx_header' : str, 'type' : str, - 'cxx_bases' : list, + 'cxx_extra_bases' : list, 'cxx_exports' : list, 'cxx_param_exports' : list, } @@ -441,8 +441,8 @@ class MetaSimObject(type): value_dict[key] = val if 'abstract' not in value_dict: value_dict['abstract'] = False - if 'cxx_bases' not in value_dict: - value_dict['cxx_bases'] = [] + if 'cxx_extra_bases' not in value_dict: + value_dict['cxx_extra_bases'] = [] if 'cxx_exports' not in value_dict: value_dict['cxx_exports'] = cxx_exports else: @@ -734,8 +734,8 @@ module_init(py::module &m_internal) code() code.dedent() - bases = [ cls._base.cxx_class ] + cls.cxx_bases if cls._base else \ - cls.cxx_bases + bases = [ cls._base.cxx_class ] + cls.cxx_extra_bases if \ + cls._base else cls.cxx_extra_bases if bases: base_str = ", ".join(bases) code('py::class_<${{cls.cxx_class}}, ${base_str}, ' \ @@ -933,7 +933,7 @@ class SimObject(object): abstract = True cxx_header = "sim/sim_object.hh" - cxx_bases = [ "Drainable", "Serializable" ] + cxx_extra_bases = [ "Drainable", "Serializable" ] eventq_index = Param.UInt32(Parent.eventq_index, "Event Queue Index") cxx_exports = [ -- 2.30.2