From cdd3fd37f71aa3a6abbcecc9d8ceb582022c4b61 Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Tue, 28 Feb 2017 00:19:48 -0500 Subject: [PATCH] Sync --- c-api/files.html | 7 +- ..._8c_a098c8f133063f61acf0ea4f61e02f759.html | 2 +- c-api/globals_d.html | 11 +- c-api/globals_func_d.html | 7 +- c-api/globals_func_g.html | 47 +- c-api/globals_g.html | 35 +- c-api/group__gc__major.html | 3 +- ...or_ga08c98f6a7999fcdcde8c21344cd51d63.html | 1 - ...or_ga0a33ee3f5c77cf4b03b37e0ba3308070.html | 1 - ...or_ga1091a8b18fc274af25f5155e3bf7a1ff.html | 1 - ...or_ga11081c291bf7b8ca714d6ba09e0912d7.html | 1 - ...or_ga15186c504a0fb0727cd7d405b0b2d9a5.html | 1 - ...or_ga197294109a9a037b9a6641ce41ff9608.html | 1 - ...or_ga1b45302695680930829cac31d65e41e1.html | 1 - ...or_ga2031d7ff5d1678d2aa7954c5fa3b989e.html | 1 - ...or_ga20cf7c4fac92c3cb1adb025813ea2a99.html | 1 - ...or_ga2118e3b31300a7ddcd96c95e218f862e.html | 1 - ...or_ga21b50029124a435e12dd1fb97f1f4275.html | 1 - ...or_ga21e9a50a7de06a81cbcc934bd8e4809c.html | 1 - ...or_ga24af05ed1aef52dcba9177511705682d.html | 1 - ...or_ga2f62288e6f57fe9fbff4bae5bd782e44.html | 1 - ...or_ga34834cdbd4e4f511ad8e918f0fb2d765.html | 1 - ...or_ga4074eefce64a43efc40de89bc9595c9b.html | 1 - ...or_ga46bc54c66f56b0006420ce310c2729c1.html | 1 - ...or_ga4c76104f4bb633c0594334508f8a19b1.html | 1 - ...or_ga506d5fadc6ed572bbb11b122193ea36d.html | 1 - ...or_ga51690b332091995ffd5c7318f569f934.html | 1 - ...or_ga600c743cb3da304751627e36099445b9.html | 1 - ...or_ga61dd942ed84e904a5c297fdc57fd4d7a.html | 1 - ...or_ga63112677a59a58464bc08d5ef2a91c6c.html | 1 - ...or_ga6490c2be516744d1cdc225b9ef2688ca.html | 1 - ...or_ga66382faf126033f74c62e4eb8a4c4cbe.html | 1 - ...or_ga6934bc689d9c64df40d96fbd4db8cbd7.html | 1 - ...or_ga6a88578b8802b9bca9f56e0ccfdff435.html | 1 - ...or_ga734c99799a64ad0450ca6879900640f5.html | 1 - ...or_ga75b3fd7dd320d8524d0dcad79cc1eb1e.html | 1 - ...or_ga7ca46159df2a2857a042f5b83b8903c4.html | 1 - ...or_ga7f1dfa939185ca0cf6d194c991000185.html | 1 - ...or_ga7fac46df80136375f0aabd3af30a8874.html | 1 - ...or_ga91caaa8e3c877e2780b365e593bbfef9.html | 1 - ...or_ga9427b1684a8ab0eba8315606d67709ed.html | 1 - ...or_ga969e0c6129a50134006fe4b380965cb2.html | 1 - ...or_ga976021ebdbed6eb538d78c744c1ef931.html | 1 - ...or_ga977b02989cc5091ac256ca154f5e78ee.html | 1 - ...or_ga9c86247beb6521f42271c87685c41288.html | 1 - ...or_ga9dc80c9089068607718ad99e9cd77fcc.html | 1 - ...or_gaa1745070eb682d926f656f3017ccedda.html | 1 - ...or_gaa64a151f71c793be3f27b6f70c8a98bd.html | 1 - ...or_gaa8776e5cc0c3bf309c76dc61f0c7f838.html | 1 - ...or_gaac1a9d422fb7cf93b7de39bd41e0cad2.html | 1 - ...or_gab19d274a8cfbf5274db73e35f2fb18b5.html | 1 - ...or_gab4c9dba3c0f373c7a74e89e35b919fe8.html | 1 - ...or_gabbaa9e82df175595165b5309ffb360b5.html | 1 - ...or_gabdf15a8d52624122c76c2ae9df4a3cdc.html | 1 - ...or_gabebf61106ee21a438dcb21fc8a9fb05b.html | 1 - ...or_gabf9a3adddd986f1f953d4ddc1c795491.html | 1 - ...or_gac5dc8552660d7975bbdf83c59e6c5dd3.html | 9 +- ...or_gacc34220240fa78aaed5482565c8952e6.html | 1 - ...or_gacdd780abddd9b089bc19771035890bf5.html | 1 - ...or_gad09673fe7b5673515705b6a821648cbe.html | 1 - ...or_gad107cf5b38c74e2cd84a8159940b6579.html | 1 - ...or_gadb0efe9a5fa3686ffe062cb1ce16f8c1.html | 1 - ...or_gadd73c9a0b9b1112d6d941dee642893e7.html | 1 - ...or_gadd82bcff4895bd4ca335a45109597102.html | 1 - ...or_gadf94b852782bd0108138e3b97fc1113b.html | 1 - ...or_gae43e9fb0564edc5ecf489ead57731d52.html | 1 - ...or_gae4b0fc6e4b949f950ecf85d3135bfd9a.html | 1 - ...or_gaec0fd25a5b345b9ad50842b08bed4027.html | 1 - ...or_gaf98d32e8f592dc38f4cd01c153e91a2d.html | 1 - ...or_gafa9a2390e7f946a0526be8c21d3ec864.html | 1 - ...or_gafcdb2c9fc0d53c3b0971b6fe85916858.html | 1 - ...rr_ga099dcb668802d7bece1e4cdde826121d.html | 2 +- ...rr_ga2e6927f223a2bc6802c66114d42aee2f.html | 2 +- ...rr_gaa2354df89425b979e4932a3b466d72e0.html | 2 +- ...um_gae8ea3533e198e99a23b42b6d075fb560.html | 2 +- c-api/runtime_8c.html | 1 + ..._8c_a716a4025cfe7438ee0a309ff456f095c.html | 2 +- c-api/runtime_8h.html | 1 + c-api/runtime_8h_source.html | 556 +++++++++--------- c-api/search/all_4.js | 3 +- c-api/search/all_7.js | 1 - c-api/search/files_1.js | 2 +- c-api/search/files_2.js | 2 +- c-api/search/files_3.js | 4 +- c-api/search/files_4.js | 4 +- c-api/search/functions_4.js | 2 +- c-api/search/functions_7.js | 1 - c-api/search/searchdata.js | 2 +- c-api/types_8h.html | 2 - ..._8h_a01fe455be3d0b61e715241b4b6b4fc93.html | 1 - ..._8h_a0b27392e34bfe90a8e9dd5fde42fa990.html | 1 - ..._8h_a220de93ec65338197156768ff8236416.html | 1 - ..._8h_a24aed87e9e46908d0a5ad680e82b7ff4.html | 1 - ..._8h_a75a7c8dc50900925e39415036f17dae9.html | 1 - ..._8h_a9f542dda06a1a342304c570baf6347a0.html | 1 - ..._8h_aa78f73754eb4a59f2cefbfa29ebca908.html | 1 - ..._8h_ac2343bb5210a1e0caf42a915dcef7c91.html | 1 - c-api/types_8h_source.html | 25 +- 98 files changed, 365 insertions(+), 443 deletions(-) diff --git a/c-api/files.html b/c-api/files.html index f3de6c4a..90f6788a 100644 --- a/c-api/files.html +++ b/c-api/files.html @@ -70,10 +70,9 @@ $(function() {   cyclone  runtime.h  types.h - dispatch.c - gc.c - mstreams.c - runtime.c + gc.c + mstreams.c + runtime.c diff --git a/c-api/gc_8c_a098c8f133063f61acf0ea4f61e02f759.html b/c-api/gc_8c_a098c8f133063f61acf0ea4f61e02f759.html index a1366d20..fd4fde29 100644 --- a/c-api/gc_8c_a098c8f133063f61acf0ea4f61e02f759.html +++ b/c-api/gc_8c_a098c8f133063f61acf0ea4f61e02f759.html @@ -155,7 +155,7 @@ $(function() {
Value:
if (is_object_type(gobj) && mark(gobj) == gc_color_clear) { \
mark_stack = vpbuffer_add(mark_stack, &mark_stack_len, mark_stack_i++, gobj); \
}
#define mark(x)
Definition: types.h:219
#define is_object_type(x)
Definition: types.h:490
-
void ** vpbuffer_add(void **buf, int *len, int i, void *obj)
Definition: runtime.c:5438
+
void ** vpbuffer_add(void **buf, int *len, int i, void *obj)
Definition: runtime.c:5442

"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 40e0a1ba..f293f508 100644 --- a/c-api/globals_d.html +++ b/c-api/globals_d.html @@ -104,23 +104,22 @@ $(function() { : runtime.c
  • dispatch_string_91append() -: runtime.h -, runtime.c +: runtime.c +, runtime.h
  • dispatch_va() : runtime.h , runtime.c
  • dispatch_write_va() -: runtime.c -, runtime.h +: runtime.h +, runtime.c
  • do_apply_va : runtime.c
  • do_dispatch() -: dispatch.c -, runtime.h +: runtime.h
  • double2buffer() : runtime.c diff --git a/c-api/globals_func_d.html b/c-api/globals_func_d.html index 33506f38..8f10284b 100644 --- a/c-api/globals_func_d.html +++ b/c-api/globals_func_d.html @@ -103,12 +103,11 @@ $(function() { , runtime.h
  • dispatch_write_va() -: runtime.h -, runtime.c +: runtime.c +, runtime.h
  • do_dispatch() -: dispatch.c -, runtime.h +: runtime.h
  • double2buffer() : runtime.c diff --git a/c-api/globals_func_g.html b/c-api/globals_func_g.html index af05246e..a2e4ab9e 100644 --- a/c-api/globals_func_g.html +++ b/c-api/globals_func_g.html @@ -135,9 +135,6 @@ $(function() { : gc.c , types.h
  • -
  • gc_heap_total_size() -: types.h -
  • gc_init_heap() : runtime.h , runtime.c @@ -162,8 +159,8 @@ $(function() { , types.h
  • gc_mark_gray2() -: gc.c -, types.h +: types.h +, gc.c
  • gc_merge_all_heaps() : gc.c @@ -180,32 +177,32 @@ $(function() { , types.h
  • gc_mut_update() -: gc.c -, types.h +: types.h +, gc.c
  • gc_mutator_thread_blocked() : gc.c , types.h
  • gc_mutator_thread_runnable() -: gc.c -, types.h +: types.h +, gc.c
  • gc_post_handshake() -: gc.c -, types.h +: types.h +, gc.c
  • gc_print_stats() -: types.h -, gc.c +: gc.c +, types.h
  • gc_remove_mutator() : gc.c , types.h
  • gc_request_mark_globals() -: runtime.c -, types.h +: types.h +, runtime.c
  • gc_start_collector() : gc.c @@ -215,16 +212,16 @@ $(function() { : gc.c
  • gc_sweep() -: gc.c -, types.h +: types.h +, gc.c
  • gc_thr_add_to_move_buffer() -: types.h -, gc.c +: gc.c +, types.h
  • gc_thr_grow_move_buffer() -: gc.c -, types.h +: types.h +, gc.c
  • gc_thread_data_free() : gc.c @@ -235,8 +232,8 @@ $(function() { , types.h
  • gc_try_alloc() -: types.h -, gc.c +: gc.c +, types.h
  • gc_wait_handshake() : types.h @@ -246,8 +243,8 @@ $(function() { : gc.c
  • get_env_variables() -: runtime.h -, runtime.c +: runtime.c +, runtime.h
  • diff --git a/c-api/globals_g.html b/c-api/globals_g.html index 7fbf077f..bc2ae790 100644 --- a/c-api/globals_g.html +++ b/c-api/globals_g.html @@ -192,9 +192,6 @@ $(function() {
  • gc_heap_root : types.h
  • -
  • gc_heap_total_size() -: types.h -
  • gc_heap_type : types.h
  • @@ -217,8 +214,8 @@ $(function() { : gc.c
  • gc_mark_globals() -: gc.c -, types.h +: types.h +, gc.c
  • gc_mark_gray() : gc.c @@ -250,8 +247,8 @@ $(function() { , types.h
  • gc_mutator_thread_blocked() -: types.h -, gc.c +: gc.c +, types.h
  • gc_mutator_thread_runnable() : gc.c @@ -262,8 +259,8 @@ $(function() { , types.h
  • gc_print_stats() -: gc.c -, types.h +: types.h +, gc.c
  • gc_remove_mutator() : gc.c @@ -290,12 +287,12 @@ $(function() { : gc.c
  • gc_sweep() -: types.h -, gc.c +: gc.c +, types.h
  • gc_thr_add_to_move_buffer() -: types.h -, gc.c +: gc.c +, types.h
  • gc_thr_grow_move_buffer() : types.h @@ -309,8 +306,8 @@ $(function() { , types.h
  • gc_thread_data_init() -: gc.c -, types.h +: types.h +, gc.c
  • gc_try_alloc() : gc.c @@ -324,8 +321,8 @@ $(function() { : gc.c
  • get_env_variables() -: runtime.c -, runtime.h +: runtime.h +, runtime.c
  • global_heap_size : runtime.h @@ -337,8 +334,8 @@ $(function() { : runtime.h
  • global_table -: runtime.h -, runtime.c +: runtime.c +, runtime.h
  • grayed : types.h diff --git a/c-api/group__gc__major.html b/c-api/group__gc__major.html index 293f4e3e..edd65383 100644 --- a/c-api/group__gc__major.html +++ b/c-api/group__gc__major.html @@ -217,9 +217,8 @@ Functions void gc_heap_merge (gc_heap *hdest, gc_heap *hsrc)  Merge one heap into another. More...
      -size_t gc_heap_total_size (gc_heap *h) -  void gc_init_heap (long heap_size) + Perform one-time heap initializations for the program. More...
      void gc_initialize (void)  Perform one-time initialization before mutators can be executed. More...
    diff --git a/c-api/group__gc__major_ga08c98f6a7999fcdcde8c21344cd51d63.html b/c-api/group__gc__major_ga08c98f6a7999fcdcde8c21344cd51d63.html index d15b5e3b..0a619872 100644 --- a/c-api/group__gc__major_ga08c98f6a7999fcdcde8c21344cd51d63.html +++ b/c-api/group__gc__major_ga08c98f6a7999fcdcde8c21344cd51d63.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__gc__major_ga0a33ee3f5c77cf4b03b37e0ba3308070.html b/c-api/group__gc__major_ga0a33ee3f5c77cf4b03b37e0ba3308070.html index c12acef4..dda5ff58 100644 --- a/c-api/group__gc__major_ga0a33ee3f5c77cf4b03b37e0ba3308070.html +++ b/c-api/group__gc__major_ga0a33ee3f5c77cf4b03b37e0ba3308070.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__gc__major_ga1091a8b18fc274af25f5155e3bf7a1ff.html b/c-api/group__gc__major_ga1091a8b18fc274af25f5155e3bf7a1ff.html index 4ea82e3d..4ba5c1f3 100644 --- a/c-api/group__gc__major_ga1091a8b18fc274af25f5155e3bf7a1ff.html +++ b/c-api/group__gc__major_ga1091a8b18fc274af25f5155e3bf7a1ff.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__gc__major_ga11081c291bf7b8ca714d6ba09e0912d7.html b/c-api/group__gc__major_ga11081c291bf7b8ca714d6ba09e0912d7.html index d23fb35a..e6ab1120 100644 --- a/c-api/group__gc__major_ga11081c291bf7b8ca714d6ba09e0912d7.html +++ b/c-api/group__gc__major_ga11081c291bf7b8ca714d6ba09e0912d7.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__gc__major_ga15186c504a0fb0727cd7d405b0b2d9a5.html b/c-api/group__gc__major_ga15186c504a0fb0727cd7d405b0b2d9a5.html index 4e204207..6be46a58 100644 --- a/c-api/group__gc__major_ga15186c504a0fb0727cd7d405b0b2d9a5.html +++ b/c-api/group__gc__major_ga15186c504a0fb0727cd7d405b0b2d9a5.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__gc__major_ga197294109a9a037b9a6641ce41ff9608.html b/c-api/group__gc__major_ga197294109a9a037b9a6641ce41ff9608.html index b28017f1..5443daaa 100644 --- a/c-api/group__gc__major_ga197294109a9a037b9a6641ce41ff9608.html +++ b/c-api/group__gc__major_ga197294109a9a037b9a6641ce41ff9608.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__gc__major_ga1b45302695680930829cac31d65e41e1.html b/c-api/group__gc__major_ga1b45302695680930829cac31d65e41e1.html index 3ecb509e..b72955fb 100644 --- a/c-api/group__gc__major_ga1b45302695680930829cac31d65e41e1.html +++ b/c-api/group__gc__major_ga1b45302695680930829cac31d65e41e1.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__gc__major_ga2031d7ff5d1678d2aa7954c5fa3b989e.html b/c-api/group__gc__major_ga2031d7ff5d1678d2aa7954c5fa3b989e.html index 66aa79aa..5f1281d8 100644 --- a/c-api/group__gc__major_ga2031d7ff5d1678d2aa7954c5fa3b989e.html +++ b/c-api/group__gc__major_ga2031d7ff5d1678d2aa7954c5fa3b989e.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__gc__major_ga20cf7c4fac92c3cb1adb025813ea2a99.html b/c-api/group__gc__major_ga20cf7c4fac92c3cb1adb025813ea2a99.html index e35482cb..61aedc5d 100644 --- a/c-api/group__gc__major_ga20cf7c4fac92c3cb1adb025813ea2a99.html +++ b/c-api/group__gc__major_ga20cf7c4fac92c3cb1adb025813ea2a99.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__gc__major_ga2118e3b31300a7ddcd96c95e218f862e.html b/c-api/group__gc__major_ga2118e3b31300a7ddcd96c95e218f862e.html index 345ce39b..81d4bae9 100644 --- a/c-api/group__gc__major_ga2118e3b31300a7ddcd96c95e218f862e.html +++ b/c-api/group__gc__major_ga2118e3b31300a7ddcd96c95e218f862e.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__gc__major_ga21b50029124a435e12dd1fb97f1f4275.html b/c-api/group__gc__major_ga21b50029124a435e12dd1fb97f1f4275.html index 1aaccf4e..f599cb9d 100644 --- a/c-api/group__gc__major_ga21b50029124a435e12dd1fb97f1f4275.html +++ b/c-api/group__gc__major_ga21b50029124a435e12dd1fb97f1f4275.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__gc__major_ga21e9a50a7de06a81cbcc934bd8e4809c.html b/c-api/group__gc__major_ga21e9a50a7de06a81cbcc934bd8e4809c.html index e35e9a82..ed316e0d 100644 --- a/c-api/group__gc__major_ga21e9a50a7de06a81cbcc934bd8e4809c.html +++ b/c-api/group__gc__major_ga21e9a50a7de06a81cbcc934bd8e4809c.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__gc__major_ga24af05ed1aef52dcba9177511705682d.html b/c-api/group__gc__major_ga24af05ed1aef52dcba9177511705682d.html index fbaeb968..6701bd0b 100644 --- a/c-api/group__gc__major_ga24af05ed1aef52dcba9177511705682d.html +++ b/c-api/group__gc__major_ga24af05ed1aef52dcba9177511705682d.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__gc__major_ga2f62288e6f57fe9fbff4bae5bd782e44.html b/c-api/group__gc__major_ga2f62288e6f57fe9fbff4bae5bd782e44.html index 5e7c62cf..021fe321 100644 --- a/c-api/group__gc__major_ga2f62288e6f57fe9fbff4bae5bd782e44.html +++ b/c-api/group__gc__major_ga2f62288e6f57fe9fbff4bae5bd782e44.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__gc__major_ga34834cdbd4e4f511ad8e918f0fb2d765.html b/c-api/group__gc__major_ga34834cdbd4e4f511ad8e918f0fb2d765.html index 81d163af..b7a00b82 100644 --- a/c-api/group__gc__major_ga34834cdbd4e4f511ad8e918f0fb2d765.html +++ b/c-api/group__gc__major_ga34834cdbd4e4f511ad8e918f0fb2d765.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__gc__major_ga4074eefce64a43efc40de89bc9595c9b.html b/c-api/group__gc__major_ga4074eefce64a43efc40de89bc9595c9b.html index bafcba93..f3bae587 100644 --- a/c-api/group__gc__major_ga4074eefce64a43efc40de89bc9595c9b.html +++ b/c-api/group__gc__major_ga4074eefce64a43efc40de89bc9595c9b.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__gc__major_ga46bc54c66f56b0006420ce310c2729c1.html b/c-api/group__gc__major_ga46bc54c66f56b0006420ce310c2729c1.html index a3543c6e..de045d9e 100644 --- a/c-api/group__gc__major_ga46bc54c66f56b0006420ce310c2729c1.html +++ b/c-api/group__gc__major_ga46bc54c66f56b0006420ce310c2729c1.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__gc__major_ga4c76104f4bb633c0594334508f8a19b1.html b/c-api/group__gc__major_ga4c76104f4bb633c0594334508f8a19b1.html index e401a5b0..e052fbb7 100644 --- a/c-api/group__gc__major_ga4c76104f4bb633c0594334508f8a19b1.html +++ b/c-api/group__gc__major_ga4c76104f4bb633c0594334508f8a19b1.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__gc__major_ga506d5fadc6ed572bbb11b122193ea36d.html b/c-api/group__gc__major_ga506d5fadc6ed572bbb11b122193ea36d.html index bacd6d78..17c8c801 100644 --- a/c-api/group__gc__major_ga506d5fadc6ed572bbb11b122193ea36d.html +++ b/c-api/group__gc__major_ga506d5fadc6ed572bbb11b122193ea36d.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__gc__major_ga51690b332091995ffd5c7318f569f934.html b/c-api/group__gc__major_ga51690b332091995ffd5c7318f569f934.html index 5fae3017..b29cfd2a 100644 --- a/c-api/group__gc__major_ga51690b332091995ffd5c7318f569f934.html +++ b/c-api/group__gc__major_ga51690b332091995ffd5c7318f569f934.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__gc__major_ga600c743cb3da304751627e36099445b9.html b/c-api/group__gc__major_ga600c743cb3da304751627e36099445b9.html index 16d31c62..3805e414 100644 --- a/c-api/group__gc__major_ga600c743cb3da304751627e36099445b9.html +++ b/c-api/group__gc__major_ga600c743cb3da304751627e36099445b9.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__gc__major_ga61dd942ed84e904a5c297fdc57fd4d7a.html b/c-api/group__gc__major_ga61dd942ed84e904a5c297fdc57fd4d7a.html index 18740aa2..799d2473 100644 --- a/c-api/group__gc__major_ga61dd942ed84e904a5c297fdc57fd4d7a.html +++ b/c-api/group__gc__major_ga61dd942ed84e904a5c297fdc57fd4d7a.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__gc__major_ga63112677a59a58464bc08d5ef2a91c6c.html b/c-api/group__gc__major_ga63112677a59a58464bc08d5ef2a91c6c.html index f1664519..06830117 100644 --- a/c-api/group__gc__major_ga63112677a59a58464bc08d5ef2a91c6c.html +++ b/c-api/group__gc__major_ga63112677a59a58464bc08d5ef2a91c6c.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__gc__major_ga6490c2be516744d1cdc225b9ef2688ca.html b/c-api/group__gc__major_ga6490c2be516744d1cdc225b9ef2688ca.html index 240475cf..1ff18a50 100644 --- a/c-api/group__gc__major_ga6490c2be516744d1cdc225b9ef2688ca.html +++ b/c-api/group__gc__major_ga6490c2be516744d1cdc225b9ef2688ca.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__gc__major_ga66382faf126033f74c62e4eb8a4c4cbe.html b/c-api/group__gc__major_ga66382faf126033f74c62e4eb8a4c4cbe.html index 9d3601fe..c5bc0ccd 100644 --- a/c-api/group__gc__major_ga66382faf126033f74c62e4eb8a4c4cbe.html +++ b/c-api/group__gc__major_ga66382faf126033f74c62e4eb8a4c4cbe.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__gc__major_ga6934bc689d9c64df40d96fbd4db8cbd7.html b/c-api/group__gc__major_ga6934bc689d9c64df40d96fbd4db8cbd7.html index cd9367ac..759bf620 100644 --- a/c-api/group__gc__major_ga6934bc689d9c64df40d96fbd4db8cbd7.html +++ b/c-api/group__gc__major_ga6934bc689d9c64df40d96fbd4db8cbd7.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__gc__major_ga6a88578b8802b9bca9f56e0ccfdff435.html b/c-api/group__gc__major_ga6a88578b8802b9bca9f56e0ccfdff435.html index 5cae2b6d..33a88a94 100644 --- a/c-api/group__gc__major_ga6a88578b8802b9bca9f56e0ccfdff435.html +++ b/c-api/group__gc__major_ga6a88578b8802b9bca9f56e0ccfdff435.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__gc__major_ga734c99799a64ad0450ca6879900640f5.html b/c-api/group__gc__major_ga734c99799a64ad0450ca6879900640f5.html index 1f25b363..a79ceca2 100644 --- a/c-api/group__gc__major_ga734c99799a64ad0450ca6879900640f5.html +++ b/c-api/group__gc__major_ga734c99799a64ad0450ca6879900640f5.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__gc__major_ga75b3fd7dd320d8524d0dcad79cc1eb1e.html b/c-api/group__gc__major_ga75b3fd7dd320d8524d0dcad79cc1eb1e.html index 34dc2b22..d78e3480 100644 --- a/c-api/group__gc__major_ga75b3fd7dd320d8524d0dcad79cc1eb1e.html +++ b/c-api/group__gc__major_ga75b3fd7dd320d8524d0dcad79cc1eb1e.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__gc__major_ga7ca46159df2a2857a042f5b83b8903c4.html b/c-api/group__gc__major_ga7ca46159df2a2857a042f5b83b8903c4.html index c4276d5d..efb7003d 100644 --- a/c-api/group__gc__major_ga7ca46159df2a2857a042f5b83b8903c4.html +++ b/c-api/group__gc__major_ga7ca46159df2a2857a042f5b83b8903c4.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__gc__major_ga7f1dfa939185ca0cf6d194c991000185.html b/c-api/group__gc__major_ga7f1dfa939185ca0cf6d194c991000185.html index 2659cb20..c3b49dfb 100644 --- a/c-api/group__gc__major_ga7f1dfa939185ca0cf6d194c991000185.html +++ b/c-api/group__gc__major_ga7f1dfa939185ca0cf6d194c991000185.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__gc__major_ga7fac46df80136375f0aabd3af30a8874.html b/c-api/group__gc__major_ga7fac46df80136375f0aabd3af30a8874.html index b097cf00..5dc80f9d 100644 --- a/c-api/group__gc__major_ga7fac46df80136375f0aabd3af30a8874.html +++ b/c-api/group__gc__major_ga7fac46df80136375f0aabd3af30a8874.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__gc__major_ga91caaa8e3c877e2780b365e593bbfef9.html b/c-api/group__gc__major_ga91caaa8e3c877e2780b365e593bbfef9.html index 50d922a3..49be9419 100644 --- a/c-api/group__gc__major_ga91caaa8e3c877e2780b365e593bbfef9.html +++ b/c-api/group__gc__major_ga91caaa8e3c877e2780b365e593bbfef9.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__gc__major_ga9427b1684a8ab0eba8315606d67709ed.html b/c-api/group__gc__major_ga9427b1684a8ab0eba8315606d67709ed.html index 3baa7358..4db2920d 100644 --- a/c-api/group__gc__major_ga9427b1684a8ab0eba8315606d67709ed.html +++ b/c-api/group__gc__major_ga9427b1684a8ab0eba8315606d67709ed.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__gc__major_ga969e0c6129a50134006fe4b380965cb2.html b/c-api/group__gc__major_ga969e0c6129a50134006fe4b380965cb2.html index 01190d01..d5a138af 100644 --- a/c-api/group__gc__major_ga969e0c6129a50134006fe4b380965cb2.html +++ b/c-api/group__gc__major_ga969e0c6129a50134006fe4b380965cb2.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__gc__major_ga976021ebdbed6eb538d78c744c1ef931.html b/c-api/group__gc__major_ga976021ebdbed6eb538d78c744c1ef931.html index 55d32cda..98360c7c 100644 --- a/c-api/group__gc__major_ga976021ebdbed6eb538d78c744c1ef931.html +++ b/c-api/group__gc__major_ga976021ebdbed6eb538d78c744c1ef931.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__gc__major_ga977b02989cc5091ac256ca154f5e78ee.html b/c-api/group__gc__major_ga977b02989cc5091ac256ca154f5e78ee.html index 41a89af4..c397cbd3 100644 --- a/c-api/group__gc__major_ga977b02989cc5091ac256ca154f5e78ee.html +++ b/c-api/group__gc__major_ga977b02989cc5091ac256ca154f5e78ee.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__gc__major_ga9c86247beb6521f42271c87685c41288.html b/c-api/group__gc__major_ga9c86247beb6521f42271c87685c41288.html index 042843c0..09fbd283 100644 --- a/c-api/group__gc__major_ga9c86247beb6521f42271c87685c41288.html +++ b/c-api/group__gc__major_ga9c86247beb6521f42271c87685c41288.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__gc__major_ga9dc80c9089068607718ad99e9cd77fcc.html b/c-api/group__gc__major_ga9dc80c9089068607718ad99e9cd77fcc.html index fdfaaef0..03ccb4b7 100644 --- a/c-api/group__gc__major_ga9dc80c9089068607718ad99e9cd77fcc.html +++ b/c-api/group__gc__major_ga9dc80c9089068607718ad99e9cd77fcc.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__gc__major_gaa1745070eb682d926f656f3017ccedda.html b/c-api/group__gc__major_gaa1745070eb682d926f656f3017ccedda.html index c96e3801..3198e2b3 100644 --- a/c-api/group__gc__major_gaa1745070eb682d926f656f3017ccedda.html +++ b/c-api/group__gc__major_gaa1745070eb682d926f656f3017ccedda.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__gc__major_gaa64a151f71c793be3f27b6f70c8a98bd.html b/c-api/group__gc__major_gaa64a151f71c793be3f27b6f70c8a98bd.html index 6452344a..e0b9175f 100644 --- a/c-api/group__gc__major_gaa64a151f71c793be3f27b6f70c8a98bd.html +++ b/c-api/group__gc__major_gaa64a151f71c793be3f27b6f70c8a98bd.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__gc__major_gaa8776e5cc0c3bf309c76dc61f0c7f838.html b/c-api/group__gc__major_gaa8776e5cc0c3bf309c76dc61f0c7f838.html index 0f6c01d6..0e20b4a0 100644 --- a/c-api/group__gc__major_gaa8776e5cc0c3bf309c76dc61f0c7f838.html +++ b/c-api/group__gc__major_gaa8776e5cc0c3bf309c76dc61f0c7f838.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__gc__major_gaac1a9d422fb7cf93b7de39bd41e0cad2.html b/c-api/group__gc__major_gaac1a9d422fb7cf93b7de39bd41e0cad2.html index c0fc274f..543adc2a 100644 --- a/c-api/group__gc__major_gaac1a9d422fb7cf93b7de39bd41e0cad2.html +++ b/c-api/group__gc__major_gaac1a9d422fb7cf93b7de39bd41e0cad2.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__gc__major_gab19d274a8cfbf5274db73e35f2fb18b5.html b/c-api/group__gc__major_gab19d274a8cfbf5274db73e35f2fb18b5.html index 9501a641..bc9e3c94 100644 --- a/c-api/group__gc__major_gab19d274a8cfbf5274db73e35f2fb18b5.html +++ b/c-api/group__gc__major_gab19d274a8cfbf5274db73e35f2fb18b5.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__gc__major_gab4c9dba3c0f373c7a74e89e35b919fe8.html b/c-api/group__gc__major_gab4c9dba3c0f373c7a74e89e35b919fe8.html index 3eac1017..53e75e8b 100644 --- a/c-api/group__gc__major_gab4c9dba3c0f373c7a74e89e35b919fe8.html +++ b/c-api/group__gc__major_gab4c9dba3c0f373c7a74e89e35b919fe8.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__gc__major_gabbaa9e82df175595165b5309ffb360b5.html b/c-api/group__gc__major_gabbaa9e82df175595165b5309ffb360b5.html index 8debc9c7..acfc76fb 100644 --- a/c-api/group__gc__major_gabbaa9e82df175595165b5309ffb360b5.html +++ b/c-api/group__gc__major_gabbaa9e82df175595165b5309ffb360b5.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__gc__major_gabdf15a8d52624122c76c2ae9df4a3cdc.html b/c-api/group__gc__major_gabdf15a8d52624122c76c2ae9df4a3cdc.html index 317d0ed9..2de654d9 100644 --- a/c-api/group__gc__major_gabdf15a8d52624122c76c2ae9df4a3cdc.html +++ b/c-api/group__gc__major_gabdf15a8d52624122c76c2ae9df4a3cdc.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__gc__major_gabebf61106ee21a438dcb21fc8a9fb05b.html b/c-api/group__gc__major_gabebf61106ee21a438dcb21fc8a9fb05b.html index dd8f9b9c..ff0ac96d 100644 --- a/c-api/group__gc__major_gabebf61106ee21a438dcb21fc8a9fb05b.html +++ b/c-api/group__gc__major_gabebf61106ee21a438dcb21fc8a9fb05b.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__gc__major_gabf9a3adddd986f1f953d4ddc1c795491.html b/c-api/group__gc__major_gabf9a3adddd986f1f953d4ddc1c795491.html index d318c033..c87f1cb0 100644 --- a/c-api/group__gc__major_gabf9a3adddd986f1f953d4ddc1c795491.html +++ b/c-api/group__gc__major_gabf9a3adddd986f1f953d4ddc1c795491.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__gc__major_gac5dc8552660d7975bbdf83c59e6c5dd3.html b/c-api/group__gc__major_gac5dc8552660d7975bbdf83c59e6c5dd3.html index 431e79ce..04e36333 100644 --- a/c-api/group__gc__major_gac5dc8552660d7975bbdf83c59e6c5dd3.html +++ b/c-api/group__gc__major_gac5dc8552660d7975bbdf83c59e6c5dd3.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize @@ -154,6 +153,14 @@ $(function() {
    +

    Perform one-time heap initializations for the program.

    +
    Parameters
    + + +
    heap_sizeUnused
    +
    +
    +
    diff --git a/c-api/group__gc__major_gacc34220240fa78aaed5482565c8952e6.html b/c-api/group__gc__major_gacc34220240fa78aaed5482565c8952e6.html index af47e0fa..98aa6d32 100644 --- a/c-api/group__gc__major_gacc34220240fa78aaed5482565c8952e6.html +++ b/c-api/group__gc__major_gacc34220240fa78aaed5482565c8952e6.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__gc__major_gacdd780abddd9b089bc19771035890bf5.html b/c-api/group__gc__major_gacdd780abddd9b089bc19771035890bf5.html index 522dcc82..ca191ff2 100644 --- a/c-api/group__gc__major_gacdd780abddd9b089bc19771035890bf5.html +++ b/c-api/group__gc__major_gacdd780abddd9b089bc19771035890bf5.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__gc__major_gad09673fe7b5673515705b6a821648cbe.html b/c-api/group__gc__major_gad09673fe7b5673515705b6a821648cbe.html index 905aaf0d..d9f6ddb3 100644 --- a/c-api/group__gc__major_gad09673fe7b5673515705b6a821648cbe.html +++ b/c-api/group__gc__major_gad09673fe7b5673515705b6a821648cbe.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__gc__major_gad107cf5b38c74e2cd84a8159940b6579.html b/c-api/group__gc__major_gad107cf5b38c74e2cd84a8159940b6579.html index 1b442cfd..2bc5f4af 100644 --- a/c-api/group__gc__major_gad107cf5b38c74e2cd84a8159940b6579.html +++ b/c-api/group__gc__major_gad107cf5b38c74e2cd84a8159940b6579.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__gc__major_gadb0efe9a5fa3686ffe062cb1ce16f8c1.html b/c-api/group__gc__major_gadb0efe9a5fa3686ffe062cb1ce16f8c1.html index b68c13bd..ef3046b8 100644 --- a/c-api/group__gc__major_gadb0efe9a5fa3686ffe062cb1ce16f8c1.html +++ b/c-api/group__gc__major_gadb0efe9a5fa3686ffe062cb1ce16f8c1.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__gc__major_gadd73c9a0b9b1112d6d941dee642893e7.html b/c-api/group__gc__major_gadd73c9a0b9b1112d6d941dee642893e7.html index c74d6810..05935c91 100644 --- a/c-api/group__gc__major_gadd73c9a0b9b1112d6d941dee642893e7.html +++ b/c-api/group__gc__major_gadd73c9a0b9b1112d6d941dee642893e7.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__gc__major_gadd82bcff4895bd4ca335a45109597102.html b/c-api/group__gc__major_gadd82bcff4895bd4ca335a45109597102.html index 2ca5dea4..9637111c 100644 --- a/c-api/group__gc__major_gadd82bcff4895bd4ca335a45109597102.html +++ b/c-api/group__gc__major_gadd82bcff4895bd4ca335a45109597102.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__gc__major_gadf94b852782bd0108138e3b97fc1113b.html b/c-api/group__gc__major_gadf94b852782bd0108138e3b97fc1113b.html index 27e3c3d1..0db0ca50 100644 --- a/c-api/group__gc__major_gadf94b852782bd0108138e3b97fc1113b.html +++ b/c-api/group__gc__major_gadf94b852782bd0108138e3b97fc1113b.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__gc__major_gae43e9fb0564edc5ecf489ead57731d52.html b/c-api/group__gc__major_gae43e9fb0564edc5ecf489ead57731d52.html index bcf95a45..8329a70f 100644 --- a/c-api/group__gc__major_gae43e9fb0564edc5ecf489ead57731d52.html +++ b/c-api/group__gc__major_gae43e9fb0564edc5ecf489ead57731d52.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__gc__major_gae4b0fc6e4b949f950ecf85d3135bfd9a.html b/c-api/group__gc__major_gae4b0fc6e4b949f950ecf85d3135bfd9a.html index 8943c5a2..21e8e3c1 100644 --- a/c-api/group__gc__major_gae4b0fc6e4b949f950ecf85d3135bfd9a.html +++ b/c-api/group__gc__major_gae4b0fc6e4b949f950ecf85d3135bfd9a.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__gc__major_gaec0fd25a5b345b9ad50842b08bed4027.html b/c-api/group__gc__major_gaec0fd25a5b345b9ad50842b08bed4027.html index db7a5893..0da37089 100644 --- a/c-api/group__gc__major_gaec0fd25a5b345b9ad50842b08bed4027.html +++ b/c-api/group__gc__major_gaec0fd25a5b345b9ad50842b08bed4027.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__gc__major_gaf98d32e8f592dc38f4cd01c153e91a2d.html b/c-api/group__gc__major_gaf98d32e8f592dc38f4cd01c153e91a2d.html index a813d48a..6823e90b 100644 --- a/c-api/group__gc__major_gaf98d32e8f592dc38f4cd01c153e91a2d.html +++ b/c-api/group__gc__major_gaf98d32e8f592dc38f4cd01c153e91a2d.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__gc__major_gafa9a2390e7f946a0526be8c21d3ec864.html b/c-api/group__gc__major_gafa9a2390e7f946a0526be8c21d3ec864.html index a56564bf..b02765a9 100644 --- a/c-api/group__gc__major_gafa9a2390e7f946a0526be8c21d3ec864.html +++ b/c-api/group__gc__major_gafa9a2390e7f946a0526be8c21d3ec864.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__gc__major_gafcdb2c9fc0d53c3b0971b6fe85916858.html b/c-api/group__gc__major_gafcdb2c9fc0d53c3b0971b6fe85916858.html index 73ddb508..1a4ae04c 100644 --- a/c-api/group__gc__major_gafcdb2c9fc0d53c3b0971b6fe85916858.html +++ b/c-api/group__gc__major_gafcdb2c9fc0d53c3b0971b6fe85916858.html @@ -95,7 +95,6 @@ $(function() { gc_heap_last gc_heap_merge gc_heap_root - gc_heap_total_size gc_heap_type gc_init_heap gc_initialize diff --git a/c-api/group__prim__err_ga099dcb668802d7bece1e4cdde826121d.html b/c-api/group__prim__err_ga099dcb668802d7bece1e4cdde826121d.html index 98ca22a7..d29298ed 100644 --- a/c-api/group__prim__err_ga099dcb668802d7bece1e4cdde826121d.html +++ b/c-api/group__prim__err_ga099dcb668802d7bece1e4cdde826121d.html @@ -128,7 +128,7 @@ $(function() {
    -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); \
    } \
    }
    object Cyc_length(void *d, object l)
    Definition: runtime.c:1668
    +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); \
    } \
    }
    object Cyc_length(void *d, object l)
    Definition: runtime.c:1672
    #define obj_obj2int(x)
    Definition: types.h:460
    diff --git a/c-api/group__prim__err_ga2e6927f223a2bc6802c66114d42aee2f.html b/c-api/group__prim__err_ga2e6927f223a2bc6802c66114d42aee2f.html index 062b2fa0..4c45e3d4 100644 --- a/c-api/group__prim__err_ga2e6927f223a2bc6802c66114d42aee2f.html +++ b/c-api/group__prim__err_ga2e6927f223a2bc6802c66114d42aee2f.html @@ -128,7 +128,7 @@ $(function() {
    -Value:
    { \
    if ((boolean_f == fnc_test(obj))) Cyc_invalid_type_error(data, tag, obj); }
    const object boolean_f
    Definition: runtime.c:287
    +Value:
    { \
    if ((boolean_f == fnc_test(obj))) Cyc_invalid_type_error(data, tag, obj); }
    const object boolean_f
    Definition: runtime.c:291
    void Cyc_invalid_type_error(void *data, int tag, object found)
    Definition: runtime.c:58
    diff --git a/c-api/group__prim__err_gaa2354df89425b979e4932a3b466d72e0.html b/c-api/group__prim__err_gaa2354df89425b979e4932a3b466d72e0.html index f6a137ca..49b90bd6 100644 --- a/c-api/group__prim__err_gaa2354df89425b979e4932a3b466d72e0.html +++ b/c-api/group__prim__err_gaa2354df89425b979e4932a3b466d72e0.html @@ -128,7 +128,7 @@ $(function() {
    -Value:
    { \
    if ((boolean_f == fnc_test(data, obj))) Cyc_invalid_type_error(data, tag, obj); }
    const object boolean_f
    Definition: runtime.c:287
    +Value:
    { \
    if ((boolean_f == fnc_test(data, obj))) Cyc_invalid_type_error(data, tag, obj); }
    const object boolean_f
    Definition: runtime.c:291
    void Cyc_invalid_type_error(void *data, int tag, object found)
    Definition: runtime.c:58
    diff --git a/c-api/group__prim__num_gae8ea3533e198e99a23b42b6d075fb560.html b/c-api/group__prim__num_gae8ea3533e198e99a23b42b6d075fb560.html index 460ba411..bd2660d8 100644 --- a/c-api/group__prim__num_gae8ea3533e198e99a23b42b6d075fb560.html +++ b/c-api/group__prim__num_gae8ea3533e198e99a23b42b6d075fb560.html @@ -154,7 +154,7 @@ $(function() {
    #define obj_obj2int(x)
    Definition: types.h:460
    #define obj_is_int(x)
    Definition: types.h:455
    #define type_of(obj)
    Definition: types.h:72
    -
    double mp_get_double(mp_int *a)
    Definition: runtime.c:1212
    +
    double mp_get_double(mp_int *a)
    Definition: runtime.c:1216
    #define make_double(n, v)
    Definition: types.h:664
    Deprecated - boxed integers.
    Definition: types.h:629
    #define bignum_value(x)
    Definition: types.h:685
    diff --git a/c-api/runtime_8c.html b/c-api/runtime_8c.html index 4efe5f7e..901f50ec 100644 --- a/c-api/runtime_8c.html +++ b/c-api/runtime_8c.html @@ -721,6 +721,7 @@ Functions char * gc_fixup_moved_obj (gc_thread_data *thd, int *alloci, char *obj, object hp)   void gc_init_heap (long heap_size) + Perform one-time heap initializations for the program. More...
      int gc_minor (void *data, object low_limit, object high_limit, closure cont, object *args, int num_args)   diff --git a/c-api/runtime_8c_a716a4025cfe7438ee0a309ff456f095c.html b/c-api/runtime_8c_a716a4025cfe7438ee0a309ff456f095c.html index 83956402..499481bd 100644 --- a/c-api/runtime_8c_a716a4025cfe7438ee0a309ff456f095c.html +++ b/c-api/runtime_8c_a716a4025cfe7438ee0a309ff456f095c.html @@ -564,7 +564,7 @@ $(function() {
    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:256
    -
    char * gc_move(char *obj, gc_thread_data *thd, int *alloci, int *heap_grown)
    Definition: runtime.c:4623
    +
    char * gc_move(char *obj, gc_thread_data *thd, int *alloci, int *heap_grown)
    Definition: runtime.c:4627
    #define stack_overflow(x, y)
    Definition: types.h:387
    diff --git a/c-api/runtime_8h.html b/c-api/runtime_8h.html index ec45fafe..4188f4b1 100644 --- a/c-api/runtime_8h.html +++ b/c-api/runtime_8h.html @@ -457,6 +457,7 @@ Functions void GC (void *, closure, object *, int)   void gc_init_heap (long heap_size) + Perform one-time heap initializations for the program. More...
      char ** get_env_variables ()   diff --git a/c-api/runtime_8h_source.html b/c-api/runtime_8h_source.html index 374aec66..71f9777b 100644 --- a/c-api/runtime_8h_source.html +++ b/c-api/runtime_8h_source.html @@ -68,333 +68,333 @@ $(function() {
    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_int(d,obj) Cyc_check_type(d,Cyc_is_integer, integer_tag, obj);
    77 #define Cyc_check_str(d,obj) Cyc_check_type(d,Cyc_is_string, string_tag, obj);
    78 #define Cyc_check_sym(d,obj) Cyc_check_type(d,Cyc_is_symbol, symbol_tag, obj);
    79 #define Cyc_check_vec(d,obj) Cyc_check_type(d,Cyc_is_vector, vector_tag, obj);
    80 #define Cyc_check_bvec(d,obj) Cyc_check_type(d,Cyc_is_bytevector, bytevector_tag, obj);
    81 #define Cyc_check_port(d,obj) Cyc_check_type(d,Cyc_is_port, port_tag, obj);
    82 #define Cyc_check_mutex(d,obj) Cyc_check_type(d,Cyc_is_mutex, mutex_tag, obj);
    83 #define Cyc_check_cond_var(d,obj) Cyc_check_type(d,Cyc_is_cond_var, cond_var_tag, obj);
    84 void Cyc_invalid_type_error(void *data, int tag, object found);
    85 void Cyc_check_obj(void *data, int tag, object obj);
    86 void Cyc_check_bounds(void *data, const char *label, int len, int index);
    88 /* END error checking */
    89 
    90 extern long global_stack_size;
    91 extern long global_heap_size;
    92 
    93 char **get_env_variables();
    94 void pack_env_variables(void *data, object k);
    95 void set_env_variables(char **vars);
    96 
    97 object cell_get(object cell);
    98 
    99 #define global_set(glo,value) Cyc_global_set(data, (object *)&glo, value)
    100 object Cyc_global_set(void *thd, object * glo, object value);
    101 
    102 /* Variable argument count support
    103 
    104  This macro is intended to be executed at the top of a function that
    105  is passed 'var' as a variable-length argument. 'count' is the number
    106  of varargs that were passed. EG:
    107  - C definition: f(object a, ...)
    108  - C call: f(1, 2, 3)
    109  - var: a
    110  - count: 3
    111 
    112  Argument count would need to be passed by the caller of f. Presumably
    113  our compiler will compute the difference between the number of required
    114  args and the number of provided ones, and pass the difference as 'count'
    115  */
    116 #define load_varargs(var, arg_var, count) \
    117  list var = (count > 0) ? alloca(sizeof(pair_type)*count) : NULL; \
    118  { \
    119  int i; \
    120  object tmp; \
    121  va_list va; \
    122  if (count > 0) { \
    123  va_start(va, arg_var); \
    124  for (i = 0; i < count; i++) { \
    125  if (i) { \
    126  tmp = va_arg(va, object); \
    127  } else { \
    128  tmp = arg_var; \
    129  } \
    130  var[i].hdr.mark = gc_color_red; \
    131  var[i].hdr.grayed = 0; \
    132  var[i].tag = pair_tag; \
    133  var[i].pair_car = tmp; \
    134  var[i].pair_cdr = (i == (count-1)) ? NULL : &var[i + 1]; \
    135  } \
    136  va_end(va); \
    137  } \
    138  }
    139 /* Prototypes for primitive functions. */
    140 
    146 object Cyc_car(void *data, object lis);
    147 object Cyc_cdr(void *data, object lis);
    148 list malloc_make_pair(object, object);
    149 object Cyc_set_cell(void *, object l, object val);
    150 object Cyc_set_car(void *, object l, object val);
    151 object Cyc_set_cdr(void *, object l, object val);
    152 object Cyc_length(void *d, object l);
    153 object Cyc_list2vector(void *data, object cont, object l);
    154 object Cyc_list2string(void *d, object cont, object lst);
    155 object Cyc_list(void *data, int argc, object cont, ...);
    156 object memberp(void *data, object x, list l);
    157 object memqp(void *data, object x, list l);
    158 list assq(void *data, object x, list l);
    159 list assoc(void *data, object x, list l);
    168 object apply(void *data, object cont, object func, object args);
    169 void Cyc_apply(void *data, int argc, closure cont, object prim, ...);
    170 void dispatch_apply_va(void *data, int argc, object clo, object cont, object func, ...);
    171 object apply_va(void *data, object cont, int argc, object func, ...);
    172 void dispatch(void *data, int argc, function_type func, object clo, object cont,
    173  object args);
    174 void dispatch_va(void *data, int argc, function_type_va func, object clo,
    175  object cont, object args);
    176 void do_dispatch(void *data, int argc, function_type func, object clo,
    177  object * buffer);
    178 
    186 object Cyc_string_cmp(void *data, object str1, object str2);
    187 object dispatch_string_91append(void *data, int argc, object clo, object cont,
    188  object str1, ...);
    189 object Cyc_string2number_(void *d, object cont, object str);
    190 object Cyc_string2number2_(void *data, object cont, int argc, object str, ...);
    191 int binstr2int(const char *str);
    192 int octstr2int(const char *str);
    193 object Cyc_string_append(void *data, object cont, int argc, object str1, ...);
    194 object Cyc_string_length(void *data, object str);
    195 object Cyc_substring(void *data, object cont, object str, object start,
    196  object end);
    197 object Cyc_string_ref(void *data, object str, object k);
    198 object Cyc_string_set(void *data, object str, object k, object chr);
    206 object Cyc_char2integer(object chr);
    214 object Cyc_symbol2string(void *d, object cont, object sym);
    215 object Cyc_string2symbol(void *d, object str);
    223 extern object Cyc_global_variables;
    224 cvar_type *mcvar(object * var);
    225 object Cyc_get_global_variables();
    226 object Cyc_get_cvar(object var);
    227 object Cyc_set_cvar(object var, object value);
    235 object Cyc_display(void *data, object, FILE * port);
    236 void dispatch_display_va(void *data, int argc, object clo, object cont,
    237  object x, ...);
    238 object Cyc_display_va(void *data, int argc, object x, ...);
    239 object Cyc_display_va_list(void *data, int argc, object x, va_list ap);
    240 object Cyc_write_char(void *data, object c, object port);
    241 object Cyc_write(void *data, object, FILE * port);
    242 void dispatch_write_va(void *data, int argc, object clo, object cont,
    243  object x, ...);
    244 object Cyc_write_va(void *data, int argc, object x, ...);
    245 object Cyc_write_va_list(void *data, int argc, object x, va_list ap);
    246 port_type Cyc_stdout(void);
    247 port_type Cyc_stdin(void);
    248 port_type Cyc_stderr(void);
    249 port_type Cyc_io_open_input_file(void *data, object str);
    250 port_type Cyc_io_open_output_file(void *data, object str);
    252 port_type *Cyc_io_open_input_string(void *data, object str);
    253 port_type *Cyc_io_open_input_bytevector(void *data, object bv);
    254 void Cyc_io_get_output_string(void *data, object cont, object port);
    255 void Cyc_io_get_output_bytevector(void *data, object cont, object port);
    256 object Cyc_io_close_port(void *data, object port);
    257 object Cyc_io_close_input_port(void *data, object port);
    258 object Cyc_io_close_output_port(void *data, object port);
    259 object Cyc_io_flush_output_port(void *data, object port);
    260 object Cyc_io_read_char(void *data, object cont, object port);
    261 object Cyc_io_peek_char(void *data, object cont, object port);
    262 object Cyc_io_read_line(void *data, object cont, object port);
    272 #define return_inexact_double_op(data, cont, OP, z) \
    273  make_double(d, 0.0); \
    274  Cyc_check_num(data, z); \
    275  if (obj_is_int(z)) { \
    276  d.value = OP(obj_obj2int(z)); \
    277  } else if (type_of(z) == integer_tag) { \
    278  d.value = OP(((integer_type *)z)->value); \
    279  } else if (type_of(z) == bignum_tag) { \
    280  d.value = OP(mp_get_double(&bignum_value(z))); \
    281  } else { \
    282  d.value = OP(((double_type *)z)->value); \
    283  } \
    284  return_closcall1(data, cont, &d)
    285 
    286 #define return_exact_double_op(data, cont, OP, z) \
    287  int i = 0; \
    288  Cyc_check_num(data, z); \
    289  if (obj_is_int(z)) { \
    290  i = obj_obj2int(z); \
    291  } else if (type_of(z) == integer_tag) { \
    292  i = (int)OP(((integer_type *)z)->value); \
    293  } else if (type_of(z) == bignum_tag) { \
    294  return_closcall1(data, cont, z); \
    295  } else { \
    296  i = (int)OP(((double_type *)z)->value); \
    297  } \
    298  return_closcall1(data, cont, obj_int2obj(i))
    299 
    300 #define unbox_number(n) \
    301  ((obj_is_int(n) ? obj_obj2int(n) : \
    302  ((type_of(n) == integer_tag) ? \
    303  ((integer_type *)n)->value : \
    304  ((double_type *)n)->value)))
    305 
    306 object Cyc_num_eq(void *, object cont, int argc, object n, ...);
    307 object Cyc_num_gt(void *, object cont, int argc, object n, ...);
    308 object Cyc_num_lt(void *, object cont, int argc, object n, ...);
    309 object Cyc_num_gte(void *, object cont, int argc, object n, ...);
    310 object Cyc_num_lte(void *, object cont, int argc, object n, ...);
    311 int Cyc_num_eq_op(void *, object x, object y);
    312 int Cyc_num_gt_op(void *, object x, object y);
    313 int Cyc_num_lt_op(void *, object x, object y);
    314 int Cyc_num_gte_op(void *, object x, object y);
    315 int Cyc_num_lte_op(void *, object x, object y);
    316 object Cyc_num_fast_eq_op(void *data, object x, object y);
    317 object Cyc_num_fast_gt_op(void *data, object x, object y);
    318 object Cyc_num_fast_lt_op(void *data, object x, object y);
    319 object Cyc_num_fast_gte_op(void *data, object x, object y);
    320 object Cyc_num_fast_lte_op(void *data, object x, object y);
    321 object Cyc_num_cmp_va_list(void *data, int argc,
    322  int (fn_op(void *, object, object)), object n,
    323  va_list ns);
    324 void Cyc_expt(void *data, object cont, object x, object y);
    325 void Cyc_remainder(void *data, object cont, object num1, object num2);
    326 object Cyc_number2string2(void *data, object cont, int argc, object n, ...);
    327 object Cyc_integer2char(void *data, object n);
    328 object Cyc_sum_op(void *data, common_type * x, object y);
    329 object Cyc_sub_op(void *data, common_type * x, object y);
    330 object Cyc_mul_op(void *data, common_type * x, object y);
    331 object Cyc_div_op(void *data, common_type * x, object y);
    332 object Cyc_sum(void *data, object cont, int argc, object n, ...);
    333 object Cyc_sub(void *data, object cont, int argc, object n, ...);
    334 object Cyc_mul(void *data, object cont, int argc, object n, ...);
    335 object Cyc_div(void *data, object cont, int argc, object n, ...);
    336 object Cyc_fast_sum(void *data, object ptr, object x, object y);
    337 object Cyc_fast_sub(void *data, object ptr, object x, object y);
    338 object Cyc_fast_mul(void *data, object ptr, object x, object y);
    339 object Cyc_fast_div(void *data, object ptr, object x, object y);
    340 object Cyc_bit_unset(void *data, object n1, object n2);
    341 object Cyc_bit_set(void *data, object n1, object n2);
    342 object Cyc_num_op_va_list(void *data, int argc,
    343  object(fn_op(void *, common_type *, object)),
    344  int default_no_args, int default_one_arg, object n,
    345  va_list ns, common_type * buf);
    346 double MRG32k3a (double seed);
    352 object Cyc_eq(object x, object y);
    353 int equal(object, object);
    354 object equalp(object, object);
    355 object Cyc_has_cycle(object lst);
    356 object Cyc_is_boolean(object o);
    357 object Cyc_is_pair(object o);
    358 object Cyc_is_null(object o);
    359 object Cyc_is_number(object o);
    360 object Cyc_is_real(object o);
    361 object Cyc_is_integer(object o);
    362 object Cyc_is_bignum(object o);
    363 object Cyc_is_vector(object o);
    364 object Cyc_is_bytevector(object o);
    365 object Cyc_is_port(object o);
    366 object Cyc_is_mutex(object o);
    367 object Cyc_is_cond_var(object o);
    368 object Cyc_is_symbol(object o);
    369 object Cyc_is_string(object o);
    370 object Cyc_is_char(object o);
    371 object Cyc_is_procedure(void *data, object o);
    372 object Cyc_is_macro(object o);
    373 object Cyc_is_eof_object(object o);
    374 object Cyc_is_cvar(object o);
    375 object Cyc_is_opaque(object o);
    383 object Cyc_vector_length(void *data, object v);
    384 object Cyc_vector_ref(void *d, object v, object k);
    385 object Cyc_vector_set(void *d, object v, object k, object obj);
    386 object Cyc_make_vector(void *data, object cont, int argc, object len, ...);
    394 object Cyc_make_bytevector(void *data, object cont, int argc, object len, ...);
    395 object Cyc_bytevector(void *data, object cont, int argc, object bval, ...);
    396 object Cyc_bytevector_length(void *data, object bv);
    397 object Cyc_bytevector_append(void *data, object cont, int _argc, object bv,
    398  ...);
    399 object Cyc_bytevector_copy(void *data, object cont, object bv, object start,
    400  object end);
    401 object Cyc_bytevector_u8_ref(void *data, object bv, object k);
    402 object Cyc_bytevector_u8_set(void *data, object bv, object k, object b);
    403 object Cyc_utf82string(void *data, object cont, object bv, object start,
    404  object end);
    405 object Cyc_string2utf8(void *data, object cont, object str, object start,
    406  object end);
    415 char **_cyc_argv;
    416 object Cyc_installation_dir(void *data, object cont, object type);
    417 object Cyc_compilation_environment(void *data, object cont, object var);
    418 object Cyc_command_line_arguments(void *data, object cont);
    419 object Cyc_system(object cmd);
    420 void Cyc_halt(object obj);
    421 object __halt(object obj);
    422 object Cyc_io_delete_file(void *data, object filename);
    423 object Cyc_io_file_exists(void *data, object filename);
    434 object Cyc_spawn_thread(object thunk);
    436 void Cyc_end_thread(gc_thread_data * thd);
    437 void Cyc_exit_thread(gc_thread_data * thd);
    438 object Cyc_thread_sleep(void *data, object timeout);
    446 object Cyc_trigger_minor_gc(void *data, object cont);
    447 object copy2heap(void *data, object obj);
    456 void Cyc_st_add(void *data, char *frame);
    457 void Cyc_st_print(void *data, FILE * out);
    468 extern const object primitive_Cyc_91global_91vars;
    469 extern const object primitive_Cyc_91get_91cvar;
    470 extern const object primitive_Cyc_91set_91cvar_67;
    471 extern const object primitive_Cyc_91cvar_127;
    472 extern const object primitive_Cyc_91opaque_127;
    473 extern const object primitive_Cyc_91has_91cycle_127;
    474 extern const object primitive_Cyc_91spawn_91thread_67;
    475 extern const object primitive_Cyc_91end_91thread_67;
    476 extern const object primitive__87;
    477 extern const object primitive__91;
    478 extern const object primitive__85;
    479 extern const object primitive__95;
    480 extern const object primitive__123;
    481 extern const object primitive__125;
    482 extern const object primitive__121;
    483 extern const object primitive__125_123;
    484 extern const object primitive__121_123;
    485 extern const object primitive_apply;
    486 extern const object primitive__75halt;
    487 extern const object primitive_exit;
    490 extern const object primitive_cons;
    491 extern const object primitive_cell_91get;
    492 extern const object primitive_set_91global_67;
    493 extern const object primitive_set_91cell_67;
    494 extern const object primitive_cell;
    495 extern const object primitive_eq_127;
    496 extern const object primitive_eqv_127;
    497 extern const object primitive_equal_127;
    498 extern const object primitive_assq;
    499 extern const object primitive_assv;
    500 extern const object primitive_memq;
    501 extern const object primitive_memv;
    502 extern const object primitive_length;
    503 extern const object primitive_vector_91length;
    504 extern const object primitive_bytevector_91length;
    505 extern const object primitive_set_91car_67;
    506 extern const object primitive_set_91cdr_67;
    507 extern const object primitive_car;
    508 extern const object primitive_cdr;
    509 extern const object primitive_caar;
    510 extern const object primitive_cadr;
    511 extern const object primitive_cdar;
    512 extern const object primitive_cddr;
    513 extern const object primitive_caaar;
    514 extern const object primitive_caadr;
    515 extern const object primitive_cadar;
    516 extern const object primitive_caddr;
    517 extern const object primitive_cdaar;
    518 extern const object primitive_cdadr;
    519 extern const object primitive_cddar;
    520 extern const object primitive_cdddr;
    521 extern const object primitive_caaaar;
    522 extern const object primitive_caaadr;
    523 extern const object primitive_caadar;
    524 extern const object primitive_caaddr;
    525 extern const object primitive_cadaar;
    526 extern const object primitive_cadadr;
    527 extern const object primitive_caddar;
    528 extern const object primitive_cadddr;
    529 extern const object primitive_cdaaar;
    530 extern const object primitive_cdaadr;
    531 extern const object primitive_cdadar;
    532 extern const object primitive_cdaddr;
    533 extern const object primitive_cddaar;
    534 extern const object primitive_cddadr;
    535 extern const object primitive_cdddar;
    536 extern const object primitive_cddddr;
    537 extern const object primitive_char_91_125integer;
    538 extern const object primitive_integer_91_125char;
    539 extern const object primitive_string_91_125number;
    540 extern const object primitive_string_91cmp;
    541 extern const object primitive_string_91append;
    542 extern const object primitive_list_91_125string;
    543 extern const object primitive_string_91_125symbol;
    544 extern const object primitive_symbol_91_125string;
    545 extern const object primitive_number_91_125string;
    546 extern const object primitive_string_91length;
    547 extern const object primitive_substring;
    548 extern const object primitive_make_91bytevector;
    549 extern const object primitive_make_91vector;
    550 extern const object primitive_list_91_125vector;
    551 extern const object primitive_vector_91ref;
    552 extern const object primitive_vector_91set_67;
    553 extern const object primitive_bytevector;
    554 extern const object primitive_bytevector_91append;
    555 extern const object primitive_Cyc_91bytevector_91copy;
    556 extern const object primitive_Cyc_91string_91_125utf8;
    557 extern const object primitive_Cyc_91utf8_91_125string;
    558 extern const object primitive_bytevector_91u8_91ref;
    559 extern const object primitive_bytevector_91u8_91set_67;
    560 extern const object primitive_string_91ref;
    561 extern const object primitive_string_91set_67;
    562 extern const object primitive_Cyc_91installation_91dir;
    564 extern const object primitive_command_91line_91arguments;
    565 extern const object primitive_system;
    566 extern const object primitive_boolean_127;
    567 extern const object primitive_char_127;
    568 extern const object primitive_eof_91object_127;
    569 extern const object primitive_null_127;
    570 extern const object primitive_number_127;
    571 extern const object primitive_real_127;
    572 extern const object primitive_integer_127;
    573 extern const object primitive_pair_127;
    574 extern const object primitive_procedure_127;
    575 extern const object primitive_macro_127;
    576 extern const object primitive_Cyc_91macro_127;
    577 extern const object primitive_port_127;
    578 extern const object primitive_vector_127;
    579 extern const object primitive_bytevector_127;
    580 extern const object primitive_string_127;
    581 extern const object primitive_symbol_127;
    582 extern const object primitive_open_91input_91file;
    583 extern const object primitive_open_91output_91file;
    584 extern const object primitive_close_91port;
    585 extern const object primitive_close_91input_91port;
    586 extern const object primitive_close_91output_91port;
    587 extern const object primitive_Cyc_91flush_91output_91port;
    588 extern const object primitive_file_91exists_127;
    589 extern const object primitive_delete_91file;
    590 extern const object primitive_read_91char;
    591 extern const object primitive_peek_91char;
    592 extern const object primitive_Cyc_91read_91line;
    593 extern const object primitive_Cyc_91write_91char;
    594 extern const object primitive_Cyc_91write;
    595 extern const object primitive_Cyc_91display;
    596 extern const object primitive_call_95cc;
    597 /* -------------------------------------------- */
    608 extern object Cyc_glo_eval_from_c;
    609 extern object Cyc_glo_call_cc;
    610 
    611 #define __glo_eval_91from_91c_scheme_eval Cyc_glo_eval_from_c
    612 #define __glo_call_95cc_scheme_base Cyc_glo_call_cc
    613 
    619 object Cyc_default_exception_handler(void *data, int argc, closure _, object err);
    620 
    621 object Cyc_current_exception_handler(void *data);
    622 void Cyc_rt_raise(void *data, object err);
    623 void Cyc_rt_raise2(void *data, const char *msg, object err);
    624 void Cyc_rt_raise_msg(void *data, const char *err);
    638 object add_symbol(symbol_type * psym);
    639 object add_symbol_by_name(const char *name);
    640 object find_symbol_by_name(const char *name);
    641 object find_or_add_symbol(const char *name);
    642 char *_strdup(const char *s);
    651 extern list global_table;
    652 void add_global(object * glo);
    655 #endif /* CYCLONE_RUNTIME_H */
    object Cyc_is_pair(object o)
    Definition: runtime.c:1435
    -
    const object primitive_cdaar
    Definition: runtime.c:5230
    +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_int(d,obj) Cyc_check_type(d,Cyc_is_integer, integer_tag, obj);
    77 #define Cyc_check_str(d,obj) Cyc_check_type(d,Cyc_is_string, string_tag, obj);
    78 #define Cyc_check_sym(d,obj) Cyc_check_type(d,Cyc_is_symbol, symbol_tag, obj);
    79 #define Cyc_check_vec(d,obj) Cyc_check_type(d,Cyc_is_vector, vector_tag, obj);
    80 #define Cyc_check_bvec(d,obj) Cyc_check_type(d,Cyc_is_bytevector, bytevector_tag, obj);
    81 #define Cyc_check_port(d,obj) Cyc_check_type(d,Cyc_is_port, port_tag, obj);
    82 #define Cyc_check_mutex(d,obj) Cyc_check_type(d,Cyc_is_mutex, mutex_tag, obj);
    83 #define Cyc_check_cond_var(d,obj) Cyc_check_type(d,Cyc_is_cond_var, cond_var_tag, obj);
    84 void Cyc_invalid_type_error(void *data, int tag, object found);
    85 void Cyc_check_obj(void *data, int tag, object obj);
    86 void Cyc_check_bounds(void *data, const char *label, int len, int index);
    88 /* END error checking */
    89 
    90 extern long global_stack_size;
    91 extern long global_heap_size;
    92 
    93 char **get_env_variables();
    94 void pack_env_variables(void *data, object k);
    95 void set_env_variables(char **vars);
    96 
    97 object cell_get(object cell);
    98 
    99 #define global_set(glo,value) Cyc_global_set(data, (object *)&glo, value)
    100 object Cyc_global_set(void *thd, object * glo, object value);
    101 
    102 /* Variable argument count support
    103 
    104  This macro is intended to be executed at the top of a function that
    105  is passed 'var' as a variable-length argument. 'count' is the number
    106  of varargs that were passed. EG:
    107  - C definition: f(object a, ...)
    108  - C call: f(1, 2, 3)
    109  - var: a
    110  - count: 3
    111 
    112  Argument count would need to be passed by the caller of f. Presumably
    113  our compiler will compute the difference between the number of required
    114  args and the number of provided ones, and pass the difference as 'count'
    115  */
    116 #define load_varargs(var, arg_var, count) \
    117  list var = (count > 0) ? alloca(sizeof(pair_type)*count) : NULL; \
    118  { \
    119  int i; \
    120  object tmp; \
    121  va_list va; \
    122  if (count > 0) { \
    123  va_start(va, arg_var); \
    124  for (i = 0; i < count; i++) { \
    125  if (i) { \
    126  tmp = va_arg(va, object); \
    127  } else { \
    128  tmp = arg_var; \
    129  } \
    130  var[i].hdr.mark = gc_color_red; \
    131  var[i].hdr.grayed = 0; \
    132  var[i].tag = pair_tag; \
    133  var[i].pair_car = tmp; \
    134  var[i].pair_cdr = (i == (count-1)) ? NULL : &var[i + 1]; \
    135  } \
    136  va_end(va); \
    137  } \
    138  }
    139 /* Prototypes for primitive functions. */
    140 
    146 object Cyc_car(void *data, object lis);
    147 object Cyc_cdr(void *data, object lis);
    148 list malloc_make_pair(object, object);
    149 object Cyc_set_cell(void *, object l, object val);
    150 object Cyc_set_car(void *, object l, object val);
    151 object Cyc_set_cdr(void *, object l, object val);
    152 object Cyc_length(void *d, object l);
    153 object Cyc_list2vector(void *data, object cont, object l);
    154 object Cyc_list2string(void *d, object cont, object lst);
    155 object Cyc_list(void *data, int argc, object cont, ...);
    156 object memberp(void *data, object x, list l);
    157 object memqp(void *data, object x, list l);
    158 list assq(void *data, object x, list l);
    159 list assoc(void *data, object x, list l);
    168 object apply(void *data, object cont, object func, object args);
    169 void Cyc_apply(void *data, int argc, closure cont, object prim, ...);
    170 void dispatch_apply_va(void *data, int argc, object clo, object cont, object func, ...);
    171 object apply_va(void *data, object cont, int argc, object func, ...);
    172 void dispatch(void *data, int argc, function_type func, object clo, object cont,
    173  object args);
    174 void dispatch_va(void *data, int argc, function_type_va func, object clo,
    175  object cont, object args);
    176 void do_dispatch(void *data, int argc, function_type func, object clo,
    177  object * buffer);
    178 
    186 object Cyc_string_cmp(void *data, object str1, object str2);
    187 object dispatch_string_91append(void *data, int argc, object clo, object cont,
    188  object str1, ...);
    189 object Cyc_string2number_(void *d, object cont, object str);
    190 object Cyc_string2number2_(void *data, object cont, int argc, object str, ...);
    191 int binstr2int(const char *str);
    192 int octstr2int(const char *str);
    193 object Cyc_string_append(void *data, object cont, int argc, object str1, ...);
    194 object Cyc_string_length(void *data, object str);
    195 object Cyc_substring(void *data, object cont, object str, object start,
    196  object end);
    197 object Cyc_string_ref(void *data, object str, object k);
    198 object Cyc_string_set(void *data, object str, object k, object chr);
    206 object Cyc_char2integer(object chr);
    214 object Cyc_symbol2string(void *d, object cont, object sym);
    215 object Cyc_string2symbol(void *d, object str);
    223 extern object Cyc_global_variables;
    224 cvar_type *mcvar(object * var);
    225 object Cyc_get_global_variables();
    226 object Cyc_get_cvar(object var);
    227 object Cyc_set_cvar(object var, object value);
    235 object Cyc_display(void *data, object, FILE * port);
    236 void dispatch_display_va(void *data, int argc, object clo, object cont,
    237  object x, ...);
    238 object Cyc_display_va(void *data, int argc, object x, ...);
    239 object Cyc_display_va_list(void *data, int argc, object x, va_list ap);
    240 object Cyc_write_char(void *data, object c, object port);
    241 object Cyc_write(void *data, object, FILE * port);
    242 void dispatch_write_va(void *data, int argc, object clo, object cont,
    243  object x, ...);
    244 object Cyc_write_va(void *data, int argc, object x, ...);
    245 object Cyc_write_va_list(void *data, int argc, object x, va_list ap);
    246 port_type Cyc_stdout(void);
    247 port_type Cyc_stdin(void);
    248 port_type Cyc_stderr(void);
    249 port_type Cyc_io_open_input_file(void *data, object str);
    250 port_type Cyc_io_open_output_file(void *data, object str);
    252 port_type *Cyc_io_open_input_string(void *data, object str);
    253 port_type *Cyc_io_open_input_bytevector(void *data, object bv);
    254 void Cyc_io_get_output_string(void *data, object cont, object port);
    255 void Cyc_io_get_output_bytevector(void *data, object cont, object port);
    256 object Cyc_io_close_port(void *data, object port);
    257 object Cyc_io_close_input_port(void *data, object port);
    258 object Cyc_io_close_output_port(void *data, object port);
    259 object Cyc_io_flush_output_port(void *data, object port);
    260 object Cyc_io_read_char(void *data, object cont, object port);
    261 object Cyc_io_peek_char(void *data, object cont, object port);
    262 object Cyc_io_read_line(void *data, object cont, object port);
    272 #define return_inexact_double_op(data, cont, OP, z) \
    273  make_double(d, 0.0); \
    274  Cyc_check_num(data, z); \
    275  if (obj_is_int(z)) { \
    276  d.value = OP(obj_obj2int(z)); \
    277  } else if (type_of(z) == integer_tag) { \
    278  d.value = OP(((integer_type *)z)->value); \
    279  } else if (type_of(z) == bignum_tag) { \
    280  d.value = OP(mp_get_double(&bignum_value(z))); \
    281  } else { \
    282  d.value = OP(((double_type *)z)->value); \
    283  } \
    284  return_closcall1(data, cont, &d)
    285 
    286 #define return_exact_double_op(data, cont, OP, z) \
    287  int i = 0; \
    288  Cyc_check_num(data, z); \
    289  if (obj_is_int(z)) { \
    290  i = obj_obj2int(z); \
    291  } else if (type_of(z) == integer_tag) { \
    292  i = (int)OP(((integer_type *)z)->value); \
    293  } else if (type_of(z) == bignum_tag) { \
    294  return_closcall1(data, cont, z); \
    295  } else { \
    296  i = (int)OP(((double_type *)z)->value); \
    297  } \
    298  return_closcall1(data, cont, obj_int2obj(i))
    299 
    300 #define unbox_number(n) \
    301  ((obj_is_int(n) ? obj_obj2int(n) : \
    302  ((type_of(n) == integer_tag) ? \
    303  ((integer_type *)n)->value : \
    304  ((double_type *)n)->value)))
    305 
    306 object Cyc_num_eq(void *, object cont, int argc, object n, ...);
    307 object Cyc_num_gt(void *, object cont, int argc, object n, ...);
    308 object Cyc_num_lt(void *, object cont, int argc, object n, ...);
    309 object Cyc_num_gte(void *, object cont, int argc, object n, ...);
    310 object Cyc_num_lte(void *, object cont, int argc, object n, ...);
    311 int Cyc_num_eq_op(void *, object x, object y);
    312 int Cyc_num_gt_op(void *, object x, object y);
    313 int Cyc_num_lt_op(void *, object x, object y);
    314 int Cyc_num_gte_op(void *, object x, object y);
    315 int Cyc_num_lte_op(void *, object x, object y);
    316 object Cyc_num_fast_eq_op(void *data, object x, object y);
    317 object Cyc_num_fast_gt_op(void *data, object x, object y);
    318 object Cyc_num_fast_lt_op(void *data, object x, object y);
    319 object Cyc_num_fast_gte_op(void *data, object x, object y);
    320 object Cyc_num_fast_lte_op(void *data, object x, object y);
    321 object Cyc_num_cmp_va_list(void *data, int argc,
    322  int (fn_op(void *, object, object)), object n,
    323  va_list ns);
    324 void Cyc_expt(void *data, object cont, object x, object y);
    325 void Cyc_remainder(void *data, object cont, object num1, object num2);
    326 object Cyc_number2string2(void *data, object cont, int argc, object n, ...);
    327 object Cyc_integer2char(void *data, object n);
    328 object Cyc_sum_op(void *data, common_type * x, object y);
    329 object Cyc_sub_op(void *data, common_type * x, object y);
    330 object Cyc_mul_op(void *data, common_type * x, object y);
    331 object Cyc_div_op(void *data, common_type * x, object y);
    332 object Cyc_sum(void *data, object cont, int argc, object n, ...);
    333 object Cyc_sub(void *data, object cont, int argc, object n, ...);
    334 object Cyc_mul(void *data, object cont, int argc, object n, ...);
    335 object Cyc_div(void *data, object cont, int argc, object n, ...);
    336 object Cyc_fast_sum(void *data, object ptr, object x, object y);
    337 object Cyc_fast_sub(void *data, object ptr, object x, object y);
    338 object Cyc_fast_mul(void *data, object ptr, object x, object y);
    339 object Cyc_fast_div(void *data, object ptr, object x, object y);
    340 object Cyc_bit_unset(void *data, object n1, object n2);
    341 object Cyc_bit_set(void *data, object n1, object n2);
    342 object Cyc_num_op_va_list(void *data, int argc,
    343  object(fn_op(void *, common_type *, object)),
    344  int default_no_args, int default_one_arg, object n,
    345  va_list ns, common_type * buf);
    346 double MRG32k3a (double seed);
    352 object Cyc_eq(object x, object y);
    353 int equal(object, object);
    354 object equalp(object, object);
    355 object Cyc_has_cycle(object lst);
    356 object Cyc_is_boolean(object o);
    357 object Cyc_is_pair(object o);
    358 object Cyc_is_null(object o);
    359 object Cyc_is_number(object o);
    360 object Cyc_is_real(object o);
    361 object Cyc_is_integer(object o);
    362 object Cyc_is_bignum(object o);
    363 object Cyc_is_vector(object o);
    364 object Cyc_is_bytevector(object o);
    365 object Cyc_is_port(object o);
    366 object Cyc_is_mutex(object o);
    367 object Cyc_is_cond_var(object o);
    368 object Cyc_is_symbol(object o);
    369 object Cyc_is_string(object o);
    370 object Cyc_is_char(object o);
    371 object Cyc_is_procedure(void *data, object o);
    372 object Cyc_is_macro(object o);
    373 object Cyc_is_eof_object(object o);
    374 object Cyc_is_cvar(object o);
    375 object Cyc_is_opaque(object o);
    383 object Cyc_vector_length(void *data, object v);
    384 object Cyc_vector_ref(void *d, object v, object k);
    385 object Cyc_vector_set(void *d, object v, object k, object obj);
    386 object Cyc_make_vector(void *data, object cont, int argc, object len, ...);
    394 object Cyc_make_bytevector(void *data, object cont, int argc, object len, ...);
    395 object Cyc_bytevector(void *data, object cont, int argc, object bval, ...);
    396 object Cyc_bytevector_length(void *data, object bv);
    397 object Cyc_bytevector_append(void *data, object cont, int _argc, object bv,
    398  ...);
    399 object Cyc_bytevector_copy(void *data, object cont, object bv, object start,
    400  object end);
    401 object Cyc_bytevector_u8_ref(void *data, object bv, object k);
    402 object Cyc_bytevector_u8_set(void *data, object bv, object k, object b);
    403 object Cyc_utf82string(void *data, object cont, object bv, object start,
    404  object end);
    405 object Cyc_string2utf8(void *data, object cont, object str, object start,
    406  object end);
    415 char **_cyc_argv;
    416 object Cyc_installation_dir(void *data, object cont, object type);
    417 object Cyc_compilation_environment(void *data, object cont, object var);
    418 object Cyc_command_line_arguments(void *data, object cont);
    419 object Cyc_system(object cmd);
    420 void Cyc_halt(object obj);
    421 object __halt(object obj);
    422 object Cyc_io_delete_file(void *data, object filename);
    423 object Cyc_io_file_exists(void *data, object filename);
    434 object Cyc_spawn_thread(object thunk);
    436 void Cyc_end_thread(gc_thread_data * thd);
    437 void Cyc_exit_thread(gc_thread_data * thd);
    438 object Cyc_thread_sleep(void *data, object timeout);
    446 object Cyc_trigger_minor_gc(void *data, object cont);
    447 object copy2heap(void *data, object obj);
    456 void Cyc_st_add(void *data, char *frame);
    457 void Cyc_st_print(void *data, FILE * out);
    468 extern const object primitive_Cyc_91global_91vars;
    469 extern const object primitive_Cyc_91get_91cvar;
    470 extern const object primitive_Cyc_91set_91cvar_67;
    471 extern const object primitive_Cyc_91cvar_127;
    472 extern const object primitive_Cyc_91opaque_127;
    473 extern const object primitive_Cyc_91has_91cycle_127;
    474 extern const object primitive_Cyc_91spawn_91thread_67;
    475 extern const object primitive_Cyc_91end_91thread_67;
    476 extern const object primitive__87;
    477 extern const object primitive__91;
    478 extern const object primitive__85;
    479 extern const object primitive__95;
    480 extern const object primitive__123;
    481 extern const object primitive__125;
    482 extern const object primitive__121;
    483 extern const object primitive__125_123;
    484 extern const object primitive__121_123;
    485 extern const object primitive_apply;
    486 extern const object primitive__75halt;
    487 extern const object primitive_exit;
    490 extern const object primitive_cons;
    491 extern const object primitive_cell_91get;
    492 extern const object primitive_set_91global_67;
    493 extern const object primitive_set_91cell_67;
    494 extern const object primitive_cell;
    495 extern const object primitive_eq_127;
    496 extern const object primitive_eqv_127;
    497 extern const object primitive_equal_127;
    498 extern const object primitive_assq;
    499 extern const object primitive_assv;
    500 extern const object primitive_memq;
    501 extern const object primitive_memv;
    502 extern const object primitive_length;
    503 extern const object primitive_vector_91length;
    504 extern const object primitive_bytevector_91length;
    505 extern const object primitive_set_91car_67;
    506 extern const object primitive_set_91cdr_67;
    507 extern const object primitive_car;
    508 extern const object primitive_cdr;
    509 extern const object primitive_caar;
    510 extern const object primitive_cadr;
    511 extern const object primitive_cdar;
    512 extern const object primitive_cddr;
    513 extern const object primitive_caaar;
    514 extern const object primitive_caadr;
    515 extern const object primitive_cadar;
    516 extern const object primitive_caddr;
    517 extern const object primitive_cdaar;
    518 extern const object primitive_cdadr;
    519 extern const object primitive_cddar;
    520 extern const object primitive_cdddr;
    521 extern const object primitive_caaaar;
    522 extern const object primitive_caaadr;
    523 extern const object primitive_caadar;
    524 extern const object primitive_caaddr;
    525 extern const object primitive_cadaar;
    526 extern const object primitive_cadadr;
    527 extern const object primitive_caddar;
    528 extern const object primitive_cadddr;
    529 extern const object primitive_cdaaar;
    530 extern const object primitive_cdaadr;
    531 extern const object primitive_cdadar;
    532 extern const object primitive_cdaddr;
    533 extern const object primitive_cddaar;
    534 extern const object primitive_cddadr;
    535 extern const object primitive_cdddar;
    536 extern const object primitive_cddddr;
    537 extern const object primitive_char_91_125integer;
    538 extern const object primitive_integer_91_125char;
    539 extern const object primitive_string_91_125number;
    540 extern const object primitive_string_91cmp;
    541 extern const object primitive_string_91append;
    542 extern const object primitive_list_91_125string;
    543 extern const object primitive_string_91_125symbol;
    544 extern const object primitive_symbol_91_125string;
    545 extern const object primitive_number_91_125string;
    546 extern const object primitive_string_91length;
    547 extern const object primitive_substring;
    548 extern const object primitive_make_91bytevector;
    549 extern const object primitive_make_91vector;
    550 extern const object primitive_list_91_125vector;
    551 extern const object primitive_vector_91ref;
    552 extern const object primitive_vector_91set_67;
    553 extern const object primitive_bytevector;
    554 extern const object primitive_bytevector_91append;
    555 extern const object primitive_Cyc_91bytevector_91copy;
    556 extern const object primitive_Cyc_91string_91_125utf8;
    557 extern const object primitive_Cyc_91utf8_91_125string;
    558 extern const object primitive_bytevector_91u8_91ref;
    559 extern const object primitive_bytevector_91u8_91set_67;
    560 extern const object primitive_string_91ref;
    561 extern const object primitive_string_91set_67;
    562 extern const object primitive_Cyc_91installation_91dir;
    564 extern const object primitive_command_91line_91arguments;
    565 extern const object primitive_system;
    566 extern const object primitive_boolean_127;
    567 extern const object primitive_char_127;
    568 extern const object primitive_eof_91object_127;
    569 extern const object primitive_null_127;
    570 extern const object primitive_number_127;
    571 extern const object primitive_real_127;
    572 extern const object primitive_integer_127;
    573 extern const object primitive_pair_127;
    574 extern const object primitive_procedure_127;
    575 extern const object primitive_macro_127;
    576 extern const object primitive_Cyc_91macro_127;
    577 extern const object primitive_port_127;
    578 extern const object primitive_vector_127;
    579 extern const object primitive_bytevector_127;
    580 extern const object primitive_string_127;
    581 extern const object primitive_symbol_127;
    582 extern const object primitive_open_91input_91file;
    583 extern const object primitive_open_91output_91file;
    584 extern const object primitive_close_91port;
    585 extern const object primitive_close_91input_91port;
    586 extern const object primitive_close_91output_91port;
    587 extern const object primitive_Cyc_91flush_91output_91port;
    588 extern const object primitive_file_91exists_127;
    589 extern const object primitive_delete_91file;
    590 extern const object primitive_read_91char;
    591 extern const object primitive_peek_91char;
    592 extern const object primitive_Cyc_91read_91line;
    593 extern const object primitive_Cyc_91write_91char;
    594 extern const object primitive_Cyc_91write;
    595 extern const object primitive_Cyc_91display;
    596 extern const object primitive_call_95cc;
    597 /* -------------------------------------------- */
    608 extern object Cyc_glo_eval_from_c;
    609 extern object Cyc_glo_call_cc;
    610 
    611 #define __glo_eval_91from_91c_scheme_eval Cyc_glo_eval_from_c
    612 #define __glo_call_95cc_scheme_base Cyc_glo_call_cc
    613 
    619 object Cyc_default_exception_handler(void *data, int argc, closure _, object err);
    620 
    621 object Cyc_current_exception_handler(void *data);
    622 void Cyc_rt_raise(void *data, object err);
    623 void Cyc_rt_raise2(void *data, const char *msg, object err);
    624 void Cyc_rt_raise_msg(void *data, const char *err);
    638 object add_symbol(symbol_type * psym);
    639 object add_symbol_by_name(const char *name);
    640 object find_symbol_by_name(const char *name);
    641 object find_or_add_symbol(const char *name);
    642 char *_strdup(const char *s);
    651 extern list global_table;
    652 void add_global(object * glo);
    655 #endif /* CYCLONE_RUNTIME_H */
    object Cyc_is_pair(object o)
    Definition: runtime.c:1439
    +
    const object primitive_cdaar
    Definition: runtime.c:5234
    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:1047
    -
    const object primitive_substring
    Definition: runtime.c:5254
    +
    object Cyc_write_char(void *data, object c, object port)
    Definition: runtime.c:1051
    +
    const object primitive_substring
    Definition: runtime.c:5258
    A closed-over function with no variables.
    Definition: types.h:948
    -
    object Cyc_vector_ref(void *d, object v, object k)
    Definition: runtime.c:1644
    +
    object Cyc_vector_ref(void *d, object v, object k)
    Definition: runtime.c:1648
    long global_heap_size
    -
    object copy2heap(void *data, object obj)
    Definition: runtime.c:5418
    -
    object Cyc_bit_set(void *data, object n1, object n2)
    Definition: runtime.c:5461
    -
    object Cyc_write(void *data, object, FILE *port)
    Definition: runtime.c:1040
    -
    object Cyc_is_symbol(object o)
    Definition: runtime.c:1480
    +
    object copy2heap(void *data, object obj)
    Definition: runtime.c:5422
    +
    object Cyc_bit_set(void *data, object n1, object n2)
    Definition: runtime.c:5465
    +
    object Cyc_write(void *data, object, FILE *port)
    Definition: runtime.c:1044
    +
    object Cyc_is_symbol(object o)
    Definition: runtime.c:1484
    char ** get_env_variables()
    Definition: runtime.c:156
    -
    const object primitive_Cyc_91write_91char
    Definition: runtime.c:5312
    -
    const object primitive_caar
    Definition: runtime.c:5222
    -
    object add_symbol_by_name(const char *name)
    Definition: runtime.c:365
    -
    object Cyc_get_global_variables()
    Definition: runtime.c:624
    -
    port_type Cyc_io_open_input_file(void *data, object str)
    Definition: runtime.c:3310
    -
    const object primitive_memq
    Definition: runtime.c:5211
    +
    const object primitive_Cyc_91write_91char
    Definition: runtime.c:5316
    +
    const object primitive_caar
    Definition: runtime.c:5226
    +
    object add_symbol_by_name(const char *name)
    Definition: runtime.c:369
    +
    object Cyc_get_global_variables()
    Definition: runtime.c:628
    +
    port_type Cyc_io_open_input_file(void *data, object str)
    Definition: runtime.c:3314
    +
    const object primitive_memq
    Definition: runtime.c:5215
    The port object type.
    Definition: types.h:757
    -
    const object primitive_command_91line_91arguments
    Definition: runtime.c:5261
    -
    const object primitive_open_91input_91file
    Definition: runtime.c:5300
    -
    object Cyc_string_append(void *data, object cont, int argc, object str1,...)
    Definition: runtime.c:2008
    -
    object Cyc_is_eof_object(object o)
    Definition: runtime.c:1569
    -
    void Cyc_st_add(void *data, char *frame)
    Definition: runtime.c:294
    -
    const object primitive_cdadar
    Definition: runtime.c:5244
    -
    object Cyc_is_bytevector(object o)
    Definition: runtime.c:1494
    -
    const object primitive_port_127
    Definition: runtime.c:5296
    -
    object memberp(void *data, object x, list l)
    Definition: runtime.c:1062
    -
    object Cyc_is_macro(object o)
    Definition: runtime.c:1557
    -
    const object primitive_cdddr
    Definition: runtime.c:5233
    -
    const object quote_void
    Definition: runtime.c:291
    -
    void add_global(object *glo)
    Definition: runtime.c:388
    -
    object Cyc_fast_mul(void *data, object ptr, object x, object y)
    Definition: runtime.c:2838
    -
    object Cyc_cdr(void *data, object lis)
    Definition: runtime.c:618
    -
    object add_symbol(symbol_type *psym)
    Definition: runtime.c:356
    +
    const object primitive_command_91line_91arguments
    Definition: runtime.c:5265
    +
    const object primitive_open_91input_91file
    Definition: runtime.c:5304
    +
    object Cyc_string_append(void *data, object cont, int argc, object str1,...)
    Definition: runtime.c:2012
    +
    object Cyc_is_eof_object(object o)
    Definition: runtime.c:1573
    +
    void Cyc_st_add(void *data, char *frame)
    Definition: runtime.c:298
    +
    const object primitive_cdadar
    Definition: runtime.c:5248
    +
    object Cyc_is_bytevector(object o)
    Definition: runtime.c:1498
    +
    const object primitive_port_127
    Definition: runtime.c:5300
    +
    object memberp(void *data, object x, list l)
    Definition: runtime.c:1066
    +
    object Cyc_is_macro(object o)
    Definition: runtime.c:1561
    +
    const object primitive_cdddr
    Definition: runtime.c:5237
    +
    const object quote_void
    Definition: runtime.c:295
    +
    void add_global(object *glo)
    Definition: runtime.c:392
    +
    object Cyc_fast_mul(void *data, object ptr, object x, object y)
    Definition: runtime.c:2842
    +
    object Cyc_cdr(void *data, object lis)
    Definition: runtime.c:622
    +
    object add_symbol(symbol_type *psym)
    Definition: runtime.c:360
    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:3172
    -
    object Cyc_string_ref(void *data, object str, object k)
    Definition: runtime.c:2043
    -
    object Cyc_string_set(void *data, object str, object k, object chr)
    Definition: runtime.c:2022
    -
    port_type Cyc_stdout(void)
    Definition: runtime.c:3292
    -
    const object primitive_Cyc_91macro_127
    Definition: runtime.c:5294
    +
    void Cyc_expt(void *data, object cont, object x, object y)
    Definition: runtime.c:3176
    +
    object Cyc_string_ref(void *data, object str, object k)
    Definition: runtime.c:2047
    +
    object Cyc_string_set(void *data, object str, object k, object chr)
    Definition: runtime.c:2026
    +
    port_type Cyc_stdout(void)
    Definition: runtime.c:3296
    +
    const object primitive_Cyc_91macro_127
    Definition: runtime.c:5298
    The pair (cons) type.
    Definition: types.h:830
    -
    double MRG32k3a(double seed)
    Definition: runtime.c:5490
    -
    const object primitive_cdaddr
    Definition: runtime.c:5245
    +
    double MRG32k3a(double seed)
    Definition: runtime.c:5494
    +
    const object primitive_cdaddr
    Definition: runtime.c:5249
    Definition: types.h:256
    -
    const object primitive_Cyc_91read_91line
    Definition: runtime.c:5311
    -
    const object primitive_caddar
    Definition: runtime.c:5240
    -
    const object primitive_string_91length
    Definition: runtime.c:5253
    -
    object Cyc_fast_sum(void *data, object ptr, object x, object y)
    Definition: runtime.c:2687
    -
    const object primitive_symbol_127
    Definition: runtime.c:5299
    -
    const object primitive_Cyc_91flush_91output_91port
    Definition: runtime.c:5305
    +
    const object primitive_Cyc_91read_91line
    Definition: runtime.c:5315
    +
    const object primitive_caddar
    Definition: runtime.c:5244
    +
    const object primitive_string_91length
    Definition: runtime.c:5257
    +
    object Cyc_fast_sum(void *data, object ptr, object x, object y)
    Definition: runtime.c:2691
    +
    const object primitive_symbol_127
    Definition: runtime.c:5303
    +
    const object primitive_Cyc_91flush_91output_91port
    Definition: runtime.c:5309
    const object Cyc_EOF
    Definition: runtime.c:150
    -
    object equalp(object, object)
    Definition: runtime.c:1125
    +
    object equalp(object, object)
    Definition: runtime.c:1129
    int Cyc_num_lte_op(void *, object x, object y)
    -
    const object primitive_procedure_127
    Definition: runtime.c:5292
    -
    const object primitive_integer_127
    Definition: runtime.c:5290
    -
    void dispatch_display_va(void *data, int argc, object clo, object cont, object x,...)
    Definition: runtime.c:714
    -
    void Cyc_apply(void *data, int argc, closure cont, object prim,...)
    Definition: runtime.c:4516
    -
    object Cyc_is_boolean(object o)
    Definition: runtime.c:1426
    -
    const object primitive_cdaadr
    Definition: runtime.c:5243
    -
    object Cyc_io_close_output_port(void *data, object port)
    Definition: runtime.c:3341
    -
    object Cyc_glo_call_cc
    Definition: runtime.c:456
    -
    const object primitive_open_91output_91file
    Definition: runtime.c:5301
    -
    object Cyc_io_read_char(void *data, object cont, object port)
    Definition: runtime.c:3403
    -
    const object primitive_cadaar
    Definition: runtime.c:5238
    -
    const object primitive_cddaar
    Definition: runtime.c:5246
    -
    const object primitive_cell
    Definition: runtime.c:5205
    -
    object Cyc_char2integer(object chr)
    Definition: runtime.c:2531
    -
    const object primitive_caaar
    Definition: runtime.c:5226
    -
    object Cyc_is_bignum(object o)
    Definition: runtime.c:1473
    -
    const object primitive_caaadr
    Definition: runtime.c:5235
    -
    object Cyc_thread_sleep(void *data, object timeout)
    Definition: runtime.c:5404
    -
    const object primitive__125
    Definition: runtime.c:5190
    +
    const object primitive_procedure_127
    Definition: runtime.c:5296
    +
    const object primitive_integer_127
    Definition: runtime.c:5294
    +
    void dispatch_display_va(void *data, int argc, object clo, object cont, object x,...)
    Definition: runtime.c:718
    +
    void Cyc_apply(void *data, int argc, closure cont, object prim,...)
    Definition: runtime.c:4520
    +
    object Cyc_is_boolean(object o)
    Definition: runtime.c:1430
    +
    const object primitive_cdaadr
    Definition: runtime.c:5247
    +
    object Cyc_io_close_output_port(void *data, object port)
    Definition: runtime.c:3345
    +
    object Cyc_glo_call_cc
    Definition: runtime.c:460
    +
    const object primitive_open_91output_91file
    Definition: runtime.c:5305
    +
    object Cyc_io_read_char(void *data, object cont, object port)
    Definition: runtime.c:3407
    +
    const object primitive_cadaar
    Definition: runtime.c:5242
    +
    const object primitive_cddaar
    Definition: runtime.c:5250
    +
    const object primitive_cell
    Definition: runtime.c:5209
    +
    object Cyc_char2integer(object chr)
    Definition: runtime.c:2535
    +
    const object primitive_caaar
    Definition: runtime.c:5230
    +
    object Cyc_is_bignum(object o)
    Definition: runtime.c:1477
    +
    const object primitive_caaadr
    Definition: runtime.c:5239
    +
    object Cyc_thread_sleep(void *data, object timeout)
    Definition: runtime.c:5408
    +
    const object primitive__125
    Definition: runtime.c:5194
    void(* function_type_va)(int, object, object, object,...)
    Definition: types.h:515
    -
    object Cyc_string2symbol(void *d, object str)
    Definition: runtime.c:1771
    -
    const object primitive_list_91_125string
    Definition: runtime.c:5266
    -
    void dispatch(void *data, int argc, function_type func, object clo, object cont, object args)
    Definition: runtime.c:4892
    -
    object Cyc_substring(void *data, object cont, object str, object start, object end)
    Definition: runtime.c:2062
    +
    object Cyc_string2symbol(void *d, object str)
    Definition: runtime.c:1775
    +
    const object primitive_list_91_125string
    Definition: runtime.c:5270
    +
    void dispatch(void *data, int argc, function_type func, object clo, object cont, object args)
    Definition: runtime.c:4896
    +
    object Cyc_substring(void *data, object cont, object str, object start, object end)
    Definition: runtime.c:2066
    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:4911
    -
    object Cyc_is_cond_var(object o)
    Definition: runtime.c:1515
    -
    const object primitive_string_127
    Definition: runtime.c:5295
    -
    const object primitive__121_123
    Definition: runtime.c:5193
    -
    const object primitive_apply
    Definition: runtime.c:5194
    -
    cvar_type * mcvar(object *var)
    Definition: runtime.c:3477
    -
    object Cyc_compilation_environment(void *data, object cont, object var)
    Definition: runtime.c:2128
    +
    void dispatch_va(void *data, int argc, function_type_va func, object clo, object cont, object args)
    Definition: runtime.c:4915
    +
    object Cyc_is_cond_var(object o)
    Definition: runtime.c:1519
    +
    const object primitive_string_127
    Definition: runtime.c:5299
    +
    const object primitive__121_123
    Definition: runtime.c:5197
    +
    const object primitive_apply
    Definition: runtime.c:5198
    +
    cvar_type * mcvar(object *var)
    Definition: runtime.c:3481
    +
    object Cyc_compilation_environment(void *data, object cont, object var)
    Definition: runtime.c:2132
    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:1597
    -
    void Cyc_start_trampoline(gc_thread_data *thd)
    Definition: runtime.c:4574
    -
    void dispatch_write_va(void *data, int argc, object clo, object cont, object x,...)
    Definition: runtime.c:893
    -
    object Cyc_car(void *data, object lis)
    Definition: runtime.c:612
    -
    void Cyc_remainder(void *data, object cont, object num1, object num2)
    Definition: runtime.c:3234
    -
    const object primitive_delete_91file
    Definition: runtime.c:5308
    -
    object Cyc_num_cmp_va_list(void *data, int argc, int(fn_op(void *, object, object)), object n, va_list ns)
    Definition: runtime.c:1183
    -
    const object primitive_cons
    Definition: runtime.c:5201
    -
    object Cyc_is_vector(object o)
    Definition: runtime.c:1487
    -
    char * _strdup(const char *s)
    Definition: runtime.c:337
    -
    object Cyc_make_bytevector(void *data, object cont, int argc, object len,...)
    Definition: runtime.c:2234
    -
    int equal(object, object)
    Definition: runtime.c:536
    -
    void Cyc_rt_raise_msg(void *data, const char *err)
    Definition: runtime.c:528
    +
    object Cyc_set_cell(void *, object l, object val)
    Definition: runtime.c:1601
    +
    void Cyc_start_trampoline(gc_thread_data *thd)
    Definition: runtime.c:4578
    +
    void dispatch_write_va(void *data, int argc, object clo, object cont, object x,...)
    Definition: runtime.c:897
    +
    object Cyc_car(void *data, object lis)
    Definition: runtime.c:616
    +
    void Cyc_remainder(void *data, object cont, object num1, object num2)
    Definition: runtime.c:3238
    +
    const object primitive_delete_91file
    Definition: runtime.c:5312
    +
    object Cyc_num_cmp_va_list(void *data, int argc, int(fn_op(void *, object, object)), object n, va_list ns)
    Definition: runtime.c:1187
    +
    const object primitive_cons
    Definition: runtime.c:5205
    +
    object Cyc_is_vector(object o)
    Definition: runtime.c:1491
    +
    char * _strdup(const char *s)
    Definition: runtime.c:341
    +
    object Cyc_make_bytevector(void *data, object cont, int argc, object len,...)
    Definition: runtime.c:2238
    +
    int equal(object, object)
    Definition: runtime.c:540
    +
    void Cyc_rt_raise_msg(void *data, const char *err)
    Definition: runtime.c:532
    object Cyc_num_fast_lte_op(void *data, object x, object y)
    -
    object Cyc_list2vector(void *data, object cont, object l)
    Definition: runtime.c:2499
    -
    const object boolean_f
    Definition: runtime.c:287
    -
    object Cyc_io_delete_file(void *data, object filename)
    Definition: runtime.c:3378
    -
    const object primitive_vector_91set_67
    Definition: runtime.c:5217
    -
    const object primitive_string_91ref
    Definition: runtime.c:5255
    -
    const object primitive_set_91car_67
    Definition: runtime.c:5218
    +
    object Cyc_list2vector(void *data, object cont, object l)
    Definition: runtime.c:2503
    +
    const object boolean_f
    Definition: runtime.c:291
    +
    object Cyc_io_delete_file(void *data, object filename)
    Definition: runtime.c:3382
    +
    const object primitive_vector_91set_67
    Definition: runtime.c:5221
    +
    const object primitive_string_91ref
    Definition: runtime.c:5259
    +
    const object primitive_set_91car_67
    Definition: runtime.c:5222
    int Cyc_num_gt_op(void *, object x, object y)
    -
    object Cyc_length(void *d, object l)
    Definition: runtime.c:1668
    -
    const object primitive_car
    Definition: runtime.c:5220
    -
    const object primitive_Cyc_91display
    Definition: runtime.c:5314
    -
    int binstr2int(const char *str)
    Definition: runtime.c:1942
    -
    object Cyc_spawn_thread(object thunk)
    Definition: runtime.c:5341
    +
    object Cyc_length(void *d, object l)
    Definition: runtime.c:1672
    +
    const object primitive_car
    Definition: runtime.c:5224
    +
    const object primitive_Cyc_91display
    Definition: runtime.c:5318
    +
    int binstr2int(const char *str)
    Definition: runtime.c:1946
    +
    object Cyc_spawn_thread(object thunk)
    Definition: runtime.c:5345
    Symbols are similar to strings, but only one instance of each unique symbol is created, so comparisons are O(1).
    Definition: types.h:609
    -
    const object primitive_number_91_125string
    Definition: runtime.c:5269
    -
    object Cyc_io_flush_output_port(void *data, object port)
    Definition: runtime.c:3364
    -
    object Cyc_default_exception_handler(void *data, int argc, closure _, object err)
    Definition: runtime.c:460
    -
    const object primitive_string_91append
    Definition: runtime.c:5265
    -
    const object primitive_set_91cdr_67
    Definition: runtime.c:5219
    +
    const object primitive_number_91_125string
    Definition: runtime.c:5273
    +
    object Cyc_io_flush_output_port(void *data, object port)
    Definition: runtime.c:3368
    +
    object Cyc_default_exception_handler(void *data, int argc, closure _, object err)
    Definition: runtime.c:464
    +
    const object primitive_string_91append
    Definition: runtime.c:5269
    +
    const object primitive_set_91cdr_67
    Definition: runtime.c:5223
    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_is_port(object o)
    Definition: runtime.c:1501
    -
    object Cyc_io_read_line(void *data, object cont, object port)
    Definition: runtime.c:3420
    -
    const object primitive_cddr
    Definition: runtime.c:5225
    -
    void Cyc_rt_raise(void *data, object err)
    Definition: runtime.c:504
    -
    object Cyc_bytevector_u8_ref(void *data, object bv, object k)
    Definition: runtime.c:2450
    +
    object Cyc_is_port(object o)
    Definition: runtime.c:1505
    +
    object Cyc_io_read_line(void *data, object cont, object port)
    Definition: runtime.c:3424
    +
    const object primitive_cddr
    Definition: runtime.c:5229
    +
    void Cyc_rt_raise(void *data, object err)
    Definition: runtime.c:508
    +
    object Cyc_bytevector_u8_ref(void *data, object bv, object k)
    Definition: runtime.c:2454
    object Cyc_global_variables
    Definition: runtime.c:144
    -
    const object primitive_close_91input_91port
    Definition: runtime.c:5303
    +
    const object primitive_close_91input_91port
    Definition: runtime.c:5307
    void Cyc_io_get_output_bytevector(void *data, object cont, object port)
    Definition: mstreams.c:109
    -
    const object primitive_caddr
    Definition: runtime.c:5229
    -
    const object primitive_null_127
    Definition: runtime.c:5287
    -
    object Cyc_write_va(void *data, int argc, object x,...)
    Definition: runtime.c:904
    +
    const object primitive_caddr
    Definition: runtime.c:5233
    +
    const object primitive_null_127
    Definition: runtime.c:5291
    +
    object Cyc_write_va(void *data, int argc, object x,...)
    Definition: runtime.c:908
    char ** _cyc_argv
    Definition: runtime.h:415
    C-variable integration type - wrapper around a Cyclone object pointer.
    Definition: types.h:520
    -
    object Cyc_system(object cmd)
    Definition: runtime.c:2523
    -
    const object primitive__95
    Definition: runtime.c:5188
    -
    object Cyc_string2number_(void *d, object cont, object str)
    Definition: runtime.c:1907
    -
    const object primitive_make_91bytevector
    Definition: runtime.c:5270
    -
    object Cyc_display_va_list(void *data, int argc, object x, va_list ap)
    Definition: runtime.c:735
    -
    object Cyc_make_vector(void *data, object cont, int argc, object len,...)
    Definition: runtime.c:2182
    -
    const object primitive_equal_127
    Definition: runtime.c:5208
    -
    const object boolean_t
    Definition: runtime.c:286
    -
    const object primitive_char_127
    Definition: runtime.c:5285
    -
    const object primitive__123
    Definition: runtime.c:5189
    -
    const object primitive_Cyc_91write
    Definition: runtime.c:5313
    -
    const object primitive_Cyc_91set_91cvar_67
    Definition: runtime.c:5178
    -
    const object primitive_Cyc_91bytevector_91copy
    Definition: runtime.c:5274
    -
    const object primitive_cdr
    Definition: runtime.c:5221
    -
    const object primitive_Cyc_91default_91exception_91handler
    Definition: runtime.c:5199
    -
    const object primitive_Cyc_91opaque_127
    Definition: runtime.c:5180
    -
    object Cyc_get_cvar(object var)
    Definition: runtime.c:629
    +
    object Cyc_system(object cmd)
    Definition: runtime.c:2527
    +
    const object primitive__95
    Definition: runtime.c:5192
    +
    object Cyc_string2number_(void *d, object cont, object str)
    Definition: runtime.c:1911
    +
    const object primitive_make_91bytevector
    Definition: runtime.c:5274
    +
    object Cyc_display_va_list(void *data, int argc, object x, va_list ap)
    Definition: runtime.c:739
    +
    object Cyc_make_vector(void *data, object cont, int argc, object len,...)
    Definition: runtime.c:2186
    +
    const object primitive_equal_127
    Definition: runtime.c:5212
    +
    const object boolean_t
    Definition: runtime.c:290
    +
    const object primitive_char_127
    Definition: runtime.c:5289
    +
    const object primitive__123
    Definition: runtime.c:5193
    +
    const object primitive_Cyc_91write
    Definition: runtime.c:5317
    +
    const object primitive_Cyc_91set_91cvar_67
    Definition: runtime.c:5182
    +
    const object primitive_Cyc_91bytevector_91copy
    Definition: runtime.c:5278
    +
    const object primitive_cdr
    Definition: runtime.c:5225
    +
    const object primitive_Cyc_91default_91exception_91handler
    Definition: runtime.c:5203
    +
    const object primitive_Cyc_91opaque_127
    Definition: runtime.c:5184
    +
    object Cyc_get_cvar(object var)
    Definition: runtime.c:633
    long global_stack_size
    -
    object Cyc_number2string2(void *data, object cont, int argc, object n,...)
    Definition: runtime.c:1703
    -
    const object primitive__121
    Definition: runtime.c:5191
    -
    const object primitive__75halt
    Definition: runtime.c:5195
    -
    void Cyc_rt_raise2(void *data, const char *msg, object err)
    Definition: runtime.c:515
    -
    object Cyc_list(void *data, int argc, object cont,...)
    Definition: runtime.c:1806
    -
    const object primitive_caadar
    Definition: runtime.c:5236
    -
    void gc_init_heap(long heap_size)
    Definition: runtime.c:262
    -
    const object primitive_read_91char
    Definition: runtime.c:5309
    -
    const object primitive_Cyc_91end_91thread_67
    Definition: runtime.c:5184
    -
    object Cyc_integer2char(void *data, object n)
    Definition: runtime.c:2536
    -
    object Cyc_io_file_exists(void *data, object filename)
    Definition: runtime.c:3388
    +
    object Cyc_number2string2(void *data, object cont, int argc, object n,...)
    Definition: runtime.c:1707
    +
    const object primitive__121
    Definition: runtime.c:5195
    +
    const object primitive__75halt
    Definition: runtime.c:5199
    +
    void Cyc_rt_raise2(void *data, const char *msg, object err)
    Definition: runtime.c:519
    +
    object Cyc_list(void *data, int argc, object cont,...)
    Definition: runtime.c:1810
    +
    const object primitive_caadar
    Definition: runtime.c:5240
    +
    void gc_init_heap(long heap_size)
    Perform one-time heap initializations for the program.
    Definition: runtime.c:266
    +
    const object primitive_read_91char
    Definition: runtime.c:5313
    +
    const object primitive_Cyc_91end_91thread_67
    Definition: runtime.c:5188
    +
    object Cyc_integer2char(void *data, object n)
    Definition: runtime.c:2540
    +
    object Cyc_io_file_exists(void *data, object filename)
    Definition: runtime.c:3392
    void set_env_variables(char **vars)
    Definition: runtime.c:203
    void(* function_type)()
    Definition: types.h:512
    -
    int octstr2int(const char *str)
    Definition: runtime.c:1953
    -
    object Cyc_string2utf8(void *data, object cont, object str, object start, object end)
    Definition: runtime.c:2421
    -
    object find_or_add_symbol(const char *name)
    Definition: runtime.c:373
    -
    void Cyc_end_thread(gc_thread_data *thd)
    Definition: runtime.c:5377
    -
    const object primitive_file_91exists_127
    Definition: runtime.c:5307
    -
    object Cyc_string2number2_(void *data, object cont, int argc, object str,...)
    Definition: runtime.c:1813
    -
    object cell_get(object cell)
    Definition: runtime.c:277
    -
    object Cyc_bytevector_u8_set(void *data, object bv, object k, object b)
    Definition: runtime.c:2470
    -
    const object primitive_assv
    Definition: runtime.c:5210
    -
    object apply_va(void *data, object cont, int argc, object func,...)
    Definition: runtime.c:4424
    -
    list malloc_make_pair(object, object)
    Definition: runtime.c:3466
    -
    const object primitive_vector_127
    Definition: runtime.c:5297
    -
    const object primitive_bytevector
    Definition: runtime.c:5272
    -
    object Cyc_io_peek_char(void *data, object cont, object port)
    Definition: runtime.c:3446
    +
    int octstr2int(const char *str)
    Definition: runtime.c:1957
    +
    object Cyc_string2utf8(void *data, object cont, object str, object start, object end)
    Definition: runtime.c:2425
    +
    object find_or_add_symbol(const char *name)
    Definition: runtime.c:377
    +
    void Cyc_end_thread(gc_thread_data *thd)
    Definition: runtime.c:5381
    +
    const object primitive_file_91exists_127
    Definition: runtime.c:5311
    +
    object Cyc_string2number2_(void *data, object cont, int argc, object str,...)
    Definition: runtime.c:1817
    +
    object cell_get(object cell)
    Definition: runtime.c:281
    +
    object Cyc_bytevector_u8_set(void *data, object bv, object k, object b)
    Definition: runtime.c:2474
    +
    const object primitive_assv
    Definition: runtime.c:5214
    +
    object apply_va(void *data, object cont, int argc, object func,...)
    Definition: runtime.c:4428
    +
    list malloc_make_pair(object, object)
    Definition: runtime.c:3470
    +
    const object primitive_vector_127
    Definition: runtime.c:5301
    +
    const object primitive_bytevector
    Definition: runtime.c:5276
    +
    object Cyc_io_peek_char(void *data, object cont, object port)
    Definition: runtime.c:3450
    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:3078
    -
    object Cyc_bytevector_length(void *data, object bv)
    Definition: runtime.c:2489
    -
    const object primitive_exit
    Definition: runtime.c:5196
    -
    const object primitive_caaaar
    Definition: runtime.c:5234
    -
    const object primitive_vector_91length
    Definition: runtime.c:5215
    -
    const object primitive_call_95cc
    Definition: runtime.c:5315
    -
    object find_symbol_by_name(const char *name)
    Definition: runtime.c:346
    -
    object Cyc_set_car(void *, object l, object val)
    Definition: runtime.c:1606
    -
    object Cyc_bytevector_append(void *data, object cont, int _argc, object bv,...)
    Definition: runtime.c:2354
    -
    const object primitive__125_123
    Definition: runtime.c:5192
    -
    object __halt(object obj)
    Definition: runtime.c:2553
    -
    object Cyc_string_cmp(void *data, object str1, object str2)
    Definition: runtime.c:1963
    -
    const object primitive_eof_91object_127
    Definition: runtime.c:5286
    -
    const object primitive_bytevector_91u8_91set_67
    Definition: runtime.c:5277
    -
    object Cyc_is_null(object o)
    Definition: runtime.c:1442
    -
    const object primitive_eq_127
    Definition: runtime.c:5206
    -
    object Cyc_set_cdr(void *, object l, object val)
    Definition: runtime.c:1616
    -
    object Cyc_is_opaque(object o)
    Definition: runtime.c:1583
    -
    const object primitive_Cyc_91string_91_125utf8
    Definition: runtime.c:5279
    +
    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:3082
    +
    object Cyc_bytevector_length(void *data, object bv)
    Definition: runtime.c:2493
    +
    const object primitive_exit
    Definition: runtime.c:5200
    +
    const object primitive_caaaar
    Definition: runtime.c:5238
    +
    const object primitive_vector_91length
    Definition: runtime.c:5219
    +
    const object primitive_call_95cc
    Definition: runtime.c:5319
    +
    object find_symbol_by_name(const char *name)
    Definition: runtime.c:350
    +
    object Cyc_set_car(void *, object l, object val)
    Definition: runtime.c:1610
    +
    object Cyc_bytevector_append(void *data, object cont, int _argc, object bv,...)
    Definition: runtime.c:2358
    +
    const object primitive__125_123
    Definition: runtime.c:5196
    +
    object __halt(object obj)
    Definition: runtime.c:2557
    +
    object Cyc_string_cmp(void *data, object str1, object str2)
    Definition: runtime.c:1967
    +
    const object primitive_eof_91object_127
    Definition: runtime.c:5290
    +
    const object primitive_bytevector_91u8_91set_67
    Definition: runtime.c:5281
    +
    object Cyc_is_null(object o)
    Definition: runtime.c:1446
    +
    const object primitive_eq_127
    Definition: runtime.c:5210
    +
    object Cyc_set_cdr(void *, object l, object val)
    Definition: runtime.c:1620
    +
    object Cyc_is_opaque(object o)
    Definition: runtime.c:1587
    +
    const object primitive_Cyc_91string_91_125utf8
    Definition: runtime.c:5283
    object Cyc_mul_op(void *data, common_type *x, object y)
    -
    const object primitive_cdaaar
    Definition: runtime.c:5242
    -
    const object primitive_string_91_125number
    Definition: runtime.c:5252
    -
    const object primitive_eqv_127
    Definition: runtime.c:5207
    -
    object Cyc_is_char(object o)
    Definition: runtime.c:1529
    -
    const object primitive_string_91_125symbol
    Definition: runtime.c:5267
    -
    const object primitive_cadddr
    Definition: runtime.c:5241
    -
    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:5386
    -
    object Cyc_write_va_list(void *data, int argc, object x, va_list ap)
    Definition: runtime.c:914
    -
    const object primitive_bytevector_91u8_91ref
    Definition: runtime.c:5276
    -
    object Cyc_vector_set(void *d, object v, object k, object obj)
    Definition: runtime.c:1626
    -
    const object primitive__91
    Definition: runtime.c:5186
    -
    const object primitive_list_91_125vector
    Definition: runtime.c:5283
    +
    const object primitive_cdaaar
    Definition: runtime.c:5246
    +
    const object primitive_string_91_125number
    Definition: runtime.c:5256
    +
    const object primitive_eqv_127
    Definition: runtime.c:5211
    +
    object Cyc_is_char(object o)
    Definition: runtime.c:1533
    +
    const object primitive_string_91_125symbol
    Definition: runtime.c:5271
    +
    const object primitive_cadddr
    Definition: runtime.c:5245
    +
    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:5390
    +
    object Cyc_write_va_list(void *data, int argc, object x, va_list ap)
    Definition: runtime.c:918
    +
    const object primitive_bytevector_91u8_91ref
    Definition: runtime.c:5280
    +
    object Cyc_vector_set(void *d, object v, object k, object obj)
    Definition: runtime.c:1630
    +
    const object primitive__91
    Definition: runtime.c:5190
    +
    const object primitive_list_91_125vector
    Definition: runtime.c:5287
    int Cyc_num_gte_op(void *, object x, object y)
    -
    const object primitive_vector_91ref
    Definition: runtime.c:5216
    +
    const object primitive_vector_91ref
    Definition: runtime.c:5220
    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:2015
    -
    object Cyc_has_cycle(object lst)
    Definition: runtime.c:657
    -
    object Cyc_is_mutex(object o)
    Definition: runtime.c:1508
    -
    object Cyc_trigger_minor_gc(void *data, object cont)
    Definition: runtime.c:4733
    -
    const object primitive_system
    Definition: runtime.c:5263
    +
    object Cyc_string_length(void *data, object str)
    Definition: runtime.c:2019
    +
    object Cyc_has_cycle(object lst)
    Definition: runtime.c:661
    +
    object Cyc_is_mutex(object o)
    Definition: runtime.c:1512
    +
    object Cyc_trigger_minor_gc(void *data, object cont)
    Definition: runtime.c:4737
    +
    const object primitive_system
    Definition: runtime.c:5267
    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:1782
    -
    object Cyc_fast_div(void *data, object ptr, object x, object y)
    Definition: runtime.c:2913
    -
    object Cyc_glo_eval_from_c
    Definition: runtime.c:457
    -
    object Cyc_display_va(void *data, int argc, object x,...)
    Definition: runtime.c:725
    -
    const object primitive_macro_127
    Definition: runtime.c:5293
    -
    const object primitive_memv
    Definition: runtime.c:5212
    -
    const object primitive_peek_91char
    Definition: runtime.c:5310
    -
    const object primitive_cadar
    Definition: runtime.c:5228
    -
    object Cyc_utf82string(void *data, object cont, object bv, object start, object end)
    Definition: runtime.c:2388
    -
    object Cyc_io_close_input_port(void *data, object port)
    Definition: runtime.c:3336
    -
    object dispatch_string_91append(void *data, int argc, object clo, object cont, object str1,...)
    Definition: runtime.c:2000
    +
    object Cyc_list2string(void *d, object cont, object lst)
    Definition: runtime.c:1786
    +
    object Cyc_fast_div(void *data, object ptr, object x, object y)
    Definition: runtime.c:2917
    +
    object Cyc_glo_eval_from_c
    Definition: runtime.c:461
    +
    object Cyc_display_va(void *data, int argc, object x,...)
    Definition: runtime.c:729
    +
    const object primitive_macro_127
    Definition: runtime.c:5297
    +
    const object primitive_memv
    Definition: runtime.c:5216
    +
    const object primitive_peek_91char
    Definition: runtime.c:5314
    +
    const object primitive_cadar
    Definition: runtime.c:5232
    +
    object Cyc_utf82string(void *data, object cont, object bv, object start, object end)
    Definition: runtime.c:2392
    +
    object Cyc_io_close_input_port(void *data, object port)
    Definition: runtime.c:3340
    +
    object dispatch_string_91append(void *data, int argc, object clo, object cont, object str1,...)
    Definition: runtime.c:2004
    object Cyc_sub(void *data, object cont, int argc, object n,...)
    -
    const object primitive_symbol_91_125string
    Definition: runtime.c:5268
    -
    port_type Cyc_stdin(void)
    Definition: runtime.c:3298
    -
    const object primitive_boolean_127
    Definition: runtime.c:5284
    +
    const object primitive_symbol_91_125string
    Definition: runtime.c:5272
    +
    port_type Cyc_stdin(void)
    Definition: runtime.c:3302
    +
    const object primitive_boolean_127
    Definition: runtime.c:5288
    object Cyc_sum(void *data, object cont, int argc, object n,...)
    void pack_env_variables(void *data, object k)
    Definition: runtime.c:161
    -
    object Cyc_bytevector_copy(void *data, object cont, object bv, object start, object end)
    Definition: runtime.c:2359
    +
    object Cyc_bytevector_copy(void *data, object cont, object bv, object start, object end)
    Definition: runtime.c:2363
    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:2763
    -
    const object primitive_Cyc_91installation_91dir
    Definition: runtime.c:5257
    -
    const object primitive_Cyc_91cvar_127
    Definition: runtime.c:5179
    -
    const object primitive_caadr
    Definition: runtime.c:5227
    -
    const object primitive_close_91output_91port
    Definition: runtime.c:5304
    -
    const object primitive_bytevector_127
    Definition: runtime.c:5298
    -
    const object primitive_make_91vector
    Definition: runtime.c:5271
    -
    const object primitive_cadr
    Definition: runtime.c:5223
    -
    object Cyc_is_cvar(object o)
    Definition: runtime.c:1576
    +
    object Cyc_fast_sub(void *data, object ptr, object x, object y)
    Definition: runtime.c:2767
    +
    const object primitive_Cyc_91installation_91dir
    Definition: runtime.c:5261
    +
    const object primitive_Cyc_91cvar_127
    Definition: runtime.c:5183
    +
    const object primitive_caadr
    Definition: runtime.c:5231
    +
    const object primitive_close_91output_91port
    Definition: runtime.c:5308
    +
    const object primitive_bytevector_127
    Definition: runtime.c:5302
    +
    const object primitive_make_91vector
    Definition: runtime.c:5275
    +
    const object primitive_cadr
    Definition: runtime.c:5227
    +
    object Cyc_is_cvar(object o)
    Definition: runtime.c:1580
    object Cyc_mul(void *data, object cont, int argc, object n,...)
    -
    const object primitive_bytevector_91length
    Definition: runtime.c:5214
    -
    const object primitive_set_91global_67
    Definition: runtime.c:5203
    -
    object Cyc_is_real(object o)
    Definition: runtime.c:1459
    +
    const object primitive_bytevector_91length
    Definition: runtime.c:5218
    +
    const object primitive_set_91global_67
    Definition: runtime.c:5207
    +
    object Cyc_is_real(object o)
    Definition: runtime.c:1463
    object Cyc_num_fast_gt_op(void *data, object x, object y)
    -
    void Cyc_st_print(void *data, FILE *out)
    Definition: runtime.c:305
    +
    void Cyc_st_print(void *data, FILE *out)
    Definition: runtime.c:309
    int Cyc_num_lt_op(void *, object x, object y)
    -
    const object primitive_assq
    Definition: runtime.c:5209
    -
    object Cyc_bit_unset(void *data, object n1, object n2)
    Definition: runtime.c:5453
    +
    const object primitive_assq
    Definition: runtime.c:5213
    +
    object Cyc_bit_unset(void *data, object n1, object n2)
    Definition: runtime.c:5457
    void Cyc_check_bounds(void *data, const char *label, int len, int index)
    Definition: runtime.c:73
    -
    const object primitive_integer_91_125char
    Definition: runtime.c:5251
    -
    object Cyc_div(void *data, object cont, int argc, object n,...)
    Definition: runtime.c:3051
    +
    const object primitive_integer_91_125char
    Definition: runtime.c:5255
    +
    object Cyc_div(void *data, object cont, int argc, object n,...)
    Definition: runtime.c:3055
    void Cyc_invalid_type_error(void *data, int tag, object found)
    Definition: runtime.c:58
    -
    const object primitive_caaddr
    Definition: runtime.c:5237
    -
    const object primitive_cdadr
    Definition: runtime.c:5231
    -
    const object primitive_char_91_125integer
    Definition: runtime.c:5250
    -
    port_type Cyc_stderr(void)
    Definition: runtime.c:3304
    +
    const object primitive_caaddr
    Definition: runtime.c:5241
    +
    const object primitive_cdadr
    Definition: runtime.c:5235
    +
    const object primitive_char_91_125integer
    Definition: runtime.c:5254
    +
    port_type Cyc_stderr(void)
    Definition: runtime.c:3308
    A union of all the constant-size objects.
    Definition: types.h:1027
    -
    void dispatch_apply_va(void *data, int argc, object clo, object cont, object func,...)
    Definition: runtime.c:4413
    -
    object Cyc_display(void *data, object, FILE *port)
    Definition: runtime.c:751
    +
    void dispatch_apply_va(void *data, int argc, object clo, object cont, object func,...)
    Definition: runtime.c:4417
    +
    object Cyc_display(void *data, object, FILE *port)
    Definition: runtime.c:755
    int _cyc_argc
    Definition: runtime.h:414
    -
    const object primitive__85
    Definition: runtime.c:5187
    +
    const object primitive__85
    Definition: runtime.c:5191
    object Cyc_num_eq(void *, object cont, int argc, object n,...)
    object Cyc_num_fast_lt_op(void *data, object x, object y)
    -
    object Cyc_symbol2string(void *d, object cont, object sym)
    Definition: runtime.c:1762
    -
    const object primitive_bytevector_91append
    Definition: runtime.c:5273
    -
    object Cyc_current_exception_handler(void *data)
    Definition: runtime.c:493
    -
    const object primitive_Cyc_91get_91cvar
    Definition: runtime.c:5177
    -
    object Cyc_set_cvar(object var, object value)
    Definition: runtime.c:637
    -
    void Cyc_halt(object obj)
    Definition: runtime.c:2545
    +
    object Cyc_symbol2string(void *d, object cont, object sym)
    Definition: runtime.c:1766
    +
    const object primitive_bytevector_91append
    Definition: runtime.c:5277
    +
    object Cyc_current_exception_handler(void *data)
    Definition: runtime.c:497
    +
    const object primitive_Cyc_91get_91cvar
    Definition: runtime.c:5181
    +
    object Cyc_set_cvar(object var, object value)
    Definition: runtime.c:641
    +
    void Cyc_halt(object obj)
    Definition: runtime.c:2549
    object Cyc_num_gte(void *, object cont, int argc, object n,...)
    -
    const object primitive_Cyc_91has_91cycle_127
    Definition: runtime.c:5181
    -
    object memqp(void *data, object x, list l)
    Definition: runtime.c:1072
    -
    object Cyc_is_number(object o)
    Definition: runtime.c:1449
    -
    object Cyc_is_integer(object o)
    Definition: runtime.c:1464
    -
    const object primitive_Cyc_91current_91exception_91handler
    Definition: runtime.c:5197
    -
    const object primitive_Cyc_91utf8_91_125string
    Definition: runtime.c:5281
    -
    object Cyc_io_close_port(void *data, object port)
    Definition: runtime.c:3346
    -
    object Cyc_command_line_arguments(void *data, object cont)
    Definition: runtime.c:2163
    -
    const object primitive_set_91cell_67
    Definition: runtime.c:5204
    -
    object Cyc_is_string(object o)
    Definition: runtime.c:1522
    -
    const object primitive_cdddar
    Definition: runtime.c:5248
    -
    object Cyc_bytevector(void *data, object cont, int argc, object bval,...)
    Definition: runtime.c:2308
    -
    list global_table
    Definition: runtime.c:386
    -
    const object primitive_length
    Definition: runtime.c:5213
    -
    object Cyc_is_procedure(void *data, object o)
    Definition: runtime.c:1536
    -
    list assoc(void *data, object x, list l)
    Definition: runtime.c:1095
    -
    const object primitive_Cyc_91spawn_91thread_67
    Definition: runtime.c:5182
    -
    const object primitive_Cyc_91compilation_91environment
    Definition: runtime.c:5259
    -
    const object primitive_Cyc_91global_91vars
    Definition: runtime.c:5176
    -
    const object primitive_cddddr
    Definition: runtime.c:5249
    -
    object Cyc_installation_dir(void *data, object cont, object type)
    Definition: runtime.c:2099
    -
    object Cyc_eq(object x, object y)
    Definition: runtime.c:1590
    +
    const object primitive_Cyc_91has_91cycle_127
    Definition: runtime.c:5185
    +
    object memqp(void *data, object x, list l)
    Definition: runtime.c:1076
    +
    object Cyc_is_number(object o)
    Definition: runtime.c:1453
    +
    object Cyc_is_integer(object o)
    Definition: runtime.c:1468
    +
    const object primitive_Cyc_91current_91exception_91handler
    Definition: runtime.c:5201
    +
    const object primitive_Cyc_91utf8_91_125string
    Definition: runtime.c:5285
    +
    object Cyc_io_close_port(void *data, object port)
    Definition: runtime.c:3350
    +
    object Cyc_command_line_arguments(void *data, object cont)
    Definition: runtime.c:2167
    +
    const object primitive_set_91cell_67
    Definition: runtime.c:5208
    +
    object Cyc_is_string(object o)
    Definition: runtime.c:1526
    +
    const object primitive_cdddar
    Definition: runtime.c:5252
    +
    object Cyc_bytevector(void *data, object cont, int argc, object bval,...)
    Definition: runtime.c:2312
    +
    list global_table
    Definition: runtime.c:390
    +
    const object primitive_length
    Definition: runtime.c:5217
    +
    object Cyc_is_procedure(void *data, object o)
    Definition: runtime.c:1540
    +
    list assoc(void *data, object x, list l)
    Definition: runtime.c:1099
    +
    const object primitive_Cyc_91spawn_91thread_67
    Definition: runtime.c:5186
    +
    const object primitive_Cyc_91compilation_91environment
    Definition: runtime.c:5263
    +
    const object primitive_Cyc_91global_91vars
    Definition: runtime.c:5180
    +
    const object primitive_cddddr
    Definition: runtime.c:5253
    +
    object Cyc_installation_dir(void *data, object cont, object type)
    Definition: runtime.c:2103
    +
    object Cyc_eq(object x, object y)
    Definition: runtime.c:1594
    object Cyc_sum_op(void *data, common_type *x, object y)
    -
    const object primitive_string_91cmp
    Definition: runtime.c:5264
    -
    object Cyc_vector_length(void *data, object v)
    Definition: runtime.c:1658
    -
    object apply(void *data, object cont, object func, object args)
    Definition: runtime.c:4439
    -
    const object primitive_cell_91get
    Definition: runtime.c:5202
    -
    const object primitive_pair_127
    Definition: runtime.c:5291
    +
    const object primitive_string_91cmp
    Definition: runtime.c:5268
    +
    object Cyc_vector_length(void *data, object v)
    Definition: runtime.c:1662
    +
    object apply(void *data, object cont, object func, object args)
    Definition: runtime.c:4443
    +
    const object primitive_cell_91get
    Definition: runtime.c:5206
    +
    const object primitive_pair_127
    Definition: runtime.c:5295
    #define prim(x)
    Definition: types.h:1018
    -
    const object primitive__87
    Definition: runtime.c:5185
    -
    const object primitive_cadadr
    Definition: runtime.c:5239
    -
    const object primitive_number_127
    Definition: runtime.c:5288
    +
    const object primitive__87
    Definition: runtime.c:5189
    +
    const object primitive_cadadr
    Definition: runtime.c:5243
    +
    const object primitive_number_127
    Definition: runtime.c:5292
    object Cyc_num_lte(void *, object cont, int argc, object n,...)
    -
    list assq(void *data, object x, list l)
    Definition: runtime.c:1082
    +
    list assq(void *data, object x, list l)
    Definition: runtime.c:1086
    void Cyc_check_obj(void *data, int tag, object obj)
    Definition: runtime.c:66
    -
    port_type Cyc_io_open_output_file(void *data, object str)
    Definition: runtime.c:3323
    -
    void GC(void *, closure, object *, int)
    Definition: runtime.c:4877
    +
    port_type Cyc_io_open_output_file(void *data, object str)
    Definition: runtime.c:3327
    +
    void GC(void *, closure, object *, int)
    Definition: runtime.c:4881
    object Cyc_num_fast_gte_op(void *data, object x, object y)
    -
    const object primitive_real_127
    Definition: runtime.c:5289
    -
    const object primitive_string_91set_67
    Definition: runtime.c:5256
    -
    const object primitive_cdar
    Definition: runtime.c:5224
    -
    const object primitive_cddadr
    Definition: runtime.c:5247
    -
    object Cyc_div_op(void *data, common_type *x, object y)
    Definition: runtime.c:2980
    -
    const object primitive_cddar
    Definition: runtime.c:5232
    -
    const object primitive_close_91port
    Definition: runtime.c:5302
    +
    const object primitive_real_127
    Definition: runtime.c:5293
    +
    const object primitive_string_91set_67
    Definition: runtime.c:5260
    +
    const object primitive_cdar
    Definition: runtime.c:5228
    +
    const object primitive_cddadr
    Definition: runtime.c:5251
    +
    object Cyc_div_op(void *data, common_type *x, object y)
    Definition: runtime.c:2984
    +
    const object primitive_cddar
    Definition: runtime.c:5236
    +
    const object primitive_close_91port
    Definition: runtime.c:5306
    -Go to the documentation of this file.
    1 /*
    2  * Cyclone Scheme
    3  * Copyright (c) 2014, Justin Ethier
    4  * All rights reserved.
    5  *
    6  * This file contains C types used by compiled programs.
    7  */
    8 
    9 #ifndef CYCLONE_TYPES_H
    10 #define CYCLONE_TYPES_H
    11 
    12 #include <math.h>
    13 #include <setjmp.h>
    14 #include <stdarg.h>
    15 #include <stdio.h>
    16 #include <stdlib.h>
    17 #include <string.h>
    18 #include <time.h>
    19 #include <pthread.h>
    20 #include <stdint.h>
    21 #include "tommath.h"
    22 
    27 typedef void *object;
    28 
    35 enum object_tag {
    36  boolean_tag = 0 // 0
    38  , c_opaque_tag // 2
    39  , closure0_tag // 3
    40  , closure1_tag // 4
    41  , closureN_tag // 5
    42  , cond_var_tag // 6
    43  , cvar_tag // 7
    44  , double_tag // 8
    45  , eof_tag // 9
    46  , forward_tag // 10
    47  , integer_tag // 11
    48  , bignum_tag // 12
    49  , macro_tag // 13
    50  , mutex_tag // 14
    51  , pair_tag // 15
    52  , port_tag // 16
    53  , primitive_tag // 17
    54  , string_tag // 18
    55  , symbol_tag // 19
    56  , vector_tag // 20
    57 };
    58 
    59 #define type_is_pair_prim(clo) \
    60  (type_of(clo) >= pair_tag)
    61 
    66 typedef unsigned char tag_type;
    67 
    72 #define type_of(obj) (((pair_type *) obj)->tag)
    73 
    92 // Parameters for size of a "page" on the heap (the second generation GC), in bytes.
    94 
    96 #define GROW_HEAP_BY_SIZE (2 * 1024 * 1024)
    97 
    99 #define INITIAL_HEAP_SIZE (3 * 1024 * 1024)
    100 
    102 #define HEAP_SIZE (32 * 1024 * 1024)
    103 
    104 // End heap page size parameters
    106 
    108 // Major GC tuning parameters
    109 
    111 #define GC_COLLECTION_THRESHOLD 0.05
    112 
    114 #define GC_FREE_THRESHOLD 0.40
    115 // END GC tuning
    117 
    119 #define MAX_STACK_TRACES 10
    120 
    122 #define DEBUG_SHOW_DIAG 0
    123 
    125 #define GC_DEBUG_SHOW_SWEEP_DIAG 0
    126 
    128 #define GC_DEBUG_TRACE 0
    129 
    131 #define GC_DEBUG_VERBOSE 0
    132 
    137 #define GC_SAFETY_CHECKS 0
    138 
    140 #define NANOSECONDS_PER_MILLISECOND 1000000
    141 
    142 /* GC data structures */
    143 
    162 typedef enum {
    163  HEAP_SM = 0 // 32 byte objects (min gc_heap_align)
    166  , HEAP_REST // Everything else
    167  , HEAP_HUGE // Huge objects, 1 per page
    168 } gc_heap_type;
    169 
    171 #define NUM_HEAP_TYPES (HEAP_HUGE + 1)
    172 
    178  unsigned int size;
    180 };
    181 
    185 typedef struct gc_heap_t gc_heap;
    186 struct gc_heap_t {
    188  unsigned int size;
    189  unsigned int chunk_size; // 0 for any size, other and heap will only alloc chunks of that size
    190  unsigned int max_size;
    191  unsigned int ttl; // Keep empty page alive this many times before freeing
    192  //
    194  unsigned int last_alloc_size;
    195  //unsigned int free_size;
    197  gc_heap *next; // TBD, linked list is not very efficient, but easy to work with as a start
    198  char *data;
    199 };
    200 
    207 };
    208 
    214  unsigned char mark; // mark bits (only need 2)
    215  unsigned char grayed; // stack object to be grayed when moved to heap
    216 };
    217 
    219 #define mark(x) (((list) x)->hdr.mark)
    220 
    222 #define grayed(x) (((list) x)->hdr.grayed)
    223 
    227 
    230  //, STAGE_REF_PROCESSING
    232 } gc_stage_type;
    233 
    234 // Constant colors are defined here.
    235 // The mark/clear colors are defined in the gc module because
    236 // the collector swaps their values as an optimization.
    237 
    239 #define gc_color_red 0
    240 
    242 #define gc_color_blue 2
    243 
    249 
    257  // Thread object, if applicable
    260  // Data needed to initiate stack-based minor GC
    261  char *stack_start;
    262  char *stack_limit;
    263  // Minor GC write barrier
    264  void **mutations;
    267  // List of objects moved to heap during minor GC
    268  void **moveBuf;
    270  // Need the following to perform longjmp's
    271  //int mutator_num;
    272  jmp_buf *jmp_start;
    273  // After longjmp, pick up execution using continuation/arguments
    274  object gc_cont;
    275  object *gc_args;
    276  short gc_num_args;
    277  // Data needed for heap GC
    283  void **mark_buffer;
    285  pthread_mutex_t lock;
    286  pthread_mutex_t heap_lock;
    287  pthread_t thread_id;
    291  // Data needed for call history
    292  char **stack_traces;
    295  // Exception handler stack
    297 };
    298 
    299 /* GC prototypes */
    300 void gc_initialize(void);
    301 void gc_add_mutator(gc_thread_data * thd);
    303 gc_heap *gc_heap_create(int heap_type, size_t size, size_t max_size,
    304  size_t chunk_size, gc_thread_data *thd);
    305 gc_heap *gc_heap_free(gc_heap *page, gc_heap *prev_page);
    306 void gc_heap_merge(gc_heap *hdest, gc_heap *hsrc);
    308 void gc_print_stats(gc_heap * h);
    309 int gc_grow_heap(gc_heap * h, int heap_type, size_t size, size_t chunk_size, gc_thread_data *thd);
    310 char *gc_copy_obj(object hp, char *obj, gc_thread_data * thd);
    311 void *gc_try_alloc(gc_heap * h, int heap_type, size_t size, char *obj,
    312  gc_thread_data * thd);
    313 void *gc_alloc(gc_heap_root * h, size_t size, char *obj, gc_thread_data * thd,
    314  int *heap_grown);
    315 void *gc_alloc_bignum(gc_thread_data *data);
    316 size_t gc_allocated_bytes(object obj, gc_free_list * q, gc_free_list * r);
    318 size_t gc_heap_total_size(gc_heap * h);
    319 //size_t gc_heap_total_free_size(gc_heap *h);
    320 //size_t gc_collect(gc_heap *h, size_t *sum_freed);
    321 //void gc_mark(gc_heap *h, object obj);
    322 void gc_request_mark_globals(void);
    323 void gc_mark_globals(object globals, object global_table);
    324 size_t gc_sweep(gc_heap * h, int heap_type, size_t * sum_freed_ptr, gc_thread_data *thd);
    326 void gc_thr_add_to_move_buffer(gc_thread_data * d, int *alloci, object obj);
    327 void gc_thread_data_init(gc_thread_data * thd, int mut_num, char *stack_base,
    328  long stack_size);
    330 // Prototypes for mutator/collector:
    331 int gc_is_stack_obj(gc_thread_data * thd, object obj);
    332 void gc_mut_update(gc_thread_data * thd, object old_obj, object value);
    333 void gc_mut_cooperate(gc_thread_data * thd, int buf_len);
    334 void gc_mark_gray(gc_thread_data * thd, object obj);
    335 void gc_mark_gray2(gc_thread_data * thd, object obj);
    336 void gc_collector_trace();
    340 void gc_wait_handshake();
    341 void gc_start_collector();
    342 void gc_mutator_thread_blocked(gc_thread_data * thd, object cont);
    343 void gc_mutator_thread_runnable(gc_thread_data * thd, object result);
    344 #define set_thread_blocked(d, c) \
    345  gc_mutator_thread_blocked(((gc_thread_data *)d), (c))
    346 #define return_thread_runnable(d, r) \
    347  gc_mutator_thread_runnable(((gc_thread_data *)d), (r))
    348 /*
    349 //#define do_with_blocked_thread(data, cont, result, body) \
    350 // set_thread_blocked((data), (cont)); \
    351 // body \
    352 // return_thread_runnable((data), (result));
    353 */
    354 
    367 #define NUM_GC_ARGS 128
    368 
    372 #define STACK_GROWTH_IS_DOWNWARD 1
    373 
    378 #define STACK_SIZE 500000
    379 
    383 #define MAX_STACK_OBJ (STACK_SIZE * 2)
    384 
    386 #if STACK_GROWTH_IS_DOWNWARD
    387 #define stack_overflow(x,y) ((x) < (y))
    388 #else
    389 #define stack_overflow(x,y) ((x) > (y))
    390 #endif
    391 
    398 #define forward(obj) (((pair_type *) obj)->pair_car)
    399 
    400 
    406 void add_mutation(void *data, object var, int index, object value);
    407 void clear_mutations(void *data);
    412 // END GC section
    447 #define CYC_FIXNUM_MAX 1073741823
    448 
    450 #define CYC_FIXNUM_MIN -1073741824
    451 
    455 #define obj_is_int(x) ((unsigned long)(x) & (unsigned long)1)
    456 
    460 #define obj_obj2int(x) ((long)(x)>>1)
    461 
    465 #define obj_int2obj(c) ((void *)((((long)c)<<1) | 1))
    466 
    470 #define obj_is_char(x) (((unsigned long)(x) & (unsigned long)3) == 2)
    471 
    475 #define obj_obj2char(x) (char)((long)(x)>>2)
    476 
    480 #define obj_char2obj(c) ((void *)((((unsigned long)c)<<2) | 2))
    481 
    485 #define is_value_type(x) ((unsigned long)(x) & (unsigned long)3)
    486 
    490 #define is_object_type(x) (x && !is_value_type(x))
    491 
    512 typedef void (*function_type) ();
    513 
    515 typedef void (*function_type_va) (int, object, object, object, ...);
    516 
    520 typedef struct {
    524  object *pvar;
    525 } cvar_type;
    526 typedef cvar_type *cvar;
    527 
    531 #define make_cvar(n,v) \
    532  cvar_type n; \
    533  n.hdr.mark = gc_color_red; \
    534  n.hdr.grayed = 0; \
    535  n.tag = cvar_tag; \
    536  n.pvar = v;
    537 
    544 typedef struct {
    548  void *ptr;
    549 } c_opaque_type;
    551 
    553 #define make_c_opaque(var, p) \
    554  c_opaque_type var; \
    555  var.hdr.mark = gc_color_red; \
    556  var.hdr.grayed = 0; \
    557  var.tag = c_opaque_tag; \
    558  var.ptr = p;
    559 
    561 #define opaque_ptr(x) (((c_opaque)x)->ptr)
    562 
    568 typedef struct {
    571  pthread_mutex_t lock;
    572 } mutex_type;
    573 typedef mutex_type *mutex;
    574 
    580 typedef struct {
    583  pthread_cond_t cond;
    584 } cond_var_type;
    586 
    593 typedef struct {
    595  const tag_type tag;
    596  const char *desc;
    597 } boolean_type;
    599 
    600 #define boolean_desc(x) (((boolean_type *) x)->desc)
    601 
    609 typedef struct {
    611  const tag_type tag;
    612  const char *desc;
    613 } symbol_type;
    615 
    616 #define symbol_desc(x) (((symbol_type *) x)->desc)
    617 
    618 #define defsymbol(name) \
    619 static object quote_##name = NULL;
    620 
    621 /* Define numeric types */
    622 
    629 typedef struct {
    632  int value;
    633  int padding; // Prevent mem corruption if sizeof(int) < sizeof(ptr)
    634 } integer_type;
    635 
    644 typedef struct {
    647  mp_int bn;
    648 } bignum_type;
    649 
    651 #define alloc_bignum(data, p) \
    652  bignum_type *p = gc_alloc_bignum((gc_thread_data *)data);
    653 
    657 typedef struct {
    660  double value;
    661 } double_type;
    662 
    664 #define make_double(n,v) \
    665  double_type n; \
    666  n.hdr.mark = gc_color_red; \
    667  n.hdr.grayed = 0; \
    668  n.tag = double_tag; \
    669  n.value = v;
    670 
    672 #define assign_double(pobj,v) \
    673  ((double_type *)pobj)->hdr.mark = gc_color_red; \
    674  ((double_type *)pobj)->hdr.grayed = 0; \
    675  ((double_type *)pobj)->tag = double_tag; \
    676  double_value(pobj) = v;
    677 
    679 #define integer_value(x) (((integer_type *) x)->value)
    680 
    682 #define double_value(x) (((double_type *) x)->value)
    683 
    685 #define bignum_value(x) (((bignum_type *) x)->bn)
    686 
    691 typedef enum {
    693  , CYC_BN_LT = MP_LT
    694  , CYC_BN_EQ = MP_EQ
    695  , CYC_BN_GT = MP_GT
    697 } bn_cmp_type;
    698 
    702 typedef struct {
    705  int len;
    706  char *str;
    707 } string_type;
    708 
    710 #define make_string(cs, s) string_type cs; \
    711 { int len = strlen(s); \
    712  cs.hdr.mark = gc_color_red; \
    713  cs.hdr.grayed = 0; \
    714  cs.tag = string_tag; \
    715  cs.len = len; \
    716  cs.str = alloca(sizeof(char) * (len + 1)); \
    717  memcpy(cs.str, s, len + 1);}
    718 
    723 #define make_string_with_len(cs, s, length) string_type cs; \
    724 { int len = length; \
    725  cs.hdr.mark = gc_color_red; \
    726  cs.hdr.grayed = 0; \
    727  cs.tag = string_tag; cs.len = len; \
    728  cs.str = alloca(sizeof(char) * (len + 1)); \
    729  memcpy(cs.str, s, len); \
    730  cs.str[len] = '\0';}
    731 
    736 #define make_string_noalloc(cs, s, length) string_type cs; \
    737 { cs.hdr.mark = gc_color_red; cs.hdr.grayed = 0; \
    738  cs.tag = string_tag; cs.len = length; \
    739  cs.str = s; }
    740 
    742 #define string_len(x) (((string_type *) x)->len)
    743 
    745 #define string_str(x) (((string_type *) x)->str)
    746 
    747 /* I/O types */
    748 
    749 // TODO: FILE* may not be good enough
    750 // consider http://stackoverflow.com/questions/6206893/how-to-implement-char-ready-in-c
    751 // TODO: a simple wrapper around FILE may not be good enough long-term
    752 // TODO: how exactly mode will be used. need to know r/w, bin/txt
    753 
    757 typedef struct {
    760  FILE *fp;
    761  int mode;
    762  char *mem_buf;
    763  size_t mem_buf_len;
    764 } port_type;
    765 
    767 #define make_port(p,f,m) \
    768  port_type p; \
    769  p.hdr.mark = gc_color_red; \
    770  p.hdr.grayed = 0; \
    771  p.tag = port_tag; \
    772  p.fp = f; \
    773  p.mode = m; \
    774  p.mem_buf = NULL; \
    775  p.mem_buf_len = 0;
    776 
    780 typedef struct {
    784  object *elements;
    785 } vector_type;
    787 
    789 #define make_empty_vector(v) \
    790  vector_type v; \
    791  v.hdr.mark = gc_color_red; \
    792  v.hdr.grayed = 0; \
    793  v.tag = vector_tag; \
    794  v.num_elements = 0; \
    795  v.elements = NULL;
    796 
    803 typedef struct {
    806  int len;
    807  char *data;
    810 
    812 #define make_empty_bytevector(v) \
    813  bytevector_type v; \
    814  v.hdr.mark = gc_color_red; \
    815  v.hdr.grayed = 0; \
    816  v.tag = bytevector_tag; \
    817  v.len = 0; \
    818  v.data = NULL;
    819 
    830 typedef struct {
    833  object pair_car;
    834  object pair_cdr;
    835 } pair_type;
    836 typedef pair_type *list;
    837 typedef pair_type *pair;
    838 
    840 #define make_pair(n,a,d) \
    841  pair_type n; \
    842  n.hdr.mark = gc_color_red; \
    843  n.hdr.grayed = 0; \
    844  n.tag = pair_tag; \
    845  n.pair_car = a; \
    846  n.pair_cdr = d;
    847 
    848 #define set_pair(n,a,d) \
    849  n->hdr.mark = gc_color_red; \
    850  n->hdr.grayed = 0; \
    851  n->tag = pair_tag; \
    852  n->pair_car = a; \
    853  n->pair_cdr = d;
    854 
    859 #define make_cell(n,a) make_pair(n,a,NULL);
    860 
    868 #define car(x) (((pair_type *) x)->pair_car)
    869 
    870 #define cdr(x) (((pair_type *) x)->pair_cdr)
    871 #define caar(x) (car(car(x)))
    872 #define cadr(x) (car(cdr(x)))
    873 #define cdar(x) (cdr(car(x)))
    874 #define cddr(x) (cdr(cdr(x)))
    875 #define caaar(x) (car(car(car(x))))
    876 #define caadr(x) (car(car(cdr(x))))
    877 #define cadar(x) (car(cdr(car(x))))
    878 #define caddr(x) (car(cdr(cdr(x))))
    879 #define cdaar(x) (cdr(car(car(x))))
    880 #define cdadr(x) (cdr(car(cdr(x))))
    881 #define cddar(x) (cdr(cdr(car(x))))
    882 #define cdddr(x) (cdr(cdr(cdr(x))))
    883 #define caaaar(x) (car(car(car(car(x)))))
    884 #define caaadr(x) (car(car(car(cdr(x)))))
    885 #define caadar(x) (car(car(cdr(car(x)))))
    886 #define caaddr(x) (car(car(cdr(cdr(x)))))
    887 #define cadaar(x) (car(cdr(car(car(x)))))
    888 #define cadadr(x) (car(cdr(car(cdr(x)))))
    889 #define caddar(x) (car(cdr(cdr(car(x)))))
    890 #define cadddr(x) (car(cdr(cdr(cdr(x)))))
    891 #define cdaaar(x) (cdr(car(car(car(x)))))
    892 #define cdaadr(x) (cdr(car(car(cdr(x)))))
    893 #define cdadar(x) (cdr(car(cdr(car(x)))))
    894 #define cdaddr(x) (cdr(car(cdr(cdr(x)))))
    895 #define cddaar(x) (cdr(cdr(car(car(x)))))
    896 #define cddadr(x) (cdr(cdr(car(cdr(x)))))
    897 #define cdddar(x) (cdr(cdr(cdr(car(x)))))
    898 #define cddddr(x) (cdr(cdr(cdr(cdr(x)))))
    899 
    907 #define Cyc_caar(d, x) (Cyc_car(d, Cyc_car(d, x)))
    908 #define Cyc_cadr(d, x) (Cyc_car(d, Cyc_cdr(d, x)))
    909 #define Cyc_cdar(d, x) (Cyc_cdr(d, Cyc_car(d, x)))
    910 #define Cyc_cddr(d, x) (Cyc_cdr(d, Cyc_cdr(d, x)))
    911 #define Cyc_caaar(d, x) (Cyc_car(d, Cyc_car(d, Cyc_car(d, x))))
    912 #define Cyc_caadr(d, x) (Cyc_car(d, Cyc_car(d, Cyc_cdr(d, x))))
    913 #define Cyc_cadar(d, x) (Cyc_car(d, Cyc_cdr(d, Cyc_car(d, x))))
    914 #define Cyc_caddr(d, x) (Cyc_car(d, Cyc_cdr(d, Cyc_cdr(d, x))))
    915 #define Cyc_cdaar(d, x) (Cyc_cdr(d, Cyc_car(d, Cyc_car(d, x))))
    916 #define Cyc_cdadr(d, x) (Cyc_cdr(d, Cyc_car(d, Cyc_cdr(d, x))))
    917 #define Cyc_cddar(d, x) (Cyc_cdr(d, Cyc_cdr(d, Cyc_car(d, x))))
    918 #define Cyc_cdddr(d, x) (Cyc_cdr(d, Cyc_cdr(d, Cyc_cdr(d, x))))
    919 #define Cyc_caaaar(d, x) (Cyc_car(d, Cyc_car(d, Cyc_car(d, Cyc_car(d, x)))))
    920 #define Cyc_caaadr(d, x) (Cyc_car(d, Cyc_car(d, Cyc_car(d, Cyc_cdr(d, x)))))
    921 #define Cyc_caadar(d, x) (Cyc_car(d, Cyc_car(d, Cyc_cdr(d, Cyc_car(d, x)))))
    922 #define Cyc_caaddr(d, x) (Cyc_car(d, Cyc_car(d, Cyc_cdr(d, Cyc_cdr(d, x)))))
    923 #define Cyc_cadaar(d, x) (Cyc_car(d, Cyc_cdr(d, Cyc_car(d, Cyc_car(d, x)))))
    924 #define Cyc_cadadr(d, x) (Cyc_car(d, Cyc_cdr(d, Cyc_car(d, Cyc_cdr(d, x)))))
    925 #define Cyc_caddar(d, x) (Cyc_car(d, Cyc_cdr(d, Cyc_cdr(d, Cyc_car(d, x)))))
    926 #define Cyc_cadddr(d, x) (Cyc_car(d, Cyc_cdr(d, Cyc_cdr(d, Cyc_cdr(d, x)))))
    927 #define Cyc_cdaaar(d, x) (Cyc_cdr(d, Cyc_car(d, Cyc_car(d, Cyc_car(d, x)))))
    928 #define Cyc_cdaadr(d, x) (Cyc_cdr(d, Cyc_car(d, Cyc_car(d, Cyc_cdr(d, x)))))
    929 #define Cyc_cdadar(d, x) (Cyc_cdr(d, Cyc_car(d, Cyc_cdr(d, Cyc_car(d, x)))))
    930 #define Cyc_cdaddr(d, x) (Cyc_cdr(d, Cyc_car(d, Cyc_cdr(d, Cyc_cdr(d, x)))))
    931 #define Cyc_cddaar(d, x) (Cyc_cdr(d, Cyc_cdr(d, Cyc_car(d, Cyc_car(d, x)))))
    932 #define Cyc_cddadr(d, x) (Cyc_cdr(d, Cyc_cdr(d, Cyc_car(d, Cyc_cdr(d, x)))))
    933 #define Cyc_cdddar(d, x) (Cyc_cdr(d, Cyc_cdr(d, Cyc_cdr(d, Cyc_car(d, x)))))
    934 #define Cyc_cddddr(d, x) (Cyc_cdr(d, Cyc_cdr(d, Cyc_cdr(d, Cyc_cdr(d, x)))))
    935 
    937 /* Closure types */
    938 
    940 typedef struct {
    944  int num_args;
    945 } macro_type;
    946 
    948 typedef struct {
    952  int num_args;
    953 } closure0_type;
    955 typedef struct {
    959  int num_args;
    960  object element;
    961 } closure1_type;
    963 typedef struct {
    967  int num_args;
    969  object *elements;
    970 } closureN_type;
    971 
    977 
    978 #define mmacro(c,f) \
    979  macro_type c; \
    980  c.hdr.mark = gc_color_red; \
    981  c.hdr.grayed = 0; \
    982  c.tag = macro_tag; \
    983  c.fn = f; \
    984  c.num_args = -1;
    985 
    986 #define mclosure0(c,f) \
    987  closure0_type c; \
    988  c.hdr.mark = gc_color_red; \
    989  c.hdr.grayed = 0; \
    990  c.tag = closure0_tag; \
    991  c.fn = f; \
    992  c.num_args = -1;
    993 
    994 #define mclosure1(c,f,a) \
    995  closure1_type c; \
    996  c.hdr.mark = gc_color_red; \
    997  c.hdr.grayed = 0; \
    998  c.tag = closure1_tag; \
    999  c.fn = f; \
    1000  c.num_args = -1; \
    1001  c.element = a;
    1002 
    1006 typedef struct {
    1009  const char *desc;
    1011 } primitive_type;
    1013 
    1014 #define defprimitive(name, desc, fnc) \
    1015 static primitive_type name##_primitive = {primitive_tag, #desc, fnc}; \
    1016 static const object primitive_##name = &name##_primitive
    1017 
    1018 #define prim(x) (x && ((primitive)x)->tag == primitive_tag)
    1019 #define prim_name(x) (((primitive_type *) x)->desc)
    1020 
    1027 typedef union {
    1035 } common_type;
    1036 
    1040 /* Utility functions */
    1041 void **vpbuffer_realloc(void **buf, int *len);
    1042 void **vpbuffer_add(void **buf, int *len, int i, void *obj);
    1043 void vpbuffer_free(void **buf);
    1044 
    1045 /* Bignum utility functions */
    1046 double mp_get_double(mp_int *a);
    1047 int Cyc_bignum_cmp(bn_cmp_type type, object x, int tx, object y, int ty);
    1048 void Cyc_int2bignum(int n, mp_int *bn);
    1049 
    1050 /* Remaining GC prototypes that require objects to be defined */
    1052 
    1057 int gc_minor(void *data, object low_limit, object high_limit, closure cont,
    1058  object * args, int num_args);
    1059 
    1060 #endif /* CYCLONE_TYPES_H */
    Definition: types.h:56
    +Go to the documentation of this file.
    1 /*
    2  * Cyclone Scheme
    3  * Copyright (c) 2014, Justin Ethier
    4  * All rights reserved.
    5  *
    6  * This file contains C types used by compiled programs.
    7  */
    8 
    9 #ifndef CYCLONE_TYPES_H
    10 #define CYCLONE_TYPES_H
    11 
    12 #include <math.h>
    13 #include <setjmp.h>
    14 #include <stdarg.h>
    15 #include <stdio.h>
    16 #include <stdlib.h>
    17 #include <string.h>
    18 #include <time.h>
    19 #include <pthread.h>
    20 #include <stdint.h>
    21 #include "tommath.h"
    22 
    27 typedef void *object;
    28 
    35 enum object_tag {
    36  boolean_tag = 0 // 0
    38  , c_opaque_tag // 2
    39  , closure0_tag // 3
    40  , closure1_tag // 4
    41  , closureN_tag // 5
    42  , cond_var_tag // 6
    43  , cvar_tag // 7
    44  , double_tag // 8
    45  , eof_tag // 9
    46  , forward_tag // 10
    47  , integer_tag // 11
    48  , bignum_tag // 12
    49  , macro_tag // 13
    50  , mutex_tag // 14
    51  , pair_tag // 15
    52  , port_tag // 16
    53  , primitive_tag // 17
    54  , string_tag // 18
    55  , symbol_tag // 19
    56  , vector_tag // 20
    57 };
    58 
    59 #define type_is_pair_prim(clo) \
    60  (type_of(clo) >= pair_tag)
    61 
    66 typedef unsigned char tag_type;
    67 
    72 #define type_of(obj) (((pair_type *) obj)->tag)
    73 
    92 // Parameters for size of a "page" on the heap (the second generation GC), in bytes.
    94 
    96 #define GROW_HEAP_BY_SIZE (2 * 1024 * 1024)
    97 
    99 #define INITIAL_HEAP_SIZE (3 * 1024 * 1024)
    100 
    102 #define HEAP_SIZE (32 * 1024 * 1024)
    103 
    104 // End heap page size parameters
    106 
    108 // Major GC tuning parameters
    109 
    111 #define GC_COLLECTION_THRESHOLD 0.05
    112 
    114 #define GC_FREE_THRESHOLD 0.40
    115 // END GC tuning
    117 
    119 #define MAX_STACK_TRACES 10
    120 
    122 #define DEBUG_SHOW_DIAG 0
    123 
    125 #define GC_DEBUG_SHOW_SWEEP_DIAG 0
    126 
    128 #define GC_DEBUG_TRACE 0
    129 
    131 #define GC_DEBUG_VERBOSE 0
    132 
    137 #define GC_SAFETY_CHECKS 0
    138 
    140 #define NANOSECONDS_PER_MILLISECOND 1000000
    141 
    142 /* GC data structures */
    143 
    162 typedef enum {
    163  HEAP_SM = 0 // 32 byte objects (min gc_heap_align)
    166  , HEAP_REST // Everything else
    167  , HEAP_HUGE // Huge objects, 1 per page
    168 } gc_heap_type;
    169 
    171 #define NUM_HEAP_TYPES (HEAP_HUGE + 1)
    172 
    178  unsigned int size;
    180 };
    181 
    185 typedef struct gc_heap_t gc_heap;
    186 struct gc_heap_t {
    188  unsigned int size;
    189  unsigned int chunk_size; // 0 for any size, other and heap will only alloc chunks of that size
    190  unsigned int max_size;
    191  unsigned int ttl; // Keep empty page alive this many times before freeing
    192  //
    194  unsigned int last_alloc_size;
    195  //unsigned int free_size;
    197  gc_heap *next; // TBD, linked list is not very efficient, but easy to work with as a start
    198  char *data;
    199 };
    200 
    207 };
    208 
    214  unsigned char mark; // mark bits (only need 2)
    215  unsigned char grayed; // stack object to be grayed when moved to heap
    216 };
    217 
    219 #define mark(x) (((list) x)->hdr.mark)
    220 
    222 #define grayed(x) (((list) x)->hdr.grayed)
    223 
    227 
    230  //, STAGE_REF_PROCESSING
    232 } gc_stage_type;
    233 
    234 // Constant colors are defined here.
    235 // The mark/clear colors are defined in the gc module because
    236 // the collector swaps their values as an optimization.
    237 
    239 #define gc_color_red 0
    240 
    242 #define gc_color_blue 2
    243 
    249 
    257  // Thread object, if applicable
    260  // Data needed to initiate stack-based minor GC
    261  char *stack_start;
    262  char *stack_limit;
    263  // Minor GC write barrier
    264  void **mutations;
    267  // List of objects moved to heap during minor GC
    268  void **moveBuf;
    270  // Need the following to perform longjmp's
    271  //int mutator_num;
    272  jmp_buf *jmp_start;
    273  // After longjmp, pick up execution using continuation/arguments
    274  object gc_cont;
    275  object *gc_args;
    276  short gc_num_args;
    277  // Data needed for heap GC
    283  void **mark_buffer;
    285  pthread_mutex_t lock;
    286  pthread_mutex_t heap_lock;
    287  pthread_t thread_id;
    291  // Data needed for call history
    292  char **stack_traces;
    295  // Exception handler stack
    297 };
    298 
    299 /* GC prototypes */
    300 void gc_initialize(void);
    301 void gc_add_mutator(gc_thread_data * thd);
    303 gc_heap *gc_heap_create(int heap_type, size_t size, size_t max_size,
    304  size_t chunk_size, gc_thread_data *thd);
    305 gc_heap *gc_heap_free(gc_heap *page, gc_heap *prev_page);
    306 void gc_heap_merge(gc_heap *hdest, gc_heap *hsrc);
    308 void gc_print_stats(gc_heap * h);
    309 int gc_grow_heap(gc_heap * h, int heap_type, size_t size, size_t chunk_size, gc_thread_data *thd);
    310 char *gc_copy_obj(object hp, char *obj, gc_thread_data * thd);
    311 void *gc_try_alloc(gc_heap * h, int heap_type, size_t size, char *obj,
    312  gc_thread_data * thd);
    313 void *gc_alloc(gc_heap_root * h, size_t size, char *obj, gc_thread_data * thd,
    314  int *heap_grown);
    315 void *gc_alloc_bignum(gc_thread_data *data);
    316 size_t gc_allocated_bytes(object obj, gc_free_list * q, gc_free_list * r);
    318 //size_t gc_heap_total_size(gc_heap * h);
    319 //size_t gc_heap_total_free_size(gc_heap *h);
    320 //size_t gc_collect(gc_heap *h, size_t *sum_freed);
    321 //void gc_mark(gc_heap *h, object obj);
    322 void gc_request_mark_globals(void);
    323 void gc_mark_globals(object globals, object global_table);
    324 size_t gc_sweep(gc_heap * h, int heap_type, size_t * sum_freed_ptr, gc_thread_data *thd);
    326 void gc_thr_add_to_move_buffer(gc_thread_data * d, int *alloci, object obj);
    327 void gc_thread_data_init(gc_thread_data * thd, int mut_num, char *stack_base,
    328  long stack_size);
    330 // Prototypes for mutator/collector:
    331 int gc_is_stack_obj(gc_thread_data * thd, object obj);
    332 void gc_mut_update(gc_thread_data * thd, object old_obj, object value);
    333 void gc_mut_cooperate(gc_thread_data * thd, int buf_len);
    334 void gc_mark_gray(gc_thread_data * thd, object obj);
    335 void gc_mark_gray2(gc_thread_data * thd, object obj);
    336 void gc_collector_trace();
    340 void gc_wait_handshake();
    341 void gc_start_collector();
    342 void gc_mutator_thread_blocked(gc_thread_data * thd, object cont);
    343 void gc_mutator_thread_runnable(gc_thread_data * thd, object result);
    344 #define set_thread_blocked(d, c) \
    345  gc_mutator_thread_blocked(((gc_thread_data *)d), (c))
    346 #define return_thread_runnable(d, r) \
    347  gc_mutator_thread_runnable(((gc_thread_data *)d), (r))
    348 /*
    349 //#define do_with_blocked_thread(data, cont, result, body) \
    350 // set_thread_blocked((data), (cont)); \
    351 // body \
    352 // return_thread_runnable((data), (result));
    353 */
    354 
    367 #define NUM_GC_ARGS 128
    368 
    372 #define STACK_GROWTH_IS_DOWNWARD 1
    373 
    378 #define STACK_SIZE 500000
    379 
    383 #define MAX_STACK_OBJ (STACK_SIZE * 2)
    384 
    386 #if STACK_GROWTH_IS_DOWNWARD
    387 #define stack_overflow(x,y) ((x) < (y))
    388 #else
    389 #define stack_overflow(x,y) ((x) > (y))
    390 #endif
    391 
    398 #define forward(obj) (((pair_type *) obj)->pair_car)
    399 
    400 
    406 void add_mutation(void *data, object var, int index, object value);
    407 void clear_mutations(void *data);
    412 // END GC section
    447 #define CYC_FIXNUM_MAX 1073741823
    448 
    450 #define CYC_FIXNUM_MIN -1073741824
    451 
    455 #define obj_is_int(x) ((unsigned long)(x) & (unsigned long)1)
    456 
    460 #define obj_obj2int(x) ((long)(x)>>1)
    461 
    465 #define obj_int2obj(c) ((void *)((((long)c)<<1) | 1))
    466 
    470 #define obj_is_char(x) (((unsigned long)(x) & (unsigned long)3) == 2)
    471 
    475 #define obj_obj2char(x) (char)((long)(x)>>2)
    476 
    480 #define obj_char2obj(c) ((void *)((((unsigned long)c)<<2) | 2))
    481 
    485 #define is_value_type(x) ((unsigned long)(x) & (unsigned long)3)
    486 
    490 #define is_object_type(x) (x && !is_value_type(x))
    491 
    512 typedef void (*function_type) ();
    513 
    515 typedef void (*function_type_va) (int, object, object, object, ...);
    516 
    520 typedef struct {
    524  object *pvar;
    525 } cvar_type;
    526 typedef cvar_type *cvar;
    527 
    531 #define make_cvar(n,v) \
    532  cvar_type n; \
    533  n.hdr.mark = gc_color_red; \
    534  n.hdr.grayed = 0; \
    535  n.tag = cvar_tag; \
    536  n.pvar = v;
    537 
    544 typedef struct {
    548  void *ptr;
    549 } c_opaque_type;
    551 
    553 #define make_c_opaque(var, p) \
    554  c_opaque_type var; \
    555  var.hdr.mark = gc_color_red; \
    556  var.hdr.grayed = 0; \
    557  var.tag = c_opaque_tag; \
    558  var.ptr = p;
    559 
    561 #define opaque_ptr(x) (((c_opaque)x)->ptr)
    562 
    568 typedef struct {
    571  pthread_mutex_t lock;
    572 } mutex_type;
    573 typedef mutex_type *mutex;
    574 
    580 typedef struct {
    583  pthread_cond_t cond;
    584 } cond_var_type;
    586 
    593 typedef struct {
    595  const tag_type tag;
    596  const char *desc;
    597 } boolean_type;
    599 
    600 #define boolean_desc(x) (((boolean_type *) x)->desc)
    601 
    609 typedef struct {
    611  const tag_type tag;
    612  const char *desc;
    613 } symbol_type;
    615 
    616 #define symbol_desc(x) (((symbol_type *) x)->desc)
    617 
    618 #define defsymbol(name) \
    619 static object quote_##name = NULL;
    620 
    621 /* Define numeric types */
    622 
    629 typedef struct {
    632  int value;
    633  int padding; // Prevent mem corruption if sizeof(int) < sizeof(ptr)
    634 } integer_type;
    635 
    644 typedef struct {
    647  mp_int bn;
    648 } bignum_type;
    649 
    651 #define alloc_bignum(data, p) \
    652  bignum_type *p = gc_alloc_bignum((gc_thread_data *)data);
    653 
    657 typedef struct {
    660  double value;
    661 } double_type;
    662 
    664 #define make_double(n,v) \
    665  double_type n; \
    666  n.hdr.mark = gc_color_red; \
    667  n.hdr.grayed = 0; \
    668  n.tag = double_tag; \
    669  n.value = v;
    670 
    672 #define assign_double(pobj,v) \
    673  ((double_type *)pobj)->hdr.mark = gc_color_red; \
    674  ((double_type *)pobj)->hdr.grayed = 0; \
    675  ((double_type *)pobj)->tag = double_tag; \
    676  double_value(pobj) = v;
    677 
    679 #define integer_value(x) (((integer_type *) x)->value)
    680 
    682 #define double_value(x) (((double_type *) x)->value)
    683 
    685 #define bignum_value(x) (((bignum_type *) x)->bn)
    686 
    691 typedef enum {
    693  , CYC_BN_LT = MP_LT
    694  , CYC_BN_EQ = MP_EQ
    695  , CYC_BN_GT = MP_GT
    697 } bn_cmp_type;
    698 
    702 typedef struct {
    705  int len;
    706  char *str;
    707 } string_type;
    708 
    710 #define make_string(cs, s) string_type cs; \
    711 { int len = strlen(s); \
    712  cs.hdr.mark = gc_color_red; \
    713  cs.hdr.grayed = 0; \
    714  cs.tag = string_tag; \
    715  cs.len = len; \
    716  cs.str = alloca(sizeof(char) * (len + 1)); \
    717  memcpy(cs.str, s, len + 1);}
    718 
    723 #define make_string_with_len(cs, s, length) string_type cs; \
    724 { int len = length; \
    725  cs.hdr.mark = gc_color_red; \
    726  cs.hdr.grayed = 0; \
    727  cs.tag = string_tag; cs.len = len; \
    728  cs.str = alloca(sizeof(char) * (len + 1)); \
    729  memcpy(cs.str, s, len); \
    730  cs.str[len] = '\0';}
    731 
    736 #define make_string_noalloc(cs, s, length) string_type cs; \
    737 { cs.hdr.mark = gc_color_red; cs.hdr.grayed = 0; \
    738  cs.tag = string_tag; cs.len = length; \
    739  cs.str = s; }
    740 
    742 #define string_len(x) (((string_type *) x)->len)
    743 
    745 #define string_str(x) (((string_type *) x)->str)
    746 
    747 /* I/O types */
    748 
    749 // TODO: FILE* may not be good enough
    750 // consider http://stackoverflow.com/questions/6206893/how-to-implement-char-ready-in-c
    751 // TODO: a simple wrapper around FILE may not be good enough long-term
    752 // TODO: how exactly mode will be used. need to know r/w, bin/txt
    753 
    757 typedef struct {
    760  FILE *fp;
    761  int mode;
    762  char *mem_buf;
    763  size_t mem_buf_len;
    764 } port_type;
    765 
    767 #define make_port(p,f,m) \
    768  port_type p; \
    769  p.hdr.mark = gc_color_red; \
    770  p.hdr.grayed = 0; \
    771  p.tag = port_tag; \
    772  p.fp = f; \
    773  p.mode = m; \
    774  p.mem_buf = NULL; \
    775  p.mem_buf_len = 0;
    776 
    780 typedef struct {
    784  object *elements;
    785 } vector_type;
    787 
    789 #define make_empty_vector(v) \
    790  vector_type v; \
    791  v.hdr.mark = gc_color_red; \
    792  v.hdr.grayed = 0; \
    793  v.tag = vector_tag; \
    794  v.num_elements = 0; \
    795  v.elements = NULL;
    796 
    803 typedef struct {
    806  int len;
    807  char *data;
    810 
    812 #define make_empty_bytevector(v) \
    813  bytevector_type v; \
    814  v.hdr.mark = gc_color_red; \
    815  v.hdr.grayed = 0; \
    816  v.tag = bytevector_tag; \
    817  v.len = 0; \
    818  v.data = NULL;
    819 
    830 typedef struct {
    833  object pair_car;
    834  object pair_cdr;
    835 } pair_type;
    836 typedef pair_type *list;
    837 typedef pair_type *pair;
    838 
    840 #define make_pair(n,a,d) \
    841  pair_type n; \
    842  n.hdr.mark = gc_color_red; \
    843  n.hdr.grayed = 0; \
    844  n.tag = pair_tag; \
    845  n.pair_car = a; \
    846  n.pair_cdr = d;
    847 
    848 #define set_pair(n,a,d) \
    849  n->hdr.mark = gc_color_red; \
    850  n->hdr.grayed = 0; \
    851  n->tag = pair_tag; \
    852  n->pair_car = a; \
    853  n->pair_cdr = d;
    854 
    859 #define make_cell(n,a) make_pair(n,a,NULL);
    860 
    868 #define car(x) (((pair_type *) x)->pair_car)
    869 
    870 #define cdr(x) (((pair_type *) x)->pair_cdr)
    871 #define caar(x) (car(car(x)))
    872 #define cadr(x) (car(cdr(x)))
    873 #define cdar(x) (cdr(car(x)))
    874 #define cddr(x) (cdr(cdr(x)))
    875 #define caaar(x) (car(car(car(x))))
    876 #define caadr(x) (car(car(cdr(x))))
    877 #define cadar(x) (car(cdr(car(x))))
    878 #define caddr(x) (car(cdr(cdr(x))))
    879 #define cdaar(x) (cdr(car(car(x))))
    880 #define cdadr(x) (cdr(car(cdr(x))))
    881 #define cddar(x) (cdr(cdr(car(x))))
    882 #define cdddr(x) (cdr(cdr(cdr(x))))
    883 #define caaaar(x) (car(car(car(car(x)))))
    884 #define caaadr(x) (car(car(car(cdr(x)))))
    885 #define caadar(x) (car(car(cdr(car(x)))))
    886 #define caaddr(x) (car(car(cdr(cdr(x)))))
    887 #define cadaar(x) (car(cdr(car(car(x)))))
    888 #define cadadr(x) (car(cdr(car(cdr(x)))))
    889 #define caddar(x) (car(cdr(cdr(car(x)))))
    890 #define cadddr(x) (car(cdr(cdr(cdr(x)))))
    891 #define cdaaar(x) (cdr(car(car(car(x)))))
    892 #define cdaadr(x) (cdr(car(car(cdr(x)))))
    893 #define cdadar(x) (cdr(car(cdr(car(x)))))
    894 #define cdaddr(x) (cdr(car(cdr(cdr(x)))))
    895 #define cddaar(x) (cdr(cdr(car(car(x)))))
    896 #define cddadr(x) (cdr(cdr(car(cdr(x)))))
    897 #define cdddar(x) (cdr(cdr(cdr(car(x)))))
    898 #define cddddr(x) (cdr(cdr(cdr(cdr(x)))))
    899 
    907 #define Cyc_caar(d, x) (Cyc_car(d, Cyc_car(d, x)))
    908 #define Cyc_cadr(d, x) (Cyc_car(d, Cyc_cdr(d, x)))
    909 #define Cyc_cdar(d, x) (Cyc_cdr(d, Cyc_car(d, x)))
    910 #define Cyc_cddr(d, x) (Cyc_cdr(d, Cyc_cdr(d, x)))
    911 #define Cyc_caaar(d, x) (Cyc_car(d, Cyc_car(d, Cyc_car(d, x))))
    912 #define Cyc_caadr(d, x) (Cyc_car(d, Cyc_car(d, Cyc_cdr(d, x))))
    913 #define Cyc_cadar(d, x) (Cyc_car(d, Cyc_cdr(d, Cyc_car(d, x))))
    914 #define Cyc_caddr(d, x) (Cyc_car(d, Cyc_cdr(d, Cyc_cdr(d, x))))
    915 #define Cyc_cdaar(d, x) (Cyc_cdr(d, Cyc_car(d, Cyc_car(d, x))))
    916 #define Cyc_cdadr(d, x) (Cyc_cdr(d, Cyc_car(d, Cyc_cdr(d, x))))
    917 #define Cyc_cddar(d, x) (Cyc_cdr(d, Cyc_cdr(d, Cyc_car(d, x))))
    918 #define Cyc_cdddr(d, x) (Cyc_cdr(d, Cyc_cdr(d, Cyc_cdr(d, x))))
    919 #define Cyc_caaaar(d, x) (Cyc_car(d, Cyc_car(d, Cyc_car(d, Cyc_car(d, x)))))
    920 #define Cyc_caaadr(d, x) (Cyc_car(d, Cyc_car(d, Cyc_car(d, Cyc_cdr(d, x)))))
    921 #define Cyc_caadar(d, x) (Cyc_car(d, Cyc_car(d, Cyc_cdr(d, Cyc_car(d, x)))))
    922 #define Cyc_caaddr(d, x) (Cyc_car(d, Cyc_car(d, Cyc_cdr(d, Cyc_cdr(d, x)))))
    923 #define Cyc_cadaar(d, x) (Cyc_car(d, Cyc_cdr(d, Cyc_car(d, Cyc_car(d, x)))))
    924 #define Cyc_cadadr(d, x) (Cyc_car(d, Cyc_cdr(d, Cyc_car(d, Cyc_cdr(d, x)))))
    925 #define Cyc_caddar(d, x) (Cyc_car(d, Cyc_cdr(d, Cyc_cdr(d, Cyc_car(d, x)))))
    926 #define Cyc_cadddr(d, x) (Cyc_car(d, Cyc_cdr(d, Cyc_cdr(d, Cyc_cdr(d, x)))))
    927 #define Cyc_cdaaar(d, x) (Cyc_cdr(d, Cyc_car(d, Cyc_car(d, Cyc_car(d, x)))))
    928 #define Cyc_cdaadr(d, x) (Cyc_cdr(d, Cyc_car(d, Cyc_car(d, Cyc_cdr(d, x)))))
    929 #define Cyc_cdadar(d, x) (Cyc_cdr(d, Cyc_car(d, Cyc_cdr(d, Cyc_car(d, x)))))
    930 #define Cyc_cdaddr(d, x) (Cyc_cdr(d, Cyc_car(d, Cyc_cdr(d, Cyc_cdr(d, x)))))
    931 #define Cyc_cddaar(d, x) (Cyc_cdr(d, Cyc_cdr(d, Cyc_car(d, Cyc_car(d, x)))))
    932 #define Cyc_cddadr(d, x) (Cyc_cdr(d, Cyc_cdr(d, Cyc_car(d, Cyc_cdr(d, x)))))
    933 #define Cyc_cdddar(d, x) (Cyc_cdr(d, Cyc_cdr(d, Cyc_cdr(d, Cyc_car(d, x)))))
    934 #define Cyc_cddddr(d, x) (Cyc_cdr(d, Cyc_cdr(d, Cyc_cdr(d, Cyc_cdr(d, x)))))
    935 
    937 /* Closure types */
    938 
    940 typedef struct {
    944  int num_args;
    945 } macro_type;
    946 
    948 typedef struct {
    952  int num_args;
    953 } closure0_type;
    955 typedef struct {
    959  int num_args;
    960  object element;
    961 } closure1_type;
    963 typedef struct {
    967  int num_args;
    969  object *elements;
    970 } closureN_type;
    971 
    977 
    978 #define mmacro(c,f) \
    979  macro_type c; \
    980  c.hdr.mark = gc_color_red; \
    981  c.hdr.grayed = 0; \
    982  c.tag = macro_tag; \
    983  c.fn = f; \
    984  c.num_args = -1;
    985 
    986 #define mclosure0(c,f) \
    987  closure0_type c; \
    988  c.hdr.mark = gc_color_red; \
    989  c.hdr.grayed = 0; \
    990  c.tag = closure0_tag; \
    991  c.fn = f; \
    992  c.num_args = -1;
    993 
    994 #define mclosure1(c,f,a) \
    995  closure1_type c; \
    996  c.hdr.mark = gc_color_red; \
    997  c.hdr.grayed = 0; \
    998  c.tag = closure1_tag; \
    999  c.fn = f; \
    1000  c.num_args = -1; \
    1001  c.element = a;
    1002 
    1006 typedef struct {
    1009  const char *desc;
    1011 } primitive_type;
    1013 
    1014 #define defprimitive(name, desc, fnc) \
    1015 static primitive_type name##_primitive = {primitive_tag, #desc, fnc}; \
    1016 static const object primitive_##name = &name##_primitive
    1017 
    1018 #define prim(x) (x && ((primitive)x)->tag == primitive_tag)
    1019 #define prim_name(x) (((primitive_type *) x)->desc)
    1020 
    1027 typedef union {
    1035 } common_type;
    1036 
    1040 /* Utility functions */
    1041 void **vpbuffer_realloc(void **buf, int *len);
    1042 void **vpbuffer_add(void **buf, int *len, int i, void *obj);
    1043 void vpbuffer_free(void **buf);
    1044 
    1045 /* Bignum utility functions */
    1046 double mp_get_double(mp_int *a);
    1047 int Cyc_bignum_cmp(bn_cmp_type type, object x, int tx, object y, int ty);
    1048 void Cyc_int2bignum(int n, mp_int *bn);
    1049 
    1050 /* Remaining GC prototypes that require objects to be defined */
    1052 
    1057 int gc_minor(void *data, object low_limit, object high_limit, closure cont,
    1058  object * args, int num_args);
    1059 
    1060 #endif /* CYCLONE_TYPES_H */
    Definition: types.h:56
    closureN_type * closureN
    Definition: types.h:974
    A closed-over function with no variables.
    Definition: types.h:948
    Definition: types.h:229
    void gc_initialize(void)
    Perform one-time initialization before mutators can be executed.
    Definition: gc.c:132
    -
    void Cyc_int2bignum(int n, mp_int *bn)
    Definition: runtime.c:1261
    +
    void Cyc_int2bignum(int n, mp_int *bn)
    Definition: runtime.c:1265
    int stack_trace_idx
    Definition: types.h:293
    The condition variable thread synchronization type.
    Definition: types.h:580
    bytevector_type * bytevector
    Definition: types.h:809
    @@ -141,8 +141,7 @@ $(function() {
    Definition: types.h:186
    gc_heap_type
    Definition: types.h:162
    int gc_alloc_color
    Definition: types.h:278
    -
    void clear_mutations(void *data)
    Definition: runtime.c:446
    -
    size_t gc_heap_total_size(gc_heap *h)
    +
    void clear_mutations(void *data)
    Definition: runtime.c:450
    object * gc_args
    Definition: types.h:275
    pair_type * list
    Definition: types.h:836
    tag_type tag
    Definition: types.h:522
    @@ -151,7 +150,7 @@ $(function() {
    gc_stage_type
    Definition: types.h:229
    int num_args
    Definition: types.h:959
    void ** mutations
    Definition: types.h:264
    -
    void ** vpbuffer_realloc(void **buf, int *len)
    Definition: runtime.c:5433
    +
    void ** vpbuffer_realloc(void **buf, int *len)
    Definition: runtime.c:5437
    int last_write
    Definition: types.h:280
    tag_type tag
    Definition: types.h:957
    gc_heap * gc_heap_free(gc_heap *page, gc_heap *prev_page)
    Free a page of the heap.
    Definition: gc.c:283
    @@ -204,7 +203,7 @@ $(function() {
    void gc_mark_gray(gc_thread_data *thd, object obj)
    Mark the given object gray if it is on the heap.
    Definition: gc.c:1367
    unsigned char tag_type
    Definition: types.h:66
    A closed-over function with zero or more closed-over variables.
    Definition: types.h:963
    -
    void gc_request_mark_globals(void)
    Definition: runtime.c:4594
    +
    void gc_request_mark_globals(void)
    Definition: runtime.c:4598
    void * ptr
    Definition: types.h:548
    gc_heap * next
    Definition: types.h:197
    object * elements
    Definition: types.h:784
    @@ -232,7 +231,7 @@ $(function() {
    pair_type * pair
    Definition: types.h:837
    symbol_type * symbol
    Definition: types.h:614
    int mode
    Definition: types.h:761
    -
    void add_mutation(void *data, object var, int index, object value)
    Definition: runtime.c:425
    +
    void add_mutation(void *data, object var, int index, object value)
    Definition: runtime.c:429
    closure0_type * macro
    Definition: types.h:976
    char * data
    Definition: types.h:198
    char ** stack_traces
    Definition: types.h:292
    @@ -241,7 +240,7 @@ $(function() {
    gc_header_type hdr
    Definition: types.h:703
    pthread_mutex_t lock
    Definition: types.h:571
    Definition: types.h:36
    -
    double mp_get_double(mp_int *a)
    Definition: runtime.c:1212
    +
    double mp_get_double(mp_int *a)
    Definition: runtime.c:1216
    FILE * fp
    Definition: types.h:760
    gc_header_type hdr
    Definition: types.h:941
    Definition: types.h:225
    @@ -279,7 +278,7 @@ $(function() {
    void gc_wait_handshake()
    Wait for all mutators to handshake.
    Definition: gc.c:1640
    Definition: types.h:177
    void ** moveBuf
    Definition: types.h:268
    -
    int Cyc_bignum_cmp(bn_cmp_type type, object x, int tx, object y, int ty)
    Definition: runtime.c:1269
    +
    int Cyc_bignum_cmp(bn_cmp_type type, object x, int tx, object y, int ty)
    Definition: runtime.c:1273
    Definition: types.h:205
    unsigned int max_size
    Definition: types.h:190
    cond_var_type * cond_var
    Definition: types.h:585
    @@ -303,7 +302,7 @@ $(function() {
    const tag_type tag
    Definition: types.h:595
    Definition: types.h:45
    Definition: types.h:46
    -
    void vpbuffer_free(void **buf)
    Definition: runtime.c:5448
    +
    void vpbuffer_free(void **buf)
    Definition: runtime.c:5452
    gc_header_type hdr
    Definition: types.h:545
    Definition: types.h:245
    Definition: types.h:48
    @@ -312,9 +311,9 @@ $(function() {
    tag_type tag
    Definition: types.h:646
    closure1_type * closure1
    Definition: types.h:973
    gc_header_type hdr
    Definition: types.h:758
    -
    list global_table
    Definition: runtime.c:386
    +
    list global_table
    Definition: runtime.c:390
    gc_heap * gc_heap_last(gc_heap *h)
    Get the heap&#39;s last page.
    Definition: gc.c:831
    -
    void ** vpbuffer_add(void **buf, int *len, int i, void *obj)
    Definition: runtime.c:5438
    +
    void ** vpbuffer_add(void **buf, int *len, int i, void *obj)
    Definition: runtime.c:5442
    bn_cmp_type
    Definition: types.h:691
    size_t gc_sweep(gc_heap *h, int heap_type, size_t *sum_freed_ptr, gc_thread_data *thd)
    Sweep portion of the GC algorithm.
    Definition: gc.c:941
    tag_type tag
    Definition: types.h:1008
    @@ -324,7 +323,7 @@ $(function() {
    function_type fn
    Definition: types.h:966
    Definition: types.h:165
    gc_header_type hdr
    Definition: types.h:804
    -
    int gc_minor(void *data, object low_limit, object high_limit, closure cont, object *args, int num_args)
    Definition: runtime.c:4745
    +
    int gc_minor(void *data, object low_limit, object high_limit, closure cont, object *args, int num_args)
    Definition: runtime.c:4749
    Definition: types.h:43
    gc_header_type hdr
    Definition: types.h:956
    Definition: types.h:246