# 2.11BSD#431 - /usr/src/lib/mip/pass1.h

##### Macros

    ADATA             X
    AL_INIT           X
    AUTO              X
    CHARCAST          X
    DATA              X
    ENAME             X
    EXTDEF            X
    EXTERN            X
    FBRK              X
    FCONT             X
    FDEF              X
    FIELD             X
    FIXARG            X
    FIXDEF            X
    FIXSTRUCT         X
    FLDSIZ            X
    FLOOP             X
    FORTRAN           X
    FUNNYNAME         X
    INSTRUCT          X
    INUNION           X
    ISTRNG            X
    LABEL             X
    MOE               X
    MOS               X
    MOU               X
    NONAME            X
    NOOFFSET          X
    NRETVAL           X
    PARAM             X
    PROG              X
    REGISTER          X
    RETVAL            X
    SEENAME           X
    SHIDDEN           X
    SHIDES            X
    SMOS              X
    SNONUNIQ          X
    SNULL             X
    SREF              X
    SSET              X
    STAB              X
    STAG              X
    STATIC            X
    STNAME            X
    STRNG             X
    TAGNAME           X
    TYPEDEF           X
    UFORTRAN          X
    ULABEL            X
    UNAME             X
    USTATIC           X
    _PASS1_           X
    checkst           X

