Gabe Black has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/48139 )

Change subject: scons: Get rid of some unused or unnecessary PySource members.
......................................................................

scons: Get rid of some unused or unnecessary PySource members.

These were either not used at all, or were unnecessary since they, for
instance, were used to name a variable in an anonymous namespace where
the actual name is hidden and largely irrelevant.

Change-Id: I738960cf0d84017ccc133428aef56701c1d40b03
---
M src/SConscript
1 file changed, 3 insertions(+), 9 deletions(-)



diff --git a/src/SConscript b/src/SConscript
index 0048288..77fd15e 100644
--- a/src/SConscript
+++ b/src/SConscript
@@ -349,10 +349,8 @@

 class PySource(SourceFile):
     '''Add a python source file to the named package'''
-    invalid_sym_char = re.compile('[^A-z0-9_]')
     modules = {}
     tnodes = {}
-    symnames = {}

     def __init__(self, package, source, tags=None, add_tags=None):
         '''specify the python package, the source file, and any tags'''
@@ -382,13 +380,10 @@
         self.modpath = modpath
         self.arcname = os.path.join(*arcpath)
         self.abspath = abspath
-        self.compiled = File(self.filename + 'c')
         self.cpp = File(self.filename + '.cc')
-        self.symname = PySource.invalid_sym_char.sub('_', modpath)

         PySource.modules[modpath] = self
         PySource.tnodes[self.tnode] = self
-        PySource.symnames[self.symname] = self

 class SimObject(PySource):
     '''Add a SimObject python file as a python source object and add
@@ -1244,7 +1239,6 @@
     compressed = zlib.compress(marshalled)
     data = compressed
     pysource = PySource.tnodes[source[1]]
-    sym = pysource.symname

     code = code_formatter()
     code('''\
@@ -1256,13 +1250,13 @@
 {

 ''')
-    bytesToCppArray(code, 'data_{}'.format(sym), data)
+    bytesToCppArray(code, 'embedded_module_data', data)
     code('''
-EmbeddedPython embedded_${sym}(
+EmbeddedPython embedded_module_info(
     ${{c_str(pysource.arcname)}},
     ${{c_str(pysource.abspath)}},
     ${{c_str(pysource.modpath)}},
-    data_${sym},
+    embedded_module_data,
     ${{len(data)}},
     ${{len(marshalled)}});


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/48139
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I738960cf0d84017ccc133428aef56701c1d40b03
Gerrit-Change-Number: 48139
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <gabe.bl...@gmail.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to