diff --git a/c-api/dispatch_8c.html b/c-api/dispatch_8c.html index 4a770085..1ad8408f 100644 --- a/c-api/dispatch_8c.html +++ b/c-api/dispatch_8c.html @@ -3,8 +3,7 @@ - - + Cyclone Scheme: dispatch.c File Reference @@ -12,6 +11,9 @@ + @@ -23,7 +25,7 @@ Logo
Cyclone Scheme -  0.4 +  0.9
@@ -31,19 +33,40 @@ - + - - - - + +
diff --git a/c-api/files.html b/c-api/files.html index d1b89571..6e5fe5b9 100644 --- a/c-api/files.html +++ b/c-api/files.html @@ -93,9 +93,10 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');   cyclone  runtime.h  types.h - gc.c - mstreams.c - runtime.c + dispatch.c + gc.c + mstreams.c + runtime.c
diff --git a/c-api/gc_8c.html b/c-api/gc_8c.html index cd96f34e..8b60e02f 100644 --- a/c-api/gc_8c.html +++ b/c-api/gc_8c.html @@ -200,6 +200,7 @@ Functions  Determine if a heap page is empty. More...
  int gc_is_mutator_active (gc_thread_data *thd) + Determine if the given mutator is in the list of active threads. More...
  int gc_is_stack_obj (gc_thread_data *thd, object obj)  Determine if object lives on the thread's stack. More...
diff --git a/c-api/gc_8c_a098c8f133063f61acf0ea4f61e02f759.html b/c-api/gc_8c_a098c8f133063f61acf0ea4f61e02f759.html index 45ef2849..50e2179a 100644 --- a/c-api/gc_8c_a098c8f133063f61acf0ea4f61e02f759.html +++ b/c-api/gc_8c_a098c8f133063f61acf0ea4f61e02f759.html @@ -186,7 +186,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
Value:
if (is_object_type(gobj) && (mark(gobj) == gc_color_clear || mark(gobj) == gc_color_purple)) { \
mark_stack = vpbuffer_add(mark_stack, &mark_stack_len, mark_stack_i++, gobj); \
}
#define mark(x)
Definition: types.h:245
#define is_object_type(x)
Definition: types.h:565
-
void ** vpbuffer_add(void **buf, int *len, int i, void *obj)
Definition: runtime.c:6062
+
void ** vpbuffer_add(void **buf, int *len, int i, void *obj)
Definition: runtime.c:6115

"Color" objects gray by adding them to the mark stack for further processing.

