1 /* $Id: alloc.h,v 1.6 1994/06/24 10:29:23 ceriel Exp $ */
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".
6 /* I N T E R M E D I A T E C O D E
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
12 extern char *newcore();
15 extern char *myalloc();
16 #define newcore(size) myalloc(size)
17 #define oldcore(p,size) free((char *)p)
20 #define newstruct(t) ((struct t *) newcore (sizeof (struct t)))
21 #define oldstruct(t,p) oldcore((char *) p,sizeof (struct t))
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();
36 extern oldbitvect(); /* (cset s, short nrbytes) */
39 extern short *newtable();
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)
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)