Age | Commit message (Collapse) | Author | Files | Lines |
|
C should use scm_c_bitvector_length, not scm_bitvector_length.
* doc/ref/api-data.texi (Bit Vectors): Reorganize a bit to put typed C
interfaces in their own section.
* libguile/bitvectors.h:
* libguile/bitvectors.c (bitvector-length, bitvector-count): Make
SCM-flavored C interface private.
(scm_c_bitvector_count): New function.
* libguile/deprecated.c (scm_bitvector_length): Deprecate.
(scm_bit_count): Adapt to changes.
|
|
* NEWS: Add entry.
* doc/ref/api-data.texi (Bit Vectors): Update.
* libguile/bitvectors.h:
* libguile/bitvectors.c (scm_c_bitvector_count_bits): New function.
* libguile/deprecated.h:
* libguile/deprecated.c (scm_bit_count_star): Deprecate.
* module/ice-9/sandbox.scm (bitvector-bindings): Replace bit-count* with
bitvector-count-bits.
* test-suite/tests/bitvectors.test: Update.
|
|
* libguile/finalizers.c (finalization_thread_proc): Set 'errno' before
calling 'perror'.
|
|
* NEWS: Add entry.
* doc/ref/api-data.texi (Bit Vectors): Update.
* libguile/bitvectors.h:
* libguile/bitvectors.c (scm_c_bitvector_flip_all_bits_x): New function.
* libguile/deprecated.h:
* libguile/deprecated.c (scm_bit_invert_x): Deprecate.
* module/ice-9/sandbox.scm (mutable-bitvector-bindings): Replace
bit-invert! with bitvector-flip-all-bits!.
* module/system/vm/frame.scm (available-bindings): Use the new
interface.
* test-suite/tests/bitvectors.test: Update.
|
|
* NEWS: Add entry.
* doc/ref/api-data.texi (Bit Vectors): Update.
* libguile/bitvectors.h:
* libguile/bitvectors.c (scm_c_bitvector_set_all_bits_x)
(scm_c_bitvector_clear_all_bits_x): New functions.
* libguile/deprecated.h:
* libguile/deprecated.c (scm_bitvector_fill_x): Deprecate.
* module/ice-9/sandbox.scm (mutable-bitvector-bindings): Replace
bitvector-fill! with bitvector-set-all-bits! /
bitvector-clear-all-bits!.
* module/system/vm/disassembler.scm (static-opcode-set): Use
bitvector-set-bit!.
* module/system/vm/frame.scm (available-bindings): Use the new
interfaces.
* test-suite/tests/bitvectors.test: Update.
|
|
* NEWS: Add entry.
* doc/ref/api-data.texi (Bit Vectors): Update.
* libguile/array-handle.h (bitvector_set_x, scm_array_get_handle): Adapt
to bitvector changes.
* libguile/bitvectors.h:
* libguile/bitvectors.c (scm_c_bitvector_set_bit_x)
(scm_c_bitvector_clear_bit_x): New functions.
* libguile/deprecated.h:
* libguile/deprecated.c (scm_bitvector_set_x): Deprecate.
* module/ice-9/sandbox.scm (mutable-bitvector-bindings): Replace
bitvector-set! with bitvector-set-bit! / bitvector-clear-bit!.
* module/system/vm/disassembler.scm (static-opcode-set): Use
bitvector-set-bit!.
* module/system/vm/frame.scm (compute-defs-by-slot, available-bindings):
Use bitvector-set-bit!.
* test-suite/tests/bitvectors.test: Update.
|
|
This is an opportunity to make a new interface that can be more
efficient in 3.0 (because no generic array support), easier to read (no
need for 'not'), and more consistent with other bitvector interfaces.
* NEWS: Add entry.
* doc/ref/api-data.texi (Bit Vectors): Update.
* libguile/array-handle.h (bitvector_ref, scm_array_get_handle): Adapt
to bitvector changes.
* libguile/bitvectors.h:
* libguile/bitvectors.c (scm_c_bitvector_bit_is_set)
(scm_c_bitvector_bit_is_clear): New functions.
* libguile/deprecated.h:
* libguile/deprecated.c (scm_bitvector_ref): Deprecate.
* module/ice-9/sandbox.scm (bitvector-bindings): Replace
bitvector-ref with bitvector-bit-set? / bitvector-bit-clear?.
* module/system/vm/disassembler.scm (instruction-has-fallthrough): Use
bitvector-bit-clear?.
* test-suite/tests/bitvectors.test: Update.
|
|
The old name was wonky and hard to read: you almost always pass a
literal as the value to set, so better to make separate functions.
* NEWS: Add entry.
* doc/ref/api-data.texi (Bit Vectors): Update.
* libguile/bitvectors.h:
* libguile/bitvectors.c (scm_bitvector_set_bits_x)
(scm_bitvector_clear_bits_x): New functions.
* libguile/deprecated.h:
* libguile/deprecated.c (scm_bit_set_star_x): Deprecate.
* module/ice-9/sandbox.scm (mutable-bitvector-bindings): Replace
bit-set*! with bitvector-set-bits! / bitvector-clear-bits!.
* module/system/vm/frame.scm (available-bindings, compute-killv): Use
bitvector-set-bits! and bitvector-clear-bits!.
* test-suite/tests/bitvectors.test: Update.
|
|
The old name was wonky and had bad argument order.
* NEWS: Add entry.
* doc/ref/api-data.texi (Bit Vectors): Update.
* libguile/bitvectors.h:
* libguile/bitvectors.c (scm_bitvector_position): New function.
* libguile/deprecated.h:
* libguile/deprecated.c (scm_bit_position): Deprecate.
* module/ice-9/sandbox.scm (bitvector-bindings): Replace bit-position
with bitvector-position.
* module/language/cps/intset.scm (bitvector->intset): Use
bitvector-position.
* module/system/vm/frame.scm (available-bindings): Use
bitvector-position.
* test-suite/tests/bitvectors.test ("bitvector-position"): Add test.
|
|
The old name was wonky and had bad argument order.
* NEWS: Add entry.
* doc/ref/api-data.texi (Bit Vectors): Update.
* libguile/bitvectors.h:
* libguile/bitvectors.c (VALIDATE_BITVECTOR): New helper.
(scm_bitvector_count): New function.
* libguile/deprecated.h:
* libguile/deprecated.c (scm_bit_count): Deprecate.
* module/ice-9/sandbox.scm (bitvector-bindings): Replace bit-count with
bitvector-count.
* module/srfi/srfi-60.scm: No need to #:replace bit-count.
* module/system/vm/frame.scm (available-bindings): Use bitvector-count.
* test-suite/tests/bitvectors.test ("bitvector-count"): Add test.
|
|
* NEWS: Update.
* doc/ref/api-data.texi (Bit Vectors): Update documentation on bit-set*!
and bit-count*.
* libguile/bitvectors.c: Add a to-do list.
(scm_c_bitvector_ref, scm_c_bitvector_set_x, scm_bitvector_fill_x)
(scm_bitvector_to_list, scm_bit_count, scm_bit_position):
Issue deprecation warnings when used on array slices.
(scm_list_to_bitvector): Simplify.
(scm_bit_set_star_x, scm_bit_count_star): Deprecate arrays as target
bitvectors, and also use of u32vector as selection vector.
* libguile/bitvectors.h:
* libguile/deprecated.h:
* libguile/deprecated.c (scm_istr2bve): Deprecate.
* test-suite/tests/bitvectors.test ("bit-count*"): Remove test of u32
selectors.
|
|
* libguile/srfi-14.i.c (cs_lower_case_ranges, cs_upper_case_ranges)
(cs_letter_ranges, cs_digit_ranges, cs_letter_plus_digit_ranges)
(cs_graphic_ranges, cs_printing_ranges, cs_punctuation_ranges)
(cs_symbol_ranges, cs_designated_ranges): updated to Unicode 13
|
|
* libguile/weak-set.c (resize_set): Call 'scm_gc_malloc_pointerless'
outside the loop.
|
|
Just like in dc8dda77e0c937abae42a76ea88c6e7995adbd9a, this ensures weak
sets are vacuumed in a timely fashion. It also works around the fact
that 'vacuum_all_weak_tables' isn't getting called more than a couple of
times, for some reason.
Partly fixes <https://bugs.gnu.org/40194>.
* libguile/weak-set.c (weak_set_add_x): When 'set->items > set->upper',
call 'vacuum_weak_set'.
|
|
* libguile/vectors.c (make_vector): New function.
(scm_c_make_vector): Use it instead of 'scm_words'.
(scm_vector_copy): Use it instead of 'scm_c_make_vector'.
|
|
* configure.ac: Add '--disable-tmpnam'.
* libguile/posix.c (tmpnam): Conditionalize on 'SCM_ENABLE_DEPRECATED'
and 'ENABLE_TMPNAM'. Call 'scm_c_issue_deprecation_warning'.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
|
|
Fixes <https://bugs.gnu.org/21076>.
* libguile/dynl.c (sysdep_dyn_link): Try plain lt_dlopen first, to
interpret fname as a literal path.
* doc/ref/api-foreign.texi: Update explanation to describe the new
behavior.
Co-authored-by: Ludovic Courtès <ludo@gnu.org>
|
|
Fixes <https://bugs.gnu.org/40075>.
Reported by Thomas Klausner <tk@giga.or.at>.
* libguile/null-threads.h: Include "libguile/scm.h".
* libguile/null-threads.c: Include "libguile/scmconfig.h".
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
|
|
Fixes <https://bugs.gnu.org/28211>.
* libguile/vm.c (scm_i_vm_emergency_abort, abort_to_prompt): Move
'vp->fp' assignment above 'sp[nargs]' assignments.
|
|
* libguile/libguile-3.0-gdb.scm (vm-frame-function-name)[ip-in-symbol?]:
Do not access SYM's value when it's optimized out.
|
|
* libguile/libguile-3.0-gdb.scm (find-vp): Adjust for Guile 3.0.
|
|
* libguile/libguile-3.0-gdb.scm (vm-frame): Look up stdint.h types
instead of now-deprecated "scm_t_" types.
|
|
This avoids errors while loading the file when types are not in scope.
* libguile/libguile-3.0-gdb.scm (%gdb-memory-backend)[void*]: Turn into
a promise and adjust user accordingly.
(ip-type, fp-type, sp-type, uint-type): Remove.
(vm-frame)[ip-type, uint-type]: New variables.
|
|
Fixes <https://bugs.gnu.org/39266>.
Thanks to <https://rr-project.org/> for its help!
* libguile/struct.c (set_vtable_access_fields): Fix first argument to
'scm_gc_malloc_pointerless'.
|
|
Fixes <https://bugs.gnu.org/39634>.
* libguile/hash.c (scm_raw_ihash): Add cases for scm_tc7 values that
were not explicitly listed.
|
|
* libguile/jit.c (create_perf_map_once, create_perf_map, perf_map): New
locals.
(compute_mcode): Add an entry to perf_map for emitted JIT code.
|
|
Add keyword handling to (hash ...). Previously it would just return the
same value for all keywords.
* libguile/hash.c (scm_raw_ihash): Add scm_tc7_keyword case.
* libguile/keywords.h (SCM_I_KEYWORD_HASH): New macro.
|
|
* libguile/vm.c (push_interrupt_frame, compose_continuation): In places
where we push on synthetic frames before possibly going back to mcode,
make sure that the return mcode will trampoline back to the
interpreter. Fixes compose-continuation from the interpreter to
partial continuations with mcode.
|
|
* libguile/jit.c (emit_direct_tail_call): Assert self-tail call has
mcode.
(opcodes_seen, bitvector_ref, bitvector_set, compile1): Make the
opcodes_seen set more compact, and log all instruction emissions at
level 3.
(compute_mcode): Don't overwrite mcode if compilation fails.
|
|
|
|
Suggested by Dale P. Smith <dsmich@roadrunner.com>.
* libguile/deprecated.h (SCM_MEMORY_ERROR): New macro.
* doc/ref/api-control.texi (Dynamic Wind): Use 'scm_report_out_of_memory'.
|
|
'scm_memory_error' was deprecated in 2014 in commit
c2247b782a9234bb9aedee5204c30daf1d01a510 and removed in 2017 in commit
c248ea10beb2afa4c113dbc6dc707bed5dbfc92e. This is a followup.
* libguile/error.h (SCM_MEMORY_ERROR): Remove.
* doc/guile-api.alist: Remove 'scm_memory_error'.
* doc/ref/api-control.texi (Handling Errors): Likewise.
(Dynamic Wind): Use 'scm_misc_error' instead of 'scm_memory_error'.
|
|
* libguile/continuations.c (capture_auxiliary_stack): Fix
logic in preprocessor code when checking for ia64 host;
fix dereferencing of ctx variable.
* libguile/threads.h (struct scm_thread): Add missing member
SCM_STACKITEM *auxiliary_stack_base.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
|
|
* libguile/continuations.c (scm_dynthrow): Fix missing mra
parameter to grow_stack for SCM_STACK_GROWS_UP.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
|
|
This significantly speeds up loads that create lots of bignums, like
(language cps slot-allocation) for files with many top-level
definitions. Compiling such a file is typically 2.5 times faster.
See <https://lists.gnu.org/archive/html/guile-devel/2020-02/msg00023.html>.
* libguile/numbers.c (custom_gmp_malloc): Use
'scm_gc_malloc_pointerless' instead of 'scm_malloc'.
(custom_gmp_realloc): Use 'scm_gc_realloc'.
(custom_gmp_free): Remove call to 'free'.
(make_bignum): Use 'scm_gc_malloc' instead of 'scm_gc_malloc_pointerless'.
Call 'scm_i_set_finalizer' only when SCM_INSTALL_GMP_MEMORY_FUNCTIONS is
false.
|
|
Reported by brandelune on #guile.
* libguile/libguile-2.2-gdb.scm: Rename to...
* libguile/libguile-3.0-gdb.scm: ... this.
* libguile/Makefile.am (install-data-hook): Replace hard-coded "2.2"
with @GUILE_EFFECTIVE_VERSION@.
|
|
Fixes <https://bugs.gnu.org/39183>.
These symbols had been inadvertently removed from libguile, even though
they were intended to be public (as they were in 2.2).
* libguile/expand.c: Include "memoize.h".
|
|
* libguile/loader.h (SCM_OBJCODE_MINIMUM_MINOR_VERSION):
(SCM_OBJCODE_MINOR_VERSION):
* module/system/vm/assembler.scm (*bytecode-minor-version*): Bump.
|
|
Previously (fluid-ref (make-thread-local-fluid #t)) would return #f via
scm_fluid_ref because the internal scm_hashq_ref would return #f when
the fluid had not been set, and that was interpreted as an actual value
for the fluid.
Instead, just pass the fluid default as the default for the hash table
lookups so that we don't need a second step to determine if the fluid
was set.
Thanks to Andrew Gierth for tracking down the problem.
|
|
* libguile/intrinsics.h: Add s64->f64 intrinsic, for 32-bit targets.
* libguile/jit.c (compile_s64_to_f64): Call the intrinsic for 32-bit
targets.
|
|
|
|
With this patch, these two lines
(vector-fill! vec fill)
(vector-fill! vec fill 0 end)
run at the same speed; before, the second one was much slower.
This patch also makes it an error to call vector-fill! with a non-vector
array. The previous implementation did not work correctly in this case.
* libguile/vectors.c (SCM_VALIDATE_MUTABLE_VECTOR): Better error message.
(vector-fill!): Handle optional arguments start, end. Do not attempt
to handle non-vector arrays. Rename the C binding to
scm_vector_fill_partial_x.
(scm_vector_fill_x): Reuse scm_vector_fill_partial_x.
* module/srfi/srfi-43.scm (vector-fill!): Remove & re-export the core
version instead.
|
|
From guile-gnome:plain/glib/gnome/gobject/private.h.
* libguile/gsubr.h (SCM_DEFINE_STATIC): As stated.
|
|
* libguile/vm.c (scm_i_vm_emergency_abort, abort_to_prompt): Unwinding
the dynwind stack can run dynwind leave thunks, which may expand the
stack, which may invalidate previously calculated SP / FP values.
(Re)calculate SP/FP after unwinding, to avoid writing to unmapped
memory. Fixes compile errors seen on Ubuntu and some other ports.
|
|
* libguile/fports.c (scm_i_fdes_is_valid): New internal helper.
(scm_i_fdes_to_port): Use new helper.
* libguile/fports.h: Declare new helper.
* libguile/init.c (scm_standard_stream_to_port): Refactor to use
scm_i_fdes_is_valid.
|
|
|
|
* libguile/jit.c (compile_less, compile_less_slow): Move slow path out
of line.
|
|
* libguile/jit.c (compile_numerically_equal): Add fixnum fast-path.
(compile_numerically_equal_slow): New slow path.
|
|
* libguile/jit.c (compile_allocate_pointerless_words_immediate)
(compile_allocate_pointerless_words_immediate_slow): Move slow path
out of line.
|
|
* libguile/jit.c (compile_allocate_words_immediate)
(compile_allocate_words_immediate_slow): Move slow path out of line.
|