##### struct's

    sw                X
    symtab            X

       1: /*	pass1.h	4.2	85/08/22	*/
       2:
       3: #ifndef _PASS1_
       4: #define _PASS1_
       5:
       6: #include "macdefs.h"
       7: #include "manifest.h"
       8:
       9: /*
      10:  * Symbol table definition.
      11:  *
      12:  * Colliding entries are moved down with a standard
      13:  * probe (no quadratic rehash here) and moved back when
      14:  * entries are cleared.
      15:  */
      16: struct  symtab {
      17: #ifndef FLEXNAMES
      18:     char    sname[NCHNAM];
      19: #else
      20:     char    *sname;
      21: #endif
      22:     struct  symtab *snext;  /* link to other symbols in the same scope */
      23:     TWORD   stype;      /* type word */
      24:     char    sclass;     /* storage class */
      25:     char    slevel;     /* scope level */
      26:     char    sflags;     /* flags, see below */
      27:     OFFSZ   offset;     /* offset or value */
      28:     short   dimoff;     /* offset into the dimension table */
      29:     short   sizoff;     /* offset into the size table */
      30:     int suse;       /* line number of last use of the variable */
      31: };
      32:
      33: /*
      34:  * Storage classes
      35:  */
      36: #define SNULL       0       /* initial value */
      37: #define AUTO        1       /* automatic (on stack) */
      38: #define EXTERN      2       /* external reference */
      39: #define STATIC      3       /* static scope */
      40: #define REGISTER    4       /* register requested */
      41: #define EXTDEF      5       /* external definition */
      42: #define LABEL       6       /* label definition */
      43: #define ULABEL      7       /* undefined label reference */
      44: #define MOS     8       /* member of structure */
      45: #define PARAM       9       /* parameter */
      46: #define STNAME      10      /* structure name */
      47: #define MOU     11      /* member of union */
      48: #define UNAME       12      /* union name */
      49: #define TYPEDEF     13      /* typedef name */
      50: #define FORTRAN     14      /* fortran function */
      51: #define ENAME       15      /* enumeration name */
      52: #define MOE     16      /* member of enumeration */
      53: #define UFORTRAN    17      /* undefined fortran reference */
      54: #define USTATIC     18      /* undefined static reference */
      55:
      56: /* field size is ORed in */
      57: #define FIELD       0100
      58: #define FLDSIZ      077
      59: #ifndef BUG1
      60: extern  char *scnames();
      61: #endif
      62:
      63: /*
      64:  * Symbol table flags
      65:  */
      66: #define SMOS        01      /* member of structure */
      67: #define SHIDDEN     02      /* hidden in current scope */
      68: #define SHIDES      04      /* hides symbol in outer scope */
      69: #define SSET        010     /* symbol assigned to */
      70: #define SREF        020     /* symbol referenced */
      71: #define SNONUNIQ    040     /* non-unique structure member */
      72: #define STAG        0100        /* structure tag name */
      73:
      74: /*
      75:  * Location counters
      76:  */
      77: #define PROG        0       /* program segment */
      78: #define DATA        1       /* data segment */
      79: #define ADATA       2       /* array data segment */
      80: #define STRNG       3       /* string data segment */
      81: #define ISTRNG      4       /* initialized string segment */
      82: #define STAB        5       /* symbol table segment */
      83:
      84:
      85: #ifndef ONEPASS
      86: #include "ndu.h"
      87: #endif
      88:
      89:
      90: #ifndef FIXDEF
      91: #define FIXDEF(p)
      92: #endif
      93: #ifndef FIXARG
      94: #define FIXARG(p)
      95: #endif
      96: #ifndef FIXSTRUCT
      97: #define FIXSTRUCT(a,b)
      98: #endif
      99:
     100:     /* alignment of initialized quantities */
     101: #ifndef AL_INIT
     102: #define AL_INIT ALINT
     103: #endif
     104:
     105: /*
     106:  * External definitions
     107:  */
     108: struct sw {     /* switch table */
     109:     CONSZ   sval;   /* case value */
     110:     int slab;   /* associated label */
     111: };
     112: extern  struct sw swtab[];
     113: extern  struct sw *swp;
     114: extern  int swx;
     115:
     116: extern  int ftnno;
     117: extern  int blevel;
     118: extern  int instruct, stwart;
     119:
     120: extern  int lineno, nerrors;
     121:
     122: extern  CONSZ lastcon;
     123: extern  float fcon;
     124: extern  double dcon;
     125:
     126: extern  char ftitle[];
     127: #ifndef LINT
     128: extern  char ititle[];
     129: #endif
     130: extern  struct symtab stab[];
     131: extern  int curftn;
     132: extern  int curclass;
     133: extern  int curdim;
     134: extern  OFFSZ dimtab[];
     135: extern  OFFSZ paramstk[];
     136: extern  int paramno;
     137: extern  OFFSZ autooff, argoff, strucoff;
     138: extern  int regvar;
     139: extern  int minrvar;
     140: extern  int brkflag;
     141: typedef union {
     142:     int intval;
     143:     NODE * nodep;
     144:     } YYSTYPE;
     145: extern  YYSTYPE yylval;
     146: extern  char yytext[];
     147:
     148: extern  int strflg;
     149:
     150: extern  OFFSZ inoff;
     151:
     152: extern  int reached;
     153:
     154: /* tunnel to buildtree for name id's */
     155: extern  int idname;
     156:
     157: extern  NODE node[];
     158: extern  NODE *lastfree;
     159:
     160: extern  int cflag, hflag, pflag;
     161:
     162: /* various labels */
     163: extern  int brklab;
     164: extern  int contlab;
     165: extern  int flostat;
     166: extern  int retlab;
     167: extern  int retstat;
     168: extern  int asavbc[], *psavbc;
     169:
     170: /* declarations of various functions */
     171: extern  NODE
     172:     *buildtree(),
     173:     *bdty(),
     174:     *mkty(),
     175:     *rstruct(),
     176:     *dclstruct(),
     177:     *getstr(),
     178:     *tymerge(),
     179:     *stref(),
     180:     *offcon(),
     181:     *bcon(),
     182:     *bpsize(),
     183:     *convert(),
     184:     *pconvert(),
     185:     *oconvert(),
     186:     *ptmatch(),
     187:     *tymatch(),
     188:     *makety(),
     189:     *block(),
     190:     *doszof(),
     191:     *talloc(),
     192:     *optim(),
     193:     *fixargs(),
     194:     *clocal();
     195: OFFSZ   tsize(),
     196:     psize();
     197: TWORD   types();
     198: double  atof();
     199: char    *exname(), *exdcon();
     200:
     201: #define checkst(x)
     202:
     203: #ifndef CHARCAST
     204: /* to make character constants into character connstants */
     205: /* this is a macro to defend against cross-compilers, etc. */
     206: #define CHARCAST(x) (char)(x)
     207: #endif
     208: #endif
     209:
     210: /*
     211:  * Flags used in structures/unions
     212:  */
     213: #define SEENAME     01
     214: #define INSTRUCT    02
     215: #define INUNION     04
     216: #define FUNNYNAME   010
     217: #define TAGNAME     020
     218:
     219: /*
     220:  * Flags used in the (elementary) flow analysis ...
     221:  */
     222: #define FBRK        02
     223: #define FCONT       04
     224: #define FDEF        010
     225: #define FLOOP       020
     226:
     227: /*
     228:  * Flags used for return status
     229:  */
     230: #define RETVAL      1
     231: #define NRETVAL     2
     232:
     233: #define NONAME      040000      /* marks constant w/o name field */
     234: #define NOOFFSET    (-10201)    /* mark an offset which is undefined */

#### Defined struct's

sw defined in line 108; used 10 times

- in line 112-113(4)
- in /usr/src/lib/mip/cgram.y line 893(2)
- in /usr/src/lib/mip/xdefs.c line 51-52(4)

symtab defined in line 16; used 68 times

- in line 22(2), 130(2)
- in /usr/src/lib/mip/pftn.c line 9(2), 29-37(6), 433(2), 467(2), 538(2), 842(2), 882(2), 1136(2), 1244(2), 1281(2), 1400(2), 1703-1708(4), 1746(2), 1808(2), 1833-1836(6), 1853-1855(4), 1902(2), 1929-1930(4), 1950-1951(4)
- in /usr/src/lib/mip/scan.c line 503(2)
- in /usr/src/lib/mip/trees.c line 88(2), 823(2), 1573(2)
- in /usr/src/lib/mip/xdefs.c line 22(2)

#### Defined macros

ADATA defined in line 79; used 1 times

- in /usr/src/lib/mip/pftn.c line 862

AL_INIT defined in line 102; used 2 times

- in line 101
- in /usr/src/lib/mip/pftn.c line 1035

AUTO defined in line 37; used 7 times

- in /usr/src/lib/mip/pftn.c line 914, 1061, 1253, 1379, 1612, 1658
- in /usr/src/lib/mip/scan.c line 838

CHARCAST defined in line 206; used 2 times

- in line 203
- in /usr/src/lib/mip/scan.c line 400

DATA defined in line 78; used 3 times

- in /usr/src/lib/mip/pftn.c line 427, 862
- in /usr/src/lib/mip/trees.c line 1537

ENAME defined in line 51; used 4 times

- in /usr/src/lib/mip/pftn.c line 134, 304, 477, 528

EXTDEF defined in line 41; used 7 times

- in /usr/src/lib/mip/cgram.y line 77
- in /usr/src/lib/mip/pftn.c line 227, 290, 949, 1397, 1411, 1610

EXTERN defined in line 38; used 12 times

- in /usr/src/lib/mip/cgram.y line 726, 780
- in /usr/src/lib/mip/pftn.c line 173, 226, 279, 851(2), 1055, 1383, 1597, 1623
- in /usr/src/lib/mip/scan.c line 846

FBRK defined in line 222; used 4 times

- in /usr/src/lib/mip/cgram.y line 423, 441, 450, 456

FCONT defined in line 223; used 4 times

- in /usr/src/lib/mip/cgram.y line 429, 437, 451, 463

FDEF defined in line 224; used 2 times

- in /usr/src/lib/mip/cgram.y line 450, 518

FIELD defined in line 57; used 16 times

- in /usr/src/lib/mip/cgram.y line 235-239(2)
- in /usr/src/lib/mip/pftn.c line 93-95(2), 146, 252, 328, 594, 907, 932, 1360, 1635
- in /usr/src/lib/mip/trees.c line 349, 850, 861
- in /usr/src/lib/mip/xdefs.c line 109

FIXARG defined in line 94; used 2 times

- in line 93
- in /usr/src/lib/mip/pftn.c line 454

FIXDEF defined in line 91; used 4 times

- in line 90
- in /usr/src/lib/mip/pftn.c line 129, 390, 1023

FIXSTRUCT defined in line 97; used 2 times

- in line 96
- in /usr/src/lib/mip/pftn.c line 633

FLDSIZ defined in line 58; used 6 times

- in /usr/src/lib/mip/pftn.c line 148, 329, 595, 908
- in /usr/src/lib/mip/trees.c line 863
- in /usr/src/lib/mip/xdefs.c line 110

FLOOP defined in line 225; used 5 times

- in /usr/src/lib/mip/cgram.y line 423, 441, 546-550(2), 563

FORTRAN defined in line 50; used 7 times

- in /usr/src/lib/mip/pftn.c line 197-202(2), 279, 851, 1599
- in /usr/src/lib/mip/scan.c line 851
- in /usr/src/lib/mip/trees.c line 536

FUNNYNAME defined in line 216; used 3 times

- in /usr/src/lib/mip/scan.c line 534, 645, 710

INSTRUCT defined in line 214; used 17 times

- in /usr/src/lib/mip/cgram.y line 234, 244
- in /usr/src/lib/mip/pftn.c line 476-481(3), 489, 515, 575, 1237, 1574, 1608, 1636, 1647-1651(2)
- in /usr/src/lib/mip/scan.c line 534, 941-942(2)

INUNION defined in line 215; used 13 times

- in /usr/src/lib/mip/pftn.c line 476-477(2), 485-489(2), 520, 575, 1574, 1609, 1643, 1651
- in /usr/src/lib/mip/scan.c line 534, 947-948(2)

ISTRNG defined in line 81; used 1 times

- in /usr/src/lib/mip/pftn.c line 966

LABEL defined in line 42; used 6 times

- in /usr/src/lib/mip/cgram.y line 506-508(2)
- in /usr/src/lib/mip/pftn.c line 186, 241, 280, 346

MOE defined in line 52; used 2 times

- in /usr/src/lib/mip/pftn.c line 502, 526

MOS defined in line 44; used 5 times

- in /usr/src/lib/mip/pftn.c line 252, 516, 932, 1608
- in /usr/src/lib/mip/trees.c line 349

MOU defined in line 47; used 7 times

- in /usr/src/lib/mip/cgram.y line 206
- in /usr/src/lib/mip/pftn.c line 212, 252, 361, 521, 1609
- in /usr/src/lib/mip/trees.c line 349

NONAME defined in line 233; used 13 times

- in /usr/src/lib/mip/cgram.y line 734
- in /usr/src/lib/mip/optim.c line 16
- in /usr/src/lib/mip/trees.c line 305, 535, 657-659(4), 665, 906, 1602, 1649-1651(2)

NOOFFSET defined in line 234; used 2 times

- in /usr/src/lib/mip/pftn.c line 302, 1273

NRETVAL defined in line 231; used 2 times

- in /usr/src/lib/mip/cgram.y line 84, 467

PARAM defined in line 45; used 8 times

- in /usr/src/lib/mip/pftn.c line 452, 690, 1261, 1574-1575(2), 1611, 1657, 1689

PROG defined in line 77; used 5 times

- in /usr/src/lib/mip/cgram.y line 99
- in /usr/src/lib/mip/pftn.c line 347, 458
- in /usr/src/lib/mip/scan.c line 1005
- in /usr/src/lib/mip/trees.c line 1563

REGISTER defined in line 40; used 5 times

- in /usr/src/lib/mip/pftn.c line 914, 1061, 1272, 1575
- in /usr/src/lib/mip/scan.c line 857

RETVAL defined in line 230; used 1 times

- in /usr/src/lib/mip/cgram.y line 486

SEENAME defined in line 213; used 9 times

- in /usr/src/lib/mip/cgram.y line 172-174(2), 297, 304-306(2)
- in /usr/src/lib/mip/scan.c line 541, 941, 947, 953

SHIDDEN defined in line 67; used 4 times

- in /usr/src/lib/mip/pftn.c line 1781, 1839, 1937, 1971

SHIDES defined in line 68; used 2 times

- in /usr/src/lib/mip/pftn.c line 1892, 1938

SMOS defined in line 66; used 10 times

- in /usr/src/lib/mip/cgram.y line 213-215(2)
- in /usr/src/lib/mip/pftn.c line 1720, 1781, 1812, 1839, 1938, 1954, 1964
- in /usr/src/lib/mip/scan.c line 534

SNONUNIQ defined in line 71; used 6 times

- in /usr/src/lib/mip/pftn.c line 254, 260, 1720
- in /usr/src/lib/mip/trees.c line 353, 375, 402

SNULL defined in line 36; used 20 times

- in /usr/src/lib/mip/cgram.y line 67-69(2), 124-132(4), 140, 204-207(2), 298
- in /usr/src/lib/mip/pftn.c line 86, 412, 962, 1037, 1378, 1574, 1597, 1607, 1778
- in /usr/src/lib/mip/trees.c line 295

SREF defined in line 70; never used
SSET defined in line 69; used 1 times

- in /usr/src/lib/mip/pftn.c line 371

STAB defined in line 82; never used
STAG defined in line 72; used 7 times

- in /usr/src/lib/mip/pftn.c line 1781, 1812, 1839, 1938, 1954, 1964
- in /usr/src/lib/mip/scan.c line 532

STATIC defined in line 39; used 10 times

- in /usr/src/lib/mip/cgram.y line 77(2)
- in /usr/src/lib/mip/pftn.c line 174, 181, 949, 1388, 1397-1399(2), 1598
- in /usr/src/lib/mip/scan.c line 862

STNAME defined in line 46; used 5 times

- in /usr/src/lib/mip/pftn.c line 134, 257, 304, 477, 518

STRNG defined in line 80; used 1 times

- in /usr/src/lib/mip/pftn.c line 966

TAGNAME defined in line 217; used 4 times

- in /usr/src/lib/mip/scan.c line 532, 941, 947, 953

TYPEDEF defined in line 49; used 2 times

- in /usr/src/lib/mip/scan.c line 536, 863

UFORTRAN defined in line 53; used 5 times

- in /usr/src/lib/mip/pftn.c line 197-201(2), 280, 1599
- in /usr/src/lib/mip/trees.c line 536

ULABEL defined in line 43; used 4 times

- in /usr/src/lib/mip/cgram.y line 494
- in /usr/src/lib/mip/pftn.c line 185, 241, 1872

UNAME defined in line 48; used 6 times

- in /usr/src/lib/mip/pftn.c line 134, 258, 304, 477, 523, 1055

USTATIC defined in line 54; used 3 times

- in /usr/src/lib/mip/pftn.c line 173, 181, 1598

_PASS1_ defined in line 4; used 1 times

- in line 3

checkst defined in line 201; used 4 times

- in /usr/src/lib/mip/cgram.y line 382, 392
- in /usr/src/lib/mip/pftn.c line 409, 1804

#### Usage of this include

pass1.h used 7 times

- in /usr/src/lib/mip/cgram.y line 35
- in /usr/src/lib/mip/common.c line 6
- in /usr/src/lib/mip/optim.c line 5
- in /usr/src/lib/mip/pftn.c line 5
- in /usr/src/lib/mip/scan.c line 5
- in /usr/src/lib/mip/trees.c line 5
- in /usr/src/lib/mip/xdefs.c line 5

Last modified: 1991-07-28 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 1653 |