1: /* manifest.h 4.1 85/03/19 */
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 PTR /* pointer to UNDEF */
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,
153,
188,
240,
248,
265,
379-383(4),
518,
543-547(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
39,
89,
98-100(2),
112,
122,
130-135(2),
161,
178-183(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
141,
155-156(2),
169
- in /usr/src/lib/mip/pass2.h line
132-137(2),
146,
161,
172
- in /usr/src/lib/mip/pftn.c line
36,
433,
464-467(2),
497,
505,
535,
941-945(2),
976,
1038,
1276,
1365,
1476-1477(2),
1511,
1543
- in /usr/src/lib/mip/reader.c line
10,
33,
134,
230,
274-277(2),
295,
314,
325,
360,
376,
462-467(2),
760,
825,
846,
876,
904,
1043,
1091-1096(2),
1184-1186(2),
1250-1258(3),
1319
- 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,
1499-1500(2),
1513,
1535,
1555,
1573,
1637
- in /usr/src/lib/mip/xdefs.c line
57
TWORD
defined in line
105; used 31 times
- in /usr/src/lib/mip/allo.c line
298,
323
- in /usr/src/lib/mip/common.c line
308
- 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,
195
- in /usr/src/lib/mip/pftn.c line
18,
39-40(2),
539,
613,
743,
877,
984,
1045,
1160,
1416-1420(3),
1597
- in /usr/src/lib/mip/scan.c line
923
- 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
167,
195-196(2),
237-293(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
372,
546,
1110,
1141
- in /usr/src/lib/mip/trees.c line
139,
177,
1590,
1631,
1698
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
330
- in /usr/src/lib/mip/match.c line
173
- in /usr/src/lib/mip/pftn.c line
114,
903,
918,
1160,
1496,
1550,
1560,
1671
- 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
334
- in /usr/src/lib/mip/match.c line
174
- in /usr/src/lib/mip/pftn.c line
115,
860,
902,
913-917(2),
948,
1007,
1153,
1178,
1497,
1571,
1672
- 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
333
- in /usr/src/lib/mip/pftn.c line
175,
203,
228,
290,
340,
1575,
1582,
1612,
1669-1672(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
166,
194-196(2),
218-225(8),
282
- 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
300,
373,
769,
1109,
1140
- in /usr/src/lib/mip/trees.c line
1526,
1586,
1630,
1697
NIL
defined in line
106; used 89 times
- in /usr/src/lib/mip/allo.c line
437,
443
- 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,
449(2),
473(2),
499(2),
512(2),
957,
969(2),
1062-1067(3),
1095-1098(3),
1485(2)
- in /usr/src/lib/mip/reader.c line
384,
392,
547,
634,
641,
648
- 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
564
- in /usr/src/lib/mip/common.c line
144,
164,
182-187(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
299,
331,
505,
767,
862,
1107
- in /usr/src/lib/mip/trees.c line
96,
1303,
1523,
1582,
1644
Usage of this include