/[cvs]/stack/stack.h
ViewVC logotype

Diff of /stack/stack.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.10 by masse, Sun Mar 10 20:08:47 2002 UTC revision 1.11 by teddy, Mon Mar 11 08:53:00 2002 UTC
# Line 33  typedef struct { Line 33  typedef struct {
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;
# Line 62  typedef struct stackitem_struct Line 62  typedef struct stackitem_struct
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;
# Line 85  typedef struct { Line 85  typedef struct {
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 */

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

root@recompile.se
ViewVC Help
Powered by ViewVC 1.1.26