Go to the documentation of this file.
957 #define ERROR_SYMBOL_MASK 0xFFFFFFF0
959 #define ERROR_SYMBOL_MASK 0xFFFFFFFFFFFFFFF0
static lbm_value lbm_enc_i(lbm_int x)
Definition: heap.h:702
#define ERROR_SYMBOL_MASK
Definition: heap.h:957
lbm_value cdr
Definition: heap.h:205
static lbm_value lbm_enc_char(uint8_t x)
Definition: heap.h:746
#define LBM_NUMBER_MASK
Definition: lbm_defines.h:74
lbm_value lbm_enc_u32(uint32_t x)
Definition: heap.c:104
static lbm_uint lbm_heap_num_free(void)
Definition: heap.h:289
lbm_value lbm_car(lbm_value cons)
Definition: heap.c:902
#define LBM_PTR_BIT
Definition: lbm_defines.h:32
#define SPECIAL_SYMBOLS_END
Definition: lbm_defines.h:375
void lbm_heap_new_gc_time(lbm_uint dur)
void lbm_gc_state_inc(void)
Definition: heap.c:891
lbm_flash_status lbm_allocate_const_raw(lbm_uint nwords, lbm_uint *res)
Definition: heap.c:1401
#define LBM_TYPE_CHANNEL
Definition: lbm_defines.h:54
lbm_value lbm_list_append(lbm_value list1, lbm_value list2)
Definition: heap.c:1103
static lbm_uint lbm_dec_ptr(lbm_value p)
Definition: heap.h:678
#define ENC_SYM_CONT
Definition: lbm_defines.h:474
lbm_uint gc_num
Definition: heap.h:222
static bool lbm_is_channel(lbm_value x)
Definition: heap.h:879
bool(* const_heap_write_fun)(lbm_uint ix, lbm_uint w)
Definition: heap.h:233
lbm_uint size
Definition: heap.h:238
#define ENC_SYM_QUOTE
Definition: lbm_defines.h:460
static lbm_cons_t * lbm_ref_cell(lbm_value addr)
Definition: heap.h:970
int lbm_set_car_and_cdr(lbm_value c, lbm_value car_val, lbm_value cdr_val)
Definition: heap.c:1002
lbm_value lbm_enc_double(double x)
Definition: heap.c:165
#define LBM_PTR_TYPE_MASK
Definition: lbm_defines.h:34
static bool lbm_is_continuation(lbm_value exp)
Definition: heap.h:899
lbm_int lbm_dec_as_int(lbm_value val)
Definition: heap.c:407
#define LBM_LOW_RESERVED_BITS
Definition: lbm_defines.h:81
static bool lbm_is_quoted_list(lbm_value x)
Definition: heap.h:948
int32_t lbm_dec_as_i32(lbm_value val)
Definition: heap.c:307
uint32_t lbm_uint
Definition: lbm_types.h:48
void lbm_gc_mark_env(lbm_value)
Definition: heap.c:790
lbm_flash_status lbm_const_write(lbm_uint *tgt, lbm_uint val)
Definition: heap.c:1433
static lbm_uint lbm_dec_sym(lbm_value x)
Definition: heap.h:762
static bool lbm_is_macro(lbm_value exp)
Definition: heap.h:905
static bool lbm_is_cons_rw(lbm_value x)
Definition: heap.h:821
static bool lbm_is_lisp_array_r(lbm_value x)
Definition: heap.h:869
unsigned int lbm_list_length_pred(lbm_value c, bool *pres, bool(*pred)(lbm_value))
Definition: heap.c:1026
#define ENC_SYM_CHANNEL_TYPE
Definition: lbm_defines.h:416
lbm_value lbm_cadr(lbm_value c)
Definition: heap.c:939
lbm_uint heap_size
Definition: heap.h:216
#define LBM_TYPE_SYMBOL
Definition: lbm_defines.h:76
static bool lbm_heap_array_valid(lbm_value arr)
Definition: heap.h:850
lbm_value lbm_list_drop(unsigned int n, lbm_value ls)
Definition: heap.c:1119
uint32_t lbm_dec_as_u32(lbm_value val)
Definition: heap.c:283
@ LBM_FLASH_FULL
Definition: heap.h:196
double lbm_dec_double(lbm_value x)
Definition: heap.c:195
int64_t lbm_dec_i64(lbm_value x)
Definition: heap.c:220
static bool lbm_is_symbol_nil(lbm_value exp)
Definition: heap.h:834
double lbm_dec_as_double(lbm_value val)
Definition: heap.c:457
lbm_value lbm_cdr(lbm_value cons)
Definition: heap.c:957
int lbm_heap_allocate_lisp_array(lbm_value *res, lbm_uint size)
Definition: heap.c:1215
lbm_value lbm_heap_allocate_list(lbm_uint n)
Definition: heap.c:573
lbm_heap_state_t lbm_heap_state
Definition: heap.c:65
void lbm_gc_mark_aux(lbm_uint *data, lbm_uint n)
Definition: heap.c:806
lbm_uint heap_bytes
Definition: heap.h:217
@ LBM_FLASH_WRITE_ERROR
Definition: heap.h:197
static bool lbm_is_symbol_merror(lbm_value exp)
Definition: heap.h:936
lbm_uint num_alloc
Definition: heap.h:219
const uint8_t * lbm_heap_array_get_data_ro(lbm_value arr)
Definition: heap.c:1262
char * lbm_dec_str(lbm_value val)
Definition: heap.c:231
static bool lbm_is_error(lbm_value v)
Definition: heap.h:963
lbm_uint lbm_flash_memory_usage(void)
Definition: heap.c:1460
static bool lbm_is_comma_qualified_symbol(lbm_value exp)
Definition: heap.h:917
lbm_uint lbm_heap_size(void)
Definition: heap.c:632
lbm_flash_status lbm_write_const_raw(lbm_uint *data, lbm_uint n, lbm_uint *res)
Definition: heap.c:1414
float lbm_dec_as_float(lbm_value val)
Definition: heap.c:432
void lbm_nil_freelist(void)
Definition: heap.c:508
#define ENC_SYM_COMMA
Definition: lbm_defines.h:447
static bool lbm_is_special(lbm_value symrep)
Definition: heap.h:888
lbm_value lbm_list_destructive_reverse(lbm_value list)
Definition: heap.c:1059
int lbm_const_heap_init(const_heap_write_fun w_fun, lbm_const_heap_t *heap, lbm_uint *addr, lbm_uint num_words)
Definition: heap.c:1351
uint64_t lbm_dec_u64(lbm_value x)
Definition: heap.c:209
lbm_uint next
Definition: heap.h:237
lbm_cons_t * heap
Definition: heap.h:212
#define LBM_ADDRESS_SHIFT
Definition: lbm_defines.h:28
#define ENC_SYM_EVAL
Definition: lbm_defines.h:491
static bool lbm_is_array_r(lbm_value x)
Definition: heap.h:858
lbm_value lbm_index_list(lbm_value l, int32_t n)
Definition: heap.c:1129
lbm_uint gc_recovered
Definition: heap.h:224
static lbm_value lbm_enc_u(lbm_uint x)
Definition: heap.h:706
lbm_value lbm_caar(lbm_value c)
Definition: heap.c:920
#define LBM_PTR_TO_CONSTANT_BIT
Definition: lbm_defines.h:38
static lbm_value lbm_enc_sym(lbm_uint s)
Definition: heap.h:698
static bool lbm_is_closure(lbm_value exp)
Definition: heap.h:893
Definition: lbm_channel.h:68
int lbm_heap_allocate_array(lbm_value *res, lbm_uint size)
Definition: heap.c:1211
static bool lbm_is_match_binder(lbm_value exp)
Definition: heap.h:911
#define ENC_SYM_TRUE
Definition: lbm_defines.h:394
#define ENC_SYM_CLOSURE
Definition: lbm_defines.h:475
void lbm_gc_mark_phase(lbm_value root)
Definition: heap.c:716
void lbm_get_heap_state(lbm_heap_state_t *)
Definition: heap.c:640
lbm_flash_status write_const_car(lbm_value cell, lbm_value val)
Definition: heap.c:1453
#define LBM_PTR_TO_CONSTANT_MASK
Definition: lbm_defines.h:39
static lbm_type lbm_type_of_functional(lbm_value x)
Definition: heap.h:668
lbm_uint lbm_list_length(lbm_value c)
Definition: heap.c:1014
lbm_flash_status lbm_allocate_const_cell(lbm_value *res)
Definition: heap.c:1380
lbm_uint lbm_heap_size_bytes(void)
Definition: heap.c:636
int lbm_heap_explicit_free_array(lbm_value arr)
Definition: heap.c:1298
static uint8_t lbm_dec_char(lbm_value x)
Definition: heap.h:758
lbm_cons_t * lbm_heaps[2]
Definition: heap.c:69
static bool lbm_is_number(lbm_value x)
Definition: heap.h:842
lbm_stack_t gc_stack
Definition: heap.h:214
int lbm_gc_sweep_phase(void)
Definition: heap.c:827
lbm_value car
Definition: heap.h:204
lbm_uint lbm_get_gc_stack_max(void)
Definition: heap.c:644
static lbm_uint lbm_dec_u(lbm_value x)
Definition: heap.h:754
lbm_uint lbm_size_of(lbm_type t)
Definition: heap.c:1318
int lbm_set_car(lbm_value c, lbm_value v)
Definition: heap.c:981
static lbm_cons_t * lbm_dec_heap(lbm_value p)
Definition: heap.h:689
uint8_t * lbm_heap_array_get_data_rw(lbm_value arr)
Definition: heap.c:1271
static bool lbm_is_lisp_array_rw(lbm_value x)
Definition: heap.h:874
@ LBM_FLASH_WRITE_OK
Definition: heap.h:195
static lbm_value lbm_set_ptr_type(lbm_value p, lbm_type t)
Definition: heap.h:694
static bool lbm_is_ptr(lbm_value x)
Definition: heap.h:812
#define LBM_TYPE_ARRAY
Definition: lbm_defines.h:52
lbm_value lbm_cons(lbm_value car, lbm_value cdr)
Definition: heap.c:898
int64_t lbm_dec_as_i64(lbm_value val)
Definition: heap.c:332
lbm_flash_status
Definition: heap.h:194
lbm_value freelist
Definition: heap.h:213
#define LBM_VAL_SHIFT
Definition: lbm_defines.h:29
lbm_uint gc_least_free
Definition: heap.h:226
#define ENC_SYM_MACRO
Definition: lbm_defines.h:473
static lbm_value lbm_enc_cons_ptr(lbm_uint x)
Definition: heap.h:674
int lbm_heap_init(lbm_cons_t *addr, lbm_uint num_cells, lbm_uint gc_stack_size)
Definition: heap.c:538
#define LBM_TYPE_I
Definition: lbm_defines.h:79
lbm_value lbm_enc_u64(uint64_t x)
Definition: heap.c:155
static int32_t lbm_dec_i32(lbm_value x)
Definition: heap.h:793
lbm_uint lbm_heap_num_allocated(void)
Definition: heap.c:629
lbm_value lbm_list_copy(int *m, lbm_value list)
Definition: heap.c:1076
static lbm_int lbm_dec_i(lbm_value x)
Definition: heap.h:750
lbm_uint num_alloc_arrays
Definition: heap.h:220
lbm_uint gc_recovered_arrays
Definition: heap.h:225
lbm_value lbm_heap_allocate_list_init(unsigned int n,...)
Definition: heap.c:621
lbm_char_channel_t * lbm_dec_channel(lbm_value val)
Definition: heap.c:241
#define LBM_TYPE_LISPARRAY
Definition: lbm_defines.h:56
void lbm_gc_unlock(void)
Definition: heap.c:87
lbm_value lbm_heap_allocate_list_init_va(unsigned int n, va_list valist)
Definition: heap.c:597
static uint32_t lbm_dec_u32(lbm_value x)
Definition: heap.h:779
lbm_uint gc_last_free
Definition: heap.h:227
lbm_uint * heap
Definition: heap.h:236
int lbm_set_cdr(lbm_value c, lbm_value v)
Definition: heap.c:992
void lbm_heap_new_freelist_length(void)
Definition: heap.c:531
#define LBM_PTR_TO_CONSTANT_SHIFT
Definition: lbm_defines.h:40
void lbm_gc_mark_roots(lbm_uint *roots, lbm_uint num_roots)
Definition: heap.c:820
static lbm_type lbm_type_of(lbm_value x)
Definition: heap.h:663
lbm_uint gc_marked
Definition: heap.h:223
uint64_t lbm_dec_as_u64(lbm_value val)
Definition: heap.c:357
uint32_t lbm_value
Definition: lbm_types.h:44
int32_t lbm_int
Definition: lbm_types.h:49
#define ENC_SYM_MATCH_ANY
Definition: lbm_defines.h:424
static bool lbm_is_symbol_true(lbm_value exp)
Definition: heap.h:928
#define LBM_VAL_TYPE_MASK
Definition: lbm_defines.h:72
#define LBM_PTR_VAL_MASK
Definition: lbm_defines.h:33
#define LBM_TYPE_CONS
Definition: lbm_defines.h:43
void lbm_gc_lock(void)
Definition: heap.c:85
#define ENC_SYM_MERROR
Definition: lbm_defines.h:401
lbm_value lbm_enc_i32(int32_t x)
Definition: heap.c:94
#define LBM_TYPE_CHAR
Definition: lbm_defines.h:77
#define LBM_TYPE_U
Definition: lbm_defines.h:80
lbm_value lbm_list_reverse(lbm_value list)
Definition: heap.c:1040
static bool lbm_is_array_rw(lbm_value x)
Definition: heap.h:863
lbm_uint lbm_dec_as_uint(lbm_value val)
Definition: heap.c:382
static bool lbm_is_symbol(lbm_value exp)
Definition: heap.h:924
#define LBM_CONS_TYPE_MASK
Definition: lbm_defines.h:62
lbm_uint lbm_dec_raw(lbm_value v)
uint8_t lbm_dec_as_char(lbm_value a)
Definition: heap.c:258
lbm_value lbm_enc_float(float x)
Definition: heap.c:114
lbm_value lbm_enc_i64(int64_t x)
Definition: heap.c:145
lbm_uint lbm_get_gc_stack_size(void)
Definition: heap.c:648
static bool lbm_is_list_rw(lbm_value x)
Definition: heap.h:944
static bool lbm_is_list(lbm_value x)
Definition: heap.h:940
float lbm_dec_float(lbm_value x)
Definition: heap.c:181
lbm_value lbm_heap_allocate_cell(lbm_type ptr_type, lbm_value car, lbm_value cdr)
Definition: heap.c:557
lbm_uint lbm_dec_custom(lbm_value val)
Definition: heap.c:250
static bool lbm_is_cons(lbm_value x)
Definition: heap.h:830
uint32_t lbm_type
Definition: lbm_types.h:46
static lbm_uint lbm_dec_cons_cell_ptr(lbm_value p)
Definition: heap.h:684
lbm_int lbm_heap_array_get_size(lbm_value arr)
Definition: heap.c:1249
static bool lbm_is_symbol_eval(lbm_value exp)
Definition: heap.h:932
lbm_value lbm_cddr(lbm_value c)
Definition: heap.c:968
int lbm_lift_array(lbm_value *value, char *data, lbm_uint num_elt)
Definition: heap.c:1221
lbm_flash_status write_const_cdr(lbm_value cell, lbm_value val)
Definition: heap.c:1446
static bool lbm_is_char(lbm_value x)
Definition: heap.h:884