Parameters
diff --git a/c-api/globals_d.html b/c-api/globals_d.html index 2d9908f6..22f6ce6d 100644 --- a/c-api/globals_d.html +++ b/c-api/globals_d.html @@ -145,8 +145,8 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); : types.h
  • dispatch() -: runtime.c -, runtime.h +: runtime.h +, runtime.c
  • dispatch_apply_va() : runtime.h @@ -159,8 +159,8 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); : runtime.c
  • dispatch_display_va() -: runtime.c -, runtime.h +: runtime.h +, runtime.c
  • dispatch_div() : runtime.c @@ -181,7 +181,8 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); : runtime.c
  • do_dispatch() -: runtime.h +: dispatch.c +, runtime.h
  • double2buffer() : runtime.c diff --git a/c-api/globals_func_d.html b/c-api/globals_func_d.html index b90167ad..13f37be7 100644 --- a/c-api/globals_func_d.html +++ b/c-api/globals_func_d.html @@ -134,8 +134,8 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); , runtime.c
  • dispatch_apply_va() -: runtime.h -, runtime.c +: runtime.c +, runtime.h
  • dispatch_bytevector() : runtime.c @@ -144,8 +144,8 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); : runtime.c
  • dispatch_display_va() -: runtime.c -, runtime.h +: runtime.h +, runtime.c
  • dispatch_div() : runtime.c @@ -159,11 +159,12 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); , runtime.c
  • dispatch_write_va() -: runtime.h -, runtime.c +: runtime.c +, runtime.h
  • do_dispatch() -: runtime.h +: dispatch.c +, runtime.h
  • double2buffer() : runtime.c diff --git a/c-api/group__gc__major.html b/c-api/group__gc__major.html index 2dc58609..09ede996 100644 --- a/c-api/group__gc__major.html +++ b/c-api/group__gc__major.html @@ -265,6 +265,7 @@ Functions  Determine if a heap page is empty. More...
      int gc_is_mutator_active (gc_thread_data *thd) + Determine if the given mutator is in the list of active threads. More...
      int gc_is_stack_obj (gc_thread_data *thd, object obj)  Determine if object lives on the thread's stack. More...
    @@ -303,6 +304,7 @@ Functions  Remove selected mutator from the mutator list. This is done for terminated threads. Note data is queued to be freed, to prevent accidentally freeing it while the collector thread is potentially accessing it. More...
      void gc_request_mark_globals (void) + A helper function for calling gc_mark_globals. More...
      void gc_sleep_ms (int ms)  A high-resolution sleep function. More...
    diff --git a/c-api/group__gc__major_ga452874caf46453570916da23c202eaff.html b/c-api/group__gc__major_ga452874caf46453570916da23c202eaff.html index 04f4de57..d85c1723 100644 --- a/c-api/group__gc__major_ga452874caf46453570916da23c202eaff.html +++ b/c-api/group__gc__major_ga452874caf46453570916da23c202eaff.html @@ -181,6 +181,15 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
  • +

    Determine if the given mutator is in the list of active threads.

    +
    Parameters
    + + +
    thdThread data object of the m
    +
    +
    +
    Returns
    A true value if the mutator is active, 0 otherwise.
    +
    diff --git a/c-api/group__gc__major_gae4b0fc6e4b949f950ecf85d3135bfd9a.html b/c-api/group__gc__major_gae4b0fc6e4b949f950ecf85d3135bfd9a.html index a4771c93..01c06f32 100644 --- a/c-api/group__gc__major_gae4b0fc6e4b949f950ecf85d3135bfd9a.html +++ b/c-api/group__gc__major_gae4b0fc6e4b949f950ecf85d3135bfd9a.html @@ -181,6 +181,8 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    +

    A helper function for calling gc_mark_globals.

    +
    diff --git a/c-api/group__objects_gac02607b62d3c09dc61e88945a4ad3d46.html b/c-api/group__objects_gac02607b62d3c09dc61e88945a4ad3d46.html index 7e8fe1c6..feaee801 100644 --- a/c-api/group__objects_gac02607b62d3c09dc61e88945a4ad3d46.html +++ b/c-api/group__objects_gac02607b62d3c09dc61e88945a4ad3d46.html @@ -198,10 +198,10 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); Value:
    string_type cs; \
    { int len = strlen(s); \
    cs.hdr.mark = gc_color_red; \
    cs.hdr.grayed = 0; \
    cs.tag = string_tag; \
    cs.num_cp = Cyc_utf8_count_code_points((uint8_t *)s); \
    if (cs.num_cp < 0) { \
    Cyc_rt_raise_msg(data, "Invalid UTF-8 characters in string"); \
    } \
    cs.len = len; \
    cs.str = alloca(sizeof(char) * (len + 1)); \
    memcpy(cs.str, s, len + 1);}
    int num_cp
    Definition: types.h:812
    #define gc_color_red
    Definition: types.h:265
    Definition: types.h:56
    -
    void Cyc_rt_raise_msg(void *data, const char *err)
    Definition: runtime.c:579
    +
    void Cyc_rt_raise_msg(void *data, const char *err)
    Raise an exception from the runtime code.
    Definition: runtime.c:616
    char * str
    Definition: types.h:814
    The string type.
    Definition: types.h:809
    -
    int Cyc_utf8_count_code_points(uint8_t *s)
    Count the number of code points in a string. Based on example code from Bjoern Hoehrmann.
    Definition: runtime.c:7202
    +
    int Cyc_utf8_count_code_points(uint8_t *s)
    Count the number of code points in a string. Based on example code from Bjoern Hoehrmann.
    Definition: runtime.c:7263

    Create a new string in the nursery

    diff --git a/c-api/group__objects_gadc0228b3e0f11950f0647be264d12c69.html b/c-api/group__objects_gadc0228b3e0f11950f0647be264d12c69.html index 8b68382d..42b7b893 100644 --- a/c-api/group__objects_gadc0228b3e0f11950f0647be264d12c69.html +++ b/c-api/group__objects_gadc0228b3e0f11950f0647be264d12c69.html @@ -206,7 +206,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    string_tag
    Definition: types.h:56
    boolean_f
    const object boolean_f
    Definition: runtime.c:307
    string_type
    The string type.
    Definition: types.h:809
    -
    gc_alloc
    void * gc_alloc(gc_heap_root *h, size_t size, char *obj, gc_thread_data *thd, int *heap_grown)
    Allocate memory on the heap for an object.
    Definition: gc.c:1319
    +
    gc_alloc
    void * gc_alloc(gc_heap_root *h, size_t size, char *obj, gc_thread_data *thd, int *heap_grown)
    Allocate memory on the heap for an object.
    Definition: gc.c:1324
    MAX_STACK_OBJ
    #define MAX_STACK_OBJ
    Definition: types.h:450

    Allocate a new string, either on the stack or heap depending upon size

    diff --git a/c-api/group__objects_gaf9defd5753679e4fa891731cf487f8a8.html b/c-api/group__objects_gaf9defd5753679e4fa891731cf487f8a8.html index 6e6f6232..fc538bd5 100644 --- a/c-api/group__objects_gaf9defd5753679e4fa891731cf487f8a8.html +++ b/c-api/group__objects_gaf9defd5753679e4fa891731cf487f8a8.html @@ -201,7 +201,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    boolean_f
    const object boolean_f
    Definition: runtime.c:307
    bytevector_tag
    Definition: types.h:39
    bytevector_type
    Bytevector type.
    Definition: types.h:1053
    -
    gc_alloc
    void * gc_alloc(gc_heap_root *h, size_t size, char *obj, gc_thread_data *thd, int *heap_grown)
    Allocate memory on the heap for an object.
    Definition: gc.c:1319
    +
    gc_alloc
    void * gc_alloc(gc_heap_root *h, size_t size, char *obj, gc_thread_data *thd, int *heap_grown)
    Allocate memory on the heap for an object.
    Definition: gc.c:1324
    MAX_STACK_OBJ
    #define MAX_STACK_OBJ
    Definition: types.h:450
    diff --git a/c-api/group__prim__ch.html b/c-api/group__prim__ch.html index 4db668cc..8239dcf4 100644 --- a/c-api/group__prim__ch.html +++ b/c-api/group__prim__ch.html @@ -90,8 +90,10 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');

    Functions

    void Cyc_st_add (void *data, char *frame) + Register a frame in the stack trace circular buffer. More...
      void Cyc_st_print (void *data, FILE *out) + Print the contents of the given thread's stack trace buffer. More...
     

    Detailed Description

    diff --git a/c-api/group__prim__ch_ga4127fc5c21d280fe0b9b27e712963dea.html b/c-api/group__prim__ch_ga4127fc5c21d280fe0b9b27e712963dea.html index 5af276ca..7399bfc4 100644 --- a/c-api/group__prim__ch_ga4127fc5c21d280fe0b9b27e712963dea.html +++ b/c-api/group__prim__ch_ga4127fc5c21d280fe0b9b27e712963dea.html @@ -116,6 +116,15 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    +

    Print the contents of the given thread's stack trace buffer.

    +
    Parameters
    + + + +
    dataThread data object
    outOutput stream
    +
    +
    +
    diff --git a/c-api/group__prim__ch_gafd0f800629af6229494de3ccc8553c97.html b/c-api/group__prim__ch_gafd0f800629af6229494de3ccc8553c97.html index 4c8c05d8..9bf039b6 100644 --- a/c-api/group__prim__ch_gafd0f800629af6229494de3ccc8553c97.html +++ b/c-api/group__prim__ch_gafd0f800629af6229494de3ccc8553c97.html @@ -116,6 +116,15 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    +

    Register a frame in the stack trace circular buffer.

    +
    Parameters
    + + + +
    dataThread data object
    frameName of the frame
    +
    +
    +
    diff --git a/c-api/group__prim__err_ga099dcb668802d7bece1e4cdde826121d.html b/c-api/group__prim__err_ga099dcb668802d7bece1e4cdde826121d.html index 824c79a7..13b0b212 100644 --- a/c-api/group__prim__err_ga099dcb668802d7bece1e4cdde826121d.html +++ b/c-api/group__prim__err_ga099dcb668802d7bece1e4cdde826121d.html @@ -146,8 +146,8 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    Value:
    { \
    object l = Cyc_length(data, args); \
    if (num_args > obj_obj2int(l)) { \
    char buf[128]; \
    snprintf(buf, 127, "Expected %d arguments to %s but received %ld", \
    num_args, fnc_name, obj_obj2int(l)); \
    Cyc_rt_raise_msg(data, buf); \
    } \
    }
    void * object
    Definition: types.h:29
    -
    void Cyc_rt_raise_msg(void *data, const char *err)
    Definition: runtime.c:579
    -
    object Cyc_length(void *d, object l)
    Definition: runtime.c:1806
    +
    void Cyc_rt_raise_msg(void *data, const char *err)
    Raise an exception from the runtime code.
    Definition: runtime.c:616
    +
    object Cyc_length(void *d, object l)
    Definition: runtime.c:1843
    #define obj_obj2int(x)
    Definition: types.h:534
    diff --git a/c-api/group__prim__ex.html b/c-api/group__prim__ex.html index f88c8364..8ca69af8 100644 --- a/c-api/group__prim__ex.html +++ b/c-api/group__prim__ex.html @@ -90,14 +90,19 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');

    Functions

    object Cyc_current_exception_handler (void *data) + Return the current exception handler. More...
      object Cyc_default_exception_handler (void *data, int argc, closure _, object err) + The default exception handler. More...
      void Cyc_rt_raise (void *data, object err) + Raise an exception from the runtime code. More...
      void Cyc_rt_raise2 (void *data, const char *msg, object err) + Raise an exception from the runtime code. More...
      void Cyc_rt_raise_msg (void *data, const char *err) + Raise an exception from the runtime code. More...
     

    Detailed Description

    diff --git a/c-api/group__prim__ex_ga241a32109abd670c45cf2d32de1f3749.html b/c-api/group__prim__ex_ga241a32109abd670c45cf2d32de1f3749.html index 3eac72ce..c85ebc91 100644 --- a/c-api/group__prim__ex_ga241a32109abd670c45cf2d32de1f3749.html +++ b/c-api/group__prim__ex_ga241a32109abd670c45cf2d32de1f3749.html @@ -109,6 +109,15 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    +

    Return the current exception handler.

    +
    Parameters
    + + +
    dataThread data object
    +
    +
    +
    Returns
    Object registered as the exception handler, or the default if none.
    +
    diff --git a/c-api/group__prim__ex_ga69fec1851a68ae1da4c3e86b8f03e5f1.html b/c-api/group__prim__ex_ga69fec1851a68ae1da4c3e86b8f03e5f1.html index 3fc42491..20d89cbc 100644 --- a/c-api/group__prim__ex_ga69fec1851a68ae1da4c3e86b8f03e5f1.html +++ b/c-api/group__prim__ex_ga69fec1851a68ae1da4c3e86b8f03e5f1.html @@ -125,6 +125,16 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    +

    Raise an exception from the runtime code.

    +
    Parameters
    + + + + +
    dataThread data object
    msgA message describing the error
    errData for the error
    +
    +
    +
    diff --git a/c-api/group__prim__ex_ga8ff1002dd61c1880a5ba964a1b9c8677.html b/c-api/group__prim__ex_ga8ff1002dd61c1880a5ba964a1b9c8677.html index cc04375d..3723aab4 100644 --- a/c-api/group__prim__ex_ga8ff1002dd61c1880a5ba964a1b9c8677.html +++ b/c-api/group__prim__ex_ga8ff1002dd61c1880a5ba964a1b9c8677.html @@ -119,6 +119,15 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    +

    Raise an exception from the runtime code.

    +
    Parameters
    + + + +
    dataThread data object
    errA message describing the error
    +
    +
    +
    diff --git a/c-api/group__prim__ex_gac0f05c90f7cf2d8e54da46d1a658ddbd.html b/c-api/group__prim__ex_gac0f05c90f7cf2d8e54da46d1a658ddbd.html index 47455025..24cbf04b 100644 --- a/c-api/group__prim__ex_gac0f05c90f7cf2d8e54da46d1a658ddbd.html +++ b/c-api/group__prim__ex_gac0f05c90f7cf2d8e54da46d1a658ddbd.html @@ -131,6 +131,19 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    +

    The default exception handler.

    +
    Parameters
    + + +
    dataThread data object
    +
    +
    +
    Returns
    argc Unused, just here to maintain calling convention
    +
    +_ Unused, just here to maintain calling convention
    +
    +err Object containing data for the error
    +
    diff --git a/c-api/group__prim__ex_gad77973918f91fac723a0e0127004b8eb.html b/c-api/group__prim__ex_gad77973918f91fac723a0e0127004b8eb.html index 86106fcf..2914f24c 100644 --- a/c-api/group__prim__ex_gad77973918f91fac723a0e0127004b8eb.html +++ b/c-api/group__prim__ex_gad77973918f91fac723a0e0127004b8eb.html @@ -119,6 +119,15 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    +

    Raise an exception from the runtime code.

    +
    Parameters
    + + + +
    dataThread data object
    errData for the error
    +
    +
    +
    diff --git a/c-api/group__prim__gc.html b/c-api/group__prim__gc.html index 74eccab8..537a71c9 100644 --- a/c-api/group__prim__gc.html +++ b/c-api/group__prim__gc.html @@ -90,8 +90,10 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');

    Functions

    object copy2heap (void *data, object obj) + Copy given object to the heap, if it is from the stack. This function is intended to be called directly from application code. Note that only a shallow-copy is performed! For example, a pair object would be copied to the heap but its car and cdr objects would not. More...
      object Cyc_trigger_minor_gc (void *data, object cont) + Trigger a minor GC for the calling thread. More...
     

    Detailed Description

    diff --git a/c-api/group__prim__gc_gad596a9a4ff76ba451fc4765cc203847a.html b/c-api/group__prim__gc_gad596a9a4ff76ba451fc4765cc203847a.html index ec8da346..fcd9f6d1 100644 --- a/c-api/group__prim__gc_gad596a9a4ff76ba451fc4765cc203847a.html +++ b/c-api/group__prim__gc_gad596a9a4ff76ba451fc4765cc203847a.html @@ -116,6 +116,15 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    +

    Trigger a minor GC for the calling thread.

    +
    Parameters
    + + + +
    dataThread data object for the caller.
    contContinuation to invoke after GC.
    +
    +
    +
    diff --git a/c-api/group__prim__gc_gaf2a5abbfdbbad41ffc40e099b31918dc.html b/c-api/group__prim__gc_gaf2a5abbfdbbad41ffc40e099b31918dc.html index 0e398f4e..c474c380 100644 --- a/c-api/group__prim__gc_gaf2a5abbfdbbad41ffc40e099b31918dc.html +++ b/c-api/group__prim__gc_gaf2a5abbfdbbad41ffc40e099b31918dc.html @@ -116,6 +116,15 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    +

    Copy given object to the heap, if it is from the stack. This function is intended to be called directly from application code. Note that only a shallow-copy is performed! For example, a pair object would be copied to the heap but its car and cdr objects would not.

    +
    Parameters
    + + + +
    dataThread data object for the caller.
    objObject to copy.
    +
    +
    +
    diff --git a/c-api/group__prim__num_ga18cda2ca1598ea5144b4c48d4e75f2e0.html b/c-api/group__prim__num_ga18cda2ca1598ea5144b4c48d4e75f2e0.html index ed85987b..515168b1 100644 --- a/c-api/group__prim__num_ga18cda2ca1598ea5144b4c48d4e75f2e0.html +++ b/c-api/group__prim__num_ga18cda2ca1598ea5144b4c48d4e75f2e0.html @@ -188,7 +188,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    obj_obj2int
    #define obj_obj2int(x)
    Definition: types.h:534
    obj_is_int
    #define obj_is_int(x)
    Definition: types.h:528
    type_of
    #define type_of(obj)
    Definition: types.h:75
    -
    mp_get_double
    double mp_get_double(mp_int *a)
    Definition: runtime.c:1325
    +
    mp_get_double
    double mp_get_double(mp_int *a)
    Definition: runtime.c:1362
    integer_type
    Deprecated - boxed integers.
    Definition: types.h:709
    bignum_value
    #define bignum_value(x)
    Definition: types.h:789
    complex_num_value
    #define complex_num_value(x)
    Definition: types.h:792
    diff --git a/c-api/group__prim__num_ga7ad2cfc0cc5bb041054b8b05c954aa45.html b/c-api/group__prim__num_ga7ad2cfc0cc5bb041054b8b05c954aa45.html index 53a9d6fe..1a0157eb 100644 --- a/c-api/group__prim__num_ga7ad2cfc0cc5bb041054b8b05c954aa45.html +++ b/c-api/group__prim__num_ga7ad2cfc0cc5bb041054b8b05c954aa45.html @@ -187,7 +187,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    obj_obj2int
    #define obj_obj2int(x)
    Definition: types.h:534
    obj_is_int
    #define obj_is_int(x)
    Definition: types.h:528
    type_of
    #define type_of(obj)
    Definition: types.h:75
    -
    mp_get_double
    double mp_get_double(mp_int *a)
    Definition: runtime.c:1325
    +
    mp_get_double
    double mp_get_double(mp_int *a)
    Definition: runtime.c:1362
    make_double
    #define make_double(n, v)
    Definition: types.h:768
    integer_type
    Deprecated - boxed integers.
    Definition: types.h:709
    return_closcall1
    #define return_closcall1(td, clo, a1)
    Definition: mstreams.c:22
    diff --git a/c-api/group__prim__num_ga990d7992e7f6ac29158c196ac46ce33f.html b/c-api/group__prim__num_ga990d7992e7f6ac29158c196ac46ce33f.html index 31ca69b5..1a8708e3 100644 --- a/c-api/group__prim__num_ga990d7992e7f6ac29158c196ac46ce33f.html +++ b/c-api/group__prim__num_ga990d7992e7f6ac29158c196ac46ce33f.html @@ -180,7 +180,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    obj_obj2int
    #define obj_obj2int(x)
    Definition: types.h:534
    obj_is_int
    #define obj_is_int(x)
    Definition: types.h:528
    type_of
    #define type_of(obj)
    Definition: types.h:75
    -
    mp_get_double
    double mp_get_double(mp_int *a)
    Definition: runtime.c:1325
    +
    mp_get_double
    double mp_get_double(mp_int *a)
    Definition: runtime.c:1362
    integer_type
    Deprecated - boxed integers.
    Definition: types.h:709
    bignum_value
    #define bignum_value(x)
    Definition: types.h:789
    bignum_tag
    Definition: types.h:50
    diff --git a/c-api/group__prim__num_gae8ea3533e198e99a23b42b6d075fb560.html b/c-api/group__prim__num_gae8ea3533e198e99a23b42b6d075fb560.html index d577d504..83b28419 100644 --- a/c-api/group__prim__num_gae8ea3533e198e99a23b42b6d075fb560.html +++ b/c-api/group__prim__num_gae8ea3533e198e99a23b42b6d075fb560.html @@ -179,7 +179,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    obj_obj2int
    #define obj_obj2int(x)
    Definition: types.h:534
    obj_is_int
    #define obj_is_int(x)
    Definition: types.h:528
    type_of
    #define type_of(obj)
    Definition: types.h:75
    -
    mp_get_double
    double mp_get_double(mp_int *a)
    Definition: runtime.c:1325
    +
    mp_get_double
    double mp_get_double(mp_int *a)
    Definition: runtime.c:1362
    make_double
    #define make_double(n, v)
    Definition: types.h:768
    integer_type
    Deprecated - boxed integers.
    Definition: types.h:709
    return_closcall1
    #define return_closcall1(td, clo, a1)
    Definition: mstreams.c:22
    diff --git a/c-api/group__prim__thd.html b/c-api/group__prim__thd.html index 353fdc61..44870ca7 100644 --- a/c-api/group__prim__thd.html +++ b/c-api/group__prim__thd.html @@ -98,6 +98,7 @@ Functions void Cyc_start_trampoline (gc_thread_data *thd)   object Cyc_thread_sleep (void *data, object timeout) + Accept a number of seconds to sleep according to SRFI-18. More...
     

    Detailed Description

    diff --git a/c-api/group__prim__thd_gaf63ead0309cabbe85042540a794fad21.html b/c-api/group__prim__thd_gaf63ead0309cabbe85042540a794fad21.html index ebacb052..0d51f847 100644 --- a/c-api/group__prim__thd_gaf63ead0309cabbe85042540a794fad21.html +++ b/c-api/group__prim__thd_gaf63ead0309cabbe85042540a794fad21.html @@ -119,6 +119,8 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    +

    Accept a number of seconds to sleep according to SRFI-18.

    +
    diff --git a/c-api/group__prim__utf8.html b/c-api/group__prim__utf8.html index f71cb2bc..5ed928b7 100644 --- a/c-api/group__prim__utf8.html +++ b/c-api/group__prim__utf8.html @@ -91,10 +91,12 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');

    Macros

    #define CYC_UTF8_ACCEPT   0 + Successful state. More...
      #define Cyc_utf8_encode_char(dest, dest_size, char_value)   Cyc_utf8_encode(dest, dest_size, &char_value, 1)   #define CYC_UTF8_REJECT   1 + Invalid state. More...
      + + diff --git a/c-api/group__prim__utf8_ga03d50d398fe997bc0958497ae5e220b6.html b/c-api/group__prim__utf8_ga03d50d398fe997bc0958497ae5e220b6.html index ad862319..ad0ba0c4 100644 --- a/c-api/group__prim__utf8_ga03d50d398fe997bc0958497ae5e220b6.html +++ b/c-api/group__prim__utf8_ga03d50d398fe997bc0958497ae5e220b6.html @@ -109,6 +109,8 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');

    @@ -103,8 +105,10 @@ Functions

     Count the number of code points in a string. Based on example code from Bjoern Hoehrmann. More...
     
    int Cyc_utf8_count_code_points_and_bytes (uint8_t *s, char_type *codepoint, int *cpts, int *bytes)
     Count the number of code points and bytes in a string. More...
     
    uint32_t Cyc_utf8_decode (uint32_t *state, uint32_t *codep, uint32_t byte)
     Decode the next byte of a codepoint. Based on example code from Bjoern Hoehrmann. More...
     
    int Cyc_utf8_encode (char *dest, int sz, uint32_t *src, int srcsz)
     
    +

    Successful state.

    +
    diff --git a/c-api/group__prim__utf8_ga9158b37fabe72056d8e2dac07dc4e039.html b/c-api/group__prim__utf8_ga9158b37fabe72056d8e2dac07dc4e039.html index 59c6e8cf..6da2d2b1 100644 --- a/c-api/group__prim__utf8_ga9158b37fabe72056d8e2dac07dc4e039.html +++ b/c-api/group__prim__utf8_ga9158b37fabe72056d8e2dac07dc4e039.html @@ -114,6 +114,13 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');

    Count the number of code points in a string. Based on example code from Bjoern Hoehrmann.

    +
    Parameters
    + + +
    sString to examine
    +
    +
    +
    Returns
    The number of codepoints found, or -1 if there was an error.
    diff --git a/c-api/group__prim__utf8_ga9ac60b0dc066bee5cfc1c3a0e2bde641.html b/c-api/group__prim__utf8_ga9ac60b0dc066bee5cfc1c3a0e2bde641.html index 3821a08e..a8d6077e 100644 --- a/c-api/group__prim__utf8_ga9ac60b0dc066bee5cfc1c3a0e2bde641.html +++ b/c-api/group__prim__utf8_ga9ac60b0dc066bee5cfc1c3a0e2bde641.html @@ -129,6 +129,17 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    +

    Decode the next byte of a codepoint. Based on example code from Bjoern Hoehrmann.

    +
    Parameters
    + + + + +
    stateOut parameter, the state of the decoding
    codepOut parameter, contains the codepoint
    byteByte to examine
    +
    +
    +
    Returns
    The current state: CYC_UTF8_ACCEPT if successful otherwise CYC_UTF8_REJECT.
    +
    diff --git a/c-api/group__prim__utf8_gacd8ac4c362f3050f52b0ef076ad96376.html b/c-api/group__prim__utf8_gacd8ac4c362f3050f52b0ef076ad96376.html index d48cd4f7..423003ab 100644 --- a/c-api/group__prim__utf8_gacd8ac4c362f3050f52b0ef076ad96376.html +++ b/c-api/group__prim__utf8_gacd8ac4c362f3050f52b0ef076ad96376.html @@ -135,6 +135,18 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    +

    Count the number of code points and bytes in a string.

    +
    Parameters
    + + + + + +
    sString to examine
    codepointOut parameter, set to the codepoint.
    cptsOut parameter, set to the number of code points
    bytesOut parameter, set to the number of bytes
    +
    +
    +
    Returns
    Returns CYC_UTF8_ACCEPT on success, otherwise CYC_UTF8_REJECT.
    +
    diff --git a/c-api/group__prim__utf8_gae36b2d3bf5e2f989159fd3e6606a242a.html b/c-api/group__prim__utf8_gae36b2d3bf5e2f989159fd3e6606a242a.html index ca09a9bf..c0911f68 100644 --- a/c-api/group__prim__utf8_gae36b2d3bf5e2f989159fd3e6606a242a.html +++ b/c-api/group__prim__utf8_gae36b2d3bf5e2f989159fd3e6606a242a.html @@ -109,6 +109,8 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    +

    Invalid state.

    +
    diff --git a/c-api/mstreams_8c_a0d755ed34076754d1962ddf90947ef0c.html b/c-api/mstreams_8c_a0d755ed34076754d1962ddf90947ef0c.html index a1189aa7..37845adc 100644 --- a/c-api/mstreams_8c_a0d755ed34076754d1962ddf90947ef0c.html +++ b/c-api/mstreams_8c_a0d755ed34076754d1962ddf90947ef0c.html @@ -128,7 +128,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    Value:
    if (type_is_pair_prim(clo)) { \
    Cyc_apply(td, 0, (closure)(a1), clo); \
    } else { \
    ((clo)->fn)(td, 1, clo, a1);\
    }
    A closed-over function with no variables.
    Definition: types.h:1216
    -
    void Cyc_apply(void *data, int argc, closure cont, object prim,...)
    Definition: runtime.c:5086
    +
    void Cyc_apply(void *data, int argc, closure cont, object prim,...)
    Definition: runtime.c:5123
    #define type_is_pair_prim(clo)
    Definition: types.h:62

    Cyclone Scheme https://github.com/justinethier/cyclone

    Copyright (c) 2014-2016, Justin Ethier All rights reserved.

    diff --git a/c-api/mstreams_8c_ae252289600e88777aa66bf3ff503995d.html b/c-api/mstreams_8c_ae252289600e88777aa66bf3ff503995d.html index 42c3bd66..60fd5b05 100644 --- a/c-api/mstreams_8c_ae252289600e88777aa66bf3ff503995d.html +++ b/c-api/mstreams_8c_ae252289600e88777aa66bf3ff503995d.html @@ -132,7 +132,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    Definition: types.h:290
    #define closcall1(td, clo, a1)
    Definition: mstreams.c:16
    #define stack_overflow(x, y)
    Definition: types.h:454
    -
    void GC(void *, closure, object *, int)
    Definition: runtime.c:5461
    +
    void GC(void *, closure, object *, int)
    Definition: runtime.c:5506
    diff --git a/c-api/runtime_8c.html b/c-api/runtime_8c.html index 62ef18f0..424e4a79 100644 --- a/c-api/runtime_8c.html +++ b/c-api/runtime_8c.html @@ -494,6 +494,7 @@ Functions void clear_mutations (void *data)   object copy2heap (void *data, object obj) + Copy given object to the heap, if it is from the stack. This function is intended to be called directly from application code. Note that only a shallow-copy is performed! For example, a pair object would be copied to the heap but its car and cdr objects would not. More...
      void Cyc_apply (void *data, int argc, closure cont, object prim,...)   @@ -532,8 +533,10 @@ Functions object Cyc_compilation_environment (void *data, object cont, object var)   object Cyc_current_exception_handler (void *data) + Return the current exception handler. More...
      object Cyc_default_exception_handler (void *data, int argc, closure _, object err) + The default exception handler. More...
      object Cyc_display (void *data, object x, FILE *port)   @@ -651,10 +654,13 @@ Functions void Cyc_remainder (void *data, object cont, object num1, object num2)   void Cyc_rt_raise (void *data, object err) + Raise an exception from the runtime code. More...
      void Cyc_rt_raise2 (void *data, const char *msg, object err) + Raise an exception from the runtime code. More...
      void Cyc_rt_raise_msg (void *data, const char *err) + Raise an exception from the runtime code. More...
      object Cyc_set_car (void *data, object l, object val)   @@ -669,8 +675,10 @@ Functions object Cyc_spawn_thread (object thread_and_thunk)   void Cyc_st_add (void *data, char *frame) + Register a frame in the stack trace circular buffer. More...
      void Cyc_st_print (void *data, FILE *out) + Print the contents of the given thread's stack trace buffer. More...
      void Cyc_start_trampoline (gc_thread_data *thd)   @@ -707,8 +715,10 @@ Functions object Cyc_system (object cmd)   object Cyc_thread_sleep (void *data, object timeout) + Accept a number of seconds to sleep according to SRFI-18. More...
      object Cyc_trigger_minor_gc (void *data, object cont) + Trigger a minor GC for the calling thread. More...
      object Cyc_utf82string (void *data, object cont, object bv, object start, object end)   @@ -716,8 +726,10 @@ Functions  Count the number of code points in a string. Based on example code from Bjoern Hoehrmann. More...
      int Cyc_utf8_count_code_points_and_bytes (uint8_t *s, char_type *codepoint, int *cpts, int *bytes) + Count the number of code points and bytes in a string. More...
      uint32_t Cyc_utf8_decode (uint32_t *state, uint32_t *codep, uint32_t byte) + Decode the next byte of a codepoint. Based on example code from Bjoern Hoehrmann. More...
      int Cyc_utf8_encode (char *dest, int sz, uint32_t *src, int srcsz)   @@ -813,6 +825,7 @@ Functions char * gc_move (char *obj, gc_thread_data *thd, int *alloci, int *heap_grown)   void gc_request_mark_globals (void) + A helper function for calling gc_mark_globals. More...
      char ** get_env_variables ()   diff --git a/c-api/runtime_8c_a0d755ed34076754d1962ddf90947ef0c.html b/c-api/runtime_8c_a0d755ed34076754d1962ddf90947ef0c.html index c596fa89..49e02acf 100644 --- a/c-api/runtime_8c_a0d755ed34076754d1962ddf90947ef0c.html +++ b/c-api/runtime_8c_a0d755ed34076754d1962ddf90947ef0c.html @@ -619,7 +619,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    Value:
    if (type_is_pair_prim(clo)) { \
    Cyc_apply(td, 0, (closure)(a1), clo); \
    } else { \
    ((clo)->fn)(td, 1, clo, a1);\
    }
    A closed-over function with no variables.
    Definition: types.h:1216
    -
    void Cyc_apply(void *data, int argc, closure cont, object prim,...)
    Definition: runtime.c:5086
    +
    void Cyc_apply(void *data, int argc, closure cont, object prim,...)
    Definition: runtime.c:5123
    #define type_is_pair_prim(clo)
    Definition: types.h:62
    diff --git a/c-api/runtime_8c_a17011b7c9e101c02050f228bb1c948dc.html b/c-api/runtime_8c_a17011b7c9e101c02050f228bb1c948dc.html index e9c7ae41..d971d989 100644 --- a/c-api/runtime_8c_a17011b7c9e101c02050f228bb1c948dc.html +++ b/c-api/runtime_8c_a17011b7c9e101c02050f228bb1c948dc.html @@ -629,7 +629,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    gc_thread_data_t
    Definition: types.h:290
    closcall2
    #define closcall2(td, clo, a1, a2)
    Definition: runtime.c:119
    stack_overflow
    #define stack_overflow(x, y)
    Definition: types.h:454
    -
    GC
    void GC(void *data, closure cont, object *args, int num_args)
    Definition: runtime.c:5461
    +
    GC
    void GC(void *data, closure cont, object *args, int num_args)
    Definition: runtime.c:5506
    diff --git a/c-api/runtime_8c_a21b7de4fa6d0ffc1749be53a9505c1ec.html b/c-api/runtime_8c_a21b7de4fa6d0ffc1749be53a9505c1ec.html index efbb53c6..0544b738 100644 --- a/c-api/runtime_8c_a21b7de4fa6d0ffc1749be53a9505c1ec.html +++ b/c-api/runtime_8c_a21b7de4fa6d0ffc1749be53a9505c1ec.html @@ -623,7 +623,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    gc_thread_data_t
    Definition: types.h:290
    stack_overflow
    #define stack_overflow(x, y)
    Definition: types.h:454
    closcall1
    #define closcall1(td, clo, a1)
    Definition: runtime.c:91
    -
    GC
    void GC(void *data, closure cont, object *args, int num_args)
    Definition: runtime.c:5461
    +
    GC
    void GC(void *data, closure cont, object *args, int num_args)
    Definition: runtime.c:5506
    diff --git a/c-api/runtime_8c_a5c56834e8bdc10c7e40de0899afa833f.html b/c-api/runtime_8c_a5c56834e8bdc10c7e40de0899afa833f.html index 55e1c618..aca58c62 100644 --- a/c-api/runtime_8c_a5c56834e8bdc10c7e40de0899afa833f.html +++ b/c-api/runtime_8c_a5c56834e8bdc10c7e40de0899afa833f.html @@ -625,7 +625,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    Value:
    if (type_is_pair_prim(clo)) { \
    Cyc_apply(td, 1, (closure)(a1), clo,a2); \
    } else { \
    ((clo)->fn)(td, 2, clo, a1, a2);\
    }
    A closed-over function with no variables.
    Definition: types.h:1216
    -
    void Cyc_apply(void *data, int argc, closure cont, object prim,...)
    Definition: runtime.c:5086
    +
    void Cyc_apply(void *data, int argc, closure cont, object prim,...)
    Definition: runtime.c:5123
    #define type_is_pair_prim(clo)
    Definition: types.h:62
    diff --git a/c-api/runtime_8c_a638b761548027ce695951194791c82d2.html b/c-api/runtime_8c_a638b761548027ce695951194791c82d2.html index 0730b5af..4a2e4398 100644 --- a/c-api/runtime_8c_a638b761548027ce695951194791c82d2.html +++ b/c-api/runtime_8c_a638b761548027ce695951194791c82d2.html @@ -619,8 +619,8 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    Value:
    if (p->mem_buf_len == 0 || p->mem_buf_len == p->buf_idx) { \
    int rv = read_from_port(p); \
    if (!rv) { \
    if (p->tok_end) _read_return_atom(data, cont, p); \
    } \
    }
    const object Cyc_EOF
    Definition: runtime.c:156
    -
    void _read_return_atom(void *data, object cont, port_type *p)
    Helper function, return read atom.
    Definition: runtime.c:6767
    -
    int read_from_port(port_type *p)
    Helper function to perform a buffered read from an input port.
    Definition: runtime.c:6196
    +
    void _read_return_atom(void *data, object cont, port_type *p)
    Helper function, return read atom.
    Definition: runtime.c:6820
    +
    int read_from_port(port_type *p)
    Helper function to perform a buffered read from an input port.
    Definition: runtime.c:6249
    #define return_thread_runnable_with_obj(d, r, maybe_copied)
    Return from a blocked thread with an object that may have been copied. If the object was copied we ne...
    Definition: types.h:413

    Helper macro for Cyc_io_read_token.

    diff --git a/c-api/runtime_8c_a716a4025cfe7438ee0a309ff456f095c.html b/c-api/runtime_8c_a716a4025cfe7438ee0a309ff456f095c.html index ac06fc4a..91b1270d 100644 --- a/c-api/runtime_8c_a716a4025cfe7438ee0a309ff456f095c.html +++ b/c-api/runtime_8c_a716a4025cfe7438ee0a309ff456f095c.html @@ -603,7 +603,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    Value:
    { \
    temp = obj; \
    if (stack_overflow(low_limit, temp) && \
    stack_overflow(temp, high_limit)){ \
    (obj) = (object) gc_move(temp, (gc_thread_data *)data, &alloci, &heap_grown); \
    } \
    }
    Definition: types.h:290
    -
    char * gc_move(char *obj, gc_thread_data *thd, int *alloci, int *heap_grown)
    Definition: runtime.c:5193
    +
    char * gc_move(char *obj, gc_thread_data *thd, int *alloci, int *heap_grown)
    Definition: runtime.c:5233
    #define stack_overflow(x, y)
    Definition: types.h:454
    diff --git a/c-api/runtime_8c_ad1914897f385222d3b27b6f651e6afbe.html b/c-api/runtime_8c_ad1914897f385222d3b27b6f651e6afbe.html index 4390ec2d..a4cfade6 100644 --- a/c-api/runtime_8c_ad1914897f385222d3b27b6f651e6afbe.html +++ b/c-api/runtime_8c_ad1914897f385222d3b27b6f651e6afbe.html @@ -629,7 +629,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    gc_thread_data_t
    Definition: types.h:290
    closcall2
    #define closcall2(td, clo, a1, a2)
    Definition: runtime.c:119
    stack_overflow
    #define stack_overflow(x, y)
    Definition: types.h:454
    -
    GC
    void GC(void *data, closure cont, object *args, int num_args)
    Definition: runtime.c:5461
    +
    GC
    void GC(void *data, closure cont, object *args, int num_args)
    Definition: runtime.c:5506
    diff --git a/c-api/runtime_8c_ae252289600e88777aa66bf3ff503995d.html b/c-api/runtime_8c_ae252289600e88777aa66bf3ff503995d.html index a8357d50..69528f58 100644 --- a/c-api/runtime_8c_ae252289600e88777aa66bf3ff503995d.html +++ b/c-api/runtime_8c_ae252289600e88777aa66bf3ff503995d.html @@ -623,7 +623,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    gc_thread_data_t
    Definition: types.h:290
    stack_overflow
    #define stack_overflow(x, y)
    Definition: types.h:454
    closcall1
    #define closcall1(td, clo, a1)
    Definition: runtime.c:91
    -
    GC
    void GC(void *data, closure cont, object *args, int num_args)
    Definition: runtime.c:5461
    +
    GC
    void GC(void *data, closure cont, object *args, int num_args)
    Definition: runtime.c:5506
    diff --git a/c-api/runtime_8h.html b/c-api/runtime_8h.html index c87fa645..fd8e0f37 100644 --- a/c-api/runtime_8h.html +++ b/c-api/runtime_8h.html @@ -177,10 +177,12 @@ Macros #define Cyc_is_vector(o)   (make_boolean(is_object_type(o) && ((list) o)->tag == vector_tag))   #define CYC_UTF8_ACCEPT   0 + Successful state. More...
      #define Cyc_utf8_encode_char(dest, dest_size, char_value)   Cyc_utf8_encode(dest, dest_size, &char_value, 1)   #define CYC_UTF8_REJECT   1 + Invalid state. More...
      #define global_set(glo, value)   Cyc_global_set(data, (object *)&glo, value)   @@ -228,6 +230,7 @@ Functions object cell_get (object cell)   object copy2heap (void *data, object obj) + Copy given object to the heap, if it is from the stack. This function is intended to be called directly from application code. Note that only a shallow-copy is performed! For example, a pair object would be copied to the heap but its car and cdr objects would not. More...
      void Cyc_apply (void *data, int argc, closure cont, object prim,...)   @@ -272,8 +275,10 @@ Functions object Cyc_compilation_environment (void *data, object cont, object var)   object Cyc_current_exception_handler (void *data) + Return the current exception handler. More...
      object Cyc_default_exception_handler (void *data, int argc, closure _, object err) + The default exception handler. More...
      object Cyc_display (void *data, object, FILE *port)   @@ -423,10 +428,13 @@ Functions void Cyc_remainder (void *data, object cont, object num1, object num2)   void Cyc_rt_raise (void *data, object err) + Raise an exception from the runtime code. More...
      void Cyc_rt_raise2 (void *data, const char *msg, object err) + Raise an exception from the runtime code. More...
      void Cyc_rt_raise_msg (void *data, const char *err) + Raise an exception from the runtime code. More...
      object Cyc_set_car (void *, object l, object val)   @@ -441,8 +449,10 @@ Functions object Cyc_spawn_thread (object thunk)   void Cyc_st_add (void *data, char *frame) + Register a frame in the stack trace circular buffer. More...
      void Cyc_st_print (void *data, FILE *out) + Print the contents of the given thread's stack trace buffer. More...
      void Cyc_start_trampoline (gc_thread_data *thd)   @@ -487,8 +497,10 @@ Functions object Cyc_system (object cmd)   object Cyc_thread_sleep (void *data, object timeout) + Accept a number of seconds to sleep according to SRFI-18. More...
      object Cyc_trigger_minor_gc (void *data, object cont) + Trigger a minor GC for the calling thread. More...
      object Cyc_utf82string (void *data, object cont, object bv, object start, object end)   @@ -496,8 +508,10 @@ Functions  Count the number of code points in a string. Based on example code from Bjoern Hoehrmann. More...
      int Cyc_utf8_count_code_points_and_bytes (uint8_t *s, char_type *codepoint, int *cpts, int *bytes) + Count the number of code points and bytes in a string. More...
      uint32_t Cyc_utf8_decode (uint32_t *state, uint32_t *codep, uint32_t byte) + Decode the next byte of a codepoint. Based on example code from Bjoern Hoehrmann. More...
      int Cyc_utf8_encode (char *dest, int sz, uint32_t *src, int srcsz)   diff --git a/c-api/runtime_8h_source.html b/c-api/runtime_8h_source.html index 1a689a40..09967b65 100644 --- a/c-api/runtime_8h_source.html +++ b/c-api/runtime_8h_source.html @@ -91,344 +91,344 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
    runtime.h
    -Go to the documentation of this file.
    1 
    9 #ifndef CYCLONE_RUNTIME_H
    10 #define CYCLONE_RUNTIME_H
    11 
    12 
    17 extern const object boolean_t;
    22 extern const object boolean_f;
    27 extern const object quote_void;
    32 extern const object Cyc_EOF;
    33 
    37 void GC(void *, closure, object *, int);
    38 
    42 void gc_init_heap(long heap_size);
    43 
    57 #define Cyc_check_num_args(data, fnc_name, num_args, args) { \
    58  object l = Cyc_length(data, args); \
    59  if (num_args > obj_obj2int(l)) { \
    60  char buf[128]; \
    61  snprintf(buf, 127, "Expected %d arguments to %s but received %ld", \
    62  num_args, fnc_name, obj_obj2int(l)); \
    63  Cyc_rt_raise_msg(data, buf); \
    64  } \
    65 }
    66 
    67 #define Cyc_check_type(data, fnc_test, tag, obj) { \
    68  if ((boolean_f == fnc_test(obj))) Cyc_invalid_type_error(data, tag, obj); }
    69 #define Cyc_check_type2(data, fnc_test, tag, obj) { \
    70  if ((boolean_f == fnc_test(data, obj))) Cyc_invalid_type_error(data, tag, obj); }
    71 
    72 #define Cyc_check_pair_or_null(d,obj) { if (obj != NULL) { Cyc_check_pair(d,obj); }}
    73 #define Cyc_check_pair(d,obj) Cyc_check_type(d,Cyc_is_pair, pair_tag, obj)
    74 #define Cyc_check_proc(d,obj) Cyc_check_type2(d,Cyc_is_procedure, closureN_tag, obj)
    75 #define Cyc_check_num(d,obj) Cyc_check_type(d,Cyc_is_number, integer_tag, obj)
    76 #define Cyc_check_fixnum(d,obj) Cyc_check_type(d,Cyc_is_fixnum, integer_tag, obj)
    77 #define Cyc_check_int(d,obj) Cyc_check_type(d,Cyc_is_integer, integer_tag, obj)
    78 #define Cyc_check_str(d,obj) Cyc_check_type(d,Cyc_is_string, string_tag, obj)
    79 #define Cyc_check_sym(d,obj) Cyc_check_type(d,Cyc_is_symbol, symbol_tag, obj)
    80 #define Cyc_check_vec(d,obj) Cyc_check_type(d,Cyc_is_vector, vector_tag, obj)
    81 #define Cyc_check_bvec(d,obj) Cyc_check_type(d,Cyc_is_bytevector, bytevector_tag, obj)
    82 #define Cyc_check_port(d,obj) Cyc_check_type(d,Cyc_is_port, port_tag, obj)
    83 #define Cyc_check_mutex(d,obj) Cyc_check_type(d,Cyc_is_mutex, mutex_tag, obj)
    84 #define Cyc_check_cond_var(d,obj) Cyc_check_type(d,Cyc_is_cond_var, cond_var_tag, obj)
    85 #define Cyc_check_opaque(d,obj) Cyc_check_type(d,Cyc_is_opaque, c_opaque_tag, obj)
    86 void Cyc_invalid_type_error(void *data, int tag, object found);
    87 void Cyc_check_obj(void *data, int tag, object obj);
    88 void Cyc_check_bounds(void *data, const char *label, int len, int index);
    90 /* END error checking */
    91 
    92 extern long global_stack_size;
    93 extern long global_heap_size;
    94 
    95 char **get_env_variables();
    96 void pack_env_variables(void *data, object k);
    97 void set_env_variables(char **vars);
    98 
    99 object cell_get(object cell);
    100 
    101 #define global_set(glo,value) Cyc_global_set(data, (object *)&glo, value)
    102 object Cyc_global_set(void *thd, object * glo, object value);
    103 
    104 /* Variable argument count support
    105 
    106  This macro is intended to be executed at the top of a function that
    107  is passed 'var' as a variable-length argument. 'count' is the number
    108  of varargs that were passed. EG:
    109  - C definition: f(object a, ...)
    110  - C call: f(1, 2, 3)
    111  - var: a
    112  - count: 3
    113 
    114  Argument count would need to be passed by the caller of f. Presumably
    115  our compiler will compute the difference between the number of required
    116  args and the number of provided ones, and pass the difference as 'count'
    117  */
    118 #define load_varargs(var, arg_var, count) \
    119  list var = (count > 0) ? alloca(sizeof(pair_type)*count) : NULL; \
    120  { \
    121  int i; \
    122  object tmp; \
    123  va_list va; \
    124  if (count > 0) { \
    125  va_start(va, arg_var); \
    126  for (i = 0; i < count; i++) { \
    127  if (i) { \
    128  tmp = va_arg(va, object); \
    129  } else { \
    130  tmp = arg_var; \
    131  } \
    132  var[i].hdr.mark = gc_color_red; \
    133  var[i].hdr.grayed = 0; \
    134  var[i].tag = pair_tag; \
    135  var[i].pair_car = tmp; \
    136  var[i].pair_cdr = (i == (count-1)) ? NULL : &var[i + 1]; \
    137  } \
    138  va_end(va); \
    139  } \
    140  }
    141 /* Prototypes for primitive functions. */
    142 
    149 object apply(void *data, object cont, object func, object args);
    150 void Cyc_apply(void *data, int argc, closure cont, object prim, ...);
    151 void dispatch_apply_va(void *data, int argc, object clo, object cont, object func, ...);
    152 object apply_va(void *data, object cont, int argc, object func, ...);
    153 void dispatch(void *data, int argc, function_type func, object clo, object cont,
    154  object args);
    155 void dispatch_va(void *data, int argc, function_type_va func, object clo,
    156  object cont, object args);
    157 void do_dispatch(void *data, int argc, function_type func, object clo,
    158  object * buffer);
    159 
    167 object Cyc_string_cmp(void *data, object str1, object str2);
    168 object dispatch_string_91append(void *data, int argc, object clo, object cont,
    169  object str1, ...);
    170 object Cyc_string2number_(void *d, object cont, object str);
    171 object Cyc_string2number2_(void *data, object cont, int argc, object str, ...);
    172 int binstr2int(const char *str);
    173 int octstr2int(const char *str);
    174 object Cyc_string_append(void *data, object cont, int argc, object str1, ...);
    175 object Cyc_string_length(void *data, object str);
    176 object Cyc_string_byte_length(void *data, object str);
    177 object Cyc_substring(void *data, object cont, object str, object start,
    178  object end);
    179 object Cyc_string_ref(void *data, object str, object k);
    180 object Cyc_string_set(void *data, object str, object k, object chr);
    188 object Cyc_char2integer(object chr);
    189 object Cyc_char_eq_op(void *data, object a, object b);
    190 object Cyc_char_gt_op(void *data, object a, object b);
    191 object Cyc_char_lt_op(void *data, object a, object b);
    192 object Cyc_char_gte_op(void *data, object a, object b);
    193 object Cyc_char_lte_op(void *data, object a, object b);
    201 object Cyc_symbol2string(void *d, object cont, object sym);
    202 object Cyc_string2symbol(void *d, object str);
    210 extern object Cyc_global_variables;
    211 cvar_type *mcvar(object * var);
    212 object Cyc_get_global_variables();
    213 object Cyc_get_cvar(object var);
    214 object Cyc_set_cvar(object var, object value);
    222 object Cyc_display(void *data, object, FILE * port);
    223 void dispatch_display_va(void *data, int argc, object clo, object cont,
    224  object x, ...);
    225 object Cyc_display_va(void *data, int argc, object x, ...);
    226 object Cyc_display_va_list(void *data, int argc, object x, va_list ap);
    227 object Cyc_write_char(void *data, object c, object port);
    228 object Cyc_write(void *data, object, FILE * port);
    229 void dispatch_write_va(void *data, int argc, object clo, object cont,
    230  object x, ...);
    231 object Cyc_write_va(void *data, int argc, object x, ...);
    232 object Cyc_write_va_list(void *data, int argc, object x, va_list ap);
    233 port_type Cyc_stdout(void);
    234 port_type Cyc_stdin(void);
    235 port_type Cyc_stderr(void);
    236 port_type Cyc_io_open_input_file(void *data, object str);
    237 port_type Cyc_io_open_output_file(void *data, object str);
    239 port_type *Cyc_io_open_input_string(void *data, object str);
    240 port_type *Cyc_io_open_input_bytevector(void *data, object bv);
    241 void Cyc_io_get_output_string(void *data, object cont, object port);
    242 void Cyc_io_get_output_bytevector(void *data, object cont, object port);
    243 object Cyc_io_close_port(void *data, object port);
    244 object Cyc_io_close_input_port(void *data, object port);
    245 object Cyc_io_close_output_port(void *data, object port);
    246 object Cyc_io_flush_output_port(void *data, object port);
    247 object Cyc_io_read_char(void *data, object cont, object port);
    248 object Cyc_io_peek_char(void *data, object cont, object port);
    249 object Cyc_write_u8(void *data, object c, object port);
    250 object Cyc_io_read_u8(void *data, object cont, object port);
    251 object Cyc_io_peek_u8(void *data, object cont, object port);
    252 object Cyc_io_read_line(void *data, object cont, object port);
    253 void Cyc_io_read_token(void *data, object cont, object port);
    263 #define return_inexact_double_op_no_cps(data, ptr, OP, z) \
    264  double unboxed; \
    265  Cyc_check_num(data, z); \
    266  if (obj_is_int(z)) { \
    267  unboxed = OP(obj_obj2int(z)); \
    268  } else if (type_of(z) == integer_tag) { \
    269  unboxed = OP(((integer_type *)z)->value); \
    270  } else if (type_of(z) == bignum_tag) { \
    271  unboxed = OP(mp_get_double(&bignum_value(z))); \
    272  } else { \
    273  unboxed = OP(((double_type *)z)->value); \
    274  } \
    275  assign_double(ptr, unboxed); \
    276  return ptr;
    277 
    278 #define return_inexact_double_op(data, cont, OP, z) \
    279  make_double(d, 0.0); \
    280  Cyc_check_num(data, z); \
    281  if (obj_is_int(z)) { \
    282  d.value = OP(obj_obj2int(z)); \
    283  } else if (type_of(z) == integer_tag) { \
    284  d.value = OP(((integer_type *)z)->value); \
    285  } else if (type_of(z) == bignum_tag) { \
    286  d.value = OP(mp_get_double(&bignum_value(z))); \
    287  } else { \
    288  d.value = OP(((double_type *)z)->value); \
    289  } \
    290  return_closcall1(data, cont, &d)
    291 
    292 #define return_inexact_double_or_cplx_op_no_cps(data, ptr, OP, CPLX_OP, z) \
    293  double unboxed; \
    294  Cyc_check_num(data, z); \
    295  if (obj_is_int(z)) { \
    296  unboxed = OP(obj_obj2int(z)); \
    297  } else if (type_of(z) == integer_tag) { \
    298  unboxed = OP(((integer_type *)z)->value); \
    299  } else if (type_of(z) == bignum_tag) { \
    300  unboxed = OP(mp_get_double(&bignum_value(z))); \
    301  } else if (type_of(z) == complex_num_tag) { \
    302  double complex unboxed = CPLX_OP(complex_num_value(z)); \
    303  assign_complex_num(ptr, unboxed); \
    304  return ptr; \
    305  } else { \
    306  unboxed = OP(((double_type *)z)->value); \
    307  } \
    308  assign_double(ptr, unboxed); \
    309  return ptr;
    310 
    311 #define return_inexact_double_or_cplx_op(data, cont, OP, CPLX_OP, z) \
    312  make_double(d, 0.0); \
    313  Cyc_check_num(data, z); \
    314  if (obj_is_int(z)) { \
    315  d.value = OP(obj_obj2int(z)); \
    316  } else if (type_of(z) == integer_tag) { \
    317  d.value = OP(((integer_type *)z)->value); \
    318  } else if (type_of(z) == bignum_tag) { \
    319  d.value = OP(mp_get_double(&bignum_value(z))); \
    320  } else if (type_of(z) == complex_num_tag) { \
    321  complex_num_type cn; \
    322  double complex unboxed = CPLX_OP(complex_num_value(z)); \
    323  assign_complex_num((&cn), unboxed); \
    324  return_closcall1(data, cont, &cn); \
    325  } else { \
    326  d.value = OP(((double_type *)z)->value); \
    327  } \
    328  return_closcall1(data, cont, &d)
    329 
    330 #define return_exact_double_op(data, cont, OP, z) \
    331  int i = 0; \
    332  Cyc_check_num(data, z); \
    333  if (obj_is_int(z)) { \
    334  i = obj_obj2int(z); \
    335  } else if (type_of(z) == integer_tag) { \
    336  i = (int)OP(((integer_type *)z)->value); \
    337  } else if (type_of(z) == bignum_tag) { \
    338  return_closcall1(data, cont, z); \
    339  } else { \
    340  i = (int)OP(((double_type *)z)->value); \
    341  } \
    342  return_closcall1(data, cont, obj_int2obj(i))
    343 
    344 #define return_exact_double_op_no_cps(data, ptr, OP, z) \
    345  int i = 0; \
    346  Cyc_check_num(data, z); \
    347  if (obj_is_int(z)) { \
    348  i = obj_obj2int(z); \
    349  } else if (type_of(z) == integer_tag) { \
    350  i = (int)OP(((integer_type *)z)->value); \
    351  } else if (type_of(z) == bignum_tag) { \
    352  return z; \
    353  } else { \
    354  i = (int)OP(((double_type *)z)->value); \
    355  } \
    356  return obj_int2obj(i);
    357 
    358 #define unbox_number(n) \
    359  ((obj_is_int(n) ? obj_obj2int(n) : \
    360  ((type_of(n) == integer_tag) ? \
    361  ((integer_type *)n)->value : \
    362  ((double_type *)n)->value)))
    363 
    364 object Cyc_num_eq(void *, object cont, int argc, object n, ...);
    365 object Cyc_num_gt(void *, object cont, int argc, object n, ...);
    366 object Cyc_num_lt(void *, object cont, int argc, object n, ...);
    367 object Cyc_num_gte(void *, object cont, int argc, object n, ...);
    368 object Cyc_num_lte(void *, object cont, int argc, object n, ...);
    369 int Cyc_num_eq_op(void *, object x, object y);
    370 int Cyc_num_gt_op(void *, object x, object y);
    371 int Cyc_num_lt_op(void *, object x, object y);
    372 int Cyc_num_gte_op(void *, object x, object y);
    373 int Cyc_num_lte_op(void *, object x, object y);
    374 object Cyc_num_fast_eq_op(void *data, object x, object y);
    375 object Cyc_num_fast_gt_op(void *data, object x, object y);
    376 object Cyc_num_fast_lt_op(void *data, object x, object y);
    377 object Cyc_num_fast_gte_op(void *data, object x, object y);
    378 object Cyc_num_fast_lte_op(void *data, object x, object y);
    379 object Cyc_num_cmp_va_list(void *data, int argc,
    380  int (fn_op(void *, object, object)), object n,
    381  va_list ns);
    382 void Cyc_expt(void *data, object cont, object x, object y);
    383 void Cyc_remainder(void *data, object cont, object num1, object num2);
    384 object Cyc_number2string2(void *data, object cont, int argc, object n, ...);
    385 object Cyc_integer2char(void *data, object n);
    386 object Cyc_sum_op(void *data, common_type * x, object y);
    387 object Cyc_sub_op(void *data, common_type * x, object y);
    388 object Cyc_mul_op(void *data, common_type * x, object y);
    389 object Cyc_div_op(void *data, common_type * x, object y);
    390 object Cyc_sum(void *data, object cont, int argc, object n, ...);
    391 object Cyc_sub(void *data, object cont, int argc, object n, ...);
    392 object Cyc_mul(void *data, object cont, int argc, object n, ...);
    393 object Cyc_div(void *data, object cont, int argc, object n, ...);
    394 // Future idea, there may be uses for this in addition to if statements:
    395 #define Cyc_if(c,t,e) ((boolean_f != c) ? (t) : (e))
    396 object Cyc_fast_sum(void *data, object ptr, object x, object y);
    397 object Cyc_fast_sub(void *data, object ptr, object x, object y);
    398 object Cyc_fast_mul(void *data, object ptr, object x, object y);
    399 object Cyc_fast_div(void *data, object ptr, object x, object y);
    400 object Cyc_bit_unset(void *data, object n1, object n2);
    401 object Cyc_bit_set(void *data, object n1, object n2);
    402 object Cyc_num_op_va_list(void *data, int argc,
    403  object(fn_op(void *, common_type *, object)),
    404  int default_no_args, int default_one_arg, object n,
    405  va_list ns, common_type * buf);
    406 void Cyc_int2bignum(int n, mp_int *bn);
    407 object Cyc_bignum_normalize(void *data, object n);
    408 int Cyc_bignum_cmp(bn_cmp_type type, object x, int tx, object y, int ty);
    409 void Cyc_make_rectangular(void *data, object k, object r, object i);
    410 double MRG32k3a (double seed);
    416 //object Cyc_eq(object x, object y);
    417 #define Cyc_eq(x, y) (make_boolean(x == y))
    418 int equal(object, object);
    419 object equalp(object, object);
    420 object Cyc_has_cycle(object lst);
    421 //object Cyc_is_boolean(object o);
    422 #define Cyc_is_boolean(o) (make_boolean(o == boolean_f || o == boolean_t))
    423 #define Cyc_is_pair(o) ((is_object_type(o) && ((list) o)->tag == pair_tag) ? boolean_t : boolean_f)
    424 #define Cyc_is_null(o) (make_boolean(o == NULL))
    425 //TODO: convert all of these to macros (if it makes sense, most should), and remove them from runtime.c:
    426 object Cyc_is_number(object o);
    427 object Cyc_is_complex(object o);
    428 object Cyc_is_real(object o);
    429 object Cyc_is_integer(object o);
    430 #define Cyc_is_fixnum(o) (make_boolean(obj_is_int(o)))
    431 //object Cyc_is_fixnum(object o);
    432 #define Cyc_is_bignum(o) (make_boolean(is_object_type(o) && ((list) o)->tag == bignum_tag))
    433 //object Cyc_is_bignum(object o);
    434 //object Cyc_is_vector(object o);
    435 //object Cyc_is_bytevector(object o);
    436 //object Cyc_is_port(object o);
    437 //object Cyc_is_mutex(object o);
    438 //object Cyc_is_cond_var(object o);
    439 //object Cyc_is_symbol(object o);
    440 //object Cyc_is_string(object o);
    441 #define Cyc_is_vector(o) (make_boolean(is_object_type(o) && ((list) o)->tag == vector_tag))
    442 #define Cyc_is_bytevector(o) (make_boolean(is_object_type(o) && ((list) o)->tag == bytevector_tag))
    443 #define Cyc_is_port(o) (make_boolean(is_object_type(o) && ((list) o)->tag == port_tag))
    444 #define Cyc_is_mutex(o) (make_boolean(is_object_type(o) && ((list) o)->tag == mutex_tag))
    445 #define Cyc_is_cond_var(o) (make_boolean(is_object_type(o) && ((list) o)->tag == cond_var_tag))
    446 #define Cyc_is_symbol(o) (make_boolean(is_object_type(o) && ((list) o)->tag == symbol_tag))
    447 #define Cyc_is_string(o) (make_boolean(is_object_type(o) && ((list) o)->tag == string_tag))
    448 //object Cyc_is_char(object o);
    449 #define Cyc_is_char(o) (make_boolean(obj_is_char(o)))
    450 object Cyc_is_procedure(void *data, object o);
    451 //object Cyc_is_macro(object o);
    452 //object Cyc_is_eof_object(object o);
    453 //object Cyc_is_cvar(object o);
    454 //object Cyc_is_opaque(object o);
    455 #define Cyc_is_macro(o) (make_boolean(is_object_type(o) && ((list) o)->tag == macro_tag))
    456 #define Cyc_is_eof_object(o) (make_boolean(is_object_type(o) && ((list) o)->tag == eof_tag))
    457 #define Cyc_is_cvar(o) (make_boolean(is_object_type(o) && ((list) o)->tag == cvar_tag))
    458 #define Cyc_is_opaque(o) (make_boolean(is_object_type(o) && ((list) o)->tag == c_opaque_tag))
    459 
    466 object Cyc_vector_length(void *data, object v);
    467 object Cyc_vector_ref(void *d, object v, object k);
    468 object Cyc_vector_set(void *d, object v, object k, object obj);
    469 object Cyc_make_vector(void *data, object cont, int argc, object len, ...);
    477 object Cyc_make_bytevector(void *data, object cont, int argc, object len, ...);
    478 object Cyc_bytevector(void *data, object cont, int argc, object bval, ...);
    479 object Cyc_bytevector_length(void *data, object bv);
    480 object Cyc_bytevector_append(void *data, object cont, int _argc, object bv,
    481  ...);
    482 object Cyc_bytevector_copy(void *data, object cont, object bv, object start,
    483  object end);
    484 object Cyc_bytevector_u8_ref(void *data, object bv, object k);
    485 object Cyc_bytevector_u8_set(void *data, object bv, object k, object b);
    486 object Cyc_utf82string(void *data, object cont, object bv, object start,
    487  object end);
    488 object Cyc_string2utf8(void *data, object cont, object str, object start,
    489  object end);
    498 char **_cyc_argv;
    499 object Cyc_installation_dir(void *data, object cont, object type);
    500 object Cyc_compilation_environment(void *data, object cont, object var);
    501 object Cyc_command_line_arguments(void *data, object cont);
    502 object Cyc_system(object cmd);
    503 void Cyc_halt(object obj);
    504 object __halt(object obj);
    505 object Cyc_io_delete_file(void *data, object filename);
    506 object Cyc_io_file_exists(void *data, object filename);
    517 object Cyc_spawn_thread(object thunk);
    519 void Cyc_end_thread(gc_thread_data * thd);
    520 void Cyc_exit_thread(gc_thread_data * thd);
    521 object Cyc_thread_sleep(void *data, object timeout);
    529 object Cyc_trigger_minor_gc(void *data, object cont);
    530 object copy2heap(void *data, object obj);
    539 void Cyc_st_add(void *data, char *frame);
    540 void Cyc_st_print(void *data, FILE * out);
    551 extern const object primitive_Cyc_91global_91vars;
    552 extern const object primitive_Cyc_91get_91cvar;
    553 extern const object primitive_Cyc_91set_91cvar_67;
    554 extern const object primitive_Cyc_91cvar_127;
    555 extern const object primitive_Cyc_91opaque_127;
    556 extern const object primitive_Cyc_91has_91cycle_127;
    557 extern const object primitive_Cyc_91spawn_91thread_67;
    558 extern const object primitive_Cyc_91end_91thread_67;
    559 extern const object primitive__87;
    560 extern const object primitive__91;
    561 extern const object primitive__85;
    562 extern const object primitive__95;
    563 extern const object primitive__123;
    564 extern const object primitive__125;
    565 extern const object primitive__121;
    566 extern const object primitive__125_123;
    567 extern const object primitive__121_123;
    568 extern const object primitive_apply;
    569 extern const object primitive__75halt;
    570 extern const object primitive_exit;
    573 extern const object primitive_cons;
    574 extern const object primitive_cell_91get;
    575 extern const object primitive_set_91global_67;
    576 extern const object primitive_set_91cell_67;
    577 extern const object primitive_cell;
    578 extern const object primitive_eq_127;
    579 extern const object primitive_eqv_127;
    580 extern const object primitive_equal_127;
    581 extern const object primitive_assq;
    582 extern const object primitive_assv;
    583 extern const object primitive_memq;
    584 extern const object primitive_memv;
    585 extern const object primitive_length;
    586 extern const object primitive_vector_91length;
    587 extern const object primitive_bytevector_91length;
    588 extern const object primitive_set_91car_67;
    589 extern const object primitive_set_91cdr_67;
    590 extern const object primitive_car;
    591 extern const object primitive_cdr;
    592 extern const object primitive_caar;
    593 extern const object primitive_cadr;
    594 extern const object primitive_cdar;
    595 extern const object primitive_cddr;
    596 extern const object primitive_caaar;
    597 extern const object primitive_caadr;
    598 extern const object primitive_cadar;
    599 extern const object primitive_caddr;
    600 extern const object primitive_cdaar;
    601 extern const object primitive_cdadr;
    602 extern const object primitive_cddar;
    603 extern const object primitive_cdddr;
    604 extern const object primitive_caaaar;
    605 extern const object primitive_caaadr;
    606 extern const object primitive_caadar;
    607 extern const object primitive_caaddr;
    608 extern const object primitive_cadaar;
    609 extern const object primitive_cadadr;
    610 extern const object primitive_caddar;
    611 extern const object primitive_cadddr;
    612 extern const object primitive_cdaaar;
    613 extern const object primitive_cdaadr;
    614 extern const object primitive_cdadar;
    615 extern const object primitive_cdaddr;
    616 extern const object primitive_cddaar;
    617 extern const object primitive_cddadr;
    618 extern const object primitive_cdddar;
    619 extern const object primitive_cddddr;
    620 extern const object primitive_char_91_125integer;
    621 extern const object primitive_integer_91_125char;
    622 extern const object primitive_string_91_125number;
    623 extern const object primitive_string_91cmp;
    624 extern const object primitive_string_91append;
    625 extern const object primitive_list_91_125string;
    626 extern const object primitive_string_91_125symbol;
    627 extern const object primitive_symbol_91_125string;
    628 extern const object primitive_number_91_125string;
    629 extern const object primitive_string_91length;
    630 extern const object primitive_substring;
    631 extern const object primitive_make_91bytevector;
    632 extern const object primitive_make_91vector;
    633 extern const object primitive_list_91_125vector;
    634 extern const object primitive_vector_91ref;
    635 extern const object primitive_vector_91set_67;
    636 extern const object primitive_bytevector;
    637 extern const object primitive_bytevector_91append;
    638 extern const object primitive_Cyc_91bytevector_91copy;
    639 extern const object primitive_Cyc_91string_91_125utf8;
    640 extern const object primitive_Cyc_91utf8_91_125string;
    641 extern const object primitive_bytevector_91u8_91ref;
    642 extern const object primitive_bytevector_91u8_91set_67;
    643 extern const object primitive_string_91ref;
    644 extern const object primitive_string_91set_67;
    645 extern const object primitive_Cyc_91installation_91dir;
    647 extern const object primitive_command_91line_91arguments;
    648 extern const object primitive_system;
    649 extern const object primitive_boolean_127;
    650 extern const object primitive_char_127;
    651 extern const object primitive_eof_91object_127;
    652 extern const object primitive_null_127;
    653 extern const object primitive_number_127;
    654 extern const object primitive_real_127;
    655 extern const object primitive_integer_127;
    656 extern const object primitive_pair_127;
    657 extern const object primitive_procedure_127;
    658 extern const object primitive_macro_127;
    659 extern const object primitive_Cyc_91macro_127;
    660 extern const object primitive_port_127;
    661 extern const object primitive_vector_127;
    662 extern const object primitive_bytevector_127;
    663 extern const object primitive_string_127;
    664 extern const object primitive_symbol_127;
    665 extern const object primitive_open_91input_91file;
    666 extern const object primitive_open_91output_91file;
    667 extern const object primitive_close_91port;
    668 extern const object primitive_close_91input_91port;
    669 extern const object primitive_close_91output_91port;
    670 extern const object primitive_Cyc_91flush_91output_91port;
    671 extern const object primitive_file_91exists_127;
    672 extern const object primitive_delete_91file;
    673 extern const object primitive_read_91char;
    674 extern const object primitive_peek_91char;
    675 extern const object primitive_Cyc_91read_91line;
    676 extern const object primitive_Cyc_91write_91char;
    677 extern const object primitive_Cyc_91write;
    678 extern const object primitive_Cyc_91display;
    679 extern const object primitive_call_95cc;
    680 /* -------------------------------------------- */
    691 extern object Cyc_glo_eval_from_c;
    692 extern object Cyc_glo_call_cc;
    693 
    694 #define __glo_eval_91from_91c_scheme_eval Cyc_glo_eval_from_c
    695 #define __glo_call_95cc_scheme_base Cyc_glo_call_cc
    696 
    702 object Cyc_default_exception_handler(void *data, int argc, closure _, object err);
    703 
    704 object Cyc_current_exception_handler(void *data);
    705 void Cyc_rt_raise(void *data, object err);
    706 void Cyc_rt_raise2(void *data, const char *msg, object err);
    707 void Cyc_rt_raise_msg(void *data, const char *err);
    721 object add_symbol(symbol_type * psym);
    722 object add_symbol_by_name(const char *name);
    723 object find_symbol_by_name(const char *name);
    724 object find_or_add_symbol(const char *name);
    725 char *_strdup(const char *s);
    734 object is_library_loaded(const char *name);
    735 object register_library(const char *name);
    744 extern list global_table;
    745 void add_global(object * glo);
    755 #define CYC_UTF8_ACCEPT 0
    756 #define CYC_UTF8_REJECT 1
    757 
    761 #define Cyc_utf8_encode_char(dest, dest_size, char_value) \
    762  Cyc_utf8_encode(dest, dest_size, &char_value, 1)
    763 
    764 int Cyc_utf8_encode(char *dest, int sz, uint32_t *src, int srcsz);
    765 uint32_t Cyc_utf8_decode(uint32_t* state, uint32_t* codep, uint32_t byte);
    766 int Cyc_utf8_count_code_points(uint8_t* s);
    767 int Cyc_utf8_count_code_points_and_bytes(uint8_t* s, char_type *codepoint, int *cpts, int *bytes);
    768 uint32_t Cyc_utf8_validate_stream(uint32_t *state, char *str, size_t len);
    769 uint32_t Cyc_utf8_validate(char *str, size_t len);
    777 //object Cyc_car(void *data, object lis);
    778 //object Cyc_cdr(void *data, object lis);
    779 static inline object Cyc_car(void *data, object lis)
    780 {
    781  Cyc_check_pair(data, lis);
    782  return car(lis);
    783 }
    784 
    785 static inline object Cyc_cdr(void *data, object lis)
    786 {
    787  Cyc_check_pair(data, lis);
    788  return cdr(lis);
    789 }
    790 list malloc_make_pair(object, object);
    791 object Cyc_set_cell(void *, object l, object val);
    792 object Cyc_set_car(void *, object l, object val);
    793 object Cyc_set_cdr(void *, object l, object val);
    794 object Cyc_length(void *d, object l);
    795 object Cyc_list2vector(void *data, object cont, object l);
    796 object Cyc_list2string(void *d, object cont, object lst);
    797 object Cyc_list(void *data, int argc, object cont, ...);
    798 object memberp(void *data, object x, list l);
    799 object memqp(void *data, object x, list l);
    800 list assq(void *data, object x, list l);
    801 list assoc(void *data, object x, list l);
    802 list assoc_cdr(void *data, object x, list l);
    806 #endif /* CYCLONE_RUNTIME_H */
    const object primitive_cdaar
    Definition: runtime.c:5814
    +Go to the documentation of this file.
    1 
    9 #ifndef CYCLONE_RUNTIME_H
    10 #define CYCLONE_RUNTIME_H
    11 
    12 
    17 extern const object boolean_t;
    22 extern const object boolean_f;
    27 extern const object quote_void;
    32 extern const object Cyc_EOF;
    33 
    37 void GC(void *, closure, object *, int);
    38 
    42 void gc_init_heap(long heap_size);
    43 
    57 #define Cyc_check_num_args(data, fnc_name, num_args, args) { \
    58  object l = Cyc_length(data, args); \
    59  if (num_args > obj_obj2int(l)) { \
    60  char buf[128]; \
    61  snprintf(buf, 127, "Expected %d arguments to %s but received %ld", \
    62  num_args, fnc_name, obj_obj2int(l)); \
    63  Cyc_rt_raise_msg(data, buf); \
    64  } \
    65 }
    66 
    67 #define Cyc_check_type(data, fnc_test, tag, obj) { \
    68  if ((boolean_f == fnc_test(obj))) Cyc_invalid_type_error(data, tag, obj); }
    69 #define Cyc_check_type2(data, fnc_test, tag, obj) { \
    70  if ((boolean_f == fnc_test(data, obj))) Cyc_invalid_type_error(data, tag, obj); }
    71 
    72 #define Cyc_check_pair_or_null(d,obj) { if (obj != NULL) { Cyc_check_pair(d,obj); }}
    73 #define Cyc_check_pair(d,obj) Cyc_check_type(d,Cyc_is_pair, pair_tag, obj)
    74 #define Cyc_check_proc(d,obj) Cyc_check_type2(d,Cyc_is_procedure, closureN_tag, obj)
    75 #define Cyc_check_num(d,obj) Cyc_check_type(d,Cyc_is_number, integer_tag, obj)
    76 #define Cyc_check_fixnum(d,obj) Cyc_check_type(d,Cyc_is_fixnum, integer_tag, obj)
    77 #define Cyc_check_int(d,obj) Cyc_check_type(d,Cyc_is_integer, integer_tag, obj)
    78 #define Cyc_check_str(d,obj) Cyc_check_type(d,Cyc_is_string, string_tag, obj)
    79 #define Cyc_check_sym(d,obj) Cyc_check_type(d,Cyc_is_symbol, symbol_tag, obj)
    80 #define Cyc_check_vec(d,obj) Cyc_check_type(d,Cyc_is_vector, vector_tag, obj)
    81 #define Cyc_check_bvec(d,obj) Cyc_check_type(d,Cyc_is_bytevector, bytevector_tag, obj)
    82 #define Cyc_check_port(d,obj) Cyc_check_type(d,Cyc_is_port, port_tag, obj)
    83 #define Cyc_check_mutex(d,obj) Cyc_check_type(d,Cyc_is_mutex, mutex_tag, obj)
    84 #define Cyc_check_cond_var(d,obj) Cyc_check_type(d,Cyc_is_cond_var, cond_var_tag, obj)
    85 #define Cyc_check_opaque(d,obj) Cyc_check_type(d,Cyc_is_opaque, c_opaque_tag, obj)
    86 void Cyc_invalid_type_error(void *data, int tag, object found);
    87 void Cyc_check_obj(void *data, int tag, object obj);
    88 void Cyc_check_bounds(void *data, const char *label, int len, int index);
    90 /* END error checking */
    91 
    92 extern long global_stack_size;
    93 extern long global_heap_size;
    94 
    95 char **get_env_variables();
    96 void pack_env_variables(void *data, object k);
    97 void set_env_variables(char **vars);
    98 
    99 object cell_get(object cell);
    100 
    101 #define global_set(glo,value) Cyc_global_set(data, (object *)&glo, value)
    102 object Cyc_global_set(void *thd, object * glo, object value);
    103 
    104 /* Variable argument count support
    105 
    106  This macro is intended to be executed at the top of a function that
    107  is passed 'var' as a variable-length argument. 'count' is the number
    108  of varargs that were passed. EG:
    109  - C definition: f(object a, ...)
    110  - C call: f(1, 2, 3)
    111  - var: a
    112  - count: 3
    113 
    114  Argument count would need to be passed by the caller of f. Presumably
    115  our compiler will compute the difference between the number of required
    116  args and the number of provided ones, and pass the difference as 'count'
    117  */
    118 #define load_varargs(var, arg_var, count) \
    119  list var = (count > 0) ? alloca(sizeof(pair_type)*count) : NULL; \
    120  { \
    121  int i; \
    122  object tmp; \
    123  va_list va; \
    124  if (count > 0) { \
    125  va_start(va, arg_var); \
    126  for (i = 0; i < count; i++) { \
    127  if (i) { \
    128  tmp = va_arg(va, object); \
    129  } else { \
    130  tmp = arg_var; \
    131  } \
    132  var[i].hdr.mark = gc_color_red; \
    133  var[i].hdr.grayed = 0; \
    134  var[i].tag = pair_tag; \
    135  var[i].pair_car = tmp; \
    136  var[i].pair_cdr = (i == (count-1)) ? NULL : &var[i + 1]; \
    137  } \
    138  va_end(va); \
    139  } \
    140  }
    141 /* Prototypes for primitive functions. */
    142 
    149 object apply(void *data, object cont, object func, object args);
    150 void Cyc_apply(void *data, int argc, closure cont, object prim, ...);
    151 void dispatch_apply_va(void *data, int argc, object clo, object cont, object func, ...);
    152 object apply_va(void *data, object cont, int argc, object func, ...);
    153 void dispatch(void *data, int argc, function_type func, object clo, object cont,
    154  object args);
    155 void dispatch_va(void *data, int argc, function_type_va func, object clo,
    156  object cont, object args);
    157 void do_dispatch(void *data, int argc, function_type func, object clo,
    158  object * buffer);
    159 
    167 object Cyc_string_cmp(void *data, object str1, object str2);
    168 object dispatch_string_91append(void *data, int argc, object clo, object cont,
    169  object str1, ...);
    170 object Cyc_string2number_(void *d, object cont, object str);
    171 object Cyc_string2number2_(void *data, object cont, int argc, object str, ...);
    172 int binstr2int(const char *str);
    173 int octstr2int(const char *str);
    174 object Cyc_string_append(void *data, object cont, int argc, object str1, ...);
    175 object Cyc_string_length(void *data, object str);
    176 object Cyc_string_byte_length(void *data, object str);
    177 object Cyc_substring(void *data, object cont, object str, object start,
    178  object end);
    179 object Cyc_string_ref(void *data, object str, object k);
    180 object Cyc_string_set(void *data, object str, object k, object chr);
    188 object Cyc_char2integer(object chr);
    189 object Cyc_char_eq_op(void *data, object a, object b);
    190 object Cyc_char_gt_op(void *data, object a, object b);
    191 object Cyc_char_lt_op(void *data, object a, object b);
    192 object Cyc_char_gte_op(void *data, object a, object b);
    193 object Cyc_char_lte_op(void *data, object a, object b);
    201 object Cyc_symbol2string(void *d, object cont, object sym);
    202 object Cyc_string2symbol(void *d, object str);
    210 extern object Cyc_global_variables;
    211 cvar_type *mcvar(object * var);
    212 object Cyc_get_global_variables();
    213 object Cyc_get_cvar(object var);
    214 object Cyc_set_cvar(object var, object value);
    222 object Cyc_display(void *data, object, FILE * port);
    223 void dispatch_display_va(void *data, int argc, object clo, object cont,
    224  object x, ...);
    225 object Cyc_display_va(void *data, int argc, object x, ...);
    226 object Cyc_display_va_list(void *data, int argc, object x, va_list ap);
    227 object Cyc_write_char(void *data, object c, object port);
    228 object Cyc_write(void *data, object, FILE * port);
    229 void dispatch_write_va(void *data, int argc, object clo, object cont,
    230  object x, ...);
    231 object Cyc_write_va(void *data, int argc, object x, ...);
    232 object Cyc_write_va_list(void *data, int argc, object x, va_list ap);
    233 port_type Cyc_stdout(void);
    234 port_type Cyc_stdin(void);
    235 port_type Cyc_stderr(void);
    236 port_type Cyc_io_open_input_file(void *data, object str);
    237 port_type Cyc_io_open_output_file(void *data, object str);
    239 port_type *Cyc_io_open_input_string(void *data, object str);
    240 port_type *Cyc_io_open_input_bytevector(void *data, object bv);
    241 void Cyc_io_get_output_string(void *data, object cont, object port);
    242 void Cyc_io_get_output_bytevector(void *data, object cont, object port);
    243 object Cyc_io_close_port(void *data, object port);
    244 object Cyc_io_close_input_port(void *data, object port);
    245 object Cyc_io_close_output_port(void *data, object port);
    246 object Cyc_io_flush_output_port(void *data, object port);
    247 object Cyc_io_read_char(void *data, object cont, object port);
    248 object Cyc_io_peek_char(void *data, object cont, object port);
    249 object Cyc_write_u8(void *data, object c, object port);
    250 object Cyc_io_read_u8(void *data, object cont, object port);
    251 object Cyc_io_peek_u8(void *data, object cont, object port);
    252 object Cyc_io_read_line(void *data, object cont, object port);
    253 void Cyc_io_read_token(void *data, object cont, object port);
    263 #define return_inexact_double_op_no_cps(data, ptr, OP, z) \
    264  double unboxed; \
    265  Cyc_check_num(data, z); \
    266  if (obj_is_int(z)) { \
    267  unboxed = OP(obj_obj2int(z)); \
    268  } else if (type_of(z) == integer_tag) { \
    269  unboxed = OP(((integer_type *)z)->value); \
    270  } else if (type_of(z) == bignum_tag) { \
    271  unboxed = OP(mp_get_double(&bignum_value(z))); \
    272  } else { \
    273  unboxed = OP(((double_type *)z)->value); \
    274  } \
    275  assign_double(ptr, unboxed); \
    276  return ptr;
    277 
    278 #define return_inexact_double_op(data, cont, OP, z) \
    279  make_double(d, 0.0); \
    280  Cyc_check_num(data, z); \
    281  if (obj_is_int(z)) { \
    282  d.value = OP(obj_obj2int(z)); \
    283  } else if (type_of(z) == integer_tag) { \
    284  d.value = OP(((integer_type *)z)->value); \
    285  } else if (type_of(z) == bignum_tag) { \
    286  d.value = OP(mp_get_double(&bignum_value(z))); \
    287  } else { \
    288  d.value = OP(((double_type *)z)->value); \
    289  } \
    290  return_closcall1(data, cont, &d)
    291 
    292 #define return_inexact_double_or_cplx_op_no_cps(data, ptr, OP, CPLX_OP, z) \
    293  double unboxed; \
    294  Cyc_check_num(data, z); \
    295  if (obj_is_int(z)) { \
    296  unboxed = OP(obj_obj2int(z)); \
    297  } else if (type_of(z) == integer_tag) { \
    298  unboxed = OP(((integer_type *)z)->value); \
    299  } else if (type_of(z) == bignum_tag) { \
    300  unboxed = OP(mp_get_double(&bignum_value(z))); \
    301  } else if (type_of(z) == complex_num_tag) { \
    302  double complex unboxed = CPLX_OP(complex_num_value(z)); \
    303  assign_complex_num(ptr, unboxed); \
    304  return ptr; \
    305  } else { \
    306  unboxed = OP(((double_type *)z)->value); \
    307  } \
    308  assign_double(ptr, unboxed); \
    309  return ptr;
    310 
    311 #define return_inexact_double_or_cplx_op(data, cont, OP, CPLX_OP, z) \
    312  make_double(d, 0.0); \
    313  Cyc_check_num(data, z); \
    314  if (obj_is_int(z)) { \
    315  d.value = OP(obj_obj2int(z)); \
    316  } else if (type_of(z) == integer_tag) { \
    317  d.value = OP(((integer_type *)z)->value); \
    318  } else if (type_of(z) == bignum_tag) { \
    319  d.value = OP(mp_get_double(&bignum_value(z))); \
    320  } else if (type_of(z) == complex_num_tag) { \
    321  complex_num_type cn; \
    322  double complex unboxed = CPLX_OP(complex_num_value(z)); \
    323  assign_complex_num((&cn), unboxed); \
    324  return_closcall1(data, cont, &cn); \
    325  } else { \
    326  d.value = OP(((double_type *)z)->value); \
    327  } \
    328  return_closcall1(data, cont, &d)
    329 
    330 #define return_exact_double_op(data, cont, OP, z) \
    331  int i = 0; \
    332  Cyc_check_num(data, z); \
    333  if (obj_is_int(z)) { \
    334  i = obj_obj2int(z); \
    335  } else if (type_of(z) == integer_tag) { \
    336  i = (int)OP(((integer_type *)z)->value); \
    337  } else if (type_of(z) == bignum_tag) { \
    338  return_closcall1(data, cont, z); \
    339  } else { \
    340  i = (int)OP(((double_type *)z)->value); \
    341  } \
    342  return_closcall1(data, cont, obj_int2obj(i))
    343 
    344 #define return_exact_double_op_no_cps(data, ptr, OP, z) \
    345  int i = 0; \
    346  Cyc_check_num(data, z); \
    347  if (obj_is_int(z)) { \
    348  i = obj_obj2int(z); \
    349  } else if (type_of(z) == integer_tag) { \
    350  i = (int)OP(((integer_type *)z)->value); \
    351  } else if (type_of(z) == bignum_tag) { \
    352  return z; \
    353  } else { \
    354  i = (int)OP(((double_type *)z)->value); \
    355  } \
    356  return obj_int2obj(i);
    357 
    358 #define unbox_number(n) \
    359  ((obj_is_int(n) ? obj_obj2int(n) : \
    360  ((type_of(n) == integer_tag) ? \
    361  ((integer_type *)n)->value : \
    362  ((double_type *)n)->value)))
    363 
    364 object Cyc_num_eq(void *, object cont, int argc, object n, ...);
    365 object Cyc_num_gt(void *, object cont, int argc, object n, ...);
    366 object Cyc_num_lt(void *, object cont, int argc, object n, ...);
    367 object Cyc_num_gte(void *, object cont, int argc, object n, ...);
    368 object Cyc_num_lte(void *, object cont, int argc, object n, ...);
    369 int Cyc_num_eq_op(void *, object x, object y);
    370 int Cyc_num_gt_op(void *, object x, object y);
    371 int Cyc_num_lt_op(void *, object x, object y);
    372 int Cyc_num_gte_op(void *, object x, object y);
    373 int Cyc_num_lte_op(void *, object x, object y);
    374 object Cyc_num_fast_eq_op(void *data, object x, object y);
    375 object Cyc_num_fast_gt_op(void *data, object x, object y);
    376 object Cyc_num_fast_lt_op(void *data, object x, object y);
    377 object Cyc_num_fast_gte_op(void *data, object x, object y);
    378 object Cyc_num_fast_lte_op(void *data, object x, object y);
    379 object Cyc_num_cmp_va_list(void *data, int argc,
    380  int (fn_op(void *, object, object)), object n,
    381  va_list ns);
    382 void Cyc_expt(void *data, object cont, object x, object y);
    383 void Cyc_remainder(void *data, object cont, object num1, object num2);
    384 object Cyc_number2string2(void *data, object cont, int argc, object n, ...);
    385 object Cyc_integer2char(void *data, object n);
    386 object Cyc_sum_op(void *data, common_type * x, object y);
    387 object Cyc_sub_op(void *data, common_type * x, object y);
    388 object Cyc_mul_op(void *data, common_type * x, object y);
    389 object Cyc_div_op(void *data, common_type * x, object y);
    390 object Cyc_sum(void *data, object cont, int argc, object n, ...);
    391 object Cyc_sub(void *data, object cont, int argc, object n, ...);
    392 object Cyc_mul(void *data, object cont, int argc, object n, ...);
    393 object Cyc_div(void *data, object cont, int argc, object n, ...);
    394 // Future idea, there may be uses for this in addition to if statements:
    395 #define Cyc_if(c,t,e) ((boolean_f != c) ? (t) : (e))
    396 object Cyc_fast_sum(void *data, object ptr, object x, object y);
    397 object Cyc_fast_sub(void *data, object ptr, object x, object y);
    398 object Cyc_fast_mul(void *data, object ptr, object x, object y);
    399 object Cyc_fast_div(void *data, object ptr, object x, object y);
    400 object Cyc_bit_unset(void *data, object n1, object n2);
    401 object Cyc_bit_set(void *data, object n1, object n2);
    402 object Cyc_num_op_va_list(void *data, int argc,
    403  object(fn_op(void *, common_type *, object)),
    404  int default_no_args, int default_one_arg, object n,
    405  va_list ns, common_type * buf);
    406 void Cyc_int2bignum(int n, mp_int *bn);
    407 object Cyc_bignum_normalize(void *data, object n);
    408 int Cyc_bignum_cmp(bn_cmp_type type, object x, int tx, object y, int ty);
    409 void Cyc_make_rectangular(void *data, object k, object r, object i);
    410 double MRG32k3a (double seed);
    416 //object Cyc_eq(object x, object y);
    417 #define Cyc_eq(x, y) (make_boolean(x == y))
    418 int equal(object, object);
    419 object equalp(object, object);
    420 object Cyc_has_cycle(object lst);
    421 //object Cyc_is_boolean(object o);
    422 #define Cyc_is_boolean(o) (make_boolean(o == boolean_f || o == boolean_t))
    423 #define Cyc_is_pair(o) ((is_object_type(o) && ((list) o)->tag == pair_tag) ? boolean_t : boolean_f)
    424 #define Cyc_is_null(o) (make_boolean(o == NULL))
    425 //TODO: convert all of these to macros (if it makes sense, most should), and remove them from runtime.c:
    426 object Cyc_is_number(object o);
    427 object Cyc_is_complex(object o);
    428 object Cyc_is_real(object o);
    429 object Cyc_is_integer(object o);
    430 #define Cyc_is_fixnum(o) (make_boolean(obj_is_int(o)))
    431 //object Cyc_is_fixnum(object o);
    432 #define Cyc_is_bignum(o) (make_boolean(is_object_type(o) && ((list) o)->tag == bignum_tag))
    433 //object Cyc_is_bignum(object o);
    434 //object Cyc_is_vector(object o);
    435 //object Cyc_is_bytevector(object o);
    436 //object Cyc_is_port(object o);
    437 //object Cyc_is_mutex(object o);
    438 //object Cyc_is_cond_var(object o);
    439 //object Cyc_is_symbol(object o);
    440 //object Cyc_is_string(object o);
    441 #define Cyc_is_vector(o) (make_boolean(is_object_type(o) && ((list) o)->tag == vector_tag))
    442 #define Cyc_is_bytevector(o) (make_boolean(is_object_type(o) && ((list) o)->tag == bytevector_tag))
    443 #define Cyc_is_port(o) (make_boolean(is_object_type(o) && ((list) o)->tag == port_tag))
    444 #define Cyc_is_mutex(o) (make_boolean(is_object_type(o) && ((list) o)->tag == mutex_tag))
    445 #define Cyc_is_cond_var(o) (make_boolean(is_object_type(o) && ((list) o)->tag == cond_var_tag))
    446 #define Cyc_is_symbol(o) (make_boolean(is_object_type(o) && ((list) o)->tag == symbol_tag))
    447 #define Cyc_is_string(o) (make_boolean(is_object_type(o) && ((list) o)->tag == string_tag))
    448 //object Cyc_is_char(object o);
    449 #define Cyc_is_char(o) (make_boolean(obj_is_char(o)))
    450 object Cyc_is_procedure(void *data, object o);
    451 //object Cyc_is_macro(object o);
    452 //object Cyc_is_eof_object(object o);
    453 //object Cyc_is_cvar(object o);
    454 //object Cyc_is_opaque(object o);
    455 #define Cyc_is_macro(o) (make_boolean(is_object_type(o) && ((list) o)->tag == macro_tag))
    456 #define Cyc_is_eof_object(o) (make_boolean(is_object_type(o) && ((list) o)->tag == eof_tag))
    457 #define Cyc_is_cvar(o) (make_boolean(is_object_type(o) && ((list) o)->tag == cvar_tag))
    458 #define Cyc_is_opaque(o) (make_boolean(is_object_type(o) && ((list) o)->tag == c_opaque_tag))
    459 
    466 object Cyc_vector_length(void *data, object v);
    467 object Cyc_vector_ref(void *d, object v, object k);
    468 object Cyc_vector_set(void *d, object v, object k, object obj);
    469 object Cyc_make_vector(void *data, object cont, int argc, object len, ...);
    477 object Cyc_make_bytevector(void *data, object cont, int argc, object len, ...);
    478 object Cyc_bytevector(void *data, object cont, int argc, object bval, ...);
    479 object Cyc_bytevector_length(void *data, object bv);
    480 object Cyc_bytevector_append(void *data, object cont, int _argc, object bv,
    481  ...);
    482 object Cyc_bytevector_copy(void *data, object cont, object bv, object start,
    483  object end);
    484 object Cyc_bytevector_u8_ref(void *data, object bv, object k);
    485 object Cyc_bytevector_u8_set(void *data, object bv, object k, object b);
    486 object Cyc_utf82string(void *data, object cont, object bv, object start,
    487  object end);
    488 object Cyc_string2utf8(void *data, object cont, object str, object start,
    489  object end);
    498 char **_cyc_argv;
    499 object Cyc_installation_dir(void *data, object cont, object type);
    500 object Cyc_compilation_environment(void *data, object cont, object var);
    501 object Cyc_command_line_arguments(void *data, object cont);
    502 object Cyc_system(object cmd);
    503 void Cyc_halt(object obj);
    504 object __halt(object obj);
    505 object Cyc_io_delete_file(void *data, object filename);
    506 object Cyc_io_file_exists(void *data, object filename);
    517 object Cyc_spawn_thread(object thunk);
    519 void Cyc_end_thread(gc_thread_data * thd);
    520 void Cyc_exit_thread(gc_thread_data * thd);
    521 object Cyc_thread_sleep(void *data, object timeout);
    529 object Cyc_trigger_minor_gc(void *data, object cont);
    530 object copy2heap(void *data, object obj);
    539 void Cyc_st_add(void *data, char *frame);
    540 void Cyc_st_print(void *data, FILE * out);
    551 extern const object primitive_Cyc_91global_91vars;
    552 extern const object primitive_Cyc_91get_91cvar;
    553 extern const object primitive_Cyc_91set_91cvar_67;
    554 extern const object primitive_Cyc_91cvar_127;
    555 extern const object primitive_Cyc_91opaque_127;
    556 extern const object primitive_Cyc_91has_91cycle_127;
    557 extern const object primitive_Cyc_91spawn_91thread_67;
    558 extern const object primitive_Cyc_91end_91thread_67;
    559 extern const object primitive__87;
    560 extern const object primitive__91;
    561 extern const object primitive__85;
    562 extern const object primitive__95;
    563 extern const object primitive__123;
    564 extern const object primitive__125;
    565 extern const object primitive__121;
    566 extern const object primitive__125_123;
    567 extern const object primitive__121_123;
    568 extern const object primitive_apply;
    569 extern const object primitive__75halt;
    570 extern const object primitive_exit;
    573 extern const object primitive_cons;
    574 extern const object primitive_cell_91get;
    575 extern const object primitive_set_91global_67;
    576 extern const object primitive_set_91cell_67;
    577 extern const object primitive_cell;
    578 extern const object primitive_eq_127;
    579 extern const object primitive_eqv_127;
    580 extern const object primitive_equal_127;
    581 extern const object primitive_assq;
    582 extern const object primitive_assv;
    583 extern const object primitive_memq;
    584 extern const object primitive_memv;
    585 extern const object primitive_length;
    586 extern const object primitive_vector_91length;
    587 extern const object primitive_bytevector_91length;
    588 extern const object primitive_set_91car_67;
    589 extern const object primitive_set_91cdr_67;
    590 extern const object primitive_car;
    591 extern const object primitive_cdr;
    592 extern const object primitive_caar;
    593 extern const object primitive_cadr;
    594 extern const object primitive_cdar;
    595 extern const object primitive_cddr;
    596 extern const object primitive_caaar;
    597 extern const object primitive_caadr;
    598 extern const object primitive_cadar;
    599 extern const object primitive_caddr;
    600 extern const object primitive_cdaar;
    601 extern const object primitive_cdadr;
    602 extern const object primitive_cddar;
    603 extern const object primitive_cdddr;
    604 extern const object primitive_caaaar;
    605 extern const object primitive_caaadr;
    606 extern const object primitive_caadar;
    607 extern const object primitive_caaddr;
    608 extern const object primitive_cadaar;
    609 extern const object primitive_cadadr;
    610 extern const object primitive_caddar;
    611 extern const object primitive_cadddr;
    612 extern const object primitive_cdaaar;
    613 extern const object primitive_cdaadr;
    614 extern const object primitive_cdadar;
    615 extern const object primitive_cdaddr;
    616 extern const object primitive_cddaar;
    617 extern const object primitive_cddadr;
    618 extern const object primitive_cdddar;
    619 extern const object primitive_cddddr;
    620 extern const object primitive_char_91_125integer;
    621 extern const object primitive_integer_91_125char;
    622 extern const object primitive_string_91_125number;
    623 extern const object primitive_string_91cmp;
    624 extern const object primitive_string_91append;
    625 extern const object primitive_list_91_125string;
    626 extern const object primitive_string_91_125symbol;
    627 extern const object primitive_symbol_91_125string;
    628 extern const object primitive_number_91_125string;
    629 extern const object primitive_string_91length;
    630 extern const object primitive_substring;
    631 extern const object primitive_make_91bytevector;
    632 extern const object primitive_make_91vector;
    633 extern const object primitive_list_91_125vector;
    634 extern const object primitive_vector_91ref;
    635 extern const object primitive_vector_91set_67;
    636 extern const object primitive_bytevector;
    637 extern const object primitive_bytevector_91append;
    638 extern const object primitive_Cyc_91bytevector_91copy;
    639 extern const object primitive_Cyc_91string_91_125utf8;
    640 extern const object primitive_Cyc_91utf8_91_125string;
    641 extern const object primitive_bytevector_91u8_91ref;
    642 extern const object primitive_bytevector_91u8_91set_67;
    643 extern const object primitive_string_91ref;
    644 extern const object primitive_string_91set_67;
    645 extern const object primitive_Cyc_91installation_91dir;
    647 extern const object primitive_command_91line_91arguments;
    648 extern const object primitive_system;
    649 extern const object primitive_boolean_127;
    650 extern const object primitive_char_127;
    651 extern const object primitive_eof_91object_127;
    652 extern const object primitive_null_127;
    653 extern const object primitive_number_127;
    654 extern const object primitive_real_127;
    655 extern const object primitive_integer_127;
    656 extern const object primitive_pair_127;
    657 extern const object primitive_procedure_127;
    658 extern const object primitive_macro_127;
    659 extern const object primitive_Cyc_91macro_127;
    660 extern const object primitive_port_127;
    661 extern const object primitive_vector_127;
    662 extern const object primitive_bytevector_127;
    663 extern const object primitive_string_127;
    664 extern const object primitive_symbol_127;
    665 extern const object primitive_open_91input_91file;
    666 extern const object primitive_open_91output_91file;
    667 extern const object primitive_close_91port;
    668 extern const object primitive_close_91input_91port;
    669 extern const object primitive_close_91output_91port;
    670 extern const object primitive_Cyc_91flush_91output_91port;
    671 extern const object primitive_file_91exists_127;
    672 extern const object primitive_delete_91file;
    673 extern const object primitive_read_91char;
    674 extern const object primitive_peek_91char;
    675 extern const object primitive_Cyc_91read_91line;
    676 extern const object primitive_Cyc_91write_91char;
    677 extern const object primitive_Cyc_91write;
    678 extern const object primitive_Cyc_91display;
    679 extern const object primitive_call_95cc;
    680 /* -------------------------------------------- */
    691 extern object Cyc_glo_eval_from_c;
    692 extern object Cyc_glo_call_cc;
    693 
    694 #define __glo_eval_91from_91c_scheme_eval Cyc_glo_eval_from_c
    695 #define __glo_call_95cc_scheme_base Cyc_glo_call_cc
    696 
    702 object Cyc_default_exception_handler(void *data, int argc, closure _, object err);
    703 
    704 object Cyc_current_exception_handler(void *data);
    705 void Cyc_rt_raise(void *data, object err);
    706 void Cyc_rt_raise2(void *data, const char *msg, object err);
    707 void Cyc_rt_raise_msg(void *data, const char *err);
    721 object add_symbol(symbol_type * psym);
    722 object add_symbol_by_name(const char *name);
    723 object find_symbol_by_name(const char *name);
    724 object find_or_add_symbol(const char *name);
    725 char *_strdup(const char *s);
    734 object is_library_loaded(const char *name);
    735 object register_library(const char *name);
    744 extern list global_table;
    745 void add_global(object * glo);
    757 #define CYC_UTF8_ACCEPT 0
    758 
    760 #define CYC_UTF8_REJECT 1
    761 
    765 #define Cyc_utf8_encode_char(dest, dest_size, char_value) \
    766  Cyc_utf8_encode(dest, dest_size, &char_value, 1)
    767 
    768 int Cyc_utf8_encode(char *dest, int sz, uint32_t *src, int srcsz);
    769 uint32_t Cyc_utf8_decode(uint32_t* state, uint32_t* codep, uint32_t byte);
    770 int Cyc_utf8_count_code_points(uint8_t* s);
    771 int Cyc_utf8_count_code_points_and_bytes(uint8_t* s, char_type *codepoint, int *cpts, int *bytes);
    772 uint32_t Cyc_utf8_validate_stream(uint32_t *state, char *str, size_t len);
    773 uint32_t Cyc_utf8_validate(char *str, size_t len);
    781 //object Cyc_car(void *data, object lis);
    782 //object Cyc_cdr(void *data, object lis);
    783 static inline object Cyc_car(void *data, object lis)
    784 {
    785  Cyc_check_pair(data, lis);
    786  return car(lis);
    787 }
    788 
    789 static inline object Cyc_cdr(void *data, object lis)
    790 {
    791  Cyc_check_pair(data, lis);
    792  return cdr(lis);
    793 }
    794 list malloc_make_pair(object, object);
    795 object Cyc_set_cell(void *, object l, object val);
    796 object Cyc_set_car(void *, object l, object val);
    797 object Cyc_set_cdr(void *, object l, object val);
    798 object Cyc_length(void *d, object l);
    799 object Cyc_list2vector(void *data, object cont, object l);
    800 object Cyc_list2string(void *d, object cont, object lst);
    801 object Cyc_list(void *data, int argc, object cont, ...);
    802 object memberp(void *data, object x, list l);
    803 object memqp(void *data, object x, list l);
    804 list assq(void *data, object x, list l);
    805 list assoc(void *data, object x, list l);
    806 list assoc_cdr(void *data, object x, list l);
    810 #endif /* CYCLONE_RUNTIME_H */
    const object primitive_cdaar
    Definition: runtime.c:5859
    object Cyc_num_fast_eq_op(void *data, object x, object y)
    -
    object Cyc_write_char(void *data, object c, object port)
    Definition: runtime.c:1126
    -
    const object primitive_substring
    Definition: runtime.c:5838
    +
    object Cyc_write_char(void *data, object c, object port)
    Definition: runtime.c:1163
    +
    const object primitive_substring
    Definition: runtime.c:5883
    A closed-over function with no variables.
    Definition: types.h:1216
    -
    uint32_t Cyc_utf8_validate_stream(uint32_t *state, char *str, size_t len)
    Use this when validating from a stream, as it may be that the stream stopped in the middle of a codep...
    Definition: runtime.c:7241
    -
    object Cyc_vector_ref(void *d, object v, object k)
    Definition: runtime.c:1782
    +
    uint32_t Cyc_utf8_validate_stream(uint32_t *state, char *str, size_t len)
    Use this when validating from a stream, as it may be that the stream stopped in the middle of a codep...
    Definition: runtime.c:7310
    +
    object Cyc_vector_ref(void *d, object v, object k)
    Definition: runtime.c:1819
    long global_heap_size
    -
    object copy2heap(void *data, object obj)
    Definition: runtime.c:6042
    -
    object Cyc_bit_set(void *data, object n1, object n2)
    Definition: runtime.c:6085
    -
    object Cyc_write(void *data, object, FILE *port)
    Definition: runtime.c:1119
    +
    object copy2heap(void *data, object obj)
    Copy given object to the heap, if it is from the stack. This function is intended to be called direct...
    Definition: runtime.c:6095
    +
    object Cyc_bit_set(void *data, object n1, object n2)
    Definition: runtime.c:6138
    +
    object Cyc_write(void *data, object, FILE *port)
    Definition: runtime.c:1156
    char ** get_env_variables()
    Definition: runtime.c:163
    -
    const object primitive_Cyc_91write_91char
    Definition: runtime.c:5896
    -
    const object primitive_caar
    Definition: runtime.c:5806
    -
    object add_symbol_by_name(const char *name)
    Definition: runtime.c:385
    -
    object Cyc_get_global_variables()
    Definition: runtime.c:680
    -
    void Cyc_io_read_token(void *data, object cont, object port)
    Read next token from the input port.
    Definition: runtime.c:7014
    -
    port_type Cyc_io_open_input_file(void *data, object str)
    Definition: runtime.c:3933
    -
    const object primitive_memq
    Definition: runtime.c:5795
    +
    const object primitive_Cyc_91write_91char
    Definition: runtime.c:5941
    +
    const object primitive_caar
    Definition: runtime.c:5851
    +
    object add_symbol_by_name(const char *name)
    Definition: runtime.c:396
    +
    object Cyc_get_global_variables()
    Definition: runtime.c:717
    +
    void Cyc_io_read_token(void *data, object cont, object port)
    Read next token from the input port.
    Definition: runtime.c:7067
    +
    port_type Cyc_io_open_input_file(void *data, object str)
    Definition: runtime.c:3970
    +
    const object primitive_memq
    Definition: runtime.c:5840
    The port object type.
    Definition: types.h:961
    object Cyc_char_gte_op(void *data, object a, object b)
    -
    const object primitive_command_91line_91arguments
    Definition: runtime.c:5845
    -
    const object primitive_open_91input_91file
    Definition: runtime.c:5884
    -
    object Cyc_string_append(void *data, object cont, int argc, object str1,...)
    Definition: runtime.c:2201
    -
    void Cyc_st_add(void *data, char *frame)
    Definition: runtime.c:314
    -
    const object primitive_cdadar
    Definition: runtime.c:5828
    -
    const object primitive_port_127
    Definition: runtime.c:5880
    -
    object memberp(void *data, object x, list l)
    Definition: runtime.c:1159
    -
    const object primitive_cdddr
    Definition: runtime.c:5817
    +
    const object primitive_command_91line_91arguments
    Definition: runtime.c:5890
    +
    const object primitive_open_91input_91file
    Definition: runtime.c:5929
    +
    object Cyc_string_append(void *data, object cont, int argc, object str1,...)
    Definition: runtime.c:2238
    +
    void Cyc_st_add(void *data, char *frame)
    Register a frame in the stack trace circular buffer.
    Definition: runtime.c:320
    +
    const object primitive_cdadar
    Definition: runtime.c:5873
    +
    const object primitive_port_127
    Definition: runtime.c:5925
    +
    object memberp(void *data, object x, list l)
    Definition: runtime.c:1196
    +
    const object primitive_cdddr
    Definition: runtime.c:5862
    const object quote_void
    Definition: runtime.c:311
    -
    void add_global(object *glo)
    Definition: runtime.c:432
    -
    uint32_t Cyc_utf8_decode(uint32_t *state, uint32_t *codep, uint32_t byte)
    Definition: runtime.c:7185
    -
    object Cyc_fast_mul(void *data, object ptr, object x, object y)
    Definition: runtime.c:3358
    -
    object add_symbol(symbol_type *psym)
    Definition: runtime.c:376
    +
    void add_global(object *glo)
    Definition: runtime.c:443
    +
    uint32_t Cyc_utf8_decode(uint32_t *state, uint32_t *codep, uint32_t byte)
    Decode the next byte of a codepoint. Based on example code from Bjoern Hoehrmann. ...
    Definition: runtime.c:7245
    +
    object Cyc_fast_mul(void *data, object ptr, object x, object y)
    Definition: runtime.c:3395
    +
    object add_symbol(symbol_type *psym)
    Definition: runtime.c:387
    port_type * Cyc_io_open_output_string(void *data)
    Definition: mstreams.c:77
    -
    void Cyc_expt(void *data, object cont, object x, object y)
    Definition: runtime.c:3777
    -
    object Cyc_string_ref(void *data, object str, object k)
    Definition: runtime.c:2313
    -
    object Cyc_string_set(void *data, object str, object k, object chr)
    Definition: runtime.c:2220
    -
    port_type Cyc_stdout(void)
    Definition: runtime.c:3915
    -
    const object primitive_Cyc_91macro_127
    Definition: runtime.c:5878
    +
    void Cyc_expt(void *data, object cont, object x, object y)
    Definition: runtime.c:3814
    +
    object Cyc_string_ref(void *data, object str, object k)
    Definition: runtime.c:2350
    +
    object Cyc_string_set(void *data, object str, object k, object chr)
    Definition: runtime.c:2257
    +
    port_type Cyc_stdout(void)
    Definition: runtime.c:3952
    +
    const object primitive_Cyc_91macro_127
    Definition: runtime.c:5923
    The pair (cons) type.
    Definition: types.h:1080
    -
    double MRG32k3a(double seed)
    Definition: runtime.c:6128
    -
    const object primitive_cdaddr
    Definition: runtime.c:5829
    -
    object Cyc_write_u8(void *data, object c, object port)
    Definition: runtime.c:1143
    +
    double MRG32k3a(double seed)
    Definition: runtime.c:6181
    +
    const object primitive_cdaddr
    Definition: runtime.c:5874
    +
    object Cyc_write_u8(void *data, object c, object port)
    Definition: runtime.c:1180
    Definition: types.h:290
    -
    const object primitive_Cyc_91read_91line
    Definition: runtime.c:5895
    -
    const object primitive_caddar
    Definition: runtime.c:5824
    -
    const object primitive_string_91length
    Definition: runtime.c:5837
    -
    object register_library(const char *name)
    Definition: runtime.c:415
    -
    object Cyc_fast_sum(void *data, object ptr, object x, object y)
    Definition: runtime.c:3157
    -
    const object primitive_symbol_127
    Definition: runtime.c:5883
    -
    const object primitive_Cyc_91flush_91output_91port
    Definition: runtime.c:5889
    +
    const object primitive_Cyc_91read_91line
    Definition: runtime.c:5940
    +
    const object primitive_caddar
    Definition: runtime.c:5869
    +
    const object primitive_string_91length
    Definition: runtime.c:5882
    +
    object register_library(const char *name)
    Definition: runtime.c:426
    +
    object Cyc_fast_sum(void *data, object ptr, object x, object y)
    Definition: runtime.c:3194
    +
    const object primitive_symbol_127
    Definition: runtime.c:5928
    +
    const object primitive_Cyc_91flush_91output_91port
    Definition: runtime.c:5934
    const object Cyc_EOF
    Definition: runtime.c:156
    -
    object equalp(object, object)
    Definition: runtime.c:1238
    +
    object equalp(object, object)
    Definition: runtime.c:1275
    int Cyc_num_lte_op(void *, object x, object y)
    -
    const object primitive_procedure_127
    Definition: runtime.c:5876
    -
    const object primitive_integer_127
    Definition: runtime.c:5874
    -
    void Cyc_int2bignum(int n, mp_int *bn)
    Definition: runtime.c:1374
    -
    void dispatch_display_va(void *data, int argc, object clo, object cont, object x,...)
    Definition: runtime.c:770
    -
    void Cyc_apply(void *data, int argc, closure cont, object prim,...)
    Definition: runtime.c:5086
    -
    const object primitive_cdaadr
    Definition: runtime.c:5827
    -
    object Cyc_io_close_output_port(void *data, object port)
    Definition: runtime.c:3964
    -
    object Cyc_glo_call_cc
    Definition: runtime.c:505
    -
    const object primitive_open_91output_91file
    Definition: runtime.c:5885
    -
    object Cyc_io_read_char(void *data, object cont, object port)
    Definition: runtime.c:6909
    -
    const object primitive_cadaar
    Definition: runtime.c:5822
    -
    const object primitive_cddaar
    Definition: runtime.c:5830
    -
    const object primitive_cell
    Definition: runtime.c:5789
    -
    object Cyc_char2integer(object chr)
    Definition: runtime.c:2974
    -
    const object primitive_caaar
    Definition: runtime.c:5810
    -
    const object primitive_caaadr
    Definition: runtime.c:5819
    -
    object Cyc_thread_sleep(void *data, object timeout)
    Definition: runtime.c:6028
    -
    const object primitive__125
    Definition: runtime.c:5774
    +
    const object primitive_procedure_127
    Definition: runtime.c:5921
    +
    const object primitive_integer_127
    Definition: runtime.c:5919
    +
    void Cyc_int2bignum(int n, mp_int *bn)
    Definition: runtime.c:1411
    +
    void dispatch_display_va(void *data, int argc, object clo, object cont, object x,...)
    Definition: runtime.c:807
    +
    void Cyc_apply(void *data, int argc, closure cont, object prim,...)
    Definition: runtime.c:5123
    +
    const object primitive_cdaadr
    Definition: runtime.c:5872
    +
    object Cyc_io_close_output_port(void *data, object port)
    Definition: runtime.c:4001
    +
    object Cyc_glo_call_cc
    Definition: runtime.c:516
    +
    const object primitive_open_91output_91file
    Definition: runtime.c:5930
    +
    object Cyc_io_read_char(void *data, object cont, object port)
    Definition: runtime.c:6962
    +
    const object primitive_cadaar
    Definition: runtime.c:5867
    +
    const object primitive_cddaar
    Definition: runtime.c:5875
    +
    const object primitive_cell
    Definition: runtime.c:5834
    +
    object Cyc_char2integer(object chr)
    Definition: runtime.c:3011
    +
    const object primitive_caaar
    Definition: runtime.c:5855
    +
    const object primitive_caaadr
    Definition: runtime.c:5864
    +
    object Cyc_thread_sleep(void *data, object timeout)
    Accept a number of seconds to sleep according to SRFI-18.
    Definition: runtime.c:6075
    +
    const object primitive__125
    Definition: runtime.c:5819
    void(* function_type_va)(int, object, object, object,...)
    Definition: types.h:590
    -
    object Cyc_string2symbol(void *d, object str)
    Definition: runtime.c:1924
    -
    const object primitive_list_91_125string
    Definition: runtime.c:5850
    -
    void dispatch(void *data, int argc, function_type func, object clo, object cont, object args)
    Definition: runtime.c:5476
    -
    object Cyc_substring(void *data, object cont, object str, object start, object end)
    Definition: runtime.c:2349
    +
    object Cyc_string2symbol(void *d, object str)
    Definition: runtime.c:1961
    +
    const object primitive_list_91_125string
    Definition: runtime.c:5895
    +
    void dispatch(void *data, int argc, function_type func, object clo, object cont, object args)
    Definition: runtime.c:5521
    +
    object Cyc_substring(void *data, object cont, object str, object start, object end)
    Definition: runtime.c:2386
    object Cyc_sub_op(void *data, common_type *x, object y)
    -
    void dispatch_va(void *data, int argc, function_type_va func, object clo, object cont, object args)
    Definition: runtime.c:5495
    -
    const object primitive_string_127
    Definition: runtime.c:5879
    -
    int Cyc_utf8_count_code_points_and_bytes(uint8_t *s, char_type *codepoint, int *cpts, int *bytes)
    Definition: runtime.c:7216
    -
    const object primitive__121_123
    Definition: runtime.c:5777
    -
    const object primitive_apply
    Definition: runtime.c:5778
    -
    cvar_type * mcvar(object *var)
    Definition: runtime.c:4047
    -
    object Cyc_compilation_environment(void *data, object cont, object var)
    Definition: runtime.c:2439
    +
    void dispatch_va(void *data, int argc, function_type_va func, object clo, object cont, object args)
    Definition: runtime.c:5540
    +
    const object primitive_string_127
    Definition: runtime.c:5924
    +
    int Cyc_utf8_count_code_points_and_bytes(uint8_t *s, char_type *codepoint, int *cpts, int *bytes)
    Count the number of code points and bytes in a string.
    Definition: runtime.c:7285
    +
    const object primitive__121_123
    Definition: runtime.c:5822
    +
    const object primitive_apply
    Definition: runtime.c:5823
    +
    cvar_type * mcvar(object *var)
    Definition: runtime.c:4084
    +
    object Cyc_compilation_environment(void *data, object cont, object var)
    Definition: runtime.c:2476
    port_type * Cyc_io_open_input_bytevector(void *data, object bv)
    Definition: mstreams.c:56
    -
    object Cyc_set_cell(void *, object l, object val)
    Definition: runtime.c:1735
    -
    void Cyc_start_trampoline(gc_thread_data *thd)
    Definition: runtime.c:5144
    -
    void dispatch_write_va(void *data, int argc, object clo, object cont, object x,...)
    Definition: runtime.c:969
    -
    void Cyc_remainder(void *data, object cont, object num1, object num2)
    Definition: runtime.c:3839
    -
    const object primitive_delete_91file
    Definition: runtime.c:5892
    -
    object Cyc_num_cmp_va_list(void *data, int argc, int(fn_op(void *, object, object)), object n, va_list ns)
    Definition: runtime.c:1296
    -
    const object primitive_cons
    Definition: runtime.c:5785
    -
    char * _strdup(const char *s)
    Definition: runtime.c:357
    -
    object Cyc_make_bytevector(void *data, object cont, int argc, object len,...)
    Definition: runtime.c:2559
    -
    int equal(object, object)
    Definition: runtime.c:587
    -
    void Cyc_rt_raise_msg(void *data, const char *err)
    Definition: runtime.c:579
    +
    object Cyc_set_cell(void *, object l, object val)
    Definition: runtime.c:1772
    +
    void Cyc_start_trampoline(gc_thread_data *thd)
    Definition: runtime.c:5181
    +
    void dispatch_write_va(void *data, int argc, object clo, object cont, object x,...)
    Definition: runtime.c:1006
    +
    void Cyc_remainder(void *data, object cont, object num1, object num2)
    Definition: runtime.c:3876
    +
    const object primitive_delete_91file
    Definition: runtime.c:5937
    +
    object Cyc_num_cmp_va_list(void *data, int argc, int(fn_op(void *, object, object)), object n, va_list ns)
    Definition: runtime.c:1333
    +
    const object primitive_cons
    Definition: runtime.c:5830
    +
    char * _strdup(const char *s)
    Definition: runtime.c:368
    +
    object Cyc_make_bytevector(void *data, object cont, int argc, object len,...)
    Definition: runtime.c:2596
    +
    int equal(object, object)
    Definition: runtime.c:624
    +
    void Cyc_rt_raise_msg(void *data, const char *err)
    Raise an exception from the runtime code.
    Definition: runtime.c:616
    object Cyc_num_fast_lte_op(void *data, object x, object y)
    -
    object Cyc_list2vector(void *data, object cont, object l)
    Definition: runtime.c:2903
    +
    object Cyc_list2vector(void *data, object cont, object l)
    Definition: runtime.c:2940
    const object boolean_f
    Definition: runtime.c:307
    -
    object Cyc_io_delete_file(void *data, object filename)
    Definition: runtime.c:4011
    -
    const object primitive_vector_91set_67
    Definition: runtime.c:5801
    -
    const object primitive_string_91ref
    Definition: runtime.c:5839
    -
    const object primitive_set_91car_67
    Definition: runtime.c:5802
    +
    object Cyc_io_delete_file(void *data, object filename)
    Definition: runtime.c:4048
    +
    const object primitive_vector_91set_67
    Definition: runtime.c:5846
    +
    const object primitive_string_91ref
    Definition: runtime.c:5884
    +
    const object primitive_set_91car_67
    Definition: runtime.c:5847
    int Cyc_num_gt_op(void *, object x, object y)
    -
    object Cyc_length(void *d, object l)
    Definition: runtime.c:1806
    -
    const object primitive_car
    Definition: runtime.c:5804
    -
    const object primitive_Cyc_91display
    Definition: runtime.c:5898
    -
    int binstr2int(const char *str)
    Definition: runtime.c:2132
    -
    object Cyc_spawn_thread(object thunk)
    Definition: runtime.c:5965
    +
    object Cyc_length(void *d, object l)
    Definition: runtime.c:1843
    +
    const object primitive_car
    Definition: runtime.c:5849
    +
    const object primitive_Cyc_91display
    Definition: runtime.c:5943
    +
    int binstr2int(const char *str)
    Definition: runtime.c:2169
    +
    object Cyc_spawn_thread(object thunk)
    Definition: runtime.c:6010
    Symbols are similar to strings, but only one instance of each unique symbol is created, so comparisons are O(1).
    Definition: types.h:689
    -
    const object primitive_number_91_125string
    Definition: runtime.c:5853
    -
    object Cyc_io_flush_output_port(void *data, object port)
    Definition: runtime.c:3997
    -
    object Cyc_default_exception_handler(void *data, int argc, closure _, object err)
    Definition: runtime.c:509
    -
    const object primitive_string_91append
    Definition: runtime.c:5849
    -
    const object primitive_set_91cdr_67
    Definition: runtime.c:5803
    -
    uint32_t Cyc_utf8_validate(char *str, size_t len)
    Simplified version of Cyc_utf8_validate_stream that must always be called with a complete string buff...
    Definition: runtime.c:7261
    +
    const object primitive_number_91_125string
    Definition: runtime.c:5898
    +
    object Cyc_io_flush_output_port(void *data, object port)
    Definition: runtime.c:4034
    +
    object Cyc_default_exception_handler(void *data, int argc, closure _, object err)
    The default exception handler.
    Definition: runtime.c:526
    +
    const object primitive_string_91append
    Definition: runtime.c:5894
    +
    const object primitive_set_91cdr_67
    Definition: runtime.c:5848
    +
    uint32_t Cyc_utf8_validate(char *str, size_t len)
    Simplified version of Cyc_utf8_validate_stream that must always be called with a complete string buff...
    Definition: runtime.c:7330
    void Cyc_io_get_output_string(void *data, object cont, object port)
    Definition: mstreams.c:93
    object Cyc_num_gt(void *, object cont, int argc, object n,...)
    -
    object Cyc_io_read_line(void *data, object cont, object port)
    Definition: runtime.c:6954
    -
    const object primitive_cddr
    Definition: runtime.c:5809
    -
    void Cyc_rt_raise(void *data, object err)
    Definition: runtime.c:555
    -
    object Cyc_bytevector_u8_ref(void *data, object bv, object k)
    Definition: runtime.c:2854
    +
    object Cyc_io_read_line(void *data, object cont, object port)
    Definition: runtime.c:7007
    +
    const object primitive_cddr
    Definition: runtime.c:5854
    +
    void Cyc_rt_raise(void *data, object err)
    Raise an exception from the runtime code.
    Definition: runtime.c:581
    +
    object Cyc_bytevector_u8_ref(void *data, object bv, object k)
    Definition: runtime.c:2891
    object Cyc_global_variables
    Definition: runtime.c:150
    -
    const object primitive_close_91input_91port
    Definition: runtime.c:5887
    +
    const object primitive_close_91input_91port
    Definition: runtime.c:5932
    void Cyc_io_get_output_bytevector(void *data, object cont, object port)
    Definition: mstreams.c:110
    -
    const object primitive_caddr
    Definition: runtime.c:5813
    +
    const object primitive_caddr
    Definition: runtime.c:5858
    #define cdr(x)
    Definition: types.h:1138
    -
    const object primitive_null_127
    Definition: runtime.c:5871
    -
    object Cyc_write_va(void *data, int argc, object x,...)
    Definition: runtime.c:980
    +
    const object primitive_null_127
    Definition: runtime.c:5916
    +
    object Cyc_write_va(void *data, int argc, object x,...)
    Definition: runtime.c:1017
    char ** _cyc_argv
    Definition: runtime.h:498
    -
    int Cyc_bignum_cmp(bn_cmp_type type, object x, int tx, object y, int ty)
    Definition: runtime.c:1382
    +
    int Cyc_bignum_cmp(bn_cmp_type type, object x, int tx, object y, int ty)
    Definition: runtime.c:1419
    C-variable integration type - wrapper around a Cyclone object pointer.
    Definition: types.h:598
    -
    object Cyc_system(object cmd)
    Definition: runtime.c:2953
    -
    const object primitive__95
    Definition: runtime.c:5772
    -
    object Cyc_string2number_(void *d, object cont, object str)
    Definition: runtime.c:2098
    -
    const object primitive_make_91bytevector
    Definition: runtime.c:5854
    -
    object Cyc_display_va_list(void *data, int argc, object x, va_list ap)
    Definition: runtime.c:791
    -
    object Cyc_make_vector(void *data, object cont, int argc, object len,...)
    Definition: runtime.c:2498
    -
    void Cyc_set_globals_changed(gc_thread_data *thd)
    Definition: runtime.c:460
    -
    const object primitive_equal_127
    Definition: runtime.c:5792
    +
    object Cyc_system(object cmd)
    Definition: runtime.c:2990
    +
    const object primitive__95
    Definition: runtime.c:5817
    +
    object Cyc_string2number_(void *d, object cont, object str)
    Definition: runtime.c:2135
    +
    const object primitive_make_91bytevector
    Definition: runtime.c:5899
    +
    object Cyc_display_va_list(void *data, int argc, object x, va_list ap)
    Definition: runtime.c:828
    +
    object Cyc_make_vector(void *data, object cont, int argc, object len,...)
    Definition: runtime.c:2535
    +
    void Cyc_set_globals_changed(gc_thread_data *thd)
    Definition: runtime.c:471
    +
    const object primitive_equal_127
    Definition: runtime.c:5837
    object Cyc_char_eq_op(void *data, object a, object b)
    const object boolean_t
    Definition: runtime.c:306
    -
    const object primitive_char_127
    Definition: runtime.c:5869
    -
    const object primitive__123
    Definition: runtime.c:5773
    -
    const object primitive_Cyc_91write
    Definition: runtime.c:5897
    -
    const object primitive_Cyc_91set_91cvar_67
    Definition: runtime.c:5762
    -
    const object primitive_Cyc_91bytevector_91copy
    Definition: runtime.c:5858
    -
    const object primitive_cdr
    Definition: runtime.c:5805
    -
    void Cyc_make_rectangular(void *data, object k, object r, object i)
    Definition: runtime.c:6098
    -
    const object primitive_Cyc_91default_91exception_91handler
    Definition: runtime.c:5783
    -
    const object primitive_Cyc_91opaque_127
    Definition: runtime.c:5764
    -
    object Cyc_get_cvar(object var)
    Definition: runtime.c:685
    +
    const object primitive_char_127
    Definition: runtime.c:5914
    +
    const object primitive__123
    Definition: runtime.c:5818
    +
    const object primitive_Cyc_91write
    Definition: runtime.c:5942
    +
    const object primitive_Cyc_91set_91cvar_67
    Definition: runtime.c:5807
    +
    const object primitive_Cyc_91bytevector_91copy
    Definition: runtime.c:5903
    +
    const object primitive_cdr
    Definition: runtime.c:5850
    +
    void Cyc_make_rectangular(void *data, object k, object r, object i)
    Definition: runtime.c:6151
    +
    const object primitive_Cyc_91default_91exception_91handler
    Definition: runtime.c:5828
    +
    const object primitive_Cyc_91opaque_127
    Definition: runtime.c:5809
    +
    object Cyc_get_cvar(object var)
    Definition: runtime.c:722
    long global_stack_size
    -
    object Cyc_number2string2(void *data, object cont, int argc, object n,...)
    Definition: runtime.c:1841
    -
    const object primitive__121
    Definition: runtime.c:5775
    -
    const object primitive__75halt
    Definition: runtime.c:5779
    -
    void Cyc_rt_raise2(void *data, const char *msg, object err)
    Definition: runtime.c:566
    -
    object Cyc_list(void *data, int argc, object cont,...)
    Definition: runtime.c:1985
    -
    const object primitive_caadar
    Definition: runtime.c:5820
    +
    object Cyc_number2string2(void *data, object cont, int argc, object n,...)
    Definition: runtime.c:1878
    +
    const object primitive__121
    Definition: runtime.c:5820
    +
    const object primitive__75halt
    Definition: runtime.c:5824
    +
    void Cyc_rt_raise2(void *data, const char *msg, object err)
    Raise an exception from the runtime code.
    Definition: runtime.c:598
    +
    object Cyc_list(void *data, int argc, object cont,...)
    Definition: runtime.c:2022
    +
    const object primitive_caadar
    Definition: runtime.c:5865
    void gc_init_heap(long heap_size)
    Perform one-time heap initializations for the program.
    Definition: runtime.c:275
    -
    const object primitive_read_91char
    Definition: runtime.c:5893
    -
    const object primitive_Cyc_91end_91thread_67
    Definition: runtime.c:5768
    -
    object Cyc_integer2char(void *data, object n)
    Definition: runtime.c:2979
    -
    object Cyc_io_file_exists(void *data, object filename)
    Definition: runtime.c:4021
    +
    const object primitive_read_91char
    Definition: runtime.c:5938
    +
    const object primitive_Cyc_91end_91thread_67
    Definition: runtime.c:5813
    +
    object Cyc_integer2char(void *data, object n)
    Definition: runtime.c:3016
    +
    object Cyc_io_file_exists(void *data, object filename)
    Definition: runtime.c:4058
    void set_env_variables(char **vars)
    Definition: runtime.c:212
    void(* function_type)()
    Definition: types.h:587
    -
    int octstr2int(const char *str)
    Definition: runtime.c:2143
    -
    object Cyc_string2utf8(void *data, object cont, object str, object start, object end)
    Definition: runtime.c:2763
    -
    object find_or_add_symbol(const char *name)
    Definition: runtime.c:393
    -
    void Cyc_end_thread(gc_thread_data *thd)
    Definition: runtime.c:6001
    -
    const object primitive_file_91exists_127
    Definition: runtime.c:5891
    -
    object Cyc_string2number2_(void *data, object cont, int argc, object str,...)
    Definition: runtime.c:1992
    +
    int octstr2int(const char *str)
    Definition: runtime.c:2180
    +
    object Cyc_string2utf8(void *data, object cont, object str, object start, object end)
    Definition: runtime.c:2800
    +
    object find_or_add_symbol(const char *name)
    Definition: runtime.c:404
    +
    void Cyc_end_thread(gc_thread_data *thd)
    Definition: runtime.c:6046
    +
    const object primitive_file_91exists_127
    Definition: runtime.c:5936
    +
    object Cyc_string2number2_(void *data, object cont, int argc, object str,...)
    Definition: runtime.c:2029
    object cell_get(object cell)
    Definition: runtime.c:297
    -
    object Cyc_bytevector_u8_set(void *data, object bv, object k, object b)
    Definition: runtime.c:2874
    -
    const object primitive_assv
    Definition: runtime.c:5794
    -
    object apply_va(void *data, object cont, int argc, object func,...)
    Definition: runtime.c:4994
    -
    list malloc_make_pair(object, object)
    Definition: runtime.c:4036
    -
    const object primitive_vector_127
    Definition: runtime.c:5881
    -
    const object primitive_bytevector
    Definition: runtime.c:5856
    -
    object Cyc_io_peek_char(void *data, object cont, object port)
    Definition: runtime.c:6814
    +
    object Cyc_bytevector_u8_set(void *data, object bv, object k, object b)
    Definition: runtime.c:2911
    +
    const object primitive_assv
    Definition: runtime.c:5839
    +
    object apply_va(void *data, object cont, int argc, object func,...)
    Definition: runtime.c:5031
    +
    list malloc_make_pair(object, object)
    Definition: runtime.c:4073
    +
    const object primitive_vector_127
    Definition: runtime.c:5926
    +
    const object primitive_bytevector
    Definition: runtime.c:5901
    +
    object Cyc_io_peek_char(void *data, object cont, object port)
    Definition: runtime.c:6867
    object Cyc_num_lt(void *, object cont, int argc, object n,...)
    -
    object Cyc_num_op_va_list(void *data, int argc, object(fn_op(void *, common_type *, object)), int default_no_args, int default_one_arg, object n, va_list ns, common_type *buf)
    Definition: runtime.c:3675
    -
    object Cyc_bytevector_length(void *data, object bv)
    Definition: runtime.c:2893
    -
    const object primitive_exit
    Definition: runtime.c:5780
    -
    const object primitive_caaaar
    Definition: runtime.c:5818
    -
    int Cyc_utf8_count_code_points(uint8_t *s)
    Count the number of code points in a string. Based on example code from Bjoern Hoehrmann.
    Definition: runtime.c:7202
    -
    const object primitive_vector_91length
    Definition: runtime.c:5799
    -
    const object primitive_call_95cc
    Definition: runtime.c:5899
    -
    object find_symbol_by_name(const char *name)
    Definition: runtime.c:366
    -
    int Cyc_utf8_encode(char *dest, int sz, uint32_t *src, int srcsz)
    Definition: runtime.c:7306
    -
    object Cyc_set_car(void *, object l, object val)
    Definition: runtime.c:1744
    +
    object Cyc_num_op_va_list(void *data, int argc, object(fn_op(void *, common_type *, object)), int default_no_args, int default_one_arg, object n, va_list ns, common_type *buf)
    Definition: runtime.c:3712
    +
    object Cyc_bytevector_length(void *data, object bv)
    Definition: runtime.c:2930
    +
    const object primitive_exit
    Definition: runtime.c:5825
    +
    const object primitive_caaaar
    Definition: runtime.c:5863
    +
    int Cyc_utf8_count_code_points(uint8_t *s)
    Count the number of code points in a string. Based on example code from Bjoern Hoehrmann.
    Definition: runtime.c:7263
    +
    const object primitive_vector_91length
    Definition: runtime.c:5844
    +
    const object primitive_call_95cc
    Definition: runtime.c:5944
    +
    object find_symbol_by_name(const char *name)
    Definition: runtime.c:377
    +
    int Cyc_utf8_encode(char *dest, int sz, uint32_t *src, int srcsz)
    Definition: runtime.c:7375
    +
    object Cyc_set_car(void *, object l, object val)
    Definition: runtime.c:1781
    uint32_t char_type
    Definition: types.h:523
    -
    object Cyc_bytevector_append(void *data, object cont, int _argc, object bv,...)
    Definition: runtime.c:2679
    -
    const object primitive__125_123
    Definition: runtime.c:5776
    -
    object __halt(object obj)
    Definition: runtime.c:2996
    -
    object Cyc_string_cmp(void *data, object str1, object str2)
    Definition: runtime.c:2153
    -
    const object primitive_eof_91object_127
    Definition: runtime.c:5870
    -
    const object primitive_bytevector_91u8_91set_67
    Definition: runtime.c:5861
    -
    const object primitive_eq_127
    Definition: runtime.c:5790
    -
    object Cyc_set_cdr(void *, object l, object val)
    Definition: runtime.c:1754
    -
    const object primitive_Cyc_91string_91_125utf8
    Definition: runtime.c:5863
    +
    object Cyc_bytevector_append(void *data, object cont, int _argc, object bv,...)
    Definition: runtime.c:2716
    +
    const object primitive__125_123
    Definition: runtime.c:5821
    +
    object __halt(object obj)
    Definition: runtime.c:3033
    +
    object Cyc_string_cmp(void *data, object str1, object str2)
    Definition: runtime.c:2190
    +
    const object primitive_eof_91object_127
    Definition: runtime.c:5915
    +
    const object primitive_bytevector_91u8_91set_67
    Definition: runtime.c:5906
    +
    const object primitive_eq_127
    Definition: runtime.c:5835
    +
    object Cyc_set_cdr(void *, object l, object val)
    Definition: runtime.c:1791
    +
    const object primitive_Cyc_91string_91_125utf8
    Definition: runtime.c:5908
    object Cyc_mul_op(void *data, common_type *x, object y)
    -
    object Cyc_string_byte_length(void *data, object str)
    Definition: runtime.c:2214
    -
    const object primitive_cdaaar
    Definition: runtime.c:5826
    -
    const object primitive_string_91_125number
    Definition: runtime.c:5836
    -
    const object primitive_eqv_127
    Definition: runtime.c:5791
    -
    const object primitive_string_91_125symbol
    Definition: runtime.c:5851
    -
    const object primitive_cadddr
    Definition: runtime.c:5825
    -
    void do_dispatch(void *data, int argc, function_type func, object clo, object *buffer)
    -
    void Cyc_exit_thread(gc_thread_data *thd)
    Definition: runtime.c:6010
    -
    object Cyc_write_va_list(void *data, int argc, object x, va_list ap)
    Definition: runtime.c:990
    -
    const object primitive_bytevector_91u8_91ref
    Definition: runtime.c:5860
    -
    object Cyc_vector_set(void *d, object v, object k, object obj)
    Definition: runtime.c:1764
    -
    const object primitive__91
    Definition: runtime.c:5770
    -
    const object primitive_list_91_125vector
    Definition: runtime.c:5867
    +
    object Cyc_string_byte_length(void *data, object str)
    Definition: runtime.c:2251
    +
    const object primitive_cdaaar
    Definition: runtime.c:5871
    +
    const object primitive_string_91_125number
    Definition: runtime.c:5881
    +
    const object primitive_eqv_127
    Definition: runtime.c:5836
    +
    const object primitive_string_91_125symbol
    Definition: runtime.c:5896
    +
    const object primitive_cadddr
    Definition: runtime.c:5870
    +
    void do_dispatch(void *data, int argc, function_type func, object clo, object *buffer)
    Definition: dispatch.c:5
    +
    void Cyc_exit_thread(gc_thread_data *thd)
    Definition: runtime.c:6055
    +
    object Cyc_write_va_list(void *data, int argc, object x, va_list ap)
    Definition: runtime.c:1027
    +
    const object primitive_bytevector_91u8_91ref
    Definition: runtime.c:5905
    +
    object Cyc_vector_set(void *d, object v, object k, object obj)
    Definition: runtime.c:1801
    +
    const object primitive__91
    Definition: runtime.c:5815
    +
    const object primitive_list_91_125vector
    Definition: runtime.c:5912
    int Cyc_num_gte_op(void *, object x, object y)
    -
    const object primitive_vector_91ref
    Definition: runtime.c:5800
    +
    const object primitive_vector_91ref
    Definition: runtime.c:5845
    port_type * Cyc_io_open_input_string(void *data, object str)
    Definition: mstreams.c:35
    -
    object Cyc_string_length(void *data, object str)
    Definition: runtime.c:2208
    -
    object Cyc_has_cycle(object lst)
    Definition: runtime.c:713
    -
    object Cyc_trigger_minor_gc(void *data, object cont)
    Definition: runtime.c:5305
    -
    const object primitive_system
    Definition: runtime.c:5847
    +
    object Cyc_string_length(void *data, object str)
    Definition: runtime.c:2245
    +
    object Cyc_has_cycle(object lst)
    Definition: runtime.c:750
    +
    object Cyc_trigger_minor_gc(void *data, object cont)
    Trigger a minor GC for the calling thread.
    Definition: runtime.c:5350
    +
    const object primitive_system
    Definition: runtime.c:5892
    object Cyc_global_set(void *thd, object *glo, object value)
    Definition: runtime.c:24
    -
    object Cyc_list2string(void *d, object cont, object lst)
    Definition: runtime.c:1935
    -
    object Cyc_fast_div(void *data, object ptr, object x, object y)
    Definition: runtime.c:3458
    -
    object Cyc_glo_eval_from_c
    Definition: runtime.c:506
    -
    object Cyc_display_va(void *data, int argc, object x,...)
    Definition: runtime.c:781
    -
    const object primitive_macro_127
    Definition: runtime.c:5877
    +
    object Cyc_list2string(void *d, object cont, object lst)
    Definition: runtime.c:1972
    +
    object Cyc_fast_div(void *data, object ptr, object x, object y)
    Definition: runtime.c:3495
    +
    object Cyc_glo_eval_from_c
    Definition: runtime.c:517
    +
    object Cyc_display_va(void *data, int argc, object x,...)
    Definition: runtime.c:818
    +
    const object primitive_macro_127
    Definition: runtime.c:5922
    object Cyc_char_lte_op(void *data, object a, object b)
    -
    const object primitive_memv
    Definition: runtime.c:5796
    -
    const object primitive_peek_91char
    Definition: runtime.c:5894
    -
    const object primitive_cadar
    Definition: runtime.c:5812
    -
    object Cyc_utf82string(void *data, object cont, object bv, object start, object end)
    Definition: runtime.c:2729
    -
    object Cyc_io_close_input_port(void *data, object port)
    Definition: runtime.c:3959
    -
    object Cyc_io_read_u8(void *data, object cont, object port)
    Definition: runtime.c:6933
    -
    object dispatch_string_91append(void *data, int argc, object clo, object cont, object str1,...)
    Definition: runtime.c:2193
    +
    const object primitive_memv
    Definition: runtime.c:5841
    +
    const object primitive_peek_91char
    Definition: runtime.c:5939
    +
    const object primitive_cadar
    Definition: runtime.c:5857
    +
    object Cyc_utf82string(void *data, object cont, object bv, object start, object end)
    Definition: runtime.c:2766
    +
    object Cyc_io_close_input_port(void *data, object port)
    Definition: runtime.c:3996
    +
    object Cyc_io_read_u8(void *data, object cont, object port)
    Definition: runtime.c:6986
    +
    object dispatch_string_91append(void *data, int argc, object clo, object cont, object str1,...)
    Definition: runtime.c:2230
    object Cyc_sub(void *data, object cont, int argc, object n,...)
    -
    const object primitive_symbol_91_125string
    Definition: runtime.c:5852
    +
    const object primitive_symbol_91_125string
    Definition: runtime.c:5897
    object Cyc_char_lt_op(void *data, object a, object b)
    -
    port_type Cyc_stdin(void)
    Definition: runtime.c:3921
    -
    const object primitive_boolean_127
    Definition: runtime.c:5868
    +
    port_type Cyc_stdin(void)
    Definition: runtime.c:3958
    +
    const object primitive_boolean_127
    Definition: runtime.c:5913
    object Cyc_sum(void *data, object cont, int argc, object n,...)
    void pack_env_variables(void *data, object k)
    Definition: runtime.c:168
    -
    object Cyc_bytevector_copy(void *data, object cont, object bv, object start, object end)
    Definition: runtime.c:2684
    +
    object Cyc_bytevector_copy(void *data, object cont, object bv, object start, object end)
    Definition: runtime.c:2721
    int Cyc_num_eq_op(void *, object x, object y)
    -
    object Cyc_fast_sub(void *data, object ptr, object x, object y)
    Definition: runtime.c:3258
    -
    const object primitive_Cyc_91installation_91dir
    Definition: runtime.c:5841
    -
    const object primitive_Cyc_91cvar_127
    Definition: runtime.c:5763
    -
    const object primitive_caadr
    Definition: runtime.c:5811
    -
    const object primitive_close_91output_91port
    Definition: runtime.c:5888
    -
    const object primitive_bytevector_127
    Definition: runtime.c:5882
    -
    const object primitive_make_91vector
    Definition: runtime.c:5855
    -
    const object primitive_cadr
    Definition: runtime.c:5807
    +
    object Cyc_fast_sub(void *data, object ptr, object x, object y)
    Definition: runtime.c:3295
    +
    const object primitive_Cyc_91installation_91dir
    Definition: runtime.c:5886
    +
    const object primitive_Cyc_91cvar_127
    Definition: runtime.c:5808
    +
    const object primitive_caadr
    Definition: runtime.c:5856
    +
    const object primitive_close_91output_91port
    Definition: runtime.c:5933
    +
    const object primitive_bytevector_127
    Definition: runtime.c:5927
    +
    const object primitive_make_91vector
    Definition: runtime.c:5900
    +
    const object primitive_cadr
    Definition: runtime.c:5852
    object Cyc_mul(void *data, object cont, int argc, object n,...)
    -
    const object primitive_bytevector_91length
    Definition: runtime.c:5798
    -
    const object primitive_set_91global_67
    Definition: runtime.c:5787
    -
    object Cyc_is_real(object o)
    Definition: runtime.c:1583
    +
    const object primitive_bytevector_91length
    Definition: runtime.c:5843
    +
    const object primitive_set_91global_67
    Definition: runtime.c:5832
    +
    object Cyc_is_real(object o)
    Definition: runtime.c:1620
    object Cyc_num_fast_gt_op(void *data, object x, object y)
    -
    void Cyc_st_print(void *data, FILE *out)
    Definition: runtime.c:325
    +
    void Cyc_st_print(void *data, FILE *out)
    Print the contents of the given thread&#39;s stack trace buffer.
    Definition: runtime.c:336
    int Cyc_num_lt_op(void *, object x, object y)
    -
    const object primitive_assq
    Definition: runtime.c:5793
    -
    object Cyc_bit_unset(void *data, object n1, object n2)
    Definition: runtime.c:6077
    +
    const object primitive_assq
    Definition: runtime.c:5838
    +
    object Cyc_bit_unset(void *data, object n1, object n2)
    Definition: runtime.c:6130
    void Cyc_check_bounds(void *data, const char *label, int len, int index)
    Definition: runtime.c:79
    -
    const object primitive_integer_91_125char
    Definition: runtime.c:5835
    -
    object Cyc_div(void *data, object cont, int argc, object n,...)
    Definition: runtime.c:3648
    +
    const object primitive_integer_91_125char
    Definition: runtime.c:5880
    +
    object Cyc_div(void *data, object cont, int argc, object n,...)
    Definition: runtime.c:3685
    object Cyc_char_gt_op(void *data, object a, object b)
    void Cyc_invalid_type_error(void *data, int tag, object found)
    Definition: runtime.c:60
    -
    const object primitive_caaddr
    Definition: runtime.c:5821
    -
    const object primitive_cdadr
    Definition: runtime.c:5815
    -
    const object primitive_char_91_125integer
    Definition: runtime.c:5834
    -
    port_type Cyc_stderr(void)
    Definition: runtime.c:3927
    +
    const object primitive_caaddr
    Definition: runtime.c:5866
    +
    const object primitive_cdadr
    Definition: runtime.c:5860
    +
    const object primitive_char_91_125integer
    Definition: runtime.c:5879
    +
    port_type Cyc_stderr(void)
    Definition: runtime.c:3964
    A union of all the constant-size objects.
    Definition: types.h:1308
    -
    void dispatch_apply_va(void *data, int argc, object clo, object cont, object func,...)
    Definition: runtime.c:4983
    -
    object Cyc_display(void *data, object, FILE *port)
    Definition: runtime.c:807
    +
    void dispatch_apply_va(void *data, int argc, object clo, object cont, object func,...)
    Definition: runtime.c:5020
    +
    object Cyc_display(void *data, object, FILE *port)
    Definition: runtime.c:844
    #define car(x)
    Definition: types.h:1136
    int _cyc_argc
    Definition: runtime.h:497
    -
    const object primitive__85
    Definition: runtime.c:5771
    +
    const object primitive__85
    Definition: runtime.c:5816
    object Cyc_num_eq(void *, object cont, int argc, object n,...)
    object Cyc_num_fast_lt_op(void *data, object x, object y)
    -
    list assoc_cdr(void *data, object x, list l)
    Definition: runtime.c:1208
    -
    object Cyc_symbol2string(void *d, object cont, object sym)
    Definition: runtime.c:1915
    -
    const object primitive_bytevector_91append
    Definition: runtime.c:5857
    -
    object Cyc_current_exception_handler(void *data)
    Definition: runtime.c:544
    -
    const object primitive_Cyc_91get_91cvar
    Definition: runtime.c:5761
    -
    object Cyc_set_cvar(object var, object value)
    Definition: runtime.c:693
    -
    void Cyc_halt(object obj)
    Definition: runtime.c:2988
    -
    object is_library_loaded(const char *name)
    Definition: runtime.c:406
    +
    list assoc_cdr(void *data, object x, list l)
    Definition: runtime.c:1245
    +
    object Cyc_symbol2string(void *d, object cont, object sym)
    Definition: runtime.c:1952
    +
    const object primitive_bytevector_91append
    Definition: runtime.c:5902
    +
    object Cyc_current_exception_handler(void *data)
    Return the current exception handler.
    Definition: runtime.c:566
    +
    const object primitive_Cyc_91get_91cvar
    Definition: runtime.c:5806
    +
    object Cyc_set_cvar(object var, object value)
    Definition: runtime.c:730
    +
    void Cyc_halt(object obj)
    Definition: runtime.c:3025
    +
    object is_library_loaded(const char *name)
    Definition: runtime.c:417
    object Cyc_num_gte(void *, object cont, int argc, object n,...)
    -
    const object primitive_Cyc_91has_91cycle_127
    Definition: runtime.c:5765
    -
    object memqp(void *data, object x, list l)
    Definition: runtime.c:1169
    -
    object Cyc_is_number(object o)
    Definition: runtime.c:1572
    -
    object Cyc_is_integer(object o)
    Definition: runtime.c:1602
    -
    const object primitive_Cyc_91current_91exception_91handler
    Definition: runtime.c:5781
    -
    const object primitive_Cyc_91utf8_91_125string
    Definition: runtime.c:5865
    -
    object Cyc_io_close_port(void *data, object port)
    Definition: runtime.c:3969
    -
    object Cyc_command_line_arguments(void *data, object cont)
    Definition: runtime.c:2479
    -
    const object primitive_set_91cell_67
    Definition: runtime.c:5788
    -
    const object primitive_cdddar
    Definition: runtime.c:5832
    -
    object Cyc_bytevector(void *data, object cont, int argc, object bval,...)
    Definition: runtime.c:2633
    -
    list global_table
    Definition: runtime.c:430
    -
    const object primitive_length
    Definition: runtime.c:5797
    -
    object Cyc_is_procedure(void *data, object o)
    Definition: runtime.c:1674
    +
    const object primitive_Cyc_91has_91cycle_127
    Definition: runtime.c:5810
    +
    object memqp(void *data, object x, list l)
    Definition: runtime.c:1206
    +
    object Cyc_is_number(object o)
    Definition: runtime.c:1609
    +
    object Cyc_is_integer(object o)
    Definition: runtime.c:1639
    +
    const object primitive_Cyc_91current_91exception_91handler
    Definition: runtime.c:5826
    +
    const object primitive_Cyc_91utf8_91_125string
    Definition: runtime.c:5910
    +
    object Cyc_io_close_port(void *data, object port)
    Definition: runtime.c:4006
    +
    object Cyc_command_line_arguments(void *data, object cont)
    Definition: runtime.c:2516
    +
    const object primitive_set_91cell_67
    Definition: runtime.c:5833
    +
    const object primitive_cdddar
    Definition: runtime.c:5877
    +
    object Cyc_bytevector(void *data, object cont, int argc, object bval,...)
    Definition: runtime.c:2670
    +
    list global_table
    Definition: runtime.c:441
    +
    const object primitive_length
    Definition: runtime.c:5842
    +
    object Cyc_is_procedure(void *data, object o)
    Definition: runtime.c:1711
    bn_cmp_type
    Definition: types.h:798
    -
    list assoc(void *data, object x, list l)
    Definition: runtime.c:1192
    -
    const object primitive_Cyc_91spawn_91thread_67
    Definition: runtime.c:5766
    -
    const object primitive_Cyc_91compilation_91environment
    Definition: runtime.c:5843
    -
    const object primitive_Cyc_91global_91vars
    Definition: runtime.c:5760
    -
    const object primitive_cddddr
    Definition: runtime.c:5833
    -
    object Cyc_installation_dir(void *data, object cont, object type)
    Definition: runtime.c:2410
    +
    list assoc(void *data, object x, list l)
    Definition: runtime.c:1229
    +
    const object primitive_Cyc_91spawn_91thread_67
    Definition: runtime.c:5811
    +
    const object primitive_Cyc_91compilation_91environment
    Definition: runtime.c:5888
    +
    const object primitive_Cyc_91global_91vars
    Definition: runtime.c:5805
    +
    const object primitive_cddddr
    Definition: runtime.c:5878
    +
    object Cyc_installation_dir(void *data, object cont, object type)
    Definition: runtime.c:2447
    #define Cyc_check_pair(d, obj)
    Definition: runtime.h:73
    -
    object Cyc_bignum_normalize(void *data, object n)
    Definition: runtime.c:1350
    +
    object Cyc_bignum_normalize(void *data, object n)
    Definition: runtime.c:1387
    object Cyc_sum_op(void *data, common_type *x, object y)
    -
    const object primitive_string_91cmp
    Definition: runtime.c:5848
    -
    object Cyc_vector_length(void *data, object v)
    Definition: runtime.c:1796
    -
    object apply(void *data, object cont, object func, object args)
    Definition: runtime.c:5009
    -
    const object primitive_cell_91get
    Definition: runtime.c:5786
    -
    object Cyc_io_peek_u8(void *data, object cont, object port)
    Definition: runtime.c:6869
    -
    const object primitive_pair_127
    Definition: runtime.c:5875
    +
    const object primitive_string_91cmp
    Definition: runtime.c:5893
    +
    object Cyc_vector_length(void *data, object v)
    Definition: runtime.c:1833
    +
    object apply(void *data, object cont, object func, object args)
    Definition: runtime.c:5046
    +
    const object primitive_cell_91get
    Definition: runtime.c:5831
    +
    object Cyc_io_peek_u8(void *data, object cont, object port)
    Definition: runtime.c:6922
    +
    const object primitive_pair_127
    Definition: runtime.c:5920
    #define prim(x)
    Definition: types.h:1299
    -
    const object primitive__87
    Definition: runtime.c:5769
    -
    const object primitive_cadadr
    Definition: runtime.c:5823
    -
    const object primitive_number_127
    Definition: runtime.c:5872
    +
    const object primitive__87
    Definition: runtime.c:5814
    +
    const object primitive_cadadr
    Definition: runtime.c:5868
    +
    const object primitive_number_127
    Definition: runtime.c:5917
    object Cyc_num_lte(void *, object cont, int argc, object n,...)
    -
    list assq(void *data, object x, list l)
    Definition: runtime.c:1179
    +
    list assq(void *data, object x, list l)
    Definition: runtime.c:1216
    void Cyc_check_obj(void *data, int tag, object obj)
    Definition: runtime.c:72
    -
    port_type Cyc_io_open_output_file(void *data, object str)
    Definition: runtime.c:3946
    -
    void GC(void *, closure, object *, int)
    Definition: runtime.c:5461
    +
    port_type Cyc_io_open_output_file(void *data, object str)
    Definition: runtime.c:3983
    +
    void GC(void *, closure, object *, int)
    Definition: runtime.c:5506
    object Cyc_num_fast_gte_op(void *data, object x, object y)
    -
    const object primitive_real_127
    Definition: runtime.c:5873
    -
    const object primitive_string_91set_67
    Definition: runtime.c:5840
    -
    const object primitive_cdar
    Definition: runtime.c:5808
    -
    const object primitive_cddadr
    Definition: runtime.c:5831
    -
    object Cyc_div_op(void *data, common_type *x, object y)
    Definition: runtime.c:3550
    -
    const object primitive_cddar
    Definition: runtime.c:5816
    -
    const object primitive_close_91port
    Definition: runtime.c:5886
    -
    object Cyc_is_complex(object o)
    Definition: runtime.c:1588
    +
    const object primitive_real_127
    Definition: runtime.c:5918
    +
    const object primitive_string_91set_67
    Definition: runtime.c:5885
    +
    const object primitive_cdar
    Definition: runtime.c:5853
    +
    const object primitive_cddadr
    Definition: runtime.c:5876
    +
    object Cyc_div_op(void *data, common_type *x, object y)
    Definition: runtime.c:3587
    +
    const object primitive_cddar
    Definition: runtime.c:5861
    +
    const object primitive_close_91port
    Definition: runtime.c:5931
    +
    object Cyc_is_complex(object o)
    Definition: runtime.c:1625