projects
/
gem5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
93fff6f
)
slicc: fix missing inline function in LocalVariableAST
author
David Hashe
<david.hashe@amd.com>
Mon, 20 Jul 2015 14:15:18 +0000
(09:15 -0500)
committer
David Hashe
<david.hashe@amd.com>
Mon, 20 Jul 2015 14:15:18 +0000
(09:15 -0500)
src/mem/slicc/ast/LocalVariableAST.py
patch
|
blob
|
history
diff --git
a/src/mem/slicc/ast/LocalVariableAST.py
b/src/mem/slicc/ast/LocalVariableAST.py
index 0b77323b7f61b4ae9fa16c2034a8fd2282be8934..5c6bfe80a87cae828056c4679850907e20bcbe2a 100644
(file)
--- a/
src/mem/slicc/ast/LocalVariableAST.py
+++ b/
src/mem/slicc/ast/LocalVariableAST.py
@@
-1,4
+1,5
@@
#
+# Copyright (c) 2013 Advanced Micro Devices, Inc.
# Copyright (c) 2011 Mark D. Hill and David A. Wood
# All rights reserved.
#
@@
-43,6
+44,14
@@
class LocalVariableAST(StatementAST):
def name(self):
return self.var_name
+ def inline(self, get_type=False):
+ code = self.slicc.codeFormatter(fix_newlines=False)
+ return_type = self.generate(code)
+ if get_type:
+ return return_type, code
+ else:
+ return code
+
def generate(self, code):
type = self.type_ast.type;
ident = "%s" % self.ident;