FuncCallExprAST.py (7839:9e556fb25900) FuncCallExprAST.py (8192:be38f7b6ad9e)
1# Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
2# Copyright (c) 2009 The Hewlett-Packard Development Company
3# All rights reserved.
4#
5# Redistribution and use in source and binary forms, with or without
6# modification, are permitted provided that the following conditions are
7# met: redistributions of source code must retain the above copyright
8# notice, this list of conditions and the following disclaimer;

--- 203 unchanged lines hidden (view full) ---

212 internal = ""
213 if "external" not in func and not func.isInternalMachineFunc:
214 internal = "m_chip_ptr->"
215
216 params = ""
217 first_param = True
218
219 for (param_code, type) in zip(cvec, type_vec):
1# Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
2# Copyright (c) 2009 The Hewlett-Packard Development Company
3# All rights reserved.
4#
5# Redistribution and use in source and binary forms, with or without
6# modification, are permitted provided that the following conditions are
7# met: redistributions of source code must retain the above copyright
8# notice, this list of conditions and the following disclaimer;

--- 203 unchanged lines hidden (view full) ---

212 internal = ""
213 if "external" not in func and not func.isInternalMachineFunc:
214 internal = "m_chip_ptr->"
215
216 params = ""
217 first_param = True
218
219 for (param_code, type) in zip(cvec, type_vec):
220 if str(type) == "TBE" or ("interface" in type and
221 type["interface"] == "AbstractCacheEntry"):
220 if first_param:
221 params = str(param_code)
222 first_param = False
223 else:
224 params += ', '
225 params += str(param_code);
222
226
223 if first_param:
224 params = str(param_code).replace('*','')
225 first_param = False
226 else:
227 params += ', '
228 params += str(param_code).replace('*','');
229 else:
230 if first_param:
231 params = str(param_code)
232 first_param = False
233 else:
234 params += ', '
235 params += str(param_code);
236
237 fix = code.nofix()
238 code('(${internal}${{func.c_ident}}($params))')
239 code.fix(fix)
240
241 return func.return_type
227 fix = code.nofix()
228 code('(${internal}${{func.c_ident}}($params))')
229 code.fix(fix)
230
231 return func.return_type