]>
Repositorios git - scryer-prolog.git/log
Bennet Bleßmann [Mon, 17 Feb 2025 20:23:08 +0000 (21:23 +0100)]
further ffi cleanup
Bennet Bleßmann [Mon, 17 Feb 2025 19:19:36 +0000 (20:19 +0100)]
don't panic on unexpected/invalid value
Bennet Bleßmann [Mon, 17 Feb 2025 19:18:47 +0000 (20:18 +0100)]
also accept rust type name
Bennet Bleßmann [Tue, 21 Jan 2025 21:23:50 +0000 (22:23 +0100)]
use libffi::middle instead of libffi::low were possible
Bennet Bleßmann [Mon, 17 Feb 2025 18:58:46 +0000 (19:58 +0100)]
add a simple ffi test using structs
Bennet Bleßmann [Mon, 27 Jan 2025 20:55:34 +0000 (21:55 +0100)]
fix UB in ffi tests
Bennet Bleßmann [Mon, 27 Jan 2025 20:27:29 +0000 (21:27 +0100)]
add new test helper
Bennet Bleßmann [Wed, 22 Jan 2025 23:40:31 +0000 (00:40 +0100)]
make ffi support full {i,u}64 range
Bennet Bleßmann [Wed, 22 Jan 2025 19:32:44 +0000 (20:32 +0100)]
fix {i,u}64 in ffi
Bennet Bleßmann [Tue, 21 Jan 2025 23:03:18 +0000 (00:03 +0100)]
fix all but {i,u}64
Bennet Bleßmann [Tue, 21 Jan 2025 22:37:47 +0000 (23:37 +0100)]
fix crash when trying to load and ffi library with an invalid type specification
Bennet Bleßmann [Tue, 21 Jan 2025 22:36:14 +0000 (23:36 +0100)]
add more ffi tests
Bennet Bleßmann [Tue, 21 Jan 2025 18:20:33 +0000 (19:20 +0100)]
cleanup and fix miri & cross-compile
Bennet Bleßmann [Mon, 20 Jan 2025 22:00:03 +0000 (23:00 +0100)]
add ffi tests using f64
Mark Thom [Fri, 1 Aug 2025 05:09:41 +0000 (22:09 -0700)]
Merge pull request #3019 from Skgland/rebis-dev_fix-clippy
fix clippy
Bennet Bleßmann [Thu, 31 Jul 2025 19:46:21 +0000 (21:46 +0200)]
replace .skip(n).next() with .nth(n)
Bennet Bleßmann [Thu, 31 Jul 2025 19:45:57 +0000 (21:45 +0200)]
remove unecessary cast
Bennet Bleßmann [Thu, 31 Jul 2025 19:45:44 +0000 (21:45 +0200)]
remove unecessary into_iter
Bennet Bleßmann [Thu, 31 Jul 2025 19:45:26 +0000 (21:45 +0200)]
prefere for loop
Bennet Bleßmann [Thu, 31 Jul 2025 19:44:52 +0000 (21:44 +0200)]
replace always erroring of_else with map_err
Bennet Bleßmann [Thu, 31 Jul 2025 19:43:59 +0000 (21:43 +0200)]
replace single non-wildcard pattern match with if let
Bennet Bleßmann [Thu, 31 Jul 2025 19:41:51 +0000 (21:41 +0200)]
remove already implied must_use
Bennet Bleßmann [Thu, 31 Jul 2025 19:41:23 +0000 (21:41 +0200)]
collaps els-if / if-if
Bennet Bleßmann [Thu, 31 Jul 2025 19:40:38 +0000 (21:40 +0200)]
ingore nerver looping loop, but add a todo
Bennet Bleßmann [Thu, 31 Jul 2025 19:40:05 +0000 (21:40 +0200)]
fix clippy::unit_arg
Bennet Bleßmann [Thu, 31 Jul 2025 19:38:48 +0000 (21:38 +0200)]
check not empty instead of len > 0
Bennet Bleßmann [Thu, 31 Jul 2025 19:38:26 +0000 (21:38 +0200)]
impl From rather than Into
Bennet Bleßmann [Thu, 31 Jul 2025 19:37:23 +0000 (21:37 +0200)]
fix unecessary mut
Bennet Bleßmann [Thu, 31 Jul 2025 19:36:53 +0000 (21:36 +0200)]
ignore clippy::unbuffered_bytes in test helper functions
Bennet Bleßmann [Thu, 31 Jul 2025 19:35:55 +0000 (21:35 +0200)]
fix legacy int constants
Bennet Bleßmann [Thu, 31 Jul 2025 19:35:40 +0000 (21:35 +0200)]
ignore wrong self convention
Bennet Bleßmann [Thu, 31 Jul 2025 19:34:15 +0000 (21:34 +0200)]
fix match/if-let can be simplified to ?
Bennet Bleßmann [Thu, 31 Jul 2025 19:33:13 +0000 (21:33 +0200)]
fix unecessary return
Bennet Bleßmann [Thu, 31 Jul 2025 19:31:34 +0000 (21:31 +0200)]
fix unecessary reference/dereference
Bennet Bleßmann [Thu, 31 Jul 2025 19:28:30 +0000 (21:28 +0200)]
fix clone on copy values
Bennet Bleßmann [Thu, 31 Jul 2025 19:26:08 +0000 (21:26 +0200)]
fix clippy::uninlined_format_args
Bennet Bleßmann [Thu, 31 Jul 2025 18:07:57 +0000 (20:07 +0200)]
remove outdated comment
Bennet Bleßmann [Thu, 31 Jul 2025 18:07:07 +0000 (20:07 +0200)]
also run CI on rebis-dev
Mark Thom [Wed, 23 Jul 2025 03:16:24 +0000 (20:16 -0700)]
detect end_of_file before end_of_stream in get_char (#2990)
Mark Thom [Sun, 20 Jul 2025 23:55:07 +0000 (16:55 -0700)]
allow abolish_clause to abolish empty dynamic clauses (#3010)
Mark Thom [Thu, 17 Jul 2025 04:52:40 +0000 (21:52 -0700)]
fix variadic_functor
Mark Thom [Tue, 15 Jul 2025 06:05:10 +0000 (23:05 -0700)]
fix parsing partial number tokens in other radixes (#3000)
Mark Thom [Tue, 8 Jul 2025 20:47:08 +0000 (13:47 -0700)]
fmt improvements
Mark Thom [Tue, 1 Jul 2025 22:47:26 +0000 (15:47 -0700)]
correct number_chars (#2976)
Mark Thom [Wed, 25 Jun 2025 04:58:40 +0000 (21:58 -0700)]
use granular hierarchical locks in offset_table.rs
Mark Thom [Sat, 21 Jun 2025 06:19:32 +0000 (23:19 -0700)]
synchronize offset table growth with the borrowing of offset pointers
Mark Thom [Fri, 23 May 2025 06:49:57 +0000 (23:49 -0700)]
use OffsetTableImpl without synchronization by default
Bennet Bleßmann [Fri, 9 May 2025 21:45:03 +0000 (23:45 +0200)]
fix crash when loading html
Bennet Bleßmann [Wed, 22 Jan 2025 20:10:44 +0000 (21:10 +0100)]
make Fixnum::build_with harder to accidentally misuse
change trait bound order for better
bakaq [Mon, 5 May 2025 03:15:14 +0000 (00:15 -0300)]
Align the heap to the size of heap cells
bakaq [Mon, 5 May 2025 00:01:50 +0000 (21:01 -0300)]
Add scan_slice_to_str_from_start
Mark Thom [Sun, 4 May 2025 05:04:04 +0000 (22:04 -0700)]
correct threshold marking in copy_structure (#2920)
Markus Triska [Thu, 1 May 2025 07:18:00 +0000 (09:18 +0200)]
FIXED: correct partial string tail calculation in arg/3
This addresses another aspect of #2924, found by @haijinSk.
Thank you again!
Example:
?- "
aaaaaaa " = [_,_,_,_,_,_|T], arg(2, T, 2).
false.
Markus Triska [Tue, 29 Apr 2025 20:48:13 +0000 (22:48 +0200)]
FIXED: arg/3 for partial strings
This address #2924, reported by @haijinSk. Thank you a lot!
Example:
?- arg(2, "a", A).
A = [].
The fact that such a mistake in macro usage is even possible could be
a sign that the macro definition should be stricter.
Mark Thom [Tue, 29 Apr 2025 06:39:52 +0000 (23:39 -0700)]
fix cont function crashes (#2920)
Mark Thom [Mon, 28 Apr 2025 05:27:12 +0000 (22:27 -0700)]
replace deprecated unify_complete_string call with allocate_cstr
bakaq [Sun, 27 Apr 2025 02:34:53 +0000 (23:34 -0300)]
Migrate to strict and exposed provenance
Mark Thom [Sun, 27 Apr 2025 04:11:27 +0000 (21:11 -0700)]
allow unused_parens around let statement in functor! macro
Markus Triska [Fri, 25 Apr 2025 16:39:21 +0000 (18:39 +0200)]
FIXED: invoke correct predicate
Noted by Oleg Finkelstein. Many thanks!
Markus Triska [Fri, 25 Apr 2025 20:16:44 +0000 (22:16 +0200)]
ENHANCED: partial_string/3 no longer creates atoms
As a consequence, resulting strings are now quickly reclaimed on
backtracking.
This addresses #2912.
Test case:
:- use_module(library(iso_ext)).
:- use_module(library(lists)).
ab(a).
ab(b).
Sample query:
?- length(Ls, 1_000_000),
maplist(ab, Ls),
partial_string(Ls, Es0, []),
Es0 == Ls.
Ls = "
aaaaaaaaaaaaaaaaaaa ...", Es0 = "
aaaaaaaaaaaaaaaaaaa ..."
; Ls = "
aaaaaaaaaaaaaaaaaaa ...", Es0 = "
aaaaaaaaaaaaaaaaaaa ..."
; Ls = "
aaaaaaaaaaaaaaaaaaa ...", Es0 = "
aaaaaaaaaaaaaaaaaaa ..."
; Ls = "
aaaaaaaaaaaaaaaaaaa ...", Es0 = "
aaaaaaaaaaaaaaaaaaa ..."
; Ls = "
aaaaaaaaaaaaaaaaaaa ...", Es0 = "
aaaaaaaaaaaaaaaaaaa ..."
; ... .
running in constant memory.
Markus Triska [Thu, 24 Apr 2025 16:19:05 +0000 (18:19 +0200)]
ENHANCED: use a fast test for the expected case of chars in atom_chars/2 etc.
Suggested by Oleg Finkelstein, thank you a lot!
Example, before this change:
?- t+\(length(As, 1_000_000), maplist(=(a), As), time(atom_chars(A, As))).
% CPU time: 0.693s, 7_000_041 inferences
true.
Now:
?- t+\(length(As, 1_000_000), maplist(=(a), As), time(atom_chars(A, As))).
% CPU time: 0.080s, 40 inferences
true.
This also partially ameliorates #2907.
Mark Thom [Fri, 25 Apr 2025 05:20:40 +0000 (22:20 -0700)]
correct heap-to-cell-index comparison in copy_slice_to_end (#2906)
Mark Thom [Thu, 24 Apr 2025 05:49:03 +0000 (22:49 -0700)]
fix functor! size calculations around indexing_code_ptr
Mark Thom [Thu, 24 Apr 2025 01:55:50 +0000 (18:55 -0700)]
restore tab completion to REPL (#2575)
Mark Thom [Tue, 22 Apr 2025 03:25:50 +0000 (20:25 -0700)]
make self.s_offset use bytes in case of HeapPtr::PStr in UnifyVoid (#2897)
Mark Thom [Mon, 21 Apr 2025 00:14:13 +0000 (17:14 -0700)]
correct heap_print.rs for null characters being excluded from pstr regions of heap (#2890)
Mark Thom [Sun, 20 Apr 2025 23:53:36 +0000 (16:53 -0700)]
correctly increment s_offset for partial strings (#2897)
Mark Thom [Sun, 20 Apr 2025 07:07:55 +0000 (00:07 -0700)]
fix typo in try_from_partial_string
Mark Thom [Sun, 20 Apr 2025 06:51:26 +0000 (23:51 -0700)]
fix read_s logic around HeapPtr::PStrLoc (#2894)
Mark Thom [Fri, 18 Apr 2025 07:03:33 +0000 (00:03 -0700)]
repair cyclic PStrLoc handling in heap_print.rs
Mark Thom [Fri, 18 Apr 2025 03:20:38 +0000 (20:20 -0700)]
remove compare_pstr_to_string and related result type
Markus Triska [Thu, 17 Apr 2025 20:14:37 +0000 (22:14 +0200)]
ENHANCED: dedicated faster branches for repositionable streams
rebis-dev makes the speed difference especially apparent due to the
linear scan of strings on the heap in partial_string_tail/2 which is
now avoided for repositionable streams, notably files.
This addresses #2888 reported and analyzed by @haijinSk. Many thanks!
Mark Thom [Thu, 17 Apr 2025 05:20:31 +0000 (22:20 -0700)]
correct GetPartialString (#2887)
Mark Thom [Wed, 16 Apr 2025 05:10:02 +0000 (22:10 -0700)]
generalize compare_pstr_segments
Mark Thom [Sun, 13 Apr 2025 01:48:47 +0000 (18:48 -0700)]
ensure '\0' atom is static & never inlined (#2880)
Mark Thom [Sun, 13 Apr 2025 00:32:11 +0000 (17:32 -0700)]
fix root reading of complete strings (#2882)
Mark Thom [Sat, 12 Apr 2025 23:43:51 +0000 (16:43 -0700)]
some cosmetic tweaks
Markus Triska [Sat, 12 Apr 2025 20:54:04 +0000 (22:54 +0200)]
mark done item
Mark Thom [Sat, 12 Apr 2025 07:22:29 +0000 (00:22 -0700)]
correct and simplify compute_pstr_size
Mark Thom [Sat, 12 Apr 2025 06:59:53 +0000 (23:59 -0700)]
correct create_partial_string (#2593)
Mark Thom [Fri, 11 Apr 2025 04:06:44 +0000 (21:06 -0700)]
restore more tabu_list use to compare_term_tests (#2633)
Mark Thom [Fri, 11 Apr 2025 04:03:29 +0000 (21:03 -0700)]
restore tabu_list insertions to PStr-Lis comparisons (#2636)
Mark Thom [Thu, 10 Apr 2025 06:03:28 +0000 (23:03 -0700)]
do not allow strings containing null characters to be inlined (#2848)
Mark Thom [Sun, 6 Apr 2025 19:11:57 +0000 (12:11 -0700)]
move CodeIndex to F64Table-like table
Mark Thom [Sat, 15 Mar 2025 20:19:26 +0000 (13:19 -0700)]
Revert "remove Term"
This reverts commit
3b5879841aedecba5057c70c71da0ba23e5cd84a .
Mark Thom [Sat, 15 Mar 2025 09:10:56 +0000 (02:10 -0700)]
make write_with forward return values, use it to correct partial string handling
Mark Thom [Sat, 15 Mar 2025 09:10:04 +0000 (02:10 -0700)]
read Str focus properly in build_meta_predicate_clause
Mark Thom [Thu, 13 Mar 2025 19:33:37 +0000 (12:33 -0700)]
some fixes in response to miri
bakaq [Sun, 2 Mar 2025 21:51:57 +0000 (18:51 -0300)]
Fix parsing of \x0\ in partial strings
Mark Thom [Tue, 4 Mar 2025 08:17:20 +0000 (00:17 -0800)]
copy partial string blocks properly in all solutions predicates
Mark Thom [Sat, 1 Mar 2025 21:58:50 +0000 (13:58 -0800)]
run cargo fmt
Mark Thom [Sat, 7 Dec 2024 05:47:36 +0000 (21:47 -0800)]
remove pstr_vec
Mark Thom [Tue, 25 Feb 2025 03:54:35 +0000 (19:54 -0800)]
globalize ALIGN_CELL/ALIGN, fix compute_pstr_size
Emilie Burgun [Sun, 29 Dec 2024 22:54:03 +0000 (23:54 +0100)]
Fix allocate_pstr randomly refusing to properly allocate memory
This one was a toughie: it turns out that using `ptr::align_of()`` was
a bad idea, since the buffer in `Heap` itself is not aligned to
`Heap::heap_cell_alignment()`, so `ptr::align_of()` would sometimes
return lower values than expected.
That made for an heisenbug: if the alignment of the heap happened to be 4,
then the bug wouldn't trigger.
Emilie Burgun [Sun, 29 Dec 2024 21:04:40 +0000 (22:04 +0100)]
Fix Heap::drop not accounting for null-initialized HeapInner
Mark Thom [Fri, 15 Nov 2024 05:04:09 +0000 (22:04 -0700)]
dereference clause_clause value, reserve more parser space (#2579)
Mark Thom [Fri, 1 Nov 2024 04:58:29 +0000 (22:58 -0600)]
unmark_cell_bits! in push_literal (#2645)
Mark Thom [Tue, 14 May 2024 00:00:56 +0000 (18:00 -0600)]
introduce bespoke Heap type for in-heap partial strings
Mark Thom [Wed, 31 Jul 2024 20:04:55 +0000 (14:04 -0600)]
variable revision
Mark Thom [Tue, 16 Jul 2024 21:38:22 +0000 (15:38 -0600)]
remove Term