Deleted Added
sdiff udiff text old ( 9298:9a087e046c58 ) new ( 9302:c2e70a9bc340 )
full compact
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;

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

24# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
28from m5.util import orderdict
29
30from slicc.util import PairContainer
31from slicc.symbols.Symbol import Symbol
32
33class DataMember(PairContainer):
34 def __init__(self, ident, type, pairs, init_code):
35 super(DataMember, self).__init__(pairs)
36 self.ident = ident
37 self.type = type
38 self.init_code = init_code
39

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

146 # Return false on error
147 def addDataMember(self, ident, type, pairs, init_code):
148 if ident in self.data_members:
149 return False
150
151 member = DataMember(ident, type, pairs, init_code)
152 self.data_members[ident] = member
153
154 return True
155
156 def dataMemberType(self, ident):
157 return self.data_members[ident].type
158
159 def methodId(self, name, param_type_vec):
160 return '_'.join([name] + [ pt.c_ident for pt in param_type_vec ])
161

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

410/** \\file ${{self.c_ident}}.cc
411 *
412 * Auto generated C++ code started by $__file__:$__line__
413 */
414
415#include <iostream>
416
417#include "mem/protocol/${{self.c_ident}}.hh"
418
419using namespace std;
420''')
421
422 code('''
423/** \\brief Print the state of this object */
424void
425${{self.c_ident}}::print(ostream& out) const

--- 375 unchanged lines hidden ---