1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 11:40:18 +02:00
guile/doc/ref
Andy Wingo aa84489d18 Reimplement dynamic states
There are two goals: one, to use less memory per dynamic state in order
to allow millions of dynamic states to be allocated in light-weight
threading scenarios.  The second goal is to prevent dynamic states from
being actively mutated in two threads at once.  This second goal does
mean that dynamic states object that escape into scheme are now copies
that won't receive further updates; an incompatible change, but one
which we hope doesn't affect anyone.

* libguile/cache-internal.h: New file.
* libguile/fluids.c (is_dynamic_state, get_dynamic_state)
  (save_dynamic_state, restore_dynamic_state, add_entry)
  (copy_value_table): New functions.
  (scm_i_fluid_print, scm_i_dynamic_state_print): Move up.
  (new_fluid): No need for a number.
  (scm_fluid_p: scm_is_fluid): Inline IS_FLUID uses.
  (fluid_set_x, fluid_ref): Adapt to dynamic state changes.
  (scm_fluid_set_x, scm_fluid_unset_x): Call fluid_set_x.
  (scm_swap_fluid): Rewrite in terms of fluid_ref and fluid_set.
  (swap_fluid): Use internal fluid_set_x.
  (scm_i_make_initial_dynamic_state): Adapt to dynamic state
  representation change.
  (scm_dynamic_state_p, scm_is_dynamic_state): Use new accessors.
  (scm_current_dynamic_state): Use make_dynamic_state.
  (scm_dynwind_current_dynamic_state): Use new accessor.
* libguile/fluids.h: Remove internal definitions.  Add new struct
  definition.
* libguile/threads.h (scm_i_thread): Use scm_t_dynamic_state for dynamic
  state.
* libguile/threads.c (guilify_self_1, guilify_self_2):
  (scm_i_init_thread_for_guile, scm_init_guile):
  (scm_call_with_new_thread):
  (scm_init_threads, scm_init_threads_default_dynamic_state): Adapt to
  scm_i_thread change.
  (scm_i_with_guile, with_guile): Remove "and parent" suffix.
  (scm_i_reset_fluid): Remove unneeded function.
* doc/ref/api-scheduling.texi (Fluids and Dynamic States): Remove
  scm_make_dynamic_state docs.  Update current-dynamic-state docs.
* libguile/vm-engine.c (vm_engine): Update fluid-ref and fluid-set!
  inlined fast paths for dynamic state changes.
* libguile/vm.c (vm_error_unbound_fluid): Remove now-unused function.
* NEWS: Update.
* module/ice-9/deprecated.scm (make-dynamic-state): New definition.
* libguile/deprecated.h:
* libguile/deprecated.c (scm_make_dynamic_state): Move here.
* libguile/__scm.h (scm_t_dynamic_state): New typedef.
* libguile/dynstack.h:
* libguile/dynstack.c (scm_dynstack_push_fluid):
  (scm_dynstack_unwind_fluid): Take raw dynstate in these internal
  functions.
* libguile/throw.c (catch): Adapt to dynstack changes.
2016-12-05 21:46:37 +01:00
..
.gitignore
api-binding.texi Fix typo about variable definitions 2016-08-08 00:06:32 +02:00
api-control.texi Documentation fixes 2016-08-07 23:40:16 +02:00
api-coverage.texi No more VM objects visible to Scheme 2013-11-21 16:45:03 +01:00
api-data.texi Document new array functions, with provisional names 2016-11-23 13:05:18 +01:00
api-debug.texi Frame <binding> objects capture frame, can ref value directly 2016-01-31 11:15:58 +01:00
api-deprecated.texi
api-evaluation.texi doc: Add unquote and unquote-splicing examples. 2016-07-25 11:49:40 +02:00
api-foreign-objects.texi Remove SMOB tutorial; update manual. 2014-04-28 17:45:07 +02:00
api-foreign.texi doc: Do not gender the programmer. 2016-07-25 11:44:52 +02:00
api-i18n.texi Fix minor mistakes in documentation. 2013-09-30 12:46:01 -04:00
api-init.texi
api-io.texi Only ptob->close() after read/write finish 2016-08-31 19:10:35 +02:00
api-lalr.texi
api-languages.texi Fix typo in Nil documentation 2016-09-02 10:12:28 +02:00
api-macros.texi Clarify datum->syntax documentation. 2016-05-22 19:42:23 +02:00
api-memory.texi Clarify use of the term "scanning" in the manual 2016-06-24 08:56:21 +02:00
api-modules.texi Fix typo in manual. 2016-05-22 19:29:17 +02:00
api-options.texi Add popen feature 2016-07-25 11:43:54 +02:00
api-overview.texi
api-peg.texi PEG Renames 2013-01-16 10:11:50 +01:00
api-procedures.texi Doc updates to macroexpansion, compiled procs, and compiler.texi 2013-12-04 20:46:02 +01:00
api-regex.texi Add reference to the lack of "non-greedy" variants 2016-06-19 17:39:41 +02:00
api-scheduling.texi Reimplement dynamic states 2016-12-05 21:46:37 +01:00
api-scm.texi
api-smobs.texi Remove SMOB tutorial; update manual. 2014-04-28 17:45:07 +02:00
api-snarf.texi
api-undocumented.texi excise use of "iff" in the manual 2013-03-10 22:29:18 +01:00
api-utility.texi Clarify that object-properties cannot be reliably applied to numbers. 2014-08-10 22:55:25 -04:00
api.txt
ChangeLog-2008
ChangeLog-goops-2008
ChangeLog-guile-doc-ref
compiler.texi docs: Fix external representation of <toplevel-define> in tree-il. 2016-05-22 19:49:15 +02:00
curried.texi Document (ice-9 curried definitions) 2012-09-06 22:15:40 +01:00
data-rep.texi doc: Update libgc URL. 2016-05-22 19:29:17 +02:00
effective-version.texi.in
expect.texi
fdl.texi
gds.dia
gds.eps
gds.pdf
gds.txt
goops-tutorial.texi
goops.texi GOOPS doc fix: #:dsupers is the init keyword for the dsupers slot. 2013-12-01 18:41:31 -05:00
guile-invoke.texi Merge commit '8cf2a7ba74' 2015-01-22 13:24:30 +01:00
guile.texi Merge api-{data,compound}.texi 2016-11-22 23:11:37 +01:00
hierarchy.dot doc/ref/hierarchy.png: conform to hierarchy.txt and manual 2013-01-15 19:17:55 +01:00
hierarchy.eps doc/ref/hierarchy.png: conform to hierarchy.txt and manual 2013-01-15 19:17:55 +01:00
hierarchy.pdf doc/ref/hierarchy.png: conform to hierarchy.txt and manual 2013-01-15 19:17:55 +01:00
hierarchy.png doc/ref/hierarchy.png: conform to hierarchy.txt and manual 2013-01-15 19:17:55 +01:00
hierarchy.txt
history.texi Update history.texi 2013-11-30 18:46:10 +01:00
indices.texi
intro.texi excise use of "iff" in the manual 2013-03-10 22:29:18 +01:00
libguile-autoconf.texi manual: reorganize autoconf, pkg-config info 2011-10-12 17:12:29 +02:00
libguile-concepts.texi Deprecate user asyncs 2016-10-17 21:58:08 +02:00
libguile-extensions.texi
libguile-foreign-objects.texi Deprecate user asyncs 2016-10-17 21:58:08 +02:00
libguile-linking.texi doc: embedding example more readable. 2014-01-17 22:22:02 +01:00
libguile-parallel.texi Merge commit '5fac1a7ada' 2015-01-22 13:30:25 +01:00
libguile-program.texi Remove SMOB tutorial; update manual. 2014-04-28 17:45:07 +02:00
libguile-snarf.texi Prefer foreign objects over smobs in manual 2014-04-28 18:00:05 +02:00
Makefile.am Merge api-{data,compound}.texi 2016-11-22 23:11:37 +01:00
match.texi doc: Strengthen the case for pattern matching. 2012-11-17 16:14:02 +01:00
misc-modules.texi Document pretty-print #:max-expr-width 2016-06-21 16:45:37 +02:00
mod-getopt-long.texi Add documentation pointer from getopt-long to SRFI-37. 2016-06-25 10:06:15 +02:00
mop.text
new-docstrings.texi
posix.texi Move thread bindings to (ice-9 threads) 2016-10-23 22:29:44 +02:00
preface.texi doc: Set document encoding to UTF-8; typeset my surname correctly. 2011-12-14 22:26:15 +01:00
r6rs.texi Implement R6RS custom binary input/output ports 2016-08-04 22:29:51 +02:00
repl-modules.texi
scheme-ideas.texi Document (ice-9 curried definitions) 2012-09-06 22:15:40 +01:00
scheme-indices.texi
scheme-intro.texi
scheme-reading.texi fix urls in docs 2011-11-16 23:21:59 +01:00
scheme-scripts.texi
scheme-using.texi Update statprof documentation; deprecate `with-statprof' 2016-02-01 15:12:36 +01:00
scheme.dia
scheme.eps
scheme.pdf
scheme.txt
scsh.texi
slib.texi
srfi-modules.texi Merge api-{data,compound}.texi 2016-11-22 23:11:37 +01:00
statprof.texi Update statprof documentation; deprecate `with-statprof' 2016-02-01 15:12:36 +01:00
sxml-match.texi Fix typo about pattern variables 2016-08-07 11:57:35 +02:00
sxml.texi doc: Do not gender the programmer. 2016-07-25 11:44:52 +02:00
texinfo.texi Fix typo in `transform-string' doc. 2014-06-04 20:59:36 -04:00
tools.texi Prefer foreign objects over smobs in manual 2014-04-28 18:00:05 +02:00
tour.texi doc: Use scm_{to,from}_double instead of old API in example. 2012-09-03 22:35:33 +02:00
vm.texi Compile fluid-set! to VM opcode 2016-11-27 21:55:42 +01:00
web.texi doc: Adjust capitalization for "HTTPS" and "GnuTLS". 2016-11-07 12:13:17 -06:00