Warning: Undefined variable $n in /usr/local/www/websvn.planix.org/include/diff_util.php on line 243

Warning: Undefined variable $n in /usr/local/www/websvn.planix.org/include/diff_util.php on line 247

Warning: Undefined variable $m in /usr/local/www/websvn.planix.org/include/diff_util.php on line 251
WebSVN – tendra.SVN – Diff – /branches/tendra5/src/installers/common/diag/dg_types.h – Rev 5 and 6

Subversion Repositories tendra.SVN

Rev

Rev 5 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5 Rev 6
Line -... Line 1...
-
 
1
/*
-
 
2
 * Copyright (c) 2002-2005 The TenDRA Project <http://www.tendra.org/>.
-
 
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 met:
-
 
7
 *
-
 
8
 * 1. Redistributions of source code must retain the above copyright notice,
-
 
9
 *    this list of conditions and the following disclaimer.
-
 
10
 * 2. Redistributions in binary form must reproduce the above copyright notice,
-
 
11
 *    this list of conditions and the following disclaimer in the documentation
-
 
12
 *    and/or other materials provided with the distribution.
-
 
13
 * 3. Neither the name of The TenDRA Project nor the names of its contributors
-
 
14
 *    may be used to endorse or promote products derived from this software
-
 
15
 *    without specific, prior written permission.
-
 
16
 *
-
 
17
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
-
 
18
 * IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-
 
19
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-
 
20
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
-
 
21
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-
 
22
 * EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-
 
23
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-
 
24
 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
 
25
 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-
 
26
 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-
 
27
 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
 
28
 *
-
 
29
 * $Id$
-
 
30
 */
1
/*
31
/*
2
    		 Crown Copyright (c) 1997
32
    		 Crown Copyright (c) 1997
3
    
33
 
4
    This TenDRA(r) Computer Program is subject to Copyright
34
    This TenDRA(r) Computer Program is subject to Copyright
5
    owned by the United Kingdom Secretary of State for Defence
35
    owned by the United Kingdom Secretary of State for Defence
6
    acting through the Defence Evaluation and Research Agency
36
    acting through the Defence Evaluation and Research Agency
7
    (DERA).  It is made available to Recipients with a
37
    (DERA).  It is made available to Recipients with a
8
    royalty-free licence for its use, reproduction, transfer
38
    royalty-free licence for its use, reproduction, transfer
9
    to other parties and amendment for any purpose not excluding
39
    to other parties and amendment for any purpose not excluding
10
    product development provided that any such use et cetera
40
    product development provided that any such use et cetera
11
    shall be deemed to be acceptance of the following conditions:-
41
    shall be deemed to be acceptance of the following conditions:-
12
    
42
 
13
        (1) Its Recipients shall ensure that this Notice is
43
        (1) Its Recipients shall ensure that this Notice is
14
        reproduced upon any copies or amended versions of it;
44
        reproduced upon any copies or amended versions of it;
15
    
45
 
16
        (2) Any amended version of it shall be clearly marked to
46
        (2) Any amended version of it shall be clearly marked to
17
        show both the nature of and the organisation responsible
47
        show both the nature of and the organisation responsible
18
        for the relevant amendment or amendments;
48
        for the relevant amendment or amendments;
19
    
49
 
20
        (3) Its onward transfer from a recipient to another
50
        (3) Its onward transfer from a recipient to another
21
        party shall be deemed to be that party's acceptance of
51
        party shall be deemed to be that party's acceptance of
22
        these conditions;
52
        these conditions;
23
    
53
 
24
        (4) DERA gives no warranty or assurance as to its
54
        (4) DERA gives no warranty or assurance as to its
25
        quality or suitability for any purpose and DERA accepts
55
        quality or suitability for any purpose and DERA accepts
26
        no liability whatsoever in relation to any use to which
56
        no liability whatsoever in relation to any use to which
27
        it may be put.
57
        it may be put.
28
*/
58
*/
29
 
59
 
30
 
60
 
