diff options
author | Gabe Black <gabeblack@google.com> | 2018-05-01 15:40:04 -0700 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2018-06-08 08:30:45 +0000 |
commit | b2d3cc00e84a07ac209f8357cd9c64235ce6abd3 (patch) | |
tree | f53d8ad2347572cdc2e0fb83ad2f7b41a93e8c6d /src/python | |
parent | 6f84c91c74245a53ec1ab5a8ec325ee9d2bd1487 (diff) | |
download | gem5-b2d3cc00e84a07ac209f8357cd9c64235ce6abd3.tar.xz |
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 <andreas.sandberg@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Diffstat (limited to 'src/python')
-rw-r--r-- | src/python/m5/SimObject.py | 12 |
1 files 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 = [ |