1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-04 19:20:27 +02:00
Commit graph

21864 commits

Author SHA1 Message Date
Andy Wingo
f71775f396 Remove BDW usage from gc.c
* libguile/atomics-internal.h (scm_atomic_subtract_size): New helper.
* libguile/gc.c (scm_gc_register_allocation): Rework to use atomics.
(scm_gc_event_listener_restarting_mutators): Reset the
off_heap_allocation_countdown to the heap size after GC.
(scm_gc_disable, scm_gc_enable): Remove these.  Unclear what they mean
exactly!  Perhaps if there is a meaning we can look at it later.
(scm_i_gc):
(scm_storage_prehistory):
(scm_init_gc): Update.
2025-05-15 15:56:03 +02:00
Andy Wingo
d560676572 Wire loader DT_GUILE_GC_ROOT sections to Whippet API
* libguile/loader.c (add_roots):
(scm_trace_loader_conservative_roots):
(process_dynamic_segment): Use Whippet API to register roots.
* libguile/trace.h (struct gc_heap_roots): Define here.
* libguile/whippet-embedder.h (gc_trace_mutator_conservative_roots):
(gc_trace_heap_conservative_roots): Add definitions.
2025-05-15 15:15:28 +02:00
Andy Wingo
b97b12a19b Merge remote-tracking branch 'whippet/main' into wip-whippet 2025-05-15 14:47:07 +02:00
Andy Wingo
08e6633f93 Add embedder API to provide heap and mutator conservative roots 2025-05-15 14:46:34 +02:00
Andy Wingo
f5a1d2ca33 Use Whippet API for signal handler thread
* libguile/scmsigs.c (signal_delivery_thread): Use Whippet API.
2025-05-15 12:05:52 +02:00
Andy Wingo
799901edc4 Merge remote-tracking branch 'whippet/main' into wip-whippet 2025-05-15 12:00:17 +02:00
Andy Wingo
2f13187f62 Add gc_safepoint_signal_number() API 2025-05-15 11:59:51 +02:00
Andy Wingo
8b12d6f26c Excise BDW API use from threads.c
* libguile/threads.c (with_guile, scm_without_guile): Use gc_activate /
gc_deactivate API.  It's a noop on BDW, but all we lose is a bit of
precision.
(%call-with-new-thread): Remove GC_collect_a_little call, it was
useless.
2025-05-15 11:50:47 +02:00
Andy Wingo
173adcfe09 Merge remote-tracking branch 'whippet/main' into wip-whippet 2025-05-15 11:39:48 +02:00
Andy Wingo
6a554e5dd7 Add gc_deactivate / gc_reactivate
Guile needs this.
2025-05-15 11:39:12 +02:00
Andy Wingo
8f7e3dde4a Merge remote-tracking branch 'whippet/main' into wip-whippet 2025-05-15 11:27:08 +02:00
Andy Wingo
675d8d649a Rework gc_call_without_gc to allow reentrancy
Rename to gc_deactivate_for_call / gc_reactivate_for_call
2025-05-15 11:26:27 +02:00
Andy Wingo
0e8c6b6727 Remove SMOB mark functions
Oh yeah!  They are almost impossible to use correctly as-is, have mostly
disappeared in practice (I am aware of only two users), have the wrong
interface for moving collectors, and current usage has cemented smobs as
conservatively-marked objects.  In order to move forward with Whippet,
they have to go!

* libguile/deprecated.h (SCM_SMOB_MARK, SCM_GLOBAL_SMOB_MARK, scm_mark0)
(scm_markcdr, scm_free0, scm_set_smob_mark, scm_gc_mark): Remove these,
leaving defines to indicate that users should talk to guile-devel to
figure out what to do.
* libguile/smob.h: Remove interfaces relating to mark functions.
(scm_new_double_smob, scm_new_smob): Make not inline
* libguile/smob.c: Remove mark functions from here.
(scm_new_smob): Out-of-line-only definition.
(scm_smob_prehistory): Don't create a new GC kind for smobs.