31
/**********************************************************************
61
/**********************************************************************
32
$Author: pwe $
62
$Author: pwe $
33
$Date: 1998/03/11 11:03:31 $
63
$Date: 1998/03/11 11:03:31 $
34
$Revision: 1.2 $
64
$Revision: 1.2 $
35
$Log: dg_types.h,v $
65
$Log: dg_types.h,v $
36
 * Revision 1.2  1998/03/11  11:03:31  pwe
66
 * Revision 1.2  1998/03/11  11:03:31  pwe
37
 * DWARF optimisation info
67
 * DWARF optimisation info
38
 *
68
 *
39
 * Revision 1.1.1.1  1998/01/17  15:55:46  release
69
 * Revision 1.1.1.1  1998/01/17  15:55:46  release
40
 * First version to be checked into rolling release.
70
 * First version to be checked into rolling release.
41
 *
71
 *
42
 * Revision 1.8  1998/01/11  18:44:58  pwe
72
 * Revision 1.8  1998/01/11  18:44:58  pwe
43
 * consistent new/old diags
73
 * consistent new/old diags
Line 70... Line 100...
70
#include "dg_first.h"
100
#include "dg_first.h"
71
 
101
 
72
 
102
 
73
 
103
 
74
typedef dg_info dg;
104
typedef dg_info dg;
75
#define nildiag (dg_info)0
105
#define nildiag	(dg_info)0
76
 
106
 
77
typedef struct dg_tag_t * dg_tag;
107
typedef struct dg_tag_t *dg_tag;
78
typedef struct dg_comp_t * dg_compilation;
108
typedef struct dg_comp_t *dg_compilation;
79
 
109
 
80
typedef dg_name dg_name_list;
110
typedef dg_name dg_name_list;
81
typedef dg dg_list;
111
typedef dg dg_list;
82
 
112
 
83
typedef dg_tag dg_tag_option;
113
typedef dg_tag dg_tag_option;
84
typedef dg_type dg_type_option;
114
typedef dg_type dg_type_option;
85
typedef dg_name dg_name_option;
115
typedef dg_name dg_name_option;
86
typedef dg_filename dg_filename_option;
116
typedef dg_filename dg_filename_option;
87
 
117
 
88
typedef struct
118
typedef struct {
89
{
-
 
90
  dg_name_list		list;
119
	dg_name_list	list;
91
  dg_tag		tg;
120
	dg_tag		tg;
92
} dg_namelist;
121
} dg_namelist;
93
 
122
 
94
typedef struct
123
typedef struct {
95
{
-
 
96
  int			len;
124
	int		len;
97
  dg_type *		array;
125
	dg_type		*array;
98
} dg_type_list;
126
} dg_type_list;
99
 
127
 
100
typedef dg_type_list dg_type_list_option;
128
typedef dg_type_list dg_type_list_option;
101
 
129
 
102
typedef struct
130
typedef struct {
103
{
-
 
104
  int			len;
131
	int		len;
105
  dg_tag *		array;
132
	dg_tag		*array;
106
} dg_tag_list;
133
} dg_tag_list;
107
 
134
 
108
 
135
 
109
typedef struct
136
typedef struct {
110
{
-
 
111
  int			len;
137
	int		len;
112
  char **		array;
138
	char		**array;
113
} string_list;
139
} string_list;
114
 
140
 
115
 
141
 
116
struct file_t
142
struct file_t {
117
{
-
 
118
  long			file_dat;
143
	long		file_dat;
119
  char *		file_host;
144
	char 		*file_host;
120
  char *		file_path;
145
	char 		*file_path;
121
  char *		file_name;
146
	char 		*file_name;
122
  struct file_t *	another;
147
	struct file_t	*another;
123
  int			index;
148
	int		index;
124
};
149
};
125
 
150
 
126
typedef enum
151
typedef enum {
127
{
-
 
128
  SP_NULL = 0,
152
	SP_NULL = 0,
129
  SP_SHORT,
153
	SP_SHORT,
130
  SP_SPAN,
154
	SP_SPAN,
131
  SP_FILE,
155
	SP_FILE,
132
  SP_GLOB
156
	SP_GLOB
133
} dg_sourcepos_key;
157
} dg_sourcepos_key;
134
 
158
 
135
typedef struct
159
typedef struct {
136
{
-
 
137
  dg_sourcepos_key	sp_key;
160
	dg_sourcepos_key	sp_key;
138
  dg_filename		file;
161
	dg_filename		file;
139
  dg_filename		to_file;
162
	dg_filename		to_file;
140
  long			from_line;
163
	long			from_line;
141
  long			to_line;
164
	long			to_line;
142
  short			from_column;
165
	short			from_column;
143
  short			to_column;
166
	short			to_column;
144
} dg_sourcepos;
167
} dg_sourcepos;
145
 
168
 
146
typedef struct
169
typedef struct {
147
{
-
 
148
  dg_filename		file;
170
	dg_filename	file;
149
  long			line;
171
	long		line;
150
  short			column;
172
	short		column;
151
} short_sourcepos;
173
} short_sourcepos;
152
 
174
 
153
typedef dg_sourcepos dg_sourcepos_option;
175
typedef dg_sourcepos dg_sourcepos_option;
154
 
176
 
155
typedef struct dg_dflt
177
typedef struct dg_dflt {
156
{
-
 
157
  exp			val;
178
	exp		val;
158
  dg_sourcepos		span;
179
	dg_sourcepos	span;
159
  long			lab;
180
	long		lab;
160
  struct dg_dflt *	next;
181
	struct dg_dflt	*next;
161
} dg_default;
182
} dg_default;
162
 
183
 
163
typedef dg_default *	dg_default_option;
184
typedef dg_default *dg_default_option;
164
 
185
 
165
typedef struct dg_con
186
typedef struct dg_con {
166
{
-
 
167
  dg_tag		refmem;
187
	dg_tag		refmem;
168
  int			is_val;
188
	int		is_val;
169
  union {
189
	union {
170
    dg_type		typ;
190
		dg_type	typ;
171
    exp			val;
191
		exp	val;
172
  } u;
192
	} u;
173
  struct dg_con *	next;
193
	struct dg_con *next;
174
} * dg_constraint;
194
} *dg_constraint;
175
 
195
 
176
typedef dg_constraint	dg_constraint_list;
196
typedef dg_constraint	dg_constraint_list;
177
typedef dg_constraint	dg_constraint_list_option;
197
typedef dg_constraint	dg_constraint_list_option;
178
 
198
 
179
 
199
 
180
typedef enum
200
typedef enum {
181
{
-
 
182
  DG_ACC_NONE = 0,
201
	DG_ACC_NONE = 0,
183
  DG_ACC_PUB,
202
	DG_ACC_PUB,
184
  DG_ACC_PROT,
203
	DG_ACC_PROT,
185
  DG_ACC_PRIV,
204
	DG_ACC_PRIV,
186
  DG_ACC_LOC
205
	DG_ACC_LOC
187
} dg_accessibility;
206
} dg_accessibility;
188
typedef dg_accessibility dg_accessibility_option;
207
typedef dg_accessibility dg_accessibility_option;
189
 
208
 
190
typedef enum
209
typedef enum {
191
{
-
 
192
  DG_VIRT_NONE = 0,
210
	DG_VIRT_NONE = 0,
193
  DG_VIRT_VIRT,
211
	DG_VIRT_VIRT,
194
  DG_VIRT_PURE
212
	DG_VIRT_PURE
195
} dg_virtuality;
213
} dg_virtuality;
196
typedef dg_virtuality dg_virtuality_option;
214
typedef dg_virtuality dg_virtuality_option;
197
 
215
 
198
 
216
 
199
typedef enum
217
typedef enum {
200
{
-
 
201
  DG_ID_NONE = 0,
218
	DG_ID_NONE = 0,
202
  DG_ID_SRC,
219
	DG_ID_SRC,
203
  DG_ID_EXT,
220
	DG_ID_EXT,
204
  DG_ID_ANON,
221
	DG_ID_ANON,
205
  DG_ID_ARTFL,
222
	DG_ID_ARTFL,
206
  DG_ID_INST
223
	DG_ID_INST
207
} dg_idname_key;
224
} dg_idname_key;
208
 
225
 
209
typedef struct
226
typedef struct {
210
{
-
 
211
  dg_idname_key		id_key;
227
	dg_idname_key	id_key;
212
  union
228
	union {
213
  {
-
 
214
    char *		nam;
229
		char			*nam;
215
    struct dg_inst_t *	instance;
230
		struct dg_inst_t	*instance;
216
  } idd;
231
	} idd;
217
} dg_idname;
232
} dg_idname;
218
typedef dg_idname dg_idname_option;
233
typedef dg_idname dg_idname_option;
219
 
234
 
220
typedef struct dg_inst_t
235
typedef struct dg_inst_t {
221
{
-
 
222
  dg_idname		nam;
236
	dg_idname	nam;
223
  dg_idname		spec;
237
	dg_idname	spec;
224
  short_sourcepos	whence;
238
	short_sourcepos	whence;
225
  dg_name_list		params;
239
	dg_name_list	params;
226
} dg_instantn;
240
} dg_instantn;
227
 
241
 
228
typedef union
242
typedef union {
229
{
-
 
230
  dg_tag	tg;
243
	dg_tag	tg;
231
  exp		x;
244
	exp	x;
232
} tg_or_exp;
245
} tg_or_exp;
233
 
246
 
234
typedef struct
247
typedef struct {
235
{
-
 
236
  int		is_ref;
248
	int		is_ref;
237
  tg_or_exp	u;
249
	tg_or_exp	u;
238
  shape		sha;
250
	shape		sha;
239
} dg_bound;
251
} dg_bound;
240
 
252
 
241
typedef enum
253
typedef enum {
242
{
-
 
243
  DG_DIM_NONE,
254
	DG_DIM_NONE,
244
  DG_DIM_TYPE,
255
	DG_DIM_TYPE,
245
  DG_DIM_BOUNDS
256
	DG_DIM_BOUNDS
246
} dg_dim_key;
257
} dg_dim_key;
247
 
258
 
248
typedef struct
259
typedef struct {
249
{
-
 
250
  int			d_key	: 8;
260
	int		d_key:8;
251
  int			low_ref	: 1;
261
	int		low_ref:1;
252
  int			hi_ref	: 1;
262
	int		hi_ref:1;
253
  int			hi_cnt	: 1;
263
	int		hi_cnt:1;
254
  long			count;
264
	long		count;
255
  dg_type		d_typ;
265
	dg_type		d_typ;
256
  shape			sha;
266
	shape		sha;
257
  tg_or_exp		lower;
267
	tg_or_exp	lower;
258
  tg_or_exp		upper;
268
	tg_or_exp	upper;
259
  dg_tag		tg;
269
	dg_tag		tg;
260
} dg_dim;
270
} dg_dim;
261
 
271
 
262
typedef dg_dim dg_dim_option;
272
typedef dg_dim dg_dim_option;
263
 
273
 
264
typedef struct
274
typedef struct {
265
{
-
 
266
  int			len;
275
	int	len;
267
  dg_dim *		array;
276
	dg_dim	*array;
268
} dg_dim_list;
277
} dg_dim_list;
269
 
278
 
270
typedef struct
279
typedef struct {
271
{
-
 
272
  char *		enam;
280
	char		*enam;
273
  short_sourcepos	pos;
281
	short_sourcepos	pos;
274
  exp			value;
282
	exp		value;
275
  int			is_chn	: 1;
283
	int		is_chn:1;
276
  int			chn	: 8;
284
	int		chn:8;
277
  dg_tag		tg;
285
	dg_tag		tg;
278
} dg_enum;
286
} dg_enum;
279
 
287
 
280
typedef struct
288
typedef struct {
281
{
-
 
282
  int			len;
289
	int	len;
283
  dg_enum *		array;
290
	dg_enum	*array;
284
} dg_enum_list;
291
} dg_enum_list;
285
 
292
 
286
typedef enum
293
typedef enum {
287
{
-
 
288
  DG_CM_FIELD,
294
	DG_CM_FIELD,
289
  DG_CM_FN,
295
	DG_CM_FN,
290
  DG_CM_INDIRECT,
296
	DG_CM_INDIRECT,
291
  DG_CM_STAT
297
	DG_CM_STAT
292
} dg_cm_key;
298
} dg_cm_key;
293
 
299
 
294
typedef struct
300
typedef struct {
295
{
-
 
296
  dg_cm_key		cm_key;
301
	dg_cm_key	cm_key;
297
  union
302
	union {
298
  {
-
 
299
    struct
303
		struct {
300
    {
-
 
301
      char *		fnam;
304
			char		*fnam;
302
      short_sourcepos	f_pos;
305
			short_sourcepos	f_pos;
303
      dg_type		f_typ;
306
			dg_type		f_typ;
304
      exp		f_offset;
307
			exp		f_offset;
305
      struct dg_dflt *	dflt;
308
			struct dg_dflt	*dflt;
306
      int		acc	: 4;
309
			int		acc:4;
307
      int		discr	: 1;
310
			int		discr:1;
308
    } cm_f;
311
		} cm_f;
309
    struct
312
		struct {
310
    {
-
 
311
      dg_name		fn;
313
			dg_name		fn;
312
      exp		slot;
314
			exp		slot;
313
    } cm_fn;
315
		} cm_fn;
314
    struct
316
		struct {
315
    {
-
 
316
      char *		nam;
317
			char		*nam;
317
      short_sourcepos	pos;
318
			short_sourcepos	pos;
318
      dg_type		typ;
319
			dg_type		typ;
319
      exp		ind_loc;
320
			exp		ind_loc;
320
    } cm_ind;
321
		} cm_ind;
321
    dg_name		cm_stat;
322
		dg_name		cm_stat;
322
  } d;
323
	} d;
323
  dg_tag		tg;
324
	dg_tag	tg;
324
} dg_classmem;
325
} dg_classmem;
325
 
326
 
326
typedef struct
327
typedef struct {
327
{
-
 
328
  int			len;
328
	int		len;
329
  dg_classmem *		array;
329
	dg_classmem	*array;
330
} dg_classmem_list;
330
} dg_classmem_list;
331
 
331
 
332
typedef struct
332
typedef struct {
333
{
-
 
334
  exp			lower;
333
	exp	lower;
335
  exp			upper;
334
	exp	upper;
336
} dg_discrim;
335
} dg_discrim;
337
 
336
 
338
typedef struct
337
typedef struct {
339
{
-
 
340
  int			len;
338
	int		len;
341
  dg_discrim *		array;
339
	dg_discrim	*array;
342
} dg_discrim_list;
340
} dg_discrim_list;
343
 
341
 
344
typedef struct
342
typedef struct {
345
{
-
 
346
  dg_discrim_list	discr;
343
	dg_discrim_list		discr;
347
  dg_classmem_list	fields;
344
	dg_classmem_list	fields;
348
} dg_variant;
345
} dg_variant;
349
 
346
 
350
typedef struct
347
typedef struct {
351
{
-
 
352
  int			len;
348
	int		len;
353
  dg_variant *		array;
349
	dg_variant	*array;
354
} dg_variant_list;
350
} dg_variant_list;
355
 
351
 
356
typedef enum
352
typedef enum {
357
{
-
 
358
  DG_V_D,
353
	DG_V_D,
359
  DG_V_S,
354
	DG_V_S,
360
  DG_V_T
355
	DG_V_T
361
} dg_v_key;
356
} dg_v_key;
362
 
357
 
363
typedef struct
358
typedef struct {
364
{
-
 
365
  dg_v_key		v_key;
359
	dg_v_key		v_key;
366
  union
360
	union {
367
  {
-
 
368
    dg_classmem		d;
361
		dg_classmem	d;
369
    dg_tag		s;
362
		dg_tag		s;
370
    dg_type		t;
363
		dg_type		t;
371
  } u;
364
	} u;
372
  dg_variant_list	vnts;
365
	dg_variant_list	vnts;
373
} dg_varpart;
366
} dg_varpart;
374
 
367
 
375
typedef dg_varpart * dg_varpart_option;
368
typedef dg_varpart *dg_varpart_option;
376
 
369
 
377
 
370
 
378
typedef enum
371
typedef enum {
379
{
-
 
380
  DG_NO_MODE = 0,
372
	DG_NO_MODE = 0,
381
  DG_IN_MODE,
373
	DG_IN_MODE,
382
  DG_OUT_MODE,
374
	DG_OUT_MODE,
383
  DG_INOUT_MODE
375
	DG_INOUT_MODE
384
} dg_param_mode;
376
} dg_param_mode;
385
typedef dg_param_mode dg_param_mode_option;
377
typedef dg_param_mode dg_param_mode_option;
386
 
378
 
387
typedef struct
379
typedef struct {
388
{
-
 
389
  char *		pnam;
380
	char		*pnam;
390
  short_sourcepos	ppos;
381
	short_sourcepos	ppos;
391
  dg_param_mode		pmode;
382
	dg_param_mode	pmode;
392
  dg_type		p_typ;
383
	dg_type		p_typ;
393
  dg_default *		p_dflt;
384
	dg_default	*p_dflt;
394
} dg_param;
385
} dg_param;
395
 
386
 
396
typedef struct
387
typedef struct {
397
{
-
 
398
  int			len;
388
	int		len;
399
  dg_param *		array;
389
	dg_param	*array;
400
} dg_param_list;
390
} dg_param_list;
401
 
391
 
402
typedef struct
392
typedef struct {
403
{
-
 
404
  dg_tag		base;
393
	dg_tag		base;
405
  short_sourcepos	pos;
394
	short_sourcepos	pos;
406
  exp			location;
395
	exp		location;
407
  int			acc	: 8;
396
	int		acc:8;
408
  int			virt	: 8;
397
	int		virt:8;
409
} dg_class_base;
398
} dg_class_base;
410
 
399
 
411
typedef struct
400
typedef struct {
412
{
-
 
413
  int			len;
401
	int		len;
414
  dg_class_base *	array;
402
	dg_class_base	*array;
415
} dg_class_base_list;
403
} dg_class_base_list;
416
 
404
 
417
typedef struct
405
typedef struct {
418
{
-
 
419
  dg_class_base_list	inherits;
406
	dg_class_base_list	inherits;
420
  dg_classmem_list	members;
407
	dg_classmem_list	members;
421
  dg_tag_list		friends;
408
	dg_tag_list		friends;
422
  dg_tag		vt_s;
409
	dg_tag			vt_s;
423
  dg_tag		vt_d;
410
	dg_tag			vt_d;
424
  dg_tag		rtti_s;
411
	dg_tag			rtti_s;
425
  dg_tag		rtti_d;
412
	dg_tag			rtti_d;
426
} class_data;
413
} class_data;
427
 
414
 
428
typedef struct
415
typedef struct {
429
{
-
 
430
  dg_name_list		entries;
416
	dg_name_list		entries;
431
  dg_tag		id;
417
	dg_tag			id;
432
  dg_tag		cb;
418
	dg_tag			cb;
433
  dg_classmem_list	members;
419
	dg_classmem_list	members;
434
} task_data;			/* task or synchronised type */
420
} task_data;			/* task or synchronised type */
435
 
