Skgland
6ec8c9064f
fix pstr_iter_tests test
2025-11-20 23:08:46 +01:00
Skgland
d4f2f7ba2b
remove RESOURCE_ERROR_OFFSET_INIT
...
With it when using multiple Machine in one process only the first would store the pre-allocated error.
Instead Heap.resource_err_loc is now Option<NonZero<usize>> instead of usize using None for uninitialized.
The cell at index 0 should alredy be used by a runtime reserved interstitial cell that is allocated prior. So requiring the offset to be non zero should be fine.
2025-11-20 21:44:29 +01:00
Skgland
e90c813528
return an AllocError instead of panicing in Heap::with_cell_capacity
2025-11-20 21:13:17 +01:00
Skgland
516848e214
wrap resource_error into an error/2 functor and don't wrap it into a syntax_error functor
2025-11-20 01:22:18 +01:00
Skgland
e9e97fe82a
handle machine heap/stack allocation error
2025-11-19 22:17:24 +01:00
Mark Thom
39d02a0caf
clear rustc warnings ( #3051 )
2025-08-23 14:34:49 -07:00
Bennet Bleßmann
014d1b0095
remove already implied must_use
2025-07-31 21:47:08 +02:00
Bennet Bleßmann
c885d1a7e7
collaps els-if / if-if
2025-07-31 21:47:08 +02:00
Bennet Bleßmann
ae3019d923
fix unecessary reference/dereference
2025-07-31 21:46:51 +02:00
Mark Thom
1332611f83
use OffsetTableImpl without synchronization by default
2025-07-07 22:39:47 -07:00
bakaq
87ca083cfa
Align the heap to the size of heap cells
2025-07-07 22:38:12 -07:00
bakaq
d01557f3c1
Add scan_slice_to_str_from_start
2025-07-07 22:38:12 -07:00
bakaq
a9847eef65
Migrate to strict and exposed provenance
2025-07-07 22:38:12 -07:00
Mark Thom
b12d1ece17
correct heap-to-cell-index comparison in copy_slice_to_end ( #2906 )
2025-07-07 22:38:12 -07:00
Mark Thom
706ffe7ad9
fix functor! size calculations around indexing_code_ptr
2025-07-07 22:38:12 -07:00
Mark Thom
f3cd6326a3
remove compare_pstr_to_string and related result type
2025-07-07 22:38:12 -07:00
Mark Thom
4c46f0e54d
correct GetPartialString ( #2887 )
2025-07-07 22:38:12 -07:00
Mark Thom
e563fd8e4f
generalize compare_pstr_segments
2025-07-07 22:38:12 -07:00
Mark Thom
16b3bea48e
correct and simplify compute_pstr_size
2025-07-07 22:38:12 -07:00
Mark Thom
e20363b462
correct create_partial_string ( #2593 )
2025-07-07 22:38:12 -07:00
Mark Thom
9e1e99f961
Revert "remove Term"
...
This reverts commit 3b5879841aedecba5057c70c71da0ba23e5cd84a.
2025-07-07 22:38:10 -07:00
Mark Thom
eef7b06919
make write_with forward return values, use it to correct partial string handling
2025-07-07 22:02:27 -07:00
Mark Thom
3dee07f648
some fixes in response to miri
2025-07-07 22:02:27 -07:00
bakaq
9daf016d63
Fix parsing of \x0\ in partial strings
2025-07-07 22:02:27 -07:00
Mark Thom
fadcfb966e
copy partial string blocks properly in all solutions predicates
2025-07-07 22:02:27 -07:00
Mark Thom
ae4d12a123
remove pstr_vec
2025-07-07 22:02:27 -07:00
Mark Thom
3c85ef2724
globalize ALIGN_CELL/ALIGN, fix compute_pstr_size
2025-07-07 21:59:50 -07:00
Emilie Burgun
15f1320d05
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.
2025-07-07 21:59:50 -07:00
Emilie Burgun
7b357ba84d
Fix Heap::drop not accounting for null-initialized HeapInner
2025-07-07 21:59:50 -07:00
Mark Thom
c0f72704ec
introduce bespoke Heap type for in-heap partial strings
2025-07-07 21:59:50 -07:00
Bennet Bleßmann
74720d4d2e
remove unsafe impl From<UntypedArenaPtr> for CodeIndex
2024-07-07 14:18:50 +02:00
infogulch
9444e62df9
Resolve lints and format
2023-11-04 02:16:54 -05:00
Fayeed Pawaskar
7f0536b51d
Merge branch 'master' into dashu-fixes
2023-09-10 21:51:02 +05:30
Fayeed Pawaskar
af76659830
Removed value method and use deref to get type
2023-09-10 21:40:22 +05:30
Bennet Bleßmann
01aeb7515d
[WIP] move towards lockless AtomTable
2023-09-05 19:39:46 +02:00
Bennet Bleßmann
13cbff7eab
[WIP] fix deadlock in AtomTable::build_with
2023-09-05 19:12:22 +02:00
Fayeed Pawaskar
7b921fc767
Implemented num_order methods on Integer & Rational numbers
2023-09-04 14:12:47 +05:30
Fayeed Pawaskar
cf345d8174
wip dashu move
2023-07-17 20:40:41 +05:30
Mark Thom
1ffbf63d20
inline metacalls
2022-10-26 23:36:07 -06:00
Ross Smyth
577f85099d
Fixed imports num-rug-adapter
2022-07-17 02:06:37 -04:00
Mark Thom
6030fae685
track f64 offsets in Literal ( #1190 )
2022-05-04 21:54:46 -06:00
Mark Thom
8c99d748e2
allocate floats in dedicated buffer
2022-04-05 20:34:27 -06:00
Mark Thom
bc5125b719
put_complete_string should push the empty list to the heap for empty strings ( #1209 )
2022-01-14 16:31:49 -07:00
Mark Thom
955e1799c8
flatten the instruction dispatch loop
2022-01-06 22:09:36 -07:00
Mark Thom
cd129e32a7
fix bugs revealed by src/tests/builtins.pl
2022-01-06 21:44:41 -07:00
Mark Thom
0404c3bd94
use new heap term representation
2022-01-06 21:44:38 -07:00
Skgland
2f428b7261
split into lib and bin
...
* makes most pub things in src/ pub(crate) as not to expose things accidentally
* only those things needed by src/bin/scryer-prolog.rs and tests/scryer.rs
should be pub
* split src/main.rs into src/lib.rs and src/bin/scryer-prolog.rs
* add tests folder and run most of the files in src/tests with cargo test
added bytes method to Stream in src/machine/streams.rs to check if stdout is as expected
2021-02-28 19:21:30 +01:00
Mark Thom
6c447da730
no longer generate a choice point in bb_b_put/2 ( #742 )
2021-02-22 18:27:30 -07:00
Skgland
5041042925
rename prolog_parser_rebis to prolog_parser
...
also remove remaining extern crate statements that slipped through earlier
2021-02-06 22:13:34 +01:00
Skgland
8e5954f36f
remove use statements from main.rs that temporary replaced extern crate and fixed paths that previously used them
2021-02-06 22:13:04 +01:00