33 |
tfloat, |
tfloat, |
34 |
string, |
string, |
35 |
func, /* Function pointer */ |
func, /* Function pointer */ |
36 |
symb, |
symb, /* Symbol */ |
37 |
tcons |
tcons /* A pair of two values */ |
38 |
} type:4; /* Type of stack element */ |
} type:4; /* Type of stack element */ |
39 |
|
|
40 |
union { |
union { |
41 |
struct { |
struct { |
42 |
unsigned int mark:1; |
unsigned int mark:1; /* Used internally in the GC */ |
43 |
unsigned int protect:1; |
unsigned int protect:1; /* Protect from GC */ |
44 |
} flag; |
} flag; |
45 |
unsigned int no_gc:2; |
unsigned int no_gc:2; /* Both flags as one integer */ |
46 |
} gc; |
} gc; /* Garbage collector stuff */ |
47 |
|
|
48 |
union { |
union { |
|
struct cons_struct *c; |
|
49 |
void *ptr; /* Pointer to the content */ |
void *ptr; /* Pointer to the content */ |
50 |
|
struct cons_struct *c; /* ...or a pointer to a cons cell */ |
51 |
int i; /* ...or an integer */ |
int i; /* ...or an integer */ |
52 |
float f; |
float f; /* ...or a floating point number */ |
53 |
} content; /* Stores a pointer or an integer */ |
} content; /* Stores a pointer or an integer */ |
54 |
|
|
55 |
} value; |
} value; |
62 |
struct stackitem_struct *next; /* Next item */ |
struct stackitem_struct *next; /* Next item */ |
63 |
} stackitem; |
} stackitem; |
64 |
|
|
65 |
typedef struct cons_struct { |
typedef struct cons_struct { /* A pair of two values */ |
66 |
value *car; |
value *car; |
67 |
value *cdr; |
value *cdr; |
68 |
} cons; |
} cons; |
85 |
stackitem *gc_ref; |
stackitem *gc_ref; |
86 |
int gc_limit, gc_count; |
int gc_limit, gc_count; |
87 |
|
|
88 |
cons *head; /* Head of the stack */ |
cons *head; /* Head of the stack */ |
89 |
hashtbl symbols; /* Hash table of all variable bindings */ |
hashtbl symbols; /* Hash table of all variable bindings */ |
90 |
int err; /* Error flag */ |
int err; /* Error flag */ |
91 |
char *in_string; /* Input pending to be read */ |
char *in_string; /* Input pending to be read */ |