421
 
436
 
422
 
437
typedef union
423
typedef union {
438
{
-
 
439
    long	l;
424
	long	l;
440
    char *	s;
425
	char	*s;
441
} lab_union;
426
} lab_union;
442
 
427
 
443
typedef enum
428
typedef enum {
444
{
-
 
445
  NO_LAB = 0,
429
	NO_LAB = 0,
446
  LAB_STR,
430
	LAB_STR,
447
  LAB_CODE,
431
	LAB_CODE,
448
  LAB_D
432
	LAB_D
449
} dg_lab_key;
433
} dg_lab_key;
450
 
434
 
451
typedef struct
435
typedef struct {
452
{
-
 
453
  lab_union		u;
436
	lab_union	u;
454
  int			k;
437
	int		k;
455
} ext_lab;
438
} ext_lab;
456
 
439
 
457
typedef enum
440
typedef enum {
458
{
-
 
459
  NO_WH = 0,
441
	NO_WH = 0,
460
  WH_STR,
442
	WH_STR,
461
  WH_CODELAB,
443
	WH_CODELAB,
462
  WH_REG,
444
	WH_REG,
463
  WH_REGOFF
445
	WH_REGOFF
464
} dg_where_key;
446
} dg_where_key;
465
 
447
 
466
typedef struct
448
typedef struct {
467
{
-
 
468
  lab_union		u;
449
	lab_union	u;
469
  long			o;
450
	long		o;
470
  dg_where_key		k;
451
	dg_where_key	k;
471
} dg_where;
452
} dg_where;
472
 