* test-suite/standalone/test-smob-mark-race.c:
* test-suite/standalone/test-smob-mark.c: Remove.
* test-suite/standalone/Makefile.am: Update.
2025-05-15 10:46:01 +02:00
Andy Wingo
2bfc66554e Remove BDW alloc lock API in vm.c
* libguile/vm.c (vm_expand_stack_inner):
(vm_expand_stack):
(reinstate_continuation_x):
(compose_continuation): Use gc_inhibit_preemption /
gc_reallow_preemption.
2025-05-15 09:25:03 +02:00
Andy Wingo
1e3ce66224 Merge remote-tracking branch 'whippet/main' into wip-whippet 2025-05-15 09:02:31 +02:00
Andy Wingo
d58aa71281 Add API to inihibit pre-emption
This is really only for BDW.  It uses GC_alloc_lock() /
GC_alloc_unlock().
2025-05-15 09:01:28 +02:00
Mikael Djurfeldt
f948d414f8 Fixed documentation for make-guardian.
* module/ice-9/guardians.scm (make-guardian): Copy full documentation of
old C version.
2025-05-14 22:00:06 +02:00
Andy Wingo
1e06be2fa8 Remove weak sets
* libguile/weak-set.c:
* libguile/weak-set.h: Remove.
* libguile.h:
* libguile/Makefile.am: Adapt build and includes.
* libguile/scm.h: Remove weak set tc7.
* libguile/evalext.c:
* libguile/hash.c:
* libguile/ioext.c:
* libguile/ports.c:
* libguile/print.c: Remove weak-set includes and tc7 cases.
* libguile/init.c: No need to init weak sets.
* module/language/cps/compile-bytecode.scm:
* module/system/base/types.scm:
* module/system/base/types/internal.scm:
* module/system/vm/assembler.scm: Adapt to tc7 change.
2025-05-14 16:12:11 +02:00
Andy Wingo
4138d3c646 The symbol table is an ephemeron table
* libguile/symbols.c: Rework the symbol table to be an ephemeron table
instead of a weak set.  It is no longer resizeable; getting that to work
will involve some GC cooperation.
2025-05-14 16:12:11 +02:00
Andy Wingo
dbc384a6ba Remove weak set usage in ports.c
* libguile/ephemerons.h:
* libguile/ephemerons.c (scm_c_ephemeron_load, scm_c_ephemeron_push):
New routines.
* libguile/ioext.c (scm_fdes_to_ports): Rework in terms of
scm_c_port_for_each.
* libguile/ports-internal.h (struct scm_t_port): Add pointer to entry on
weak ports list, so that we can cancel it easily.
* libguile/ports.c (release_port): Mark weak ports list entry as dead.
(all_ports_needing_close, for_each_port_needing_close): Rework as
ephemeron chain.
(scm_c_make_port_with_encoding, close_port, scm_c_port_for_each): Adapt
API.
(scm_init_ports): No more weak set.
2025-05-14 16:12:11 +02:00
Mikael Djurfeldt
2a6f6ec354 Add documentation for make-guardian.
* module/ice-9/guardians.scm (make-guardian): Add documentation from old
C version.
2025-05-14 09:59:04 +02:00
Mikael Djurfeldt
c724f92c89 Enable building in separate directory.
* libguile/whippet/embed.am: Add -I$(top_builddir) to WHIPPET_CPPFLAGS.
2025-05-13 15:55:17 +02:00
Mikael Djurfeldt
0a5fedc11d Rename libguile-3.0-gdb.scm -> libguile-4.0-gdb.scm
* libguile/libguile-3.0-gdb.scm: Remove.
* libguile/libguile-4.0-gdb.scm: New.
2025-05-13 15:52:39 +02:00
Andy Wingo
8280c8485f Move weak table implementation to Scheme
* libguile/weak-table.c:
* libguile/weak-table.h: Remove.

* libguile.h: Remove weak-table.h include.
* libguile/Makefile.am (libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES):
(DOT_X_FILES):
(DOT_DOC_FILES):
(modinclude_HEADERS): Remove weak-table.[ch].

