cell Struct Reference

Basic Lisp entity. More...

#include <picell.h>

Collaboration diagram for cell:

Data Fields

unsigned char type
 
unsigned char marked
 type of the cell referred to the type enum More...
 
unsigned long marks
 1 if marked in the "mark" phase of the gc More...
 
union {
   int   value
 
   char *   str
 value of the num cell More...
 
   struct cell *   next_free_cell
 string of the string cell More...
 
   struct {
      struct cell *   car
 
      struct cell *   cdr
 car of the cons cell More...
 
   } 
 pointer to the next free cell for cells of type free More...
 
   struct {
      char *   sym
 
      union {
         struct {
            struct cell *(*   bl )(struct cell *args)
 
            void(*   bs )(size_t stack_base, unsigned
               char nargs)
 
         } 
 
         struct cell *(*   bm )(struct cell *args, struct
            cell *env)
 
      } 
 
   } 
 
}; 
 number of cells that refer to this cell More...
 

Detailed Description

Basic Lisp entity.

Every cell has a type identifier (referred to the type enum). It identifies the type of the cell. marked and marks are fields used to collect garbage.

Field Documentation

union { ... }

number of cells that refer to this cell

struct cell*(* cell::bl)(struct cell *args)
struct cell*(* cell::bm)(struct cell *args, struct cell *env)
void(* cell::bs)(size_t stack_base, unsigned char nargs)

pointer to builtin lambda function for builtin lambdas

struct cell* cell::car
struct cell* cell::cdr

car of the cons cell

unsigned char cell::marked

type of the cell referred to the type enum

unsigned long cell::marks

1 if marked in the "mark" phase of the gc

struct cell* cell::next_free_cell

string of the string cell

char* cell::str

value of the num cell

char* cell::sym
unsigned char cell::type
int cell::value

The documentation for this struct was generated from the following file: