Gabe Black has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/48123 )
Change subject: scons: Replace the SourceFile.filename property with
attribute.
......................................................................
scons: Replace the SourceFile.filename property with attribute.
The SourceFile.filename property dynamically calculated the str()
conversion of self.tnode. Since self.tnode shouldn't be changed, it
doesn't seem useful to calculate that value over and over, especially
since it adds some extra indirection and magic to something that's
really pretty simple.
Change-Id: Ia0e1e8f4b0c019a026a08b5c2730d93c66de8190
---
M src/SConscript
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/src/SConscript b/src/SConscript
index 8c36374..3173a30 100644
--- a/src/SConscript
+++ b/src/SConscript
@@ -250,6 +250,7 @@
tnode = File(source)
self.tnode = tnode
+ self.filename = str(self.tnode)
self.snode = tnode.srcnode()
for base in type(self).__mro__:
@@ -275,10 +276,6 @@
return self.shared_objs[key]
@property
- def filename(self):
- return str(self.tnode)
-
- @property
def basename(self):
return basename(self.filename)
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/48123
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: Ia0e1e8f4b0c019a026a08b5c2730d93c66de8190
Gerrit-Change-Number: 48123
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s