diff options
author | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2017-01-12 22:31:51 -0500 |
---|---|---|
committer | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2017-01-12 22:31:51 -0500 |
commit | 2b4ece6f99c18df090a127ec20c60ff05cbc0705 (patch) | |
tree | e8ef009433b47325520cd6b7f429409cccedce6b /all.h | |
parent | e38da51c14d9eaf8c53b58b3d2e33d7b37768f29 (diff) | |
download | roux-2b4ece6f99c18df090a127ec20c60ff05cbc0705.tar.gz |
use a less obtuse api for vnew()
Diffstat (limited to 'all.h')
-rw-r--r-- | all.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/all.h b/all.h index d2763eb..7243e09 100644 --- a/all.h +++ b/all.h @@ -490,13 +490,14 @@ struct Dat { /* main.c */ -enum Asm { - Gasmacho, - Gaself, -}; extern char debug['Z'+1]; /* util.c */ +typedef enum { + Pheap, /* free() necessary */ + Pfn, /* discarded after processing the function */ +} Pool; + extern Typ typ[NTyp]; extern Ins insb[NIns], *curi; void die_(char *, char *, ...) __attribute__((noreturn)); @@ -507,7 +508,7 @@ void emit(int, int, Ref, Ref, Ref); void emiti(Ins); void idup(Ins **, Ins *, ulong); Ins *icpy(Ins *, Ins *, ulong); -void *vnew(ulong, size_t, void *(size_t)); +void *vnew(ulong, size_t, Pool); void vfree(void *); void vgrow(void *, ulong); int clsmerge(short *, short); |