453
 
473
 
454
 
474
typedef enum
455
typedef enum {
475
{
-
 
476
  DGT_TAGGED,
456
	DGT_TAGGED,
477
  DGT_BASIC,
457
	DGT_BASIC,
478
  DGT_QUAL,	/* ptr, ref and qual */
458
	DGT_QUAL,	/* ptr, ref and qual */
479
  DGT_ARRAY,
459
	DGT_ARRAY,
480
  DGT_SUBR,
460
	DGT_SUBR,
481
  DGT_ENUM,
461
	DGT_ENUM,
482
  DGT_STRUCT,	/* includes union */
462
	DGT_STRUCT,	/* includes union */
483
  DGT_CLASS,
463
	DGT_CLASS,
484
  DGT_A_TASK,
464
	DGT_A_TASK,
485
  DGT_A_SYNCH,
465
	DGT_A_SYNCH,
486
  DGT_PMEM,
466
	DGT_PMEM,
487
  DGT_CONS,	/* set and file */
467
	DGT_CONS,	/* set and file */
488
  DGT_PROC,
468
	DGT_PROC,
489
  DGT_BITF,
469
	DGT_BITF,
490
  DGT_FIXED,
470
	DGT_FIXED,
491
  DGT_FLDIG,
471
	DGT_FLDIG,
492
  DGT_MOD,
472
	DGT_MOD,
493
  DGT_STRING,
473
	DGT_STRING,
494
  DGT_UNKNOWN
474
	DGT_UNKNOWN
495
} dg_type_key;
475
} dg_type_key;
496
 
476
 
497
typedef enum
477
typedef enum {
498
{
-
 
499
  DG_ADR_T,
478
	DG_ADR_T,
500
  DG_BOOL_T,
479
	DG_BOOL_T,
501
  DG_CHAR_T,
480
	DG_CHAR_T,
502
  DG_INT_T,
481
	DG_INT_T,
503
  DG_FLOAT_T
482
	DG_FLOAT_T
504
} dg_basic_type_key;
483
} dg_basic_type_key;
505
 
484
 
506
typedef enum
485
typedef enum {
507
{
-
 
508
  DG_PTR_T = 0,
486
	DG_PTR_T = 0,
509
  DG_HPPTR_T,
487
	DG_HPPTR_T,
510
  DG_REF_T,
488
	DG_REF_T,
511
  DG_PACK_T,
489
	DG_PACK_T,
512
  DG_CONST_T,
490
	DG_CONST_T,
513
  DG_VOL_T,
491
	DG_VOL_T,
514
  DG_ALIAS_T,
492
	DG_ALIAS_T,
515
  DG_CLWID_T,
493
	DG_CLWID_T,
516
  DG_LIM_T,
494
	DG_LIM_T,
517
  N_DG_QUAL_TYPES
495
	N_DG_QUAL_TYPES
518
} dg_qual_type_key;
496
} dg_qual_type_key;
519
 
497
 
520
typedef dg_qual_type_key dg_qualifier;
498
typedef dg_qual_type_key dg_qualifier;
521
 
499
 
522
typedef enum
500
typedef enum {
523
{
-
 
524
  DG_SET_T,
501
	DG_SET_T,
525
  DG_FILE_T
502
	DG_FILE_T
526
} dg_cons_type_key;
503
} dg_cons_type_key;
527
 
504
 
528
struct dg_type_t
505
struct dg_type_t {
529
{
-
 
530
  dg_type_key		key;
506
	dg_type_key	key;
531
  ext_lab		outref;
507
	ext_lab		outref;
532
  union
508
	union {
533
  {
-
 
534
    dg_tag		t_tag;
509
		dg_tag	t_tag;
535
    struct
510
		struct {
536
    {
-
 
537
      dg_basic_type_key	b_key;
511
			dg_basic_type_key	b_key;
538
      char *		tnam;
512
			char			*tnam;
539
      shape		b_sh;
513
			shape			b_sh;
540
    } t_bas;
514
		} t_bas;
541
    struct
515
		struct {
542
    {
-
 
543
      dg_qual_type_key	q_key;
516
			dg_qual_type_key	q_key;
544
      dg_type		typ;
517
			dg_type			typ;
-
 
518
			dg_type			another;
545
      dg_type		another; /* list q_keys to avoid repeat */
519
			/* list q_keys to avoid repeat */
546
    } t_qual;
520
		} t_qual;
547
    struct
521
		struct {
548
    {
-
 
549
      dg_type		elem_type;
522
			dg_type			elem_type;
550
      exp		stride;
523
			exp			stride;
551
      bool		rowm;
524
			bool			rowm;
552
      dg_dim_list	dims;
525
			dg_dim_list		dims;
553
    } t_arr;
526
		} t_arr;
554
    dg_dim		t_subr;
527
		dg_dim	t_subr;
555
    struct
528
		struct {
556
    {
-
 
557
      char *		tnam;
529
			char			*tnam;
558
      short_sourcepos	tpos;
530
			short_sourcepos		tpos;
559
      dg_enum_list	values;
531
			dg_enum_list		values;
560
      shape		sha;
532
			shape			sha;
561
    } t_enum;
533
		} t_enum;
562
    struct
534
		struct {
563
    {
-
 
564
      dg_idname		idnam;
535
			dg_idname		idnam;
565
      short_sourcepos	tpos;
536
			short_sourcepos		tpos;
566
      bool		is_union;
537
			bool			is_union;
567
      shape		sha;
538
			shape			sha;
568
      union
539
			union {
569
      {
-
 
570
	dg_classmem_list  fields;
540
				dg_classmem_list	fields;
571
	class_data *	cd;
541
				class_data		*cd;
572
	task_data *	td;
542
				task_data		*td;
573
      } u;
543
			} u;
574
      dg_varpart_option	vpart;
544
			dg_varpart_option	vpart;
575
    } t_struct;
545
		} t_struct;
576
    struct
546
		struct {
577
    {
-
 
578
      dg_tag		pclass;
547
			dg_tag			pclass;
579
      dg_type		memtyp;
548
			dg_type			memtyp;
580
      shape		sha;
549
			shape			sha;
581
    } t_pmem;
550
		} t_pmem;
582
    struct
551
		struct {
583
    {
-
 
584
      dg_cons_type_key	c_key;
552
			dg_cons_type_key	c_key;
585
      dg_type		typ;
553
			dg_type			typ;
586
      shape		sha;
554
			shape			sha;
587
    } t_cons;
555
		} t_cons;
588
    struct
556
		struct {
589
    {
-
 
590
      dg_param_list	params;
557
			dg_param_list		params;
591
      dg_type		res_type;
558
			dg_type			res_type;
592
      procprops		prps;
559
			procprops		prps;
593
      unsigned int	lang	: 16;
560
			unsigned int		lang:16;
594
      unsigned int	ccv	: 8;
561
			unsigned int		ccv:8;
595
      int		knowpro	: 1;
562
			int			knowpro:1;
596
      int		yespro	: 1;
563
			int			yespro:1;
597
    } t_proc;
564
		} t_proc;
598
    struct
565
		struct {
599
    {
-
 
600
      dg_type		expanded;
566
			dg_type			expanded;
601
      shape		sha;
567
			shape			sha;
602
      bitfield_variety	bv;
568
			bitfield_variety	bv;
-
 
569
			dg_type			another;
603
      dg_type		another; /* list all bitfields to avoid repeat */
570
			/* list all bitfields to avoid repeat */
604
    } t_bitf;
571
		} t_bitf;
605
    struct
572
		struct {
606
    {
-
 
607
      dg_type		rept;
573
			dg_type			rept;
608
      exp		small;
574
			exp			small;
609
      exp		delta;
575
			exp			delta;
-
 
576
			exp			digits;
610
      exp		digits;	/* or size of modular type */
577
			/* or size of modular type */
611
    } t_adanum;
578
		} t_adanum;
612
    struct
579
		struct {
613
    {
-
 
614
      dg_tag		ct;
580
			dg_tag			ct;
615
      exp		lb;
581
			exp			lb;
616
      exp		length;
582
			exp			length;
617
    } t_string;
583
		} t_string;
618
  } data;
584
	} data;
619
  struct dg_more_t *	mor;
585
	struct dg_more_t	*mor;
620
  dg_type		type_queue;
586
	dg_type			type_queue;
621
};
587
};
622
 
588
 
623
 
589
 
624
typedef enum
590
typedef enum {
625
{
-
 
626
  DGN_OBJECT,
591
	DGN_OBJECT,
627
  DGN_PROC,
592
	DGN_PROC,
628
  DGN_MODULE,
593
	DGN_MODULE,
629
  DGN_NSP,
594
	DGN_NSP,
630
  DGN_SUBUNIT,
595
	DGN_SUBUNIT,
631
  DGN_IMPORT,
596
	DGN_IMPORT,
632
  DGN_TYPE,
597
	DGN_TYPE,
633
  DGN_ENTRY
598
	DGN_ENTRY
634
} dg_name_key;
599
} dg_name_key;
635
 
600
 
636
struct dg_name_t
601
struct dg_name_t {
637
{
-
 
638
  dg_name_key		key;
602
	dg_name_key	key;
639
  dg_idname		idnam;
603
	dg_idname	idnam;
640
  short_sourcepos	whence;
604
	short_sourcepos	whence;
641
  union
605
	union {
642
  {
-
 
643
    struct
606
		struct {
644
    {
-
 
645
      dg_type		typ;
607
			dg_type		typ;
646
      exp		obtain_val;
608
			exp		obtain_val;
647
      dg_param *	p; 
609
			dg_param	*p;
648
    } n_obj;
610
		} n_obj;
649
    struct
611
		struct {
650
    {
-
 
651
      dg_type		typ;
612
			dg_type		typ;
652
      exp		obtain_val;
613
			exp		obtain_val;
653
      dg_info		params;		/* DGA_PARAMS */
614
			dg_info		params;		/* DGA_PARAMS */
654
    } n_proc;
615
		} n_proc;
655
    struct
616
		struct {
656
    {
-
 
657
      dg_name_list	members;
617
			dg_name_list	members;
658
      exp		init;
618
			exp		init;
659
    } n_mod;
619
		} n_mod;
660
    struct
620
		struct {
661
    {
-
 
662
      dg_tag		parent;
621
			dg_tag		parent;
663
      dg_name		sub;
622
			dg_name		sub;
664
      int		acc	: 8;
623
			int		acc:8;
665
      int		child	: 1;
624
			int		child:1;
666
      int		split	: 1;
625
			int		split:1;
667
    } n_sub;
626
		} n_sub;
668
    struct
627
		struct {
669
    {
-
 
670
      dg_tag		import;
628
			dg_tag		import;
671
      int		ik;
629
			int		ik;
672
      dg_type		i_typ;
630
			dg_type		i_typ;
673
    } n_imp;
631
		} n_imp;
674
    struct
632
		struct {
675
    {
-
 
676
      dg_type		raw;
633
			dg_type		raw;
677
      dg_type		named;
634
			dg_type		named;
678
      dg_constraint	constraints;
635
			dg_constraint	constraints;
679
    } n_typ;
636
		} n_typ;
680
  } data;
637
	} data;
681
  struct dg_more_t *	mor;
638
	struct dg_more_t *mor;
682
  dg_name		next;
639
	dg_name		next;
683
};
640
};
684
 
641
 
685
typedef struct dg_more_t
642
typedef struct dg_more_t {
686
{
-
 
687
  dg_tag		this_tag;
643
	dg_tag		this_tag;
688
  dg_tag		inline_ref;
644
	dg_tag		inline_ref;
689
  dg_tag		refspec;
645
	dg_tag		refspec;
690
  dg_tag		elabn;
646
	dg_tag		elabn;
691
  dg_type_list		exptns;		/* proc_name */
647
	dg_type_list	exptns;		/* proc_name */
692
  short_sourcepos	end_pos;	/* proc_name */
648
	short_sourcepos	end_pos;	/* proc_name */
693
  dg_dim *		en_family;	/* proc_name */
649
	dg_dim		*en_family;	/* proc_name */
694
  exp			vslot;		/* proc_name */
650
	exp		vslot;		/* proc_name */
695
  exp			repn;
651
	exp		repn;
696
  int			acc	: 4;
652
	int		acc:4;
697
  int			virt	: 4;	/* proc_name */
653
	int		virt:4;		/* proc_name */
698
  int			isinline : 1;	/* proc_name */
654
	int		isinline:1;	/* proc_name */
699
  int			prognm	: 1;	/* proc_name */
655
	int		prognm:1;	/* proc_name */
700
  int			isconst	: 1;	/* obj_name */
656
	int		isconst:1;	/* obj_name */
701
  int			isspec	: 1;
657
	int		isspec:1;
702
  int			issep	: 1;
658
	int		issep:1;
703
  int			isnew	: 1;	/* types */
659
	int		isnew:1;	/* types */
704
  int			aderiv	: 1;	/* types */
660
	int		aderiv:1;	/* types */
705
} * dg_more_name;
661
} *dg_more_name;
706
 
662
 
707
 
663
 
708
typedef struct ret_t
664
typedef struct ret_t {
709
{
-
 
710
  long			lab;
665
	long		lab;
711
  long			over;
666
	long		over;
712
  struct ret_t *	next;
667
	struct ret_t	*next;
713
} retrec;
668
} retrec;
714
 
669
 
715
typedef struct ob_s
670
typedef struct ob_s {
716
{
-
 
717
  dg_tag		tg;
671
	dg_tag		tg;
718
  int			ass;
672
	int		ass;
719
  struct ob_s *		next;
673
	struct ob_s	*next;
720
} objset;
674
} objset;
721
 
675
 
722
 
-
 
723
typedef enum	/* These are optimisation kinds */
676
/* These are optimisation kinds */
724
{
677
typedef enum {
725
  DGD_NONE = 0,
678
	DGD_NONE = 0,
726
  DGD_DEAD,		/* 1 OpK_Unreachable */
679
	DGD_DEAD,	/* 1 OpK_Unreachable */
727
  DGD_REM,		/* 2 OpK_Copy_Propagation */
680
	DGD_REM,	/* 2 OpK_Copy_Propagation */
728
  DGD_RDND,		/* 3 OpK_Redundant - no side effect */
681
	DGD_RDND,	/* 3 OpK_Redundant - no side effect */
729
  DGD_CNST,		/* 4 OpK_Const_Eval */
682
	DGD_CNST,	/* 4 OpK_Const_Eval */
730
  DGD_MOVD,		/* 5 OpK_Structural */
683
	DGD_MOVD,	/* 5 OpK_Structural */
731
  DGD_EXTRACT		/* 6 OpK_Loop_Const */
684
	DGD_EXTRACT	/* 6 OpK_Loop_Const */
732
			/* 7 OpK_Loop_Invariant assignments */
685
			/* 7 OpK_Loop_Invariant assignments */
733
			/* 8 OpK_Index_Reduction */
686
			/* 8 OpK_Index_Reduction */
734
			/* 9 OpK_Loop_Unroll */
687
			/* 9 OpK_Loop_Unroll */
735
} dg_detch_key;
688
} dg_detch_key;
736
 
689
 
737
typedef struct dgt_s
690
typedef struct dgt_s {
738
{
-
 
739
  dg_detch_key		why;
691
	dg_detch_key	why;
740
  dg_info		info;
692
	dg_info		info;
741
  dg_tag		tg;
693
	dg_tag		tg;
742
  struct dgt_s *	next;
694
	struct dgt_s	*next;
743
  struct dgt_s *	sub;
695
	struct dgt_s	*sub;
744
} detch_info;
696
} detch_info;
745
 
697
 
746
 
698
 
747
typedef enum
699
typedef enum {
748
{
-
 
749
  DGR_SEL,
700
	DGR_SEL,
750
  DGR_ACC,
701
	DGR_ACC,
751
  DGR_RTS,
702
	DGR_RTS,
752
  DGR_ALT,
703
	DGR_ALT,
753
  DGR_SGD,
704
	DGR_SGD,
754
  DGR_TRIG,
705
	DGR_TRIG,
755
  DGR_ABTL,
706
	DGR_ABTL,
756
  DGR_REQUE
707
	DGR_REQUE
757
} dg_rvs_key;
708
} dg_rvs_key;
983
};
907
};
984
 
908
 
985
 
909
 
986
typedef enum
910
typedef enum {
987
{
-
 
988
  DGK_NONE = 0,
911
	DGK_NONE = 0,
989
  DGK_TYPE,
912
	DGK_TYPE,
990
  DGK_NAME,
913
	DGK_NAME,
991
  DGK_INFO,
914
	DGK_INFO,
992
  DGK_COMP,
915
	DGK_COMP,
993
  DGK_CLASSMEM,
916
	DGK_CLASSMEM,
994
  DGK_DIM,
917
	DGK_DIM,
995
  DGK_ENUM,
918
	DGK_ENUM,
996
  DGK_NAMELIST
919
	DGK_NAMELIST
997
} dg_tag_key;
920
} dg_tag_key;
998
 
921
 
999
typedef struct dg_tag_t
922
typedef struct dg_tag_t {
1000
{
-
 
1001
  union
923
	union
1002
  {
924
	{
1003
    dg_type		typ;
925
		dg_type		typ;
1004
    dg_name		nam;
926
		dg_name		nam;
1005
    dg_info		info;
927
		dg_info		info;
1006
    dg_compilation	comp;
928
		dg_compilation	comp;
1007
    dg_name_list *	nl;
929
		dg_name_list	*nl;
1008
  } p;
930
	} p;
1009
  ext_lab		outref;
931
	ext_lab			outref;
1010
  long			abstract_lab;
932
	long			abstract_lab;
1011
  int			key	: 8;
933
	int			key:8;
1012
  int			done	: 1;
934
	int			done:1;
1013
  int			needed	: 1;
935
	int			needed:1;
1014
  int			any_inl	: 1;
936
	int			any_inl:1;
1015
  dg_tag		copy;
937
	dg_tag			copy;
1016
#if 0
938
#if 0
1017
  exp			e;
939
	exp			e;
1018
#endif
940
#endif
1019
} dgtag_struct;
941
} dgtag_struct;
1020
 
942
 
1021
 
943
 
1022
typedef string_list dg_idname_list;
944
typedef string_list dg_idname_list;
1023
 
945
 
1024
typedef enum
946
typedef enum {
1025
{
-
 
1026
  DGM_FN,
947
	DGM_FN,
1027
  DGM_OBJ,
948
	DGM_OBJ,
1028
  DGM_UNDEF,
949
	DGM_UNDEF,
1029
  DGM_INC
950
	DGM_INC
1030
} dg_mac_key;
951
} dg_mac_key;
1031
 
952
 
1032
typedef struct
953
typedef struct {
1033
{
-
 
1034
  int			len;
954
	int		len;
1035
  struct dg_mac_t *	array;
955
	struct dg_mac_t *array;
1036
} dg_macro_list;
956
} dg_macro_list;
1037
 
957
 
1038
typedef struct dg_mac_t
958
typedef struct dg_mac_t {
1039
{
-
 
1040
  dg_mac_key		key;
959
	dg_mac_key			key;
1041
  short_sourcepos	pos;
960
	short_sourcepos			pos;
1042
  union
961
	union {
1043
  {
-
 
1044
    struct
962
		struct {
1045
    {
-
 
1046
      char *		nam;
963
			char		*nam;
1047
      char *		defn;
964
			char		*defn;
1048
      string_list	pms;
965
			string_list	pms;
1049
    } d;
966
		} d;
1050
    struct
967
		struct {
1051
    {
-
 
1052
      dg_filename	file;
968
			dg_filename	file;
1053
      dg_macro_list	macs;
969
			dg_macro_list	macs;
1054
    } i;
970
		} i;
1055
  } u;
971
	} u;
1056
} dg_macro;
972
} dg_macro;
1057
 
973
 
1058
 
974
 
1059
struct dg_comp_t
975
struct dg_comp_t {
1060
{
-
 
1061
  dg_filename		prim_file;
976
  dg_filename		prim_file;
1062
  string_list		comp_deps;
977
  string_list		comp_deps;
1063
  long			date;
978
  long			date;
1064
  short			language;
979
  short			language;
1065
  short			id_case;
980
  short			id_case;
1066
  char *		producer;
981
  char			*producer;
1067
  dg_filename		comp_dir;
982
  dg_filename		comp_dir;
1068
  string_list		options;
983
  string_list		options;
1069
  dg_name_list		dn_list;
984
  dg_name_list		dn_list;
1070
  dg_macro_list		macros;
985
  dg_macro_list		macros;
1071
  dg_compilation	another;
986
  dg_compilation	another;
1072
};
987
};
1073
 
988
 
1074
 
989
 
1075
 
-
 
1076
typedef struct
990
typedef struct {
1077
{
-
 
1078
  int			present;	
991
	int	present;
1079
  bool			val;
992
	bool	val;
1080
} bool_option;
993
} bool_option;
1081
 
994
 
1082
typedef struct
995
typedef struct {
1083
{
-
 
1084
  int			present;	
996
	int	present;
1085
  shape			val;
997
	shape	val;
1086
} shape_option;
998
} shape_option;
1087
 
999
 
1088
typedef struct
1000
typedef struct {
1089
{
-
 
1090
  int			present;	
1001
  int			present;
1091
  struct tok_define_t *	val;
1002
  struct tok_define_t	*val;
1092
} token_option;
1003
} token_option;
1093
 
1004
 
1094
 
1005
 
1095
typedef int dg_comp_props;
1006
typedef int dg_comp_props;
1096
typedef int dg_append;
1007
typedef int dg_append;