summaryrefslogtreecommitdiff
path: root/parse/parse.h
diff options
context:
space:
mode:
authorOri Bernstein <ori@markovcorp.com>2019-02-26 13:03:14 -0800
committerOri Bernstein <ori@markovcorp.com>2019-02-26 13:03:14 -0800
commit02201160614e5f25a7a73d86ed26a1f90fa4f5bb (patch)
treece958c6982673794612cf2ea91ab8b353bf4c243 /parse/parse.h
parent16a7bb8f8cc86b22ce157e0944f66f60a556590f (diff)
downloadmc-02201160614e5f25a7a73d86ed26a1f90fa4f5bb.tar.gz
Add support for `__fini__` functions.
Diffstat (limited to 'parse/parse.h')
-rw-r--r--parse/parse.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/parse/parse.h b/parse/parse.h
index 5cf7216..9be2f57 100644
--- a/parse/parse.h
+++ b/parse/parse.h
@@ -1,4 +1,4 @@
-#define Abiversion 20
+#define Abiversion 21
typedef struct Srcloc Srcloc;
typedef struct Tysubst Tysubst;
@@ -217,9 +217,13 @@ struct Node {
Node **init; /* all __init__ function names of our deps. NB, this
is a Nname, not an Ndecl */
size_t ninit;
+ Node **fini; /* all __fini__ function names of our deps. NB, this
+ is a Nname, not an Ndecl */
+ size_t nfini;
Node **impl; /* impls defined in this file, across all namespaces */
size_t nimpl;
Node *localinit;/* and the local one, if any */
+ Node *localfini;/* and the local one, if any */
Stab *globls; /* global symtab */
Stab *builtins; /* global symtab */
Htab *ns; /* namespaces */
@@ -331,8 +335,9 @@ struct Node {
char ishidden;
char isimport;
char isnoret;
- char isexportinit;
+ char isexportval;
char isinit;
+ char isfini;
} decl;
struct {
@@ -549,7 +554,7 @@ Type *substget(Tysubst *subst, Type *from);
Node *specializedcl(Node *n, Type *param, Type *to, Node **name);
Type *tyspecialize(Type *t, Tysubst *tymap, Htab *delayed);
Node *genericname(Node *n, Type *param, Type *t);
-void geninit(void);
+void genautocall(Node **, size_t, Node *, char *);
/* usefiles */
void loaduses(void);