* libguile/evalext.c:
* libguile/fluids.c:
* libguile/hash.c:
* libguile/init.c:
* libguile/print.c:
* libguile/scm.h: Remove uses of weak-table.h and free up the tc7.

* libguile/hashtab.c:
* libguile/hashtab.h: Add deprecated shims to dispatch to (ice-9
weak-tables) when working on weak tables.

* module/ice-9/weak-tables.scm: New implementation.  Embeds the hash and
equality functions in the table itself.

* module/ice-9/object-properties.scm:
* module/ice-9/poe.scm:
* module/ice-9/popen.scm:
* module/ice-9/source-properties.scm:
* module/language/cps/compile-bytecode.scm:
* module/language/ecmascript/array.scm:
* module/language/ecmascript/function.scm:
* module/oop/goops/save.scm:
* module/srfi/srfi-18.scm:
* module/srfi/srfi-69.scm:
* module/system/base/types.scm:
* module/system/base/types/internal.scm:
* module/system/foreign.scm:
* module/system/vm/assembler.scm:
* test-suite/tests/gc.test:
* test-suite/tests/hash.test:
* test-suite/tests/srfi-69.test:
* test-suite/tests/types.test:
* test-suite/tests/weaks.test: Update to use new, non-deprecated weak
tables API.
2025-05-13 14:57:31 +02:00
Andy Wingo
d457aaa57d Add ephemeron-table-clear!; ephemeron key can be immediate
* libguile/ephemerons.c (scm_make_ephemeron): Relax restriction that key
be a heap object.  It's too annoying otherwise.
(scm_c_ephemeron_table_clear_x):
(scm_ephemeron_table_clear_x): New interface.
* module/ice-9/ephemerons.scm: Expose ephemeron-table-clear!.
* test-suite/tests/ephemerons.test ("ephemerons"): Update tests.
2025-05-13 14:55:38 +02:00
Andy Wingo
c35cbd65f1 Remove (ice-9 hcons)
It was never documented, never used, and uses the gross assoc interface
to doubly-weak tables.  Good-bye!

* module/ice-9/hcons.scm: Remove.
* am/bootstrap.am: Remove hcons from build.
* module/ice-9/poe.scm: Extract the one procedure from hcons that poe
uses, which notably doesn't have anything to do with hcons.
2025-05-13 12:20:22 +02:00
Andy Wingo
e3b743dc72 Move source properties out to a module
* module/ice-9/source-properties.scm: New file, providing the
source-properties API, as well as a replacement for `read' that always
attaches source properties, regardless of the 'positions option on the
port.

* am/bootstrap.am (SOURCES): Add the new file.

* libguile/srcprop.c:
* libguile/srcprop.h: Remove.

* libguile/Makefile.am (libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES):
(DOT_X_FILES):
(DOT_DOC_FILES):
(modinclude_HEADERS):
* libguile.h: Remove srcprop.h.

* libguile/deprecated.c:
* libguile/deprecated.h: Add deprecation shims for srcprop.h interface.

* libguile/backtrace.c:
* libguile/debug.c:
* libguile/eval.c:
* libguile/init.c:
* libguile/memoize.c:
* libguile/promises.c:
* libguile/read.c:
* libguile/syntax.c: Remove needless srcprop.h includes.

* module/ice-9/boot-9.scm: Reorder some definitions so that deprecated
modules can use the (system syntax internal) module.

* module/ice-9/deprecated.scm: Add shims for Scheme source-properties
interface.

* module/ice-9/read.scm (read): Never attach source properties.  Users
that want source can use read-syntax.

* module/language/cps.scm:
* module/language/cps/spec.scm:
* module/language/ecmascript/compile-tree-il.scm:
* module/language/elisp/compile-tree-il.scm:
* module/language/elisp/lexer.scm:
* module/language/elisp/parser.scm:
* module/language/tree-il.scm:
* module/language/tree-il/spec.scm:
* module/language/wisp.scm:
* module/system/base/lalr.scm:
* test-suite/tests/elisp-reader.test:
* test-suite/tests/reader.test:
* test-suite/tests/srcprop.test:
* test-suite/tests/srfi-105.test:
* test-suite/tests/srfi-119.test: Use the (ice-9 source-properties)
module to get access to source properties.
2025-05-12 16:29:04 +02:00
Andy Wingo
b6b6f62548 syntax-source returns a vector
* libguile/syntax.c (HAS_SOURCE_WORD_FLAG): Remove; all syntax objects
now have a source word.
(sourcev_to_props, props_to_sourcev): Remove.
(scm_make_syntax): Require source to be a vector or #f.
(scm_syntax_source): Just return source object.
(scm_syntax_sourcev): Remove.
* libguile/syntax.h: Remove scm_syntax_sourcev.
* module/srfi/srfi-64.scm (syntax->source-properties):
* module/system/base/types.scm (cell->object):
* module/ice-9/boot-9.scm (case, current-source-location, current-filename)
(define-module, load): Adapt for syntax-source returning a vector.
* module/ice-9/psyntax-pp.scm: Regen.
* module/ice-9/psyntax.scm: Rename uses of syntax-sourcev to
syntax-source.
* module/system/syntax.scm (syntax-sourcev): Add deprecated shim.
(print-syntax): Use sourcev.
* module/system/vm/assembler.scm (intern-constant):
(link-data): Always write source word.
* test-suite/tests/reader.test ("read-syntax"): Update expectation.
2025-05-12 15:05:40 +02:00
Andy Wingo
71d112cdde Boot expander no longer tracks source positions
* libguile/expand.c (VOID_, CONST_, PRIMITIVE_REF, LEXICAL_REF)
(LEXICAL_SET, MODULE_REF, MODULE_SET, TOPLEVEL_REF, TOPLEVEL_SET)
(TOPLEVEL_DEFINE, CONDITIONAL, PRIMCALL, CALL, SEQ, LAMBDA, LAMBDA_CASE)
(LET, LETREC): Always pass #f as the source.  Source locations are
instead handled by psyntax.  Adapt all callers.
2025-05-12 14:06:06 +02:00
Andy Wingo
9ab8f3d807 tree-il-src is a vector, replaces tree-il-srcv
* module/language/tree-il.scm (tree-il-src): Always a vector now;
tree-il-srcv is gone.  An incompatible change but we are in the
compiler.
(location): For parse-tree-il, make vector locations instead of alists.
* module/language/tree-il/analyze.scm:
* module/language/tree-il/compile-bytecode.scm:
* module/language/tree-il/compile-cps.scm:
* module/language/tree-il/debug.scm:
* module/language/tree-il/letrectify.scm:
* module/language/tree-il/peval.scm:
* module/system/vm/assembler.scm: Update all uses to expect vectors
instead of alists and to use tree-il-src instead of tree-il-srcv.
* module/language/elisp/compile-tree-il.scm (location): Create vectors,
not alists.
* test-suite/tests/compiler.test ("psyntax"): Update syntax-source
expectation.
2025-05-12 13:45:21 +02:00
Andy Wingo
f399f36d37 Remove use of source properties in psyntax
* module/ice-9/psyntax.scm (source-annotation): Only get source info
from syntax objects.
(strip): Don't attach source info.
(macroexpand): Don't proxy source info in that isn't in a syntax object.
(datum->syntax): Don't proxy source info from source-properties.
* test-suite/tests/compiler.test ("psyntax"):
* test-suite/tests/coverage.test (code):
* test-suite/tests/eval-string.test ("basic"):
* test-suite/tests/syntax.test ("expressions"):
* test-suite/tests/tree-il.test ("warnings"): Update tests that attach
source properties to use read-and-compile, or read-syntax.
2025-05-12 13:45:21 +02:00
Andy Wingo
05dd829ad3 boot-9: case warnings use syntax-source
* module/ice-9/boot-9.scm (case): Use syntax-source instead of
source-properties.
2025-05-12 13:45:21 +02:00
Andy Wingo
a35cb9dc46 GOOPS uses ephemeron tables instead of weak tables
* libguile/goops.c (scm_i_define_class_for_vtable)
(create_struct_classes): Use ephemeron hash tables instead of the weak
table API.  Add a FIXME about a race.
2025-05-12 13:45:21 +02:00
Andy Wingo
be6a5c6c75 Deprecate object-properties in the main environment
They should be deprecated entirely except that they are used for object
documentation.  Some other day.

* libguile/objprop.c:
* libguile/objprop.h: Remove.
* libguile/deprecated.h:
* libguile/deprecated.c (scm_object_properties):
(scm_set_object_properties_x):
(scm_object_property):
(scm_set_object_property_x): Add deprecation shims.
* module/ice-9/deprecated.scm (object-properties*):
(set-object-properties!*):
(object-property*):
(set-object-property!*): Add deprecation shims.
* libguile/init.c:
* libguile.h: Remove objprops.
* module/ice-9/object-properties.scm: Add pure Scheme implementation
here.
* module/ice-9/documentation.scm:
* module/scripts/api-diff.scm:
* module/scripts/read-text-outline.scm:
* module/scripts/scan-api.scm:
* module/scripts/summarize-guile-TODO.scm:
* module/srfi/srfi-64.scm: Include object-properties module.
2025-05-12 13:45:21 +02:00
Andy Wingo
bdadd4b057 Rework procedure properties to use ephemeron hash tables
* libguile/procprop.c: Use ephemeron tables instead of weak tables.
2025-05-12 13:45:21 +02:00
Andy Wingo
2463a0741f Rework fluids to use ephemeron hash tables
* libguile/ephemerons.c (scm_from_ephemeron, scm_to_ephemeron):
(scm_from_ephemeron_table, scm_to_ephemeron_table): New interfaces.
(scm_c_ephemeron_table_copy): Rename from
scm_c_ephemeron_hash_table_copy, as it's not specific to hash tables.

* libguile/fluids.h:
* libguile/fluids.c (restore_dynamic_state, save_dynamic_state)
(saved_dynamic_state_ref, fluid_set_x, fluid_ref)
(scm_fluid_ref_star, scm_i_make_initial_dynamic_state): Use ephemeron
hash tables.
2025-05-12 13:45:21 +02:00
Andy Wingo
134c3be452 Add ephemeron tables
* libguile/ephemerons.h:
* libguile/ephemerons.c (scm_c_make_ephemeron):
(scm_c_ephemeron_key):
(scm_c_ephemeron_value):
(scm_c_ephemeron_mark_dead_x):
(scm_c_ephemeron_swap_x):
(scm_c_ephemeron_next): Add C ephemeron API.
(scm_make_ephemeron, scm_ephemeron_key, scm_ephemeron_value)
(scm_ephemeron_mark_dead_x): Dispatch to helpers above.
(scm_ephemeron_swap_x, scm_ephemeron_mark_dead_x): New Scheme-exposed
functions.
(scm_c_make_ephemeron_table):
(scm_c_ephemeron_table_length):
(scm_c_ephemeron_table_ref):
(scm_c_ephemeron_table_push_x):
(scm_c_ephemeron_table_try_push_x): New C API for tables of ephemerons.
(scm_ephemeron_table_length):
(scm_ephemeron_table_ref):
(scm_ephemeron_table_push_x):
(scm_ephemeron_table_try_push_x): New Scheme-exposed API.
(scm_c_ephemeron_hash_table_refq):
(scm_c_ephemeron_hash_table_setq_x):
(scm_c_ephemeron_hash_table_copy): New C API for use by internal weak
table users (dynamic states, etc).

* module/ice-9/ephemerons.scm: Add new Scheme API.

* libguile/evalext.c (scm_self_evaluating_p):
* libguile/goops.c (scm_class_of, %goops-early-init):
* libguile/print.c (iprin1):
* module/oop/goops.scm:
* libguile/scm.h (scm_tc7_ephemeron_table): Add new tc7 for ephemeron
tables.

* test-suite/tests/ephemerons.test ("ephemeron tables"): Add tests.
2025-05-12 13:45:21 +02:00
Andy Wingo
67dca3a1f5 Move weak tables out to a module
* module/ice-9/weak-tables.scm: New file.

* am/bootstrap.am (SOURCES): Wire it up.
* module/ice-9/deprecated.scm: Add deprecation shims.
* libguile/init.c (scm_i_init_guile): Don't add weak bindings to default
module.
* libguile/weak-table.h:
* libguile/weak-table.c (scm_init_weak_tables):
(scm_weak_table_prehistory): Arrange to load bindings from the weaks
module.
* module/ice-9/hcons.scm:
* module/ice-9/object-properties.scm:
* module/ice-9/poe.scm:
* module/ice-9/popen.scm:
* module/ice-9/sandbox.scm:
* module/language/ecmascript/function.scm:
* module/oop/goops/save.scm:
* module/srfi/srfi-18.scm:
* module/srfi/srfi-69.scm:
* module/system/foreign.scm:
* test-suite/tests/gc.test:
* test-suite/tests/hash.test:
* test-suite/tests/types.test:
* test-suite/tests/weaks.test: Adapt to use the new module.
2025-05-12 13:45:07 +02:00
Andy Wingo
3a9c0939a0 Move make-object-property out to a module
This will allow for weak tables to be implemented partly in Scheme.

* module/ice-9/object-properties.scm: New file.

* am/bootstrap.am (SOURCES): Add new file.

* module/ice-9/boot-9.scm:
* module/ice-9/deprecated.scm (make-object-property*): Deprecate
make-object-property in default env and add a shim.

* module/ice-9/buffered-input.scm (ice-9):
* module/language/elisp/boot.el (plist-function):
* module/scripts/frisk.scm (scripts):
* module/web/http.scm (web): Adapt users to import the new module.
2025-05-12 13:45:07 +02:00
Andy Wingo
1f96d1bf4b Move to store thread join cond/lock/results directly
* libguile/threads.h: Add join data directly on the thread instead of
using a Scheme-side weak table.  It's less complicated and it will let
the weak table implementation use locks in Scheme; otherwise you would
have threads depending on weak tables and vice versa.
* libguile/threads.c (scm_trace_thread, guilify_self_1): Init and mark
the new members.
(thread_join_cond, thread_join_lock, thread_join_results)
(thread_init_joinable_x, thread_set_join_results_x): New accessors.
* module/ice-9/threads.scm (call-with-new-thread, join-thread): Use the
new accessors.
2025-05-12 13:45:07 +02:00
Andy Wingo
852c0b05c7 Remove module weak observers
If that's what you want, you need to bring your own weak hash table on a
normal observer.

* module/ice-9/boot-9.scm (module): Remove weak-observers field.
(make-module, make-autoload-interface): Don't pass weak table to
constructor.
(module-observe-weak): Remove.
(module-unobserve, module-call-observers): Remove weak case.
* module/ice-9/deprecated.scm (module-observe-weak): Dispatch to
module-observe.
* test-suite/tests/modules.test ("observers"): Adapt.
2025-05-12 13:45:07 +02:00
Andy Wingo
57f0ce914a Merge remote-tracking branch 'whippet/main' into HEAD 2025-05-12 13:39:27 +02:00
Andy Wingo
cc2a90b494 bdw: Fix detection of objects on free-lists
I am not sure about ephemerons and finalizers, though.
2025-05-12 13:38:49 +02:00
Andy Wingo
d4fd1f3486 Merge remote-tracking branch 'whippet/main' into HEAD 2025-05-12 11:55:04 +02:00
Andy Wingo
3440bb864d bdw: Use BDW lock instead of gc_heap lock; clear dead mutators
This will protect traversal of the mutator list during marking.  Also,
clear dead mutators, so that if they are still reachable, they won't be marked.
2025-05-12 11:52:51 +02:00
Andy Wingo
a5c69fb920 Add try-push, swap-value API to ephemerons
The former allows for knowing whether a push succeeded or not, which is
useful for concurrent hash tables.  The latter makes ephemerons mutable,
if the embedder wants to use them that way.
2025-05-09 09:56:17 +02:00
Andy Wingo
c63f9101f8 Reimplement weak vectors in Scheme using ephemerons
* module/ice-9/weak-vector.scm: New implementation, same interface.

* doc/ref/api-memory.texi (Weak vectors): Default weak vector value was
documented as empty list when it was actually unspecified, but #f is
most useful, so we change documentation and code to match.

* libguile/Makefile.am (libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES):
(DOT_X_FILES):
(DOT_DOC_FILES):
(noinst_HEADERS):
(modinclude_HEADERS):
* libguile.h:
* libguile/deprecated.c:
* libguile/deprecated.h:
* libguile/init.c:
* libguile/weak-vector.c:
* libguile/weak-vector.h: Remove C weak vector implementation, replaced
with deprecation stubs that call out to Scheme.

* libguile/weak-set.c:
* libguile/weak-table.c:
* libguile/weak-list.h: Remove unused internal header.

* libguile/eq.c:
* libguile/evalext.c:
* libguile/goops.c:
* libguile/hash.c:
* libguile/scm.h:
* module/system/base/types.scm:
* module/system/base/types/internal.scm:
* module/system/vm/assembler.scm: Remove wvect tc7.
2025-05-05 16:29:24 +02:00
Andy Wingo
96589bd303 Remove all deprecated code from Scheme files
* module/ice-9/boot-9.scm(symbol-property, set-symbol-property!)
(symbol-property-remove!): Remove.
* module/ice-9/boot-9.scm (make-record-type): Name must be symbol.
(record-constructor): Alias record-type-constructor.
(make-module): Require size to be zero.  Should fix this with keyword
args :/
(try-load-module): Inline definition of try-module-autoload.  Remove
try-module-autoload binding.
(make-soft-port): Add deprecation warning, so we can remove it
eventually.
* module/ice-9/save-stack.scm: Remove deprecation comment.
* module/ice-9/top-repl.scm:
* module/ice-9/threads.scm: Export instead of replace bindings.
* module/language/bytecode.scm: Remove instruction-arity et al.
* module/language/tree-il/analyze.scm: Remove deprecated
unbound-variable-analysis and macro-use-before-definition-analysis.
* module/rnrs.scm: Fix syntax-case export now that module and value
namespaces are separate.
* module/system/base/language.scm (invalidate-compilation-cache!):
Remove.
* module/system/base/language.scm (*current-language*): Remove.
2025-05-05 12:33:37 +02:00
Andy Wingo
4c2a8c1dd3 Update tests to use new soft ports interface.
* test-suite/tests/r6rs-ports.test:
* test-suite/tests/web-client.test:
* test-suite/tests/ports.test ("pending EOF behavior"):
("unicode byte-order marks (BOMs)"): Use new soft ports.
2025-05-05 12:33:28 +02:00
Andy Wingo
c1caabaa24 Add ephemeron objects
* module/ice-9/ephemerons.scm:
* libguile/ephemerons.c:
* libguile/ephemerons.h:
* test-suite/tests/ephemerons.test: New files.

* am/bootstrap.am (SOURCES):
* test-suite/Makefile.am (SCM_TESTS):
* libguile/Makefile.am (libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES):
(DOT_X_FILES, DOT_DOC_FILES, noinst_HEADERS):  Wire ephemerons into build.

* libguile/scm.h (scm_tc7_ephemeron): New tc7.

* module/oop/goops.scm (<ephemeron>):
* module/system/base/types/internal.scm (heap-tags):
* module/system/vm/assembler.scm (system):
* libguile/evalext.c (scm_self_evaluating_p):
* libguile/goops.c (scm_class_of):
* libguile/init.c (scm_i_init_guile):
* libguile/print.c (iprin1): Add cases for new tc7.
2025-05-05 11:04:44 +02:00