-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathtypeandname.h
39 lines (24 loc) · 914 Bytes
/
typeandname.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef TYPEANDNAME_H
#define TYPEANDNAME_H
// mingw needs this to get a definition of _off_t
#include <stdio.h>
#include <stdint.h>
struct typenode {
char *typename;
const struct typenode *superclass;
};
struct typeandname {
const struct typenode *ty;
const char *name;
int isarray, isconst, lineno, fn;
struct typeandname *next;
};
struct typenode *newtypenode(const char *typename, const struct typenode *superclass);
struct typeandname *newtypeandname(const struct typenode *ty, const char *name);
const struct typenode *getPrimitiveAncestor(const struct typenode *cur);
int isDerivedFrom(const struct typenode *cur, const struct typenode *base);
struct typenode* mkretty(const struct typenode *ty, uint8_t ret);
struct typenode* getTypePtr(const struct typenode *ty);
uint8_t getTypeTag(const struct typenode *ty);
int typeeq(const struct typenode*, const struct typenode*);
#endif