diff -r 7ee8e012c038 -r ee3e0c9bea57 src/mem/slicc/ast/ActionDeclAST.py --- a/src/mem/slicc/ast/ActionDeclAST.py Thu Mar 31 14:03:24 2011 -0700 +++ b/src/mem/slicc/ast/ActionDeclAST.py Thu Mar 31 14:12:57 2011 -0700 @@ -59,12 +59,12 @@ if machine.TBEType != None: var = Var(self.symtab, "tbe", self.location, machine.TBEType, - "(*m_tbe_ptr)", self.pairs) + "m_tbe_ptr", self.pairs) self.symtab.newSymbol(var) if machine.EntryType != None: var = Var(self.symtab, "cache_entry", self.location, - machine.EntryType, "(*m_cache_entry_ptr)", self.pairs) + machine.EntryType, "m_cache_entry_ptr", self.pairs) self.symtab.newSymbol(var) # Do not allows returns in actions diff -r 7ee8e012c038 -r ee3e0c9bea57 src/mem/slicc/ast/FormalParamAST.py --- a/src/mem/slicc/ast/FormalParamAST.py Thu Mar 31 14:03:24 2011 -0700 +++ b/src/mem/slicc/ast/FormalParamAST.py Thu Mar 31 14:12:57 2011 -0700 @@ -48,17 +48,12 @@ param = "param_%s" % self.ident # Add to symbol table + v = Var(self.symtab, self.ident, self.location, type, param, + self.pairs) + self.symtab.newSymbol(v) if self.pointer or str(type) == "TBE" or ( "interface" in type and type["interface"] == "AbstractCacheEntry"): - v = Var(self.symtab, self.ident, self.location, type, - "(*%s)" % param, self.pairs) - self.symtab.newSymbol(v) return type, "%s* %s" % (type.c_ident, param) - else: - v = Var(self.symtab, self.ident, self.location, type, param, - self.pairs) - self.symtab.newSymbol(v) - - return type, "%s %s" % (type.c_ident, param) + return type, "%s %s" % (type.c_ident, param) diff -r 7ee8e012c038 -r ee3e0c9bea57 src/mem/slicc/ast/FuncCallExprAST.py --- a/src/mem/slicc/ast/FuncCallExprAST.py Thu Mar 31 14:03:24 2011 -0700 +++ b/src/mem/slicc/ast/FuncCallExprAST.py Thu Mar 31 14:12:57 2011 -0700 @@ -217,22 +217,12 @@ first_param = True for (param_code, type) in zip(cvec, type_vec): - if str(type) == "TBE" or ("interface" in type and - type["interface"] == "AbstractCacheEntry"): - - if first_param: - params = str(param_code).replace('*','') - first_param = False - else: - params += ', ' - params += str(param_code).replace('*',''); - else: - if first_param: - params = str(param_code) - first_param = False - else: - params += ', ' - params += str(param_code); + if first_param: + params = str(param_code) + first_param = False + else: + params += ', ' + params += str(param_code); fix = code.nofix() code('(${internal}${{func.c_ident}}($params))') diff -r 7ee8e012c038 -r ee3e0c9bea57 src/mem/slicc/ast/IsValidPtrExprAST.py --- a/src/mem/slicc/ast/IsValidPtrExprAST.py Thu Mar 31 14:03:24 2011 -0700 +++ b/src/mem/slicc/ast/IsValidPtrExprAST.py Thu Mar 31 14:12:57 2011 -0700 @@ -43,11 +43,10 @@ fix = code.nofix() code("(") var_type, var_code = self.variable.inline(True); - var_code_str = str(var_code).replace('*','') if self.flag: - code("${var_code_str} != NULL)") + code("${var_code} != NULL)") else: - code("${var_code_str} == NULL)") + code("${var_code} == NULL)") code.fix(fix) type = self.symtab.find("bool", Type) return type diff -r 7ee8e012c038 -r ee3e0c9bea57 src/mem/slicc/ast/MemberExprAST.py --- a/src/mem/slicc/ast/MemberExprAST.py Thu Mar 31 14:03:24 2011 -0700 +++ b/src/mem/slicc/ast/MemberExprAST.py Thu Mar 31 14:12:57 2011 -0700 @@ -40,7 +40,12 @@ def generate(self, code): return_type, gcode = self.expr_ast.inline(True) fix = code.nofix() - code("($gcode).m_${{self.field}}") + + if str(return_type) == "TBE" or ("interface" in return_type and return_type["interface"] == "AbstractCacheEntry"): + code("(*$gcode).m_${{self.field}}") + else: + code("($gcode).m_${{self.field}}") + code.fix(fix) # Verify that this is a valid field name for this type