StateDeclAST.py (9298:9a087e046c58) | StateDeclAST.py (10984:a86f453a7caa) |
---|---|
1# Copyright (c) 2011 Advanced Micro Devices, Inc. 2# All rights reserved. 3# 4# Redistribution and use in source and binary forms, with or without 5# modification, are permitted provided that the following conditions are 6# met: redistributions of source code must retain the above copyright 7# notice, this list of conditions and the following disclaimer; 8# redistributions in binary form must reproduce the above copyright --- 50 unchanged lines hidden (view full) --- 59 # Add all of the states of the type to it 60 for state in self.states: 61 state.generate(t) 62 63 # Add the implicit State_to_string method - FIXME, this is a bit dirty 64 func_id = "%s_to_string" % t.c_ident 65 66 pairs = { "external" : "yes" } | 1# Copyright (c) 2011 Advanced Micro Devices, Inc. 2# All rights reserved. 3# 4# Redistribution and use in source and binary forms, with or without 5# modification, are permitted provided that the following conditions are 6# met: redistributions of source code must retain the above copyright 7# notice, this list of conditions and the following disclaimer; 8# redistributions in binary form must reproduce the above copyright --- 50 unchanged lines hidden (view full) --- 59 # Add all of the states of the type to it 60 for state in self.states: 61 state.generate(t) 62 63 # Add the implicit State_to_string method - FIXME, this is a bit dirty 64 func_id = "%s_to_string" % t.c_ident 65 66 pairs = { "external" : "yes" } |
67 func = Func(self.symtab, func_id, self.location, | 67 func = Func(self.symtab, func_id + "_" + 68 t.ident, func_id, self.location, |
68 self.symtab.find("std::string", Type), [ t ], [], "", 69 pairs) 70 self.symtab.newSymbol(func) 71 72 # Add the State_to_permission method 73 func_id = "%s_to_permission" % t.c_ident 74 75 pairs = { "external" : "yes" } | 69 self.symtab.find("std::string", Type), [ t ], [], "", 70 pairs) 71 self.symtab.newSymbol(func) 72 73 # Add the State_to_permission method 74 func_id = "%s_to_permission" % t.c_ident 75 76 pairs = { "external" : "yes" } |
76 func = Func(self.symtab, func_id, self.location, | 77 func = Func(self.symtab, func_id + "_" + 78 t.ident, func_id, self.location, |
77 self.symtab.find("AccessPermission", Type), [ t ], [], "", 78 pairs) 79 self.symtab.newSymbol(func) | 79 self.symtab.find("AccessPermission", Type), [ t ], [], "", 80 pairs) 81 self.symtab.newSymbol(func) |