diff options
author | Andreas Hansson <andreas.hansson@arm.com> | 2014-10-16 05:49:49 -0400 |
---|---|---|
committer | Andreas Hansson <andreas.hansson@arm.com> | 2014-10-16 05:49:49 -0400 |
commit | db3739682d7c54839b627ff8f7a4448a9dc99987 (patch) | |
tree | ef5e44342d585e102e2dd4b5503b0111bb8ce35f /src/mem/slicc/ast | |
parent | acdfcad30de8dcf59515b688a1310ba2c1ca6947 (diff) | |
download | gem5-db3739682d7c54839b627ff8f7a4448a9dc99987.tar.xz |
mem: Use shared_ptr for Ruby Message classes
This patch transitions the Ruby Message and its derived classes from
the ad-hoc RefCountingPtr to the c++11 shared_ptr. There are no
changes in behaviour, and the code modifications are mainly replacing
"new" with "make_shared".
The cloning of derived messages is slightly changed as they previously
relied on overriding the base-class through covariant return types.
Diffstat (limited to 'src/mem/slicc/ast')
-rw-r--r-- | src/mem/slicc/ast/EnqueueStatementAST.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mem/slicc/ast/EnqueueStatementAST.py b/src/mem/slicc/ast/EnqueueStatementAST.py index c4f2ac06c..e08e49808 100644 --- a/src/mem/slicc/ast/EnqueueStatementAST.py +++ b/src/mem/slicc/ast/EnqueueStatementAST.py @@ -54,8 +54,8 @@ class EnqueueStatementAST(StatementAST): self.symtab.newSymbol(v) # Declare message - code("${{msg_type.ident}} *out_msg = "\ - "new ${{msg_type.ident}}(clockEdge());") + code("std::shared_ptr<${{msg_type.ident}}> out_msg = "\ + "std::make_shared<${{msg_type.ident}}>(clockEdge());") # The other statements t = self.statements.generate(code, None) |