Commit Graph

37 Commits

Author SHA1 Message Date
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
Mark Thom
a239007db0 target prolog_parser_rebis on crates.io 2021-01-30 22:03:07 -07:00
Mark Thom
a4d15bfb88 move to a predicate-based module system, move to loader.[rs|pl]-based compilation, add support for incremental clause compilation 2021-01-30 21:07:51 -07:00
Mark Thom
33325f1574 remove vestigial prolog/ directory (#444) 2020-06-12 18:26:38 -06:00