FuncCallExprAST.py (10009:8523754f8885) | FuncCallExprAST.py (10972:53d63eeee46f) |
---|---|
1# Copyright (c) 1999-2008 Mark D. Hill and David A. Wood 2# Copyright (c) 2009 The Hewlett-Packard Development Company | 1# Copyright (c) 1999-2008 Mark D. Hill and David A. Wood 2# Copyright (c) 2009 The Hewlett-Packard Development Company |
3# Copyright (c) 2013 Advanced Micro Devices, Inc. |
|
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; 9# redistributions in binary form must reproduce the above copyright 10# notice, this list of conditions and the following disclaimer in the --- 37 unchanged lines hidden (view full) --- 48 # original DPRINTF() call. It is left unmodified. 49 # str_list is used for concatenating the argument 50 # list following the format specifier. A DPRINTF() 51 # call may or may not contain any arguments following 52 # the format specifier. These two cases need to be 53 # handled differently. Hence the check whether or not 54 # the str_list is empty. 55 | 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions are 8# met: redistributions of source code must retain the above copyright 9# notice, this list of conditions and the following disclaimer; 10# redistributions in binary form must reproduce the above copyright 11# notice, this list of conditions and the following disclaimer in the --- 37 unchanged lines hidden (view full) --- 49 # original DPRINTF() call. It is left unmodified. 50 # str_list is used for concatenating the argument 51 # list following the format specifier. A DPRINTF() 52 # call may or may not contain any arguments following 53 # the format specifier. These two cases need to be 54 # handled differently. Hence the check whether or not 55 # the str_list is empty. 56 |
57 dflag = "%s" % (self.exprs[0].name) 58 machine.addDebugFlag(dflag) |
|
56 format = "%s" % (self.exprs[1].inline()) 57 format_length = len(format) 58 str_list = [] 59 60 for i in range(2, len(self.exprs)): 61 str_list.append("%s" % self.exprs[i].inline()) 62 63 if len(str_list) == 0: | 59 format = "%s" % (self.exprs[1].inline()) 60 format_length = len(format) 61 str_list = [] 62 63 for i in range(2, len(self.exprs)): 64 str_list.append("%s" % self.exprs[i].inline()) 65 66 if len(str_list) == 0: |
64 code('DPRINTF(RubySlicc, "$0: $1")', 65 self.exprs[0].location, format[2:format_length-2]) | 67 code('DPRINTF($0, "$1: $2")', 68 dflag, self.exprs[0].location, format[2:format_length-2]) |
66 else: | 69 else: |
67 code('DPRINTF(RubySlicc, "$0: $1", $2)', | 70 code('DPRINTF($0, "$1: $2", $3)', 71 dflag, |
68 self.exprs[0].location, format[2:format_length-2], 69 ', '.join(str_list)) 70 71 return self.symtab.find("void", Type) 72 73 # hack for adding comments to profileTransition 74 if self.proc_name == "APPEND_TRANSITION_COMMENT": 75 # FIXME - check for number of parameters --- 117 unchanged lines hidden --- | 72 self.exprs[0].location, format[2:format_length-2], 73 ', '.join(str_list)) 74 75 return self.symtab.find("void", Type) 76 77 # hack for adding comments to profileTransition 78 if self.proc_name == "APPEND_TRANSITION_COMMENT": 79 # FIXME - check for number of parameters --- 117 unchanged lines hidden --- |