summaryrefslogtreecommitdiff
path: root/src/mem/slicc/ast/InPortDeclAST.py
diff options
context:
space:
mode:
authorNilay Vaish <nilay@cs.wisc.edu>2015-08-14 19:28:43 -0500
committerNilay Vaish <nilay@cs.wisc.edu>2015-08-14 19:28:43 -0500
commit9648c05db19292ddd285a80914593cc0631403ff (patch)
tree501c8342d95b1c87f988a2fd3be2d17f63b86f0e /src/mem/slicc/ast/InPortDeclAST.py
parent7fc725fdb55e192520c148c87ec44f75f5d07ad0 (diff)
downloadgem5-9648c05db19292ddd285a80914593cc0631403ff.tar.xz
ruby: slicc: use default argument value
Before this patch, while one could declare / define a function with default argument values, but the actual function call would require one to specify all the arguments. This patch changes the check for function arguments. Now a function call needs to specify arguments that are at least as much as those with default values and at most the total number of arguments taken as input by the function.
Diffstat (limited to 'src/mem/slicc/ast/InPortDeclAST.py')
-rw-r--r--src/mem/slicc/ast/InPortDeclAST.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mem/slicc/ast/InPortDeclAST.py b/src/mem/slicc/ast/InPortDeclAST.py
index 7a019a0e0..2ef043151 100644
--- a/src/mem/slicc/ast/InPortDeclAST.py
+++ b/src/mem/slicc/ast/InPortDeclAST.py
@@ -89,13 +89,13 @@ class InPortDeclAST(DeclAST):
for param in param_types:
trigger_func_name += "_" + param.ident
func = Func(self.symtab, trigger_func_name, "trigger", self.location,
- void_type, param_types, [], "", pairs)
+ void_type, param_types, [], [], "", pairs)
symtab.newSymbol(func)
# Add the stallPort method - this hacks reschedules the controller
# for stalled messages that don't trigger events
func = Func(self.symtab, "stallPort", "stallPort", self.location,
- void_type, [], [], "", pairs)
+ void_type, [], [], [], "", pairs)
symtab.newSymbol(func)
param_types = []