Pristine Ack-5.5
[Ack-5.5.git] / util / ego / share / alloc.h
1 /* $Id: alloc.h,v 1.6 1994/06/24 10:29:23 ceriel Exp $ */
2 /*
3  * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
4  * See the copyright notice in the ACK home directory, in the file "Copyright".
5  */
6 /*  I N T E R M E D I A T E   C O D E
7  *
8  *  C O R E   A L L O C A T I O N   A N D   D E A L L O C A T I O N
9  */
10
11 #ifdef DEBUG
12 extern char *newcore();
13 extern oldcore();
14 #else
15 extern char *myalloc();
16 #define newcore(size) myalloc(size)
17 #define oldcore(p,size) free((char *)p)
18 #endif
19
20 #define newstruct(t)    ((struct t *) newcore (sizeof (struct t)))
21 #define oldstruct(t,p)  oldcore((char *) p,sizeof (struct t))
22
23 extern line_p   newline();              /* (byte optype) */
24 extern arg_p    newarg();               /* (byte argtype) */
25 extern short    **newmap();             /* (short length)       */
26 extern cset     newbitvect();           /* (short nrbytes)      */
27 extern cond_p   newcondtab();
28
29
30 extern oldline() ;
31 extern oldargs() ;
32 extern oldargb() ;
33 extern oldobjects() ;
34 extern olddblock() ;
35 extern oldmap();
36 extern oldbitvect();                    /* (cset s, short nrbytes)      */
37 extern oldcondtab();
38
39 extern short *newtable();
40 extern oldtable();
41
42 #define newdblock()     (dblock_p) newstruct(dblock)
43 #define newobject()     (obj_p) newstruct(obj)
44 #define newproc()       (proc_p) newstruct(proc)
45 #define newargb()       (argb_p) newstruct(argbytes)
46 #define newbblock()     (bblock_p) newstruct(bblock)
47 #define newelem()       (elem_p) newstruct(elemholder)
48 #define newloop()       (loop_p) newstruct(loop)
49 #define newuse()        (use_p) newstruct(use)
50 #define newchange()     (change_p) newstruct(change)
51 #define newlocal()      (local_p) newstruct(local)
52
53 #define oldproc(x)      oldstruct(proc,x)
54 #define oldbblock(x)    oldstruct(bblock,x)
55 #define oldelem(x)      oldstruct(elemholder,x)
56 #define oldloop(x)      oldstruct(loop,x)
57 #define olduse(x)       oldstruct(use,x)
58 #define oldchange(x)    oldstruct(change,x)
59 #define oldlocal(x)     oldstruct(local,x)