summaryrefslogtreecommitdiff
path: root/src/mem/slicc/ast/FuncCallExprAST.py
diff options
context:
space:
mode:
authorNilay Vaish <nilay@cs.wisc.edu>2014-01-08 04:26:25 -0600
committerNilay Vaish <nilay@cs.wisc.edu>2014-01-08 04:26:25 -0600
commit855908164845f19421c72a552c944efe7abcf933 (patch)
treea53bfb7469865e20aa23c655fc6ab81ee4d36ff2 /src/mem/slicc/ast/FuncCallExprAST.py
parent4070b00875a5fcc3cde61ff0b32fbee882998189 (diff)
downloadgem5-855908164845f19421c72a552c944efe7abcf933.tar.xz
ruby: slicc: remove variable 'addr' used in calls to doTransition
This variable causes trouble if a variable of same name is declared in a protocol file. Hence it is being eliminated.
Diffstat (limited to 'src/mem/slicc/ast/FuncCallExprAST.py')
-rw-r--r--src/mem/slicc/ast/FuncCallExprAST.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mem/slicc/ast/FuncCallExprAST.py b/src/mem/slicc/ast/FuncCallExprAST.py
index d1daf1f9f..49cd2e8e2 100644
--- a/src/mem/slicc/ast/FuncCallExprAST.py
+++ b/src/mem/slicc/ast/FuncCallExprAST.py
@@ -93,7 +93,8 @@ class FuncCallExprAST(ExprAST):
for expr,expected_type in zip(self.exprs, func.param_types):
# Check the types of the parameter
actual_type,param_code = expr.inline(True)
- if str(actual_type) != str(expected_type):
+ if str(actual_type) != 'OOD' and \
+ str(actual_type) != str(expected_type):
expr.error("Type mismatch: expected: %s actual: %s" % \
(expected_type, actual_type))
cvec.append(param_code)
@@ -116,23 +117,22 @@ class FuncCallExprAST(ExprAST):
if self.proc_name == "trigger":
code('''
{
- Address addr = ${{cvec[1]}};
''')
if machine.TBEType != None and machine.EntryType != None:
code('''
- TransitionResult result = doTransition(${{cvec[0]}}, ${{cvec[2]}}, ${{cvec[3]}}, addr);
+ TransitionResult result = doTransition(${{cvec[0]}}, ${{cvec[2]}}, ${{cvec[3]}}, ${{cvec[1]}});
''')
elif machine.TBEType != None:
code('''
- TransitionResult result = doTransition(${{cvec[0]}}, ${{cvec[2]}}, addr);
+ TransitionResult result = doTransition(${{cvec[0]}}, ${{cvec[2]}}, ${{cvec[1]}});
''')
elif machine.EntryType != None:
code('''
- TransitionResult result = doTransition(${{cvec[0]}}, ${{cvec[2]}}, addr);
+ TransitionResult result = doTransition(${{cvec[0]}}, ${{cvec[2]}}, ${{cvec[1]}});
''')
else:
code('''
- TransitionResult result = doTransition(${{cvec[0]}}, addr);
+ TransitionResult result = doTransition(${{cvec[0]}}, ${{cvec[1]}});
''')
code('''