summaryrefslogtreecommitdiff
path: root/src/mem/slicc/ast/FormalParamAST.py
diff options
context:
space:
mode:
authorNilay Vaish <nilay@cs.wisc.edu>2015-08-19 10:02:01 -0500
committerNilay Vaish <nilay@cs.wisc.edu>2015-08-19 10:02:01 -0500
commit2f44dada688ace9c24f085a8422b3054c3edb72e (patch)
tree372bb043430552b0f4424eaa5571933883fcaaae /src/mem/slicc/ast/FormalParamAST.py
parent2d9f3f8582e2de60850852c803a8c8ba0d6b91b5 (diff)
downloadgem5-2f44dada688ace9c24f085a8422b3054c3edb72e.tar.xz
ruby: reverts to changeset: bf82f1f7b040
Diffstat (limited to 'src/mem/slicc/ast/FormalParamAST.py')
-rw-r--r--src/mem/slicc/ast/FormalParamAST.py22
1 files changed, 2 insertions, 20 deletions
diff --git a/src/mem/slicc/ast/FormalParamAST.py b/src/mem/slicc/ast/FormalParamAST.py
index ef39b40f0..ce73304f1 100644
--- a/src/mem/slicc/ast/FormalParamAST.py
+++ b/src/mem/slicc/ast/FormalParamAST.py
@@ -46,9 +46,6 @@ class FormalParamAST(AST):
def generate(self):
type = self.type_ast.type
param = "param_%s" % self.ident
- proto = ""
- body = ""
- default = False
# Add to symbol table
v = Var(self.symtab, self.ident, self.location, type, param,
@@ -59,21 +56,6 @@ class FormalParamAST(AST):
"interface" in type and (
type["interface"] == "AbstractCacheEntry" or
type["interface"] == "AbstractEntry")):
- proto = "%s* %s" % (type.c_ident, param)
- body = proto
- elif self.default != None:
- value = ""
- if self.default == True:
- value = "true"
- elif self.default == False:
- value = "false"
- else:
- value = "%s" % self.default
- proto = "const %s& %s = %s" % (type.c_ident, param, value)
- body = "const %s& %s" % (type.c_ident, param)
- default = True
+ return type, "%s* %s" % (type.c_ident, param)
else:
- proto = "const %s& %s" % (type.c_ident, param)
- body = proto
-
- return type, proto, body, default
+ return type, "const %s& %s" % (type.c_ident, param)