FuncCallExprAST.py (7780:42da07116e12) FuncCallExprAST.py (7793:f6cbeb8712d3)
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;

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

160 }
161}
162''')
163 elif self.proc_name == "error":
164 code("$0", self.exprs[0].embedError(cvec[0]))
165 elif self.proc_name == "assert":
166 error = self.exprs[0].embedError('"assert failure"')
167 code('''
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;

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

160 }
161}
162''')
163 elif self.proc_name == "error":
164 code("$0", self.exprs[0].embedError(cvec[0]))
165 elif self.proc_name == "assert":
166 error = self.exprs[0].embedError('"assert failure"')
167 code('''
168if (ASSERT_FLAG && !(${{cvec[0]}})) {
168#ifndef NDEBUG
169if (!(${{cvec[0]}})) {
169 $error
170}
170 $error
171}
172#endif
171''')
172
173 elif self.proc_name == "continueProcessing":
174 code("counter++;")
175 code("continue; // Check the first port again")
176 else:
177 # Normal function
178

--- 12 unchanged lines hidden ---
173''')
174
175 elif self.proc_name == "continueProcessing":
176 code("counter++;")
177 code("continue; // Check the first port again")
178 else:
179 # Normal function
180

--- 12 unchanged lines hidden ---