1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-12 06:41:13 +02:00
Commit graph

9668 commits

Author SHA1 Message Date
Andy Wingo
0134abce74 Move private bytevectors API to a separate header
Also give bytevectors a private type (a struct).

* libguile/bytevectors.h (SCM_BYTEVECTOR_HEADER_SIZE): Remove.
(SCM_BYTEVECTOR_LENGTH):
(SCM_BYTEVECTOR_CONTENTS): Proxy to the C accessors.
(SCM_BYTEVECTOR_PARENT): Remove from public API.
(SCM_BYTEVECTOR_P, SCM_VALIDATE_BYTEVECTOR): Make public.
(scm_c_bytevector_contents): New function.
* libguile/bytevectors-internal.h: New file.
* libguile/Makefile.am (noinst_HEADERS): Add new file.

* libguile/bytevectors.c:
* libguile/array-handle.c:
* libguile/arrays.c:
* libguile/foreign.c:
* libguile/goops.c:
* libguile/init.c:
* libguile/loader.c:
* libguile/print.c:
* libguile/r6rs-ports.c:
* libguile/srfi-4.c:
* libguile/strings.c: Adapt to use bytevectors-internal.h as needed, and
sometimes to use the internal bytevector type.
2025-06-02 09:51:47 +02:00
Andy Wingo
51bc69dd1c Fix bytevector mutators to correctly check for mutability
Previously, bytevectors that were serialized into binaries were actually
mutable by compiled bytevector-u8-set! et al.

* libguile/bytevectors.h (SCM_F_BYTEVECTOR_IMMUTABLE): Renumber to 0x80,
as for immutable vectors.
(SCM_BYTEVECTOR_CONTIGUOUS_P): Just use SCM_CELL_TYPE.
(SCM_BYTEVECTOR_FLAGS): Remove unused accessor.
* module/language/tree-il/compile-cps.scm (bytevector-set-converter):
Emit mutable-bytevector? instead of bytevector?.
* module/system/vm/assembler.scm (link-data): Update immutable flag.
* module/language/cps/compile-bytecode.scm:
* module/language/cps/effects-analysis.scm:
* module/language/cps/type-fold.scm:
* module/language/cps/types.scm:
* module/system/base/types/internal.scm: Update for immutable-bytevector
predicates.
2025-05-30 16:48:26 +02:00
Andy Wingo
043a5b62bb Rework treatment of bytevector flags
Before, they were always shifted by 7.  Now the flags are just above
0x7f and just the element type is shifted, but by 16.

* libguile/bytevectors.h (SCM_BYTEVECTOR_FLAGS): Rework to not shift.
(SCM_SET_BYTEVECTOR_FLAGS): Remove.
(SCM_MUTABLE_BYTEVECTOR_P): Don't shift the immutable flag.
(SCM_BYTEVECTOR_ELEMENT_TYPE): Shift right by 16.
* libguile/bytevectors.c (SCM_BYTEVECTOR_SET_FLAG): Remove unused
helper.
(make_bytevector_tag): New helper.
(make_bytevector): Use new helper.
(make_bytevector_from_buffer): Add flags and parent args, and use new
helper.
(scm_c_take_gc_bytevector):
(scm_c_take_typed_bytevector):
(scm_bytevector_slice): Update callers.
* module/system/vm/assembler.scm (link-data): Don't shift the flag by 7;
instead shift the element type by 16.
2025-05-30 14:19:30 +02:00
Andy Wingo
464ec999de Make programs.h private
This header file turns out to only have internal details.  Users that
need introspection can use Scheme.

* libguile/programs.h (SCM_PROGRAM_P, SCM_PROGRAM_CODE)
(SCM_PROGRAM_FREE_VARIABLES, SCM_PROGRAM_FREE_VARIABLE_REF)
(SCM_PROGRAM_FREE_VARIABLE_SET, SCM_PROGRAM_NUM_FREE_VARIABLES)
(SCM_VALIDATE_PROGRAM, SCM_F_PROGRAM_IS_BOOT, SCM_F_PROGRAM_IS_PRIMITIVE)
(SCM_F_PROGRAM_IS_PRIMITIVE_GENERIC, SCM_F_PROGRAM_IS_CONTINUATION)
(SCM_F_PROGRAM_IS_PARTIAL_CONTINUATION, SCM_F_PROGRAM_IS_FOREIGN)
(SCM_PROGRAM_IS_BOOT, SCM_PROGRAM_IS_PRIMITIVE)
(SCM_PROGRAM_IS_PRIMITIVE_GENERIC, SCM_PROGRAM_IS_CONTINUATION)
(SCM_PROGRAM_IS_PARTIAL_CONTINUATION, SCM_PROGRAM_IS_FOREIGN): Remove
these macros, as we are making this whole API private.
(struct scm_program, scm_is_program, scm_to_program, scm_from_program)
(scm_program_flags, scm_program_is_boot, scm_program_is_primitive)
(scm_program_is_primitive_generic, scm_program_is_continuation)
(scm_program_is_partial_continuation, scm_program_is_foreign)
(scm_program_code, scm_program_free_variable_count)
(scm_program_free_variable_ref, scm_program_free_variable_set_x)
(scm_i_make_program): New inline functions.
* libguile/Makefile.am (noinst_HEADERS): Add programs.h; no longer
installed.  It was never directly included from libguile.h.
* libguile/continuations.c:
* libguile/continuations.h:
* libguile/control.c:
* libguile/foreign.c:
* libguile/frames.c:
* libguile/frames.h:
* libguile/goops.c:
* libguile/gsubr.c:
* libguile/gsubr.h:
* libguile/intrinsics.h:
* libguile/procprop.c:
* libguile/procs.c:
* libguile/programs.c:
* libguile/stacks.c:
* libguile/vm-engine.c:
* libguile/vm.c:
* libguile/vm.h: Adapt all users.
2025-05-30 12:52:54 +02:00
Andy Wingo
93e5a2454a Tighten up exported ABI / API of "programs"
* libguile/programs.h (scm_program_p, scm_program_code)
(scm_primitive_code_p, scm_primitive_code_name, scm_primitive_call_ip):
Don't expose these internal functions to C
ABI.
(scm_program_num_free_variables, scm_program_free_variable_ref,
scm_program_free_variable_set_x): Don't expose these previously-public
functions to C ABI.
(scm_is_program): New internal inline function.
* libguile/stacks.c (narrow_stack): Use new scm_is_program helper.
* libguile/programs.c: Adapt implementation to use SCM_DEFINE_STATIC.
2025-05-30 10:25:00 +02:00
Andy Wingo
224fb82a39 Give reified value objects a proper data type
* libguile/values.h (struct scm_values): New build-time definition.
(scm_to_values):
(scm_from_values):
(scm_values_count):
(scm_values_ref): New helpers.
* libguile/vm.c:
* libguile/values.c:
* libguile/print.c:
* libguile/numbers.c:
* libguile/eval.c: Adapt all callers.
2025-05-30 09:57:08 +02:00
Andy Wingo
aa73d31ded Inline "struct scm_frame" into tagged frame objects
This avoids an indirection and will make the tracer's job easier.

* libguile/frames.h (struct scm_vm_frame): New data type.
(scm_is_vm_frame):
(scm_vm_frame):
(scm_vm_frame_kind):
(scm_vm_frame_fp):
(scm_vm_frame_sp):
(scm_vm_frame_ip):
(scm_frame_init_from_vm_frame): New helpers.

* libguile/frames.c:
* libguile/stacks.c:
* libguile/stacks.h:
* libguile/vm.c: Update all users of SCM_VM_FRAME_* macros to use new
helpers.
2025-05-29 21:53:36 +02:00
Andy Wingo
75842cf215 Simplify struct scm_bignum
* libguile/integers.c (struct scm_bignum): Now that SCM_I_BIG_MPZ is
gone with other deprecated code, we can simplify the bignum
representation.  Adapt all users.
2025-05-28 11:22:29 +02:00
Andy Wingo
0a0ecc518b Arrange to pin objects captured by a delimited continuation
* libguile/vm.h (struct scm_vm_cont): Include the tag word, and put
flags there.  Rename stack bottom to stack slice and make a flexible
array.
(scm_is_vm_cont):
(scm_to_vm_cont):
(scm_from_vm_cont):
(scm_vm_cont_is_partial):
(scm_vm_cont_is_rewindable): New build-time helpers.

* libguile/continuations.c (scm_i_make_continuation):
(scm_i_continuation_to_frame):
(copy_stack_and_call):
* libguile/continuations.h (scm_t_contregs):
* libguile/frames.c (frame_stack_top):
* libguile/stacks.c (scm_make_stack): Adapt to take struct scm_vm_cont*
instead of SCM for continuations.

* libguile/vm.c (capture_stack): Adapt to scm_vm_cont change.  Use new
gc_resolve_conservative_ref API to pin conservative refs from the
captured stack.
(scm_i_vm_cont_to_frame):
(scm_i_capture_current_stack):
(reinstate_continuation_x):
(capture_continuation):
(compose_continuation):
(capture_delimited_continuation):
(abort_to_prompt): Adapt to type changes.
2025-05-27 16:02:01 +02:00
Andy Wingo
177643d416 Merge remote-tracking branch 'whippet/main' into wip-whippet 2025-05-27 15:50:57 +02:00
Andy Wingo
1abd5a310e Merge remote-tracking branch 'whippet/main' into wip-whippet 2025-05-26 12:22:22 +02:00
Andy Wingo
a4c0f1e231 Merge remote-tracking branch 'whippet/main' into wip-whippet 2025-05-26 11:58:48 +02:00
Andy Wingo
e84dccb710 Merge remote-tracking branch 'whippet/main' into wip-whippet 2025-05-26 10:34:54 +02:00
Andy Wingo
b3d874c804 Add JIT support for bump-pointer allocation fast paths
* libguile/jit.c (emit_update_alloc_table):
(emit_allocate_bytes_fast_bump_pointer): Add implementation.
(compile_allocate_words_immediate_with_kind):
(compile_allocate_words_immediate_slow_with_kind): New helpers.
(compile_allocate_words_immediate):
(compile_allocate_words_immediate_slow):
(compile_allocate_pointerless_words_immediate):
(compile_allocate_pointerless_words_immediate_slow): Use new helpers.
2025-05-24 21:45:25 +02:00
Andy Wingo
3147d313f9 Add Guile's CFLAGS to WHIPPET_IMPL_CFLAGS
* libguile/Makefile.am (WHIPPET_IMPL_CFLAGS): Add GCC_CFLAGS, to ensure
the same compilation options (notably -fwrapv), to prevent mismatches at
LTO-time.
2025-05-23 09:44:50 +02:00
Andy Wingo
5d94b78095 Merge remote-tracking branch 'whippet/main' into wip-whippet 2025-05-23 09:44:31 +02:00
Andy Wingo
8c4866cd5c Merge remote-tracking branch 'whippet/main' into wip-whippet 2025-05-23 09:39:59 +02:00
Andy Wingo
6841c9509a Merge remote-tracking branch 'whippet/main' into wip-whippet 2025-05-22 16:24:47 +02:00
Andy Wingo
0a6767b3b9 Fix a bug in after-gc Scheme hook
* libguile/gc.c (scm_gc_event_listener_restarting_mutators): Avoid
running hook before Guile is booted.
2025-05-22 16:24:16 +02:00
Andy Wingo
7b4f4427f8 Update for Whippet changes, VM stacks scanned partly-conservatively
* libguile/trace.h (scm_from_ref, scm_to_ref): Helpers moved here;
update all callers.
* libguile/loader.c (scm_trace_loader_roots):
* libguile/threads.c (scm_trace_thread_roots):
* libguile/vm.c (scm_trace_vm_roots): Update for new
pinned-roots prototype.
* libguile/whippet-embedder.h (gc_extern_space_visit): Update for
Whippet API changes.
2025-05-21 14:31:23 +02:00
Andy Wingo
fb5a99c752 Merge remote-tracking branch 'whippet/main' into wip-whippet 2025-05-21 14:28:34 +02:00
Andy Wingo
72fbb05ee8 Fix Guile's whippet embedding for conservative roots tracing
* libguile/whippet-embedder.h (gc_extern_space_visit): Don't crash if
conservative tracing is enabled: these are already part of the root set.
2025-05-16 22:38:45 +02:00
Andy Wingo
0ffa6688aa Adapt to whippet change 2025-05-16 22:27:20 +02:00
Andy Wingo
a344c225c4 Merge remote-tracking branch 'whippet/main' into wip-whippet 2025-05-16 22:22:56 +02:00
Andy Wingo
ddef73d03f Remove the last direct uses of BDW API
* configure.ac: Remove code to detect BDW, that is taken care of by the
whippet macros.  Remove support for ia64, for the moment at least,
perhaps for good.
* libguile/Makefile.am (libguile_@GUILE_EFFECTIVE_VERSION@_la_LDFLAGS):
Remove BDW cflags.
(modinclude_HEADERS): Remove bdw-gc.h.
* libguile/bdw-gc.h: Remove.
* libguile/fluids.c:
* libguile/hashtab.c:
* libguile/numbers.c:
* libguile/smob.c:
* libguile/srfi-4.c:
* libguile/struct.c:
* libguile/vectors.c:
* libguile/vm.c: Remove bdw-gc.h includes.
* meta/guile-4.0-uninstalled.pc.in (Libs):
* meta/guile-4.0.pc.in (Libs): Remove direct dependency on BDW-GC, as it
is all encapsulated through Whippet, which is not publically exposed.
2025-05-15 16:13:18 +02:00
Andy Wingo
c9df342c9a Merge remote-tracking branch 'whippet/main' into wip-whippet 2025-05-15 15:56:48 +02:00
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
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
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
8f7e3dde4a Merge remote-tracking branch 'whippet/main' into wip-whippet 2025-05-15 11:27:08 +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
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
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
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
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