changeset 198726a3c723 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=198726a3c723
description:
slicc: fix missing inline function in LocalVariableAST
diffstat:
src/mem/slicc/ast/LocalVariableAST.py | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diffs (24 lines):
diff -r 6f433e7f9767 -r 198726a3c723 src/mem/slicc/ast/LocalVariableAST.py
--- a/src/mem/slicc/ast/LocalVariableAST.py Mon Jul 20 09:15:18 2015 -0500
+++ b/src/mem/slicc/ast/LocalVariableAST.py Mon Jul 20 09:15:18 2015 -0500
@@ -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 @@
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;
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev