Subversion Repositories tendra.SVN

Rev

Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 7u83 1
/*
2
    		 Crown Copyright (c) 1997
3
 
4
    This TenDRA(r) Computer Program is subject to Copyright
5
    owned by the United Kingdom Secretary of State for Defence
6
    acting through the Defence Evaluation and Research Agency
7
    (DERA).  It is made available to Recipients with a
8
    royalty-free licence for its use, reproduction, transfer
9
    to other parties and amendment for any purpose not excluding
10
    product development provided that any such use et cetera
11
    shall be deemed to be acceptance of the following conditions:-
12
 
13
        (1) Its Recipients shall ensure that this Notice is
14
        reproduced upon any copies or amended versions of it;
15
 
16
        (2) Any amended version of it shall be clearly marked to
17
        show both the nature of and the organisation responsible
18
        for the relevant amendment or amendments;
19
 
20
        (3) Its onward transfer from a recipient to another
21
        party shall be deemed to be that party's acceptance of
22
        these conditions;
23
 
24
        (4) DERA gives no warranty or assurance as to its
25
        quality or suitability for any purpose and DERA accepts
26
        no liability whatsoever in relation to any use to which
27
        it may be put.
28
*/
29
 
30
 
31
/**********************************************************************
32
$Author: pwe $
33
$Date: 1998/03/11 11:03:31 $
34
$Revision: 1.2 $
35
$Log: dg_types.h,v $
36
 * Revision 1.2  1998/03/11  11:03:31  pwe
37
 * DWARF optimisation info
38
 *
39
 * Revision 1.1.1.1  1998/01/17  15:55:46  release
40
 * First version to be checked into rolling release.
41
 *
42
 * Revision 1.8  1998/01/11  18:44:58  pwe
43
 * consistent new/old diags
44
 *
45
 * Revision 1.7  1998/01/09  09:29:50  pwe
46
 * prep restructure
47
 *
48
 * Revision 1.6  1997/12/04  19:36:34  pwe
49
 * ANDF-DE V1.9
50
 *
51
 * Revision 1.5  1997/11/06  09:17:46  pwe
52
 * ANDF-DE V1.8
53
 *
54
 * Revision 1.4  1997/10/28  10:12:35  pwe
55
 * local location support
56
 *
57
 * Revision 1.3  1997/10/23  09:21:12  pwe
58
 * ANDF-DE V1.7 and extra diags
59
 *
60
 * Revision 1.2  1997/10/10  18:16:42  pwe
61
 * prep ANDF-DE revision
62
 *
63
 * Revision 1.1  1997/08/23  13:26:56  pwe
64
 * initial ANDF-DE
65
 *
66
***********************************************************************/
67
#ifndef dg_types_key
68
#define dg_types_key 1
69
 
70
#include "dg_first.h"
71
 
72
 
73
 
74
typedef dg_info dg;
75
#define nildiag (dg_info)0
76
 
77
typedef struct dg_tag_t * dg_tag;
78
typedef struct dg_comp_t * dg_compilation;
79
 
80
typedef dg_name dg_name_list;
81
typedef dg dg_list;
82
 
83
typedef dg_tag dg_tag_option;
84
typedef dg_type dg_type_option;
85
typedef dg_name dg_name_option;
86
typedef dg_filename dg_filename_option;
87
 
88
typedef struct
89
{
90
  dg_name_list		list;
91
  dg_tag		tg;
92
} dg_namelist;
93
 
94
typedef struct
95
{
96
  int			len;
97
  dg_type *		array;
98
} dg_type_list;
99
 
100
typedef dg_type_list dg_type_list_option;
101
 
102
typedef struct
103
{
104
  int			len;
105
  dg_tag *		array;
106
} dg_tag_list;
107
 
108
 
109
typedef struct
110
{
111
  int			len;
112
  char **		array;
113
} string_list;
114
 
115
 
116
struct file_t
117
{
118
  long			file_dat;
119
  char *		file_host;
120
  char *		file_path;
121
  char *		file_name;
122
  struct file_t *	another;
123
  int			index;
124
};
125
 
126
typedef enum
127
{
128
  SP_NULL = 0,
129
  SP_SHORT,
130
  SP_SPAN,
131
  SP_FILE,
132
  SP_GLOB
133
} dg_sourcepos_key;
134
 
135
typedef struct
136
{
137
  dg_sourcepos_key	sp_key;
138
  dg_filename		file;
139
  dg_filename		to_file;
140
  long			from_line;
141
  long			to_line;
142
  short			from_column;
143
  short			to_column;
144
} dg_sourcepos;
145
 
146
typedef struct
147
{
148
  dg_filename		file;
149
  long			line;
150
  short			column;
151
} short_sourcepos;
152
 
153
typedef dg_sourcepos dg_sourcepos_option;
154
 
155
typedef struct dg_dflt
156
{
157
  exp			val;
158
  dg_sourcepos		span;
159
  long			lab;
160
  struct dg_dflt *	next;
161
} dg_default;
162
 
163
typedef dg_default *	dg_default_option;
164
 
165
typedef struct dg_con
166
{
167
  dg_tag		refmem;
168
  int			is_val;
169
  union {
170
    dg_type		typ;
171
    exp			val;
172
  } u;
173
  struct dg_con *	next;
174
} * dg_constraint;
175
 
176
typedef dg_constraint	dg_constraint_list;
177
typedef dg_constraint	dg_constraint_list_option;
178
 
179
 
180
typedef enum
181
{
182
  DG_ACC_NONE = 0,
183
  DG_ACC_PUB,
184
  DG_ACC_PROT,
185
  DG_ACC_PRIV,
186
  DG_ACC_LOC
187
} dg_accessibility;
188
typedef dg_accessibility dg_accessibility_option;
189
 
190
typedef enum
191
{
192
  DG_VIRT_NONE = 0,
193
  DG_VIRT_VIRT,
194
  DG_VIRT_PURE
195
} dg_virtuality;
196
typedef dg_virtuality dg_virtuality_option;
197
 
198
 
199
typedef enum
200
{
201
  DG_ID_NONE = 0,
202
  DG_ID_SRC,
203
  DG_ID_EXT,
204
  DG_ID_ANON,
205
  DG_ID_ARTFL,
206
  DG_ID_INST
207
} dg_idname_key;
208
 
209
typedef struct
210
{
211
  dg_idname_key		id_key;
212
  union
213
  {
214
    char *		nam;
215
    struct dg_inst_t *	instance;
216
  } idd;
217
} dg_idname;
218
typedef dg_idname dg_idname_option;
219
 
220
typedef struct dg_inst_t
221
{
222
  dg_idname		nam;
223
  dg_idname		spec;
224
  short_sourcepos	whence;
225
  dg_name_list		params;
226
} dg_instantn;
227
 
228
typedef union
229
{
230
  dg_tag	tg;
231
  exp		x;
232
} tg_or_exp;
233
 
234
typedef struct
235
{
236
  int		is_ref;
237
  tg_or_exp	u;
238
  shape		sha;
239
} dg_bound;
240
 
241
typedef enum
242
{
243
  DG_DIM_NONE,
244
  DG_DIM_TYPE,
245
  DG_DIM_BOUNDS
246
} dg_dim_key;
247
 
248
typedef struct
249
{
250
  int			d_key	: 8;
251
  int			low_ref	: 1;
252
  int			hi_ref	: 1;
253
  int			hi_cnt	: 1;
254
  long			count;
255
  dg_type		d_typ;
256
  shape			sha;
257
  tg_or_exp		lower;
258
  tg_or_exp		upper;
259
  dg_tag		tg;
260
} dg_dim;
261
 
262
typedef dg_dim dg_dim_option;
263
 
264
typedef struct
265
{
266
  int			len;
267
  dg_dim *		array;
268
} dg_dim_list;
269
 
270
typedef struct
271
{
272
  char *		enam;
273
  short_sourcepos	pos;
274
  exp			value;
275
  int			is_chn	: 1;
276
  int			chn	: 8;
277
  dg_tag		tg;
278
} dg_enum;
279
 
280
typedef struct
281
{
282
  int			len;
283
  dg_enum *		array;
284
} dg_enum_list;
285
 
286
typedef enum
287
{
288
  DG_CM_FIELD,
289
  DG_CM_FN,
290
  DG_CM_INDIRECT,
291
  DG_CM_STAT
292
} dg_cm_key;
293
 
294
typedef struct
295
{
296
  dg_cm_key		cm_key;
297
  union
298
  {
299
    struct
300
    {
301
      char *		fnam;
302
      short_sourcepos	f_pos;
303
      dg_type		f_typ;
304
      exp		f_offset;
305
      struct dg_dflt *	dflt;
306
      int		acc	: 4;
307
      int		discr	: 1;
308
    } cm_f;
309
    struct
310
    {
311
      dg_name		fn;
312
      exp		slot;
313
    } cm_fn;
314
    struct
315
    {
316
      char *		nam;
317
      short_sourcepos	pos;
318
      dg_type		typ;
319
      exp		ind_loc;
320
    } cm_ind;
321
    dg_name		cm_stat;
322
  } d;
323
  dg_tag		tg;
324
} dg_classmem;
325
 
326
typedef struct
327
{
328
  int			len;
329
  dg_classmem *		array;
330
} dg_classmem_list;
331
 
332
typedef struct
333
{
334
  exp			lower;
335
  exp			upper;
336
} dg_discrim;
337
 
338
typedef struct
339
{
340
  int			len;
341
  dg_discrim *		array;
342
} dg_discrim_list;
343
 
344
typedef struct
345
{
346
  dg_discrim_list	discr;
347
  dg_classmem_list	fields;
348
} dg_variant;
349
 
350
typedef struct
351
{
352
  int			len;
353
  dg_variant *		array;
354
} dg_variant_list;
355
 
356
typedef enum
357
{
358
  DG_V_D,
359
  DG_V_S,
360
  DG_V_T
361
} dg_v_key;
362
 
363
typedef struct
364
{
365
  dg_v_key		v_key;
366
  union
367
  {
368
    dg_classmem		d;
369
    dg_tag		s;
370
    dg_type		t;
371
  } u;
372
  dg_variant_list	vnts;
373
} dg_varpart;
374
 
375
typedef dg_varpart * dg_varpart_option;
376
 
377
 
378
typedef enum
379
{
380
  DG_NO_MODE = 0,
381
  DG_IN_MODE,
382
  DG_OUT_MODE,
383
  DG_INOUT_MODE
384
} dg_param_mode;
385
typedef dg_param_mode dg_param_mode_option;
386
 
387
typedef struct
388
{
389
  char *		pnam;
390
  short_sourcepos	ppos;
391
  dg_param_mode		pmode;
392
  dg_type		p_typ;
393
  dg_default *		p_dflt;
394
} dg_param;
395
 
396
typedef struct
397
{
398
  int			len;
399
  dg_param *		array;
400
} dg_param_list;
401
 
402
typedef struct
403
{
404
  dg_tag		base;
405
  short_sourcepos	pos;
406
  exp			location;
407
  int			acc	: 8;
408
  int			virt	: 8;
409
} dg_class_base;
410
 
411
typedef struct
412
{
413
  int			len;
414
  dg_class_base *	array;
415
} dg_class_base_list;
416
 
417
typedef struct
418
{
419
  dg_class_base_list	inherits;
420
  dg_classmem_list	members;
421
  dg_tag_list		friends;
422
  dg_tag		vt_s;
423
  dg_tag		vt_d;
424
  dg_tag		rtti_s;
425
  dg_tag		rtti_d;
426
} class_data;
427
 
428
typedef struct
429
{
430
  dg_name_list		entries;
431
  dg_tag		id;
432
  dg_tag		cb;
433
  dg_classmem_list	members;
434
} task_data;			/* task or synchronised type */
435
 
436
 
437
typedef union
438
{
439
    long	l;
440
    char *	s;
441
} lab_union;
442
 
443
typedef enum
444
{
445
  NO_LAB = 0,
446
  LAB_STR,
447
  LAB_CODE,
448
  LAB_D
449
} dg_lab_key;
450
 
451
typedef struct
452
{
453
  lab_union		u;
454
  int			k;
455
} ext_lab;
456
 
457
typedef enum
458
{
459
  NO_WH = 0,
460
  WH_STR,
461
  WH_CODELAB,
462
  WH_REG,
463
  WH_REGOFF
464
} dg_where_key;
465
 
466
typedef struct
467
{
468
  lab_union		u;
469
  long			o;
470
  dg_where_key		k;
471
} dg_where;
472
 
473
 
474
typedef enum
475
{
476
  DGT_TAGGED,
477
  DGT_BASIC,
478
  DGT_QUAL,	/* ptr, ref and qual */
479
  DGT_ARRAY,
480
  DGT_SUBR,
481
  DGT_ENUM,
482
  DGT_STRUCT,	/* includes union */
483
  DGT_CLASS,
484
  DGT_A_TASK,
485
  DGT_A_SYNCH,
486
  DGT_PMEM,
487
  DGT_CONS,	/* set and file */
488
  DGT_PROC,
489
  DGT_BITF,
490
  DGT_FIXED,
491
  DGT_FLDIG,
492
  DGT_MOD,
493
  DGT_STRING,
494
  DGT_UNKNOWN
495
} dg_type_key;
496
 
497
typedef enum
498
{
499
  DG_ADR_T,
500
  DG_BOOL_T,
501
  DG_CHAR_T,
502
  DG_INT_T,
503
  DG_FLOAT_T
504
} dg_basic_type_key;
505
 
506
typedef enum
507
{
508
  DG_PTR_T = 0,
509
  DG_HPPTR_T,
510
  DG_REF_T,
511
  DG_PACK_T,
512
  DG_CONST_T,
513
  DG_VOL_T,
514
  DG_ALIAS_T,
515
  DG_CLWID_T,
516
  DG_LIM_T,
517
  N_DG_QUAL_TYPES
518
} dg_qual_type_key;
519
 
520
typedef dg_qual_type_key dg_qualifier;
521
 
522
typedef enum
523
{
524
  DG_SET_T,
525
  DG_FILE_T
526
} dg_cons_type_key;
527
 
528
struct dg_type_t
529
{
530
  dg_type_key		key;
531
  ext_lab		outref;
532
  union
533
  {
534
    dg_tag		t_tag;
535
    struct
536
    {
537
      dg_basic_type_key	b_key;
538
      char *		tnam;
539
      shape		b_sh;
540
    } t_bas;
541
    struct
542
    {
543
      dg_qual_type_key	q_key;
544
      dg_type		typ;
545
      dg_type		another; /* list q_keys to avoid repeat */
546
    } t_qual;
547
    struct
548
    {
549
      dg_type		elem_type;
550
      exp		stride;
551
      bool		rowm;
552
      dg_dim_list	dims;
553
    } t_arr;
554
    dg_dim		t_subr;
555
    struct
556
    {
557
      char *		tnam;
558
      short_sourcepos	tpos;
559
      dg_enum_list	values;
560
      shape		sha;
561
    } t_enum;
562
    struct
563
    {
564
      dg_idname		idnam;
565
      short_sourcepos	tpos;
566
      bool		is_union;
567
      shape		sha;
568
      union
569
      {
570
	dg_classmem_list  fields;
571
	class_data *	cd;
572
	task_data *	td;
573
      } u;
574
      dg_varpart_option	vpart;
575
    } t_struct;
576
    struct
577
    {
578
      dg_tag		pclass;
579
      dg_type		memtyp;
580
      shape		sha;
581
    } t_pmem;
582
    struct
583
    {
584
      dg_cons_type_key	c_key;
585
      dg_type		typ;
586
      shape		sha;
587
    } t_cons;
588
    struct
589
    {
590
      dg_param_list	params;
591
      dg_type		res_type;
592
      procprops		prps;
593
      unsigned int	lang	: 16;
594
      unsigned int	ccv	: 8;
595
      int		knowpro	: 1;
596
      int		yespro	: 1;
597
    } t_proc;
598
    struct
599
    {
600
      dg_type		expanded;
601
      shape		sha;
602
      bitfield_variety	bv;
603
      dg_type		another; /* list all bitfields to avoid repeat */
604
    } t_bitf;
605
    struct
606
    {
607
      dg_type		rept;
608
      exp		small;
609
      exp		delta;
610
      exp		digits;	/* or size of modular type */
611
    } t_adanum;
612
    struct
613
    {
614
      dg_tag		ct;
615
      exp		lb;
616
      exp		length;
617
    } t_string;
618
  } data;
619
  struct dg_more_t *	mor;
620
  dg_type		type_queue;
621
};
622
 
623
 
624
typedef enum
625
{
626
  DGN_OBJECT,
627
  DGN_PROC,
628
  DGN_MODULE,
629
  DGN_NSP,
630
  DGN_SUBUNIT,
631
  DGN_IMPORT,
632
  DGN_TYPE,
633
  DGN_ENTRY
634
} dg_name_key;
635
 
636
struct dg_name_t
637
{
638
  dg_name_key		key;
639
  dg_idname		idnam;
640
  short_sourcepos	whence;
641
  union
642
  {
643
    struct
644
    {
645
      dg_type		typ;
646
      exp		obtain_val;
647
      dg_param *	p; 
648
    } n_obj;
649
    struct
650
    {
651
      dg_type		typ;
652
      exp		obtain_val;
653
      dg_info		params;		/* DGA_PARAMS */
654
    } n_proc;
655
    struct
656
    {
657
      dg_name_list	members;
658
      exp		init;
659
    } n_mod;
660
    struct
661
    {
662
      dg_tag		parent;
663
      dg_name		sub;
664
      int		acc	: 8;
665
      int		child	: 1;
666
      int		split	: 1;
667
    } n_sub;
668
    struct
669
    {
670
      dg_tag		import;
671
      int		ik;
672
      dg_type		i_typ;
673
    } n_imp;
674
    struct
675
    {
676
      dg_type		raw;
677
      dg_type		named;
678
      dg_constraint	constraints;
679
    } n_typ;
680
  } data;
681
  struct dg_more_t *	mor;
682
  dg_name		next;
683
};
684
 
685
typedef struct dg_more_t
686
{
687
  dg_tag		this_tag;
688
  dg_tag		inline_ref;
689
  dg_tag		refspec;
690
  dg_tag		elabn;
691
  dg_type_list		exptns;		/* proc_name */
692
  short_sourcepos	end_pos;	/* proc_name */
693
  dg_dim *		en_family;	/* proc_name */
694
  exp			vslot;		/* proc_name */
695
  exp			repn;
696
  int			acc	: 4;
697
  int			virt	: 4;	/* proc_name */
698
  int			isinline : 1;	/* proc_name */
699
  int			prognm	: 1;	/* proc_name */
700
  int			isconst	: 1;	/* obj_name */
701
  int			isspec	: 1;
702
  int			issep	: 1;
703
  int			isnew	: 1;	/* types */
704
  int			aderiv	: 1;	/* types */
705
} * dg_more_name;
706
 
707
 
708
typedef struct ret_t
709
{
710
  long			lab;
711
  long			over;
712
  struct ret_t *	next;
713
} retrec;
714
 
715
typedef struct ob_s
716
{
717
  dg_tag		tg;
718
  int			ass;
719
  struct ob_s *		next;
720
} objset;
721
 
722
 
723
typedef enum	/* These are optimisation kinds */
724
{
725
  DGD_NONE = 0,
726
  DGD_DEAD,		/* 1 OpK_Unreachable */
727
  DGD_REM,		/* 2 OpK_Copy_Propagation */
728
  DGD_RDND,		/* 3 OpK_Redundant - no side effect */
729
  DGD_CNST,		/* 4 OpK_Const_Eval */
730
  DGD_MOVD,		/* 5 OpK_Structural */
731
  DGD_EXTRACT		/* 6 OpK_Loop_Const */
732
			/* 7 OpK_Loop_Invariant assignments */
733
			/* 8 OpK_Index_Reduction */
734
			/* 9 OpK_Loop_Unroll */
735
} dg_detch_key;
736
 
737
typedef struct dgt_s
738
{
739
  dg_detch_key		why;
740
  dg_info		info;
741
  dg_tag		tg;
742
  struct dgt_s *	next;
743
  struct dgt_s *	sub;
744
} detch_info;
745
 
746
 
747
typedef enum
748
{
749
  DGR_SEL,
750
  DGR_ACC,
751
  DGR_RTS,
752
  DGR_ALT,
753
  DGR_SGD,
754
  DGR_TRIG,
755
  DGR_ABTL,
756
  DGR_REQUE
757
} dg_rvs_key;
758
 
759
 
760
typedef enum
761
{
762
  DGA_NONE = 0,
763
  DGA_PARAMS,		/* params_dg */
764
  DGA_COMP,		/* compilation_dg, source_language_dg */
765
  DGA_SRC,		/* sourcepos_dg, singlestep_dg */
766
  DGA_SCOPE,		/* lexical_block_dg */
767
  DGA_EXTRA,		/* lexical_fragment */
768
  DGA_LAB,		/* label_dg */
769
  DGA_NAME,		/* name_decl_dg */
770
  DGA_WITH,		/* with_dg */
771
  DGA_CALL,		/* call_dg, apply_(gen)_tag */
772
  DGA_INL_CALL,		/* inline_call_dg */
773
  DGA_INL_RES,		/* inline_result_dg */
774
  DGA_X_TRY,		/* exception_scope_dg */
775
  DGA_X_CATCH,		/* exception_handler_dg */
776
  DGA_X_RAISE,		/* raise_dg */
777
  DGA_BRANCH,		/* branch_dg, case_tag */
778
  DGA_TEST,		/* test_dg, test_tag */
779
  DGA_JUMP,		/* jump_dg, goto_tag */
780
  DGA_LJ,		/* long_jump_dg, long_jump_tag, goto_lv_tag,
781
				return_to_label_tag, tail_call_tag */
782
  DGA_BEG,		/* statement_part_dg */
783
  DGA_DEST,		/* destructor_dg */
784
  DGA_RVS,		/* Ada rendevous (various) */
785
  DGA_BAR,		/* barrier_dg */
786
  DGA_DETCH,		/*   detached_dg ? */
787
  DGA_MOVD,		/*    ditto */
788
  DGA_HOIST,		/*  (as MOVD but no ref to it) */
789
  DGA_OPTIM,		/*   optimisation_dg ? */
790
 
791
  DGA_PRC,		/* used when outputting proc */
792
  DGA_REMVAL		/* removed assign constants */
793
} dg_info_key;
794
 
795
struct dg_info_t
796
{
797
  dg_info_key		key;
798
  union
799
  {
800
    struct
801
    {
802
      dg_name_list	args;
803
      exp		o_env;
804
      long		b_start;
805
    } i_param;
806
    struct
807
    {
808
      bool		is_tag;
809
      union
810
      {
811
	dg_tag		comp_tag;
812
	long		comp_lang;
813
      } corl;
814
      long		lo_pc;
815
      long		hi_pc;
816
    } i_comp;
817
    struct
818
    {
819
      bool		is_stmt;
820
      short_sourcepos	startpos;
821
      short_sourcepos	endpos;
822
      long		start;
823
      long		end;
824
    } i_src;
825
    struct
826
    {
827
      char *		lexname;
828
      short_sourcepos	lexpos;
829
      short_sourcepos	endpos;
830
      long		start;
831
      long		begin_st;
832
      long		end;
833
    } i_scope;
834
    struct
835
    {
836
      dg_name		dnam;
837
      long		scope_start;
838
    } i_nam;
839
    struct
840
    {
841
      dg_type		w_typ;
842
      exp		w_exp;
843
      long		lo_pc;
844
      long		hi_pc;
845
    } i_with;
846
    struct
847
    {
848
      char *		clnam;
849
      short_sourcepos	pos;
850
      int		ck;
851
      long		brk;
852
      dg_where		p;
853
    } i_call;
854
    struct
855
    {
856
      dg_tag		proc;
857
      dg_name_list	args;
858
      int		ck;
859
      long		lo_pc;
860
      long		hi_pc;
861
      dg_info		resref;
862
    } i_inl;
863
    struct
864
    {
865
      dg_tag		call;
866
      long		brk;
867
      dg_where		res;
868
      dg_info		next;
869
    } i_res;
870
    struct
871
    {
872
      dg_tag_list	hl;
873
      long		lo_pc;
874
      long		hi_pc;
875
    } i_try;
876
    struct
877
    {
878
      dg_name		ex;
879
      long		lo_pc;
880
      long		hi_pc;
881
    } i_catch;
882
    struct
883
    {
884
      short_sourcepos	pos;
885
      dg_type		x_typ;
886
      exp		x_val;
887
    } i_raise;
888
    struct
889
    {
890
      short_sourcepos	pos;
891
      long		brk;
892
      exp		val;
893
    } i_dest;
894
    struct
895
    {
896
      short_sourcepos	pos;
897
      long		brk;
898
      long		cont;
899
    } i_brn;
900
    struct
901
    {
902
      short_sourcepos	pos;
903
      long		brk;
904
      ext_lab		jlab;
905
      long		cont;
906
      int		inv;
907
    } i_tst;
908
    struct
909
    {
910
      short_sourcepos	pos;
911
      long		brk;
912
      dg_where		j;
913
    } i_lj;
914
    struct
915
    {
916
      short_sourcepos	pos;
917
      dg_tag		entry;
918
      long		lo_pc;
919
      long		hi_pc;
920
    } i_bar;
921
    struct
922
    {
923
      long		prc_start;
924
      long		prc_end;
925
      retrec *		returns;
926
      dg_info		p;	/* DGA_PARAMS */
927
      dg_info           barrier;
928
    } i_prc;
929
    struct
930
    {
931
      int		rvs_key	: 8;
932
      int		n_code	: 2;
933
      int		has_iv	: 2;
934
      int		holder	: 1;
935
      int		alt	: 1;
936
      int		w_abort	: 1;
937
      int		async	: 1;
938
      int		kind	: 16;
939
      short_sourcepos	pos;
940
      long		lo_pc;
941
      long		hi_pc;
942
      union {
943
	dg_tag		tg;
944
	dg_info		iv;
945
      } u;
946
      exp		info_e;
947
      dg_tag		en;
948
      union {
949
	dg_name_list	p;
950
	exp		e;
951
      } u2;
952
    } i_rvs;
953
    dg_tag		i_tg;
954
    struct
955
    {
956
      int		posn;	/* pre <0, post >0 */
957
      detch_info *	dl;
958
    } i_detch;
959
    struct
960
    {
961
      int		reason;
962
      int		lost;
963
      dg_tag		tg;
964
      long		lo_pc;
965
      long		hi_pc;
966
    } i_movd;
967
    struct
968
    {
969
      int		reason;
970
      objset *		objs;
971
      long		lo_pc;
972
      long		hi_pc;
973
    } i_optim;
974
    struct
975
    {
976
      exp		var;	/* detached */
977
      exp		val;
978
      long		lo_pc;
979
    } i_remval;
980
  } data;
981
  dg_tag		this_tag;
982
  dg_info		more;
983
};
984
 
985
 
986
typedef enum
987
{
988
  DGK_NONE = 0,
989
  DGK_TYPE,
990
  DGK_NAME,
991
  DGK_INFO,
992
  DGK_COMP,
993
  DGK_CLASSMEM,
994
  DGK_DIM,
995
  DGK_ENUM,
996
  DGK_NAMELIST
997
} dg_tag_key;
998
 
999
typedef struct dg_tag_t
1000
{
1001
  union
1002
  {
1003
    dg_type		typ;
1004
    dg_name		nam;
1005
    dg_info		info;
1006
    dg_compilation	comp;
1007
    dg_name_list *	nl;
1008
  } p;
1009
  ext_lab		outref;
1010
  long			abstract_lab;
1011
  int			key	: 8;
1012
  int			done	: 1;
1013
  int			needed	: 1;
1014
  int			any_inl	: 1;
1015
  dg_tag		copy;
1016
#if 0
1017
  exp			e;
1018
#endif
1019
} dgtag_struct;
1020
 
1021
 
1022
typedef string_list dg_idname_list;
1023
 
1024
typedef enum
1025
{
1026
  DGM_FN,
1027
  DGM_OBJ,
1028
  DGM_UNDEF,
1029
  DGM_INC
1030
} dg_mac_key;
1031
 
1032
typedef struct
1033
{
1034
  int			len;
1035
  struct dg_mac_t *	array;
1036
} dg_macro_list;
1037
 
1038
typedef struct dg_mac_t
1039
{
1040
  dg_mac_key		key;
1041
  short_sourcepos	pos;
1042
  union
1043
  {
1044
    struct
1045
    {
1046
      char *		nam;
1047
      char *		defn;
1048
      string_list	pms;
1049
    } d;
1050
    struct
1051
    {
1052
      dg_filename	file;
1053
      dg_macro_list	macs;
1054
    } i;
1055
  } u;
1056
} dg_macro;
1057
 
1058
 
1059
struct dg_comp_t
1060
{
1061
  dg_filename		prim_file;
1062
  string_list		comp_deps;
1063
  long			date;
1064
  short			language;
1065
  short			id_case;
1066
  char *		producer;
1067
  dg_filename		comp_dir;
1068
  string_list		options;
1069
  dg_name_list		dn_list;
1070
  dg_macro_list		macros;
1071
  dg_compilation	another;
1072
};
1073
 
1074
 
1075
 
1076
typedef struct
1077
{
1078
  int			present;	
1079
  bool			val;
1080
} bool_option;
1081
 
1082
typedef struct
1083
{
1084
  int			present;	
1085
  shape			val;
1086
} shape_option;
1087
 
1088
typedef struct
1089
{
1090
  int			present;	
1091
  struct tok_define_t *	val;
1092
} token_option;
1093
 
1094
 
1095
typedef int dg_comp_props;
1096
typedef int dg_append;
1097
typedef dg_append dg_append_list;
1098
 
1099
 
1100
#endif