/* * Alef portable globals and prototypes */ #define CPP "/bin/cpp" Extern int asm; Extern int chks; Extern int line; Extern int iline; Extern int nerr; Extern char *file; Extern int agundecl; Extern Biobuf *bin; Extern char symbol[1024]; Extern Type *builtype[Ntype]; Extern Node *rfun[Ntype]; Extern Node *sfun[Ntype]; Extern ulong nopconv[]; Extern ulong typeasgn[]; Extern char *sclass[]; Extern int Scope; Extern Tinfo *block[Sdepth]; Extern char *itab[]; Extern char flag[256]; Extern Inst *proghead; Extern Inst *ipc; Extern Inst *funentry; Extern char not[]; Extern char inverted[]; Extern ulong params; Extern ulong frame; Extern ulong maxframe; Extern ulong stmp; Extern int setbase; Extern int veccnt; Extern Node *curfunc; Extern Node *rnode; Extern Hist *hist; Extern Hist *ehist; Extern String *strdat; Extern int Owarn; Extern Stats stats; Extern Node *buildadt; Extern Type *parent; Extern Type *adtbfun; Extern int inpar; Extern int incrit; Extern int newflag; Extern int privreg; /* Synthesized for runtime */ Extern Node *procnode; Extern Node *sendnode; Extern Node *exitnode; Extern Node *selrecv; Extern Node *doselect; Extern Node *allocnode; Extern Node *unallocnode; Extern Node *pforknode; Extern Node *pexitnode; Extern Node *csndnode; Extern Node *crcvnode; Extern Node *challocnode; Extern Node *chunallocnode; Extern Node *tasknode; Extern Node *asfailnode; Extern Node *pdonenode; Extern Node *ginode; Extern Node *gonode; #define opt(s) flag[s] extern char *treeop[]; int VBconv(void*, int, int, int, int); Type* abt(int); void adtchk(Node*, Node*); Node* adtfunc(Tysym, Node*); void addarg(Node*, Node*); Type* aguntype(Node*); ulong align(ulong, Type*); Node* an(int, Node*, Node*); void applytagtype(Type*, Node*); void applytype(Type*, Node*); Type* at(int, Type*); Tinfo* atinfo(Node*, Type*); void buildtype(Node*); void chani(Type*, Node*); int chklval(Node*); void compile(char*, char*); Node* con(int); int convisnop(Type*, Type*); void coverset(Node *n); void derivetype(Node*); void diag(Node*, char*, ...); void doinit(Node*, Type*, Node*, int); Sym* enter(char*, int); void enterblock(void); void fatal(char*, ...); void framesize(Node*); void fundecl(Type*, Node*, Node*); void fungen(Node*, Node*); void funproto(Node*, Node*); void gendata(Node*); Node* invert(Node*); int ispow2(int); void kinit(void); void leaveblock(void); void linehist(char*, int); void listcount(Node*, Node**); Sym* lookup(char*); Sym* ltytosym(Type*); Type* mkcast(Type*, Node*); void newtype(Type*, Node*); int nodeconv(void*, int, int, int, int); int numsym(char); void objfile(char*); void outinit(void); void popjmp(Jmps**); void prnagun(Type*, int); int protocmp(Node*, Node*); int protoconv(void*, int, int, int, int); void ptree(Node*, int); void pushdcl(Node*); void pushjmp(Jmps**); void reginit(void); void rewrite(Node*); void selcode(Node*); void sfile(char*); Node* simpledecl(Type*, Node*); void stmnt(Node*); Node* strnode(String*); void strop(void); int tasgninit(Type*, Node*, int); void treeflat(Node*, Node**); int tyaddr(Node*); int tyalloc(Node*); int tyassert(Node*); int tycall(Node*); int tydot(Node*); int typechk(Node*, int); int typechk(Node*, int); int typecmp(Type*, Type*, int); int typeconv(void*, int, int, int, int); Type* typecopy(Type*, int); void typeinit(void); void typesu(Node*); void typesut(Type*); int typeval(ulong*, Type*, Type*); void typroc(Node*, Node*); int tyrecv(Node*); int tysend(Node*); int tyunalloc(Node*); Node* vargptr(void); Type* walktype(Type*, Node*, int*); void warn(Node*, char*, ...); void yyerror(char*, ...); int yylex(void); int yylex(void); int yyparse(void); int promote(Node*, Node*);