picolisp

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/picolisp.git/
Log | Files | Refs | README | LICENSE

structures (2540B)


      1 
      2          Primary data types:
      3 
      4       xxxxxxxxxxxxxxxxxxxxxxxxxxxxx010 Number
      5       xxxxxxxxxxxxxxxxxxxxxxxxxxxxx100 Symbol
      6       xxxxxxxxxxxxxxxxxxxxxxxxxxxxx000 Pair
      7 
      8 
      9          Number
     10          |
     11          V
     12       +-----+-----+
     13       | DIG |  |  |
     14       +-----+--+--+
     15                |
     16                V
     17             +-----+-----+
     18             | DIG |  |  |
     19             +-----+--+--+
     20                      |
     21                      V
     22                   +-----+-----+
     23                   | DIG |  /  |
     24                   +-----+-----+
     25 
     26       Pair
     27       |
     28       V
     29       +-----+-----+
     30       | CAR | CDR |
     31       +-----+-----+
     32 
     33 
     34             Symbol
     35             |
     36             V
     37       +-----+-----+
     38       |  |  | VAL |
     39       +--+--+-----+
     40          | tail
     41          |
     42          V                                                      name
     43          +-----+-----+     +-----+-----+     +-----+-----+     +-----+-----+
     44          |  |  |  ---+---> | KEY |  ---+---> |  |  |  ---+---> |'cba'|  /  |
     45          +--+--+-----+     +-----+-----+     +--+--+-----+     +-----+-----+
     46             |                                   |
     47             V                                   V
     48             +-----+-----+                       +-----+-----+
     49             | VAL | KEY |                       | VAL | KEY |
     50             +-----+-----+                       +-----+-----+
     51 
     52 
     53       NIL:  /
     54             |
     55             V
     56       +-----+-----+-----+-----+
     57       |  /  |  /  |  /  |  /  |
     58       +-----+--+--+-----+-----+
     59 
     60 
     61 
     62          External Symbols:
     63 
     64                   +-------------+-+-------------+-+----+
     65       Block 0:    |   Free       0|   Next       0| << |
     66                   +-------------+-+-------------+-+----+
     67                   0               BLK                  2*Blk+1
     68 
     69 
     70                   +-------------+-+
     71       Free:       |   Link       0|
     72                   +-------------+-+
     73                   0
     74 
     75 
     76                   +-------------+-+----
     77       ID-Block:   |   Link       1| Data
     78                   +-------------+-+----
     79                   0              BLK
     80 
     81 
     82                   +-------------+-+----
     83       EXT-Block:  |   Link       n| Data
     84                   +-------------+-+----
     85                   0              BLK
     86 
     87 
     88 
     89       Assumptions:
     90 
     91    - 8 bits per byte
     92    - word: sizeof(void*) == sizeof(unsigned long)
     93    - word2: sizeof(unsigned long long) == 2 * sizeof(unsigned long)
     94    - gcc
     95       Functions aligned to 4-byte boundaries
     96       Zero- or variable-length arrays
     97       Conditionals with Omitted Operands
     98       Unused argument attributes
     99       Noreturn attributes