1
1
#ifndef __PTask_H
2
2
#define __PTask_H
3
3
/*
4
- * Copyright (c) 1999-2000 Stephen Williams ([email protected] )
4
+ * Copyright (c) 1999-2008 Stephen Williams ([email protected] )
5
5
*
6
6
* This source code is free software; you can redistribute it
7
7
* and/or modify it in source code form under the terms of the GNU
18
18
* along with this program; if not, write to the Free Software
19
19
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
20
20
*/
21
- #ifdef HAVE_CVS_IDENT
22
- #ident " $Id: PTask.h,v 1.14 2007/03/06 05:22:49 steve Exp $"
23
- #endif
24
21
25
22
# include " LineInfo.h"
23
+ # include " PScope.h"
26
24
# include " svector.h"
27
25
# include " StringHeap.h"
28
26
# include < string>
@@ -50,10 +48,10 @@ struct PTaskFuncArg {
50
48
/*
51
49
* The PTask holds the parsed definitions of a task.
52
50
*/
53
- class PTask : public LineInfo {
51
+ class PTask : public PScope , public LineInfo {
54
52
55
53
public:
56
- explicit PTask ();
54
+ explicit PTask (perm_string name );
57
55
~PTask ();
58
56
59
57
void set_ports (svector<PWire *>*p);
@@ -89,7 +87,7 @@ class PTask : public LineInfo {
89
87
*
90
88
* The output value is not elaborated until elaborate_sig.
91
89
*/
92
- class PFunction : public LineInfo {
90
+ class PFunction : public PScope , public LineInfo {
93
91
94
92
public:
95
93
explicit PFunction (perm_string name);
@@ -110,68 +108,9 @@ class PFunction : public LineInfo {
110
108
void dump (ostream&, unsigned ) const ;
111
109
112
110
private:
113
- perm_string name_;
114
111
PTaskFuncArg return_type_;
115
112
svector<PWire *> *ports_;
116
113
Statement *statement_;
117
114
};
118
115
119
- /*
120
- * $Log: PTask.h,v $
121
- * Revision 1.14 2007/03/06 05:22:49 steve
122
- * Support signed function return values.
123
- *
124
- * Revision 1.13 2004/05/31 23:34:36 steve
125
- * Rewire/generalize parsing an elaboration of
126
- * function return values to allow for better
127
- * speed and more type support.
128
- *
129
- * Revision 1.12 2002/08/12 01:34:58 steve
130
- * conditional ident string using autoconfig.
131
- *
132
- * Revision 1.11 2001/11/22 06:20:59 steve
133
- * Use NetScope instead of string for scope path.
134
- *
135
- * Revision 1.10 2001/01/13 22:20:08 steve
136
- * Parse parameters within nested scopes.
137
- *
138
- * Revision 1.9 2000/07/30 18:25:43 steve
139
- * Rearrange task and function elaboration so that the
140
- * NetTaskDef and NetFuncDef functions are created during
141
- * signal enaboration, and carry these objects in the
142
- * NetScope class instead of the extra, useless map in
143
- * the Design class.
144
- *
145
- * Revision 1.8 2000/03/08 04:36:53 steve
146
- * Redesign the implementation of scopes and parameters.
147
- * I now generate the scopes and notice the parameters
148
- * in a separate pass over the pform. Once the scopes
149
- * are generated, I can process overrides and evalutate
150
- * paremeters before elaboration begins.
151
- *
152
- * Revision 1.7 2000/02/23 02:56:53 steve
153
- * Macintosh compilers do not support ident.
154
- *
155
- * Revision 1.6 1999/09/30 21:28:34 steve
156
- * Handle mutual reference of tasks by elaborating
157
- * task definitions in two passes, like functions.
158
- *
159
- * Revision 1.5 1999/09/01 20:46:19 steve
160
- * Handle recursive functions and arbitrary function
161
- * references to other functions, properly pass
162
- * function parameters and save function results.
163
- *
164
- * Revision 1.4 1999/08/25 22:22:41 steve
165
- * elaborate some aspects of functions.
166
- *
167
- * Revision 1.3 1999/07/31 19:14:47 steve
168
- * Add functions up to elaboration (Ed Carter)
169
- *
170
- * Revision 1.2 1999/07/24 02:11:19 steve
171
- * Elaborate task input ports.
172
- *
173
- * Revision 1.1 1999/07/03 02:12:51 steve
174
- * Elaborate user defined tasks.
175
- *
176
- */
177
116
#endif
0 commit comments