-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlut.h
More file actions
35 lines (28 loc) · 740 Bytes
/
lut.h
File metadata and controls
35 lines (28 loc) · 740 Bytes
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
#ifndef LUT
#define LUT
#include "ast.h"
typedef struct Lut {
int size;
int index;
int max;
int stack_slots;
int all_time_max;
int search_offset;
ReturnType *types; // TODO: rename to rets
ReturnType **args;
int *arg_count;
char **names;
int *locs;
int defer_index;
int defer_size;
Node **defered_lookups;
} Lut;
extern void setupLut(Lut *lut, int size);
extern void resetLut(Lut *lut, int size);
extern int lutInsert(Lut *lut, Node *node, ReturnType t);
extern int lutFind(Lut *lut, Node *node);
extern int lutInsertFn(Lut *lut, Node *node, ReturnType t);
extern int lutFindFn(Lut *lut, Node *node);
extern int lutFindFnCall(Lut *lut, Node *node);
extern void deferLookup(Lut * lut, Node * node);
#endif