1: /* manifest.h 4.1.1 95/01/17 */
2:
3: #ifndef _MANIFEST_
4: #define _MANIFEST_
5:
6: #include <stdio.h>
7: #include "pcclocal.h"
8: #include "config.h"
9:
10: #define DSIZE (MAXOP+1) /* DSIZE is the size of the dope array */
11:
12: #define NOLAB (-1) /* no label with constant */
13:
14: /*
15: * Node types
16: */
17: #define LTYPE 02 /* leaf */
18: #define UTYPE 04 /* unary */
19: #define BITYPE 010 /* binary */
20:
21: /*
22: * Bogus type values
23: */
24: #define TNULL INCREF(MOETY) /* pointer to MOETY -- impossible type */
25: #define TVOID FTN /* function returning UNDEF (for void) */
26:
27: /*
28: * Type packing constants
29: */
30: #define TMASK 060 /* mask for 1st component of compound type */
31: #define TMASK1 0300 /* mask for 2nd component of compound type */
32: #define TMASK2 0360 /* mask for 3rd component of compound type */
33: #define BTMASK 017 /* basic type mask */
34: #define BTSHIFT 4 /* basic type shift */
35: #define TSHIFT 2 /* shift count to get next type component */
36:
37: /*
38: * Type manipulation macros
39: */
40: #define MODTYPE(x,y) x = ((x)&(~BTMASK))|(y) /* set basic type of x to y */
41: #define BTYPE(x) ((x)&BTMASK) /* basic type of x */
42: #define ISUNSIGNED(x) ((x)<=ULONG&&(x)>=UCHAR)
43: #define UNSIGNABLE(x) ((x)<=LONG&&(x)>=CHAR)
44: #define ENUNSIGN(x) ((x)+(UNSIGNED-INT))
45: #define DEUNSIGN(x) ((x)+(INT-UNSIGNED))
46: #define ISPTR(x) (((x)&TMASK)==PTR)
47: #define ISFTN(x) (((x)&TMASK)==FTN) /* is x a function type */
48: #define ISARY(x) (((x)&TMASK)==ARY) /* is x an array type */
49: #define INCREF(x) ((((x)&~BTMASK)<<TSHIFT)|PTR|((x)&BTMASK))
50: #define DECREF(x) ((((x)>>TSHIFT)&~BTMASK)|( (x)&BTMASK))
51: /* advance x to a multiple of y */
52: #define SETOFF(x,y) if ((x)%(y) != 0) (x) = (((x)/(y) + 1) * (y))
53: /* can y bits be added to x without overflowing z */
54: #define NOFIT(x,y,z) (((x)%(z) + (y)) > (z))
55:
56: /*
57: * Pack and unpack field descriptors (size and offset)
58: */
59: #define PKFIELD(s,o) (((o)<<6)| (s))
60: #define UPKFSZ(v) ((v) &077)
61: #define UPKFOFF(v) ((v)>>6)
62:
63: /*
64: * Operator information
65: */
66: #define TYFLG 016
67: #define ASGFLG 01
68: #define LOGFLG 020
69:
70: #define SIMPFLG 040
71: #define COMMFLG 0100
72: #define DIVFLG 0200
73: #define FLOFLG 0400
74: #define LTYFLG 01000
75: #define CALLFLG 02000
76: #define MULFLG 04000
77: #define SHFFLG 010000
78: #define ASGOPFLG 020000
79:
80: #define SPFLG 040000
81:
82: #define optype(o) (dope[o]&TYFLG)
83: #define asgop(o) (dope[o]&ASGFLG)
84: #define logop(o) (dope[o]&LOGFLG)
85: #define callop(o) (dope[o]&CALLFLG)
86:
87: /*
88: * External declarations, typedefs and the like
89: */
90: #ifdef FLEXNAMES
91: char *hash();
92: char *savestr();
93: char *tstr();
94: extern int tstrused;
95: extern char *tstrbuf[];
96: extern char **curtstr;
97: #define freetstr() curtstr = tstrbuf, tstrused = 0
98: #endif
99:
100: extern int nerrors; /* number of errors seen so far */
101: extern int dope[]; /* a vector containing operator information */
102: extern char *opst[]; /* a vector containing names for ops */
103:
104: typedef union ndu NODE;
105: typedef unsigned int TWORD;
106: #define NIL (NODE *)0
107:
108: #ifndef ONEPASS
109: #ifndef EXPR
110: #define EXPR '.'
111: #endif
112: #ifndef BBEG
113: #define BBEG '['
114: #endif
115: #ifndef BEND
116: #define BEND ']'
117: #endif
118: #else
119: #include "onepass.h"
120: #endif
121: #endif
Defined typedef's
NODE
defined in line
104; used 157 times
- in line 106
- in /usr/src/lib/mip/allo.c line
7,
36,
155,
190,
242,
250,
267,
381-385(4),
520,
545-549(3)
- in /usr/src/lib/mip/cgram.y line
474,
491,
505,
567,
718,
777,
790-797(4),
849
- in /usr/src/lib/mip/common.c line
50,
136,
145-147(2),
159,
169,
177-182(2),
208,
225-230(2)
- in /usr/src/lib/mip/fort.c line
110-111(2),
118
- in /usr/src/lib/mip/match.c line
44,
266,
273,
322,
421-422(2),
469-470(2),
534,
543
- in /usr/src/lib/mip/optim.c line
20-21(2),
38-43(3),
100
- in /usr/src/lib/mip/pass1.h line
143,
157-158(2),
171
- in /usr/src/lib/mip/pass2.h line
132-137(2),
146,
161,
172
- in /usr/src/lib/mip/pftn.c line
36,
434,
465-468(2),
498,
506,
536,
943-947(2),
978,
1041,
1281,
1370,
1481-1482(2),
1516,
1549
- in /usr/src/lib/mip/reader.c line
10,
33,
134,
229,
273-276(2),
294,
313,
324,
359,
375,
461-466(2),
759,
824,
845,
875,
903,
1042,
1090-1095(2),
1183-1185(2),
1249-1257(3),
1318
- in /usr/src/lib/mip/trees.c line
32,
83-90(5),
466,
583-584(2),
648,
750,
763,
817-818(2),
869,
900-902(2),
910-916(3),
928-929(2),
935,
951,
970-971(2),
986-987(2),
1011-1012(2),
1081-1082(2),
1166-1167(2),
1231-1234(3),
1246,
1297,
1497-1498(2),
1511,
1533,
1553,
1571,
1635
- in /usr/src/lib/mip/xdefs.c line
65
TWORD
defined in line
105; used 31 times
- in /usr/src/lib/mip/allo.c line
300,
325
- in /usr/src/lib/mip/common.c line
355
- in /usr/src/lib/mip/match.c line
160
- in /usr/src/lib/mip/optim.c line
45
- in /usr/src/lib/mip/pass1.h line
23,
197
- in /usr/src/lib/mip/pftn.c line
18,
39-40(2),
542,
615,
745,
879,
986,
1049,
1164,
1421-1425(3),
1603
- in /usr/src/lib/mip/scan.c line
927
- in /usr/src/lib/mip/trees.c line
496,
603,
820,
955,
1019,
1094,
1167,
1232,
1464
Defined macros
ASGFLG
defined in line
67; used 27 times
BBEG
defined in line
113; used 1 times
BEND
defined in line
116; used 1 times
BITYPE
defined in line
19; used 69 times
- in /usr/src/lib/mip/common.c line
214,
242-243(2),
284-340(51)
- in /usr/src/lib/mip/match.c line
438,
507,
514,
609,
618
- in /usr/src/lib/mip/optim.c line
52
- in /usr/src/lib/mip/reader.c line
371,
545,
1109,
1140
- in /usr/src/lib/mip/trees.c line
139,
177,
1588,
1629,
1696
BTYPE
defined in line
41; used 7 times
DECREF
defined in line
50; used 19 times
- in /usr/src/lib/mip/cgram.y line
480
- in /usr/src/lib/mip/common.c line
377
- in /usr/src/lib/mip/match.c line
173
- in /usr/src/lib/mip/pftn.c line
114,
905,
920,
1164,
1501,
1556,
1566,
1677
- in /usr/src/lib/mip/trees.c line
408,
426,
529-531(2),
809-810(2),
925,
976
DSIZE
defined in line
10; used 4 times
EXPR
defined in line
110; used 1 times
FLOFLG
defined in line
73; used 12 times
ISARY
defined in line
48; used 25 times
- in /usr/src/lib/mip/cgram.y line
673
- in /usr/src/lib/mip/common.c line
381
- in /usr/src/lib/mip/match.c line
174
- in /usr/src/lib/mip/pftn.c line
115,
862,
904,
915-919(2),
950,
1010,
1157,
1182,
1502,
1577,
1678
- in /usr/src/lib/mip/trees.c line
780-783(2),
799-806(6),
889,
975
ISFTN
defined in line
47; used 15 times
- in /usr/src/lib/mip/cgram.y line
673
- in /usr/src/lib/mip/common.c line
380
- in /usr/src/lib/mip/pftn.c line
175,
203,
228,
290,
340,
1581,
1588,
1618,
1675-1678(2)
- in /usr/src/lib/mip/trees.c line
530,
889,
980
ISPTR
defined in line
46; used 14 times
LOGFLG
defined in line
68; used 17 times
LTYPE
defined in line
17; used 26 times
- in /usr/src/lib/mip/common.c line
213,
241-243(2),
265-272(8),
329
- in /usr/src/lib/mip/match.c line
28,
435
- in /usr/src/lib/mip/optim.c line
50,
165,
228
- in /usr/src/lib/mip/reader.c line
299,
372,
768,
1108,
1139
- in /usr/src/lib/mip/trees.c line
1524,
1584,
1628,
1695
NIL
defined in line
106; used 89 times
- in /usr/src/lib/mip/allo.c line
439,
445
- in /usr/src/lib/mip/cgram.y line
213-215(2),
240,
246-249(2),
267,
284-289(2),
430,
476(2),
485,
492(2),
506(2),
582,
670,
683,
701-703(2),
709-712(3),
724-728(4),
738-742(4),
760-762(2),
778-783(4),
792(2),
799
- in /usr/src/lib/mip/match.c line
256
- in /usr/src/lib/mip/optim.c line
31
- in /usr/src/lib/mip/pftn.c line
46,
148,
329,
450(2),
474(2),
500(2),
513(2),
959,
971(2),
1066-1071(3),
1099-1102(3),
1490(2)
- in /usr/src/lib/mip/reader.c line
383,
391,
546,
633,
640,
647
- in /usr/src/lib/mip/trees.c line
444,
450-451(2),
501,
516,
545,
594-595(2),
857-862(2),
904(2),
978-981(2),
1179,
1227
NOFIT
defined in line
54;
never used
NOLAB
defined in line
12; used 8 times
SETOFF
defined in line
52; used 13 times
SPFLG
defined in line
80; used 4 times
TMASK
defined in line
30; used 10 times
TNULL
defined in line
24; used 11 times
TVOID
defined in line
25; used 1 times
TYFLG
defined in line
66; used 5 times
UTYPE
defined in line
18; used 21 times
asgop
defined in line
83; used 11 times
logop
defined in line
84; used 5 times
optype
defined in line
82; used 24 times
- in /usr/src/lib/mip/allo.c line
566
- in /usr/src/lib/mip/common.c line
191,
211,
229-234(2)
- in /usr/src/lib/mip/fort.c line
305
- in /usr/src/lib/mip/match.c line
435-438(2),
491,
592
- in /usr/src/lib/mip/optim.c line
49,
165,
228
- in /usr/src/lib/mip/reader.c line
298,
330,
504,
766,
861,
1106
- in /usr/src/lib/mip/trees.c line
96,
1303,
1521,
1580,
1642
Usage of this include