Reduct  v1.0.4-3-gdaf0d70
A functional and immutable language.
Loading...
Searching...
No Matches
reduct_item_t Struct Reference

Item structure. More...

#include <item.h>

Collaboration diagram for reduct_item_t:

Data Fields

struct reduct_input * input
 The parsed input that created this item.
 
reduct_uint32_t position
 The position in the input buffer where the item was parsed.
 
reduct_item_flags_t flags
 Flags for the item.
 
reduct_item_type_t type
 The type of the item.
 
reduct_uint16_t retainCount
 The reference count for GC retention.
 
union { 
 
   reduct_uint32_t   length 
 Common length for the item. (Stored in the union to save space due to padding rules.) More...
 
   reduct_atom_t   atom 
 An atom. More...
 
   reduct_list_t   list 
 A list. More...
 
   reduct_list_node_t   node 
 A list node. More...
 
   reduct_function_t   function 
 A function. More...
 
   reduct_closure_t   closure 
 A closure. More...
 
   struct reduct_item *   free 
 The next free item in the free list. More...
 
   uint8_t   _raw [REDUCT_ITEM_PAYLOAD_MAX
 
};  
 

Detailed Description

Item structure.

Should be exactly 64 bytes for caching.

See also
Handle

Definition at line 56 of file item.h.

Field Documentation

◆ input

struct reduct_input* reduct_item_t::input

The parsed input that created this item.

Definition at line 58 of file item.h.

◆ position

reduct_uint32_t reduct_item_t::position

The position in the input buffer where the item was parsed.

Definition at line 59 of file item.h.

◆ flags

reduct_item_flags_t reduct_item_t::flags

Flags for the item.

Definition at line 60 of file item.h.

◆ type

reduct_item_type_t reduct_item_t::type

The type of the item.

Definition at line 61 of file item.h.

◆ retainCount

reduct_uint16_t reduct_item_t::retainCount

The reference count for GC retention.

Definition at line 62 of file item.h.

◆ length

reduct_uint32_t reduct_item_t::length

Common length for the item. (Stored in the union to save space due to padding rules.)

Definition at line 65 of file item.h.

◆ atom

reduct_atom_t reduct_item_t::atom

An atom.

Definition at line 66 of file item.h.

◆ list

reduct_list_t reduct_item_t::list

A list.

Definition at line 67 of file item.h.

◆ node

reduct_list_node_t reduct_item_t::node

A list node.

Definition at line 68 of file item.h.

◆ function

reduct_function_t reduct_item_t::function

A function.

Definition at line 69 of file item.h.

◆ closure

reduct_closure_t reduct_item_t::closure

A closure.

Definition at line 70 of file item.h.

◆ free

struct reduct_item* reduct_item_t::free

The next free item in the free list.

Definition at line 71 of file item.h.

◆ _raw

uint8_t reduct_item_t::_raw[REDUCT_ITEM_PAYLOAD_MAX]

Definition at line 72 of file item.h.

◆ [union]

union { ... } reduct_item_t

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