blob: 3962e772f855765f403868472b2f08db9c604b90 (
plain)
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
|
#ifndef PGF_EVALUATOR_H_
#define PGF_EVALUATOR_H_
struct PgfEvalState {
PgfPGF* pgf;
GuPool* pool;
GuExn* err;
GuBuf* stack;
};
typedef struct PgfClosure PgfClosure;
typedef struct PgfEvalState PgfEvalState;
typedef PgfClosure* (*PgfFunction)(PgfEvalState* state, PgfClosure* val);
struct PgfClosure {
PgfFunction code;
};
typedef struct {
PgfClosure header;
PgfAbsFun* absfun;
PgfClosure* args[];
} PgfValue;
PgfClosure*
pgf_evaluate_indirection(PgfEvalState* state, PgfClosure* closure);
PgfClosure*
pgf_evaluate_value(PgfEvalState* state, PgfClosure* closure);
void
pgf_evaluate_save_variables(PgfEvalState* state, PgfValue* val);
void
pgf_evaluate_slide(PgfEvalState* state, size_t a, size_t b);
#endif
|