Commit Graph

4396 Commits

Author SHA1 Message Date
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
a05dc79505 fix unecessary parens in macro 2025-11-20 21:24:47 +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
6063783e9d propagate AllocErrro instead of unwrapping 2025-11-20 00:19:24 +01:00
Skgland
e9e97fe82a handle machine heap/stack allocation error 2025-11-19 22:17:24 +01:00
Skgland
5686b69013 stub a clippy config
with things we need to get rid of replace if we want to eliminate panics due to oom
2025-11-19 19:23:42 +01:00
Skgland
248b05c992 use as_bytes().to_vec() instead of bytes().collect()
copying a slice into a vec should be easier to optimize by the complier than collecting a byte iteration into a vec
2025-11-19 19:23:41 +01:00
Skgland
a283c8bdc2 remove some uncessary allocations/copies 2025-11-19 19:23:41 +01:00
Skgland
6b5ec3fab8 ignore incompatible msrv in compat module 2025-11-19 19:23:41 +01:00
Skgland
a0b4162d7a improve count_to_letter_code
- reserve the complete required length at the beginning to reduce reallocations
- use u8 instead of char so that we can re-use the allocation for the string
2025-11-19 19:23:41 +01:00
Skgland
119761ad10 ignore unused_parens warning
parens are generated by external macro
2025-11-18 21:42:00 +01:00
Skgland
bf8651db29 remove two unecessary clones 2025-11-18 21:29:22 +01:00
Mark Thom
e4d9692535 Merge pull request #3120 from aarroyoc/master
Delete test page from learning section
2025-10-20 19:46:26 -07:00
Mark Thom
f050e75d81 Merge pull request #3124 from bakaq/mark-partial-string-tail
Fix marking of partial string tail in iteration
2025-10-20 19:46:11 -07:00
Mark Thom
3dcb42af3c Merge pull request #3117 from aarroyoc/update-releases-0100
Update web to show 0.10.0 releases
2025-10-20 19:45:19 -07:00
bakaq
fdcd92db08 Fix marking of partial string tail in iteration 2025-10-14 16:59:50 -03:00
Adrián Arroyo Calle
c82f1ccde1 Delete test page from learning section 2025-10-11 15:24:07 +02:00
Adrián Arroyo Calle
2b85a307ae Update web to show 0.10.0 releases 2025-10-07 22:16:40 +02:00
Mark Thom
d7d5dfe059 Merge pull request #3108 from Skgland/issue-3073
emit a more appropriate error when passing the wrong argument count when constructing an ffi struct with the wrong argument count
2025-10-02 23:43:13 -07:00
Mark Thom
109796122e Merge pull request #3111 from Skgland/ffi-non-fixed-sized-integers
add support for non-fixed-width integers types for ffi
2025-10-02 23:42:59 -07:00
Mark Thom
476c1718f9 Merge pull request #3109 from Skgland/issue-3107
move CI  job release from retired ubuntu-20.04 image to ubuntu-22.04
2025-09-29 20:47:55 -07:00
Skgland
f8b9944f5c update documentation 2025-09-28 19:50:21 +02:00
Skgland
6e7dbfc75e consistently treat bool as i8 2025-09-28 18:29:20 +02:00
Skgland
1add5a9a75 add ffi types for non-fixed-sized integers 2025-09-28 18:17:35 +02:00
Skgland
777e6de9ee fix missing quotes 2025-09-28 13:43:09 +02:00
Skgland
2443af57d0 fixup quad 2025-09-27 23:14:14 +02:00
Skgland
ed03d5b1b4 move CI job release from retired ubuntu-20.04 image to ubuntu-22.04
the new image is the same as all other ubuntu jobs
2025-09-27 22:54:45 +02:00
Skgland
9376bc6369 fix mthom/scryer-prolog#3073 2025-09-27 22:48:05 +02:00
Skgland
2f43c3ff40 add regression test for issue 3073 2025-09-27 22:05:51 +02:00
Mark Thom
e7ac3ae0f7 version bump to 0.10.0
Some checks failed
CI / style (push) Has been cancelled
CI / read-msrv (push) Has been cancelled
CI / build-test (--no-default-features, ubuntu-22.04, true, nightly, wasm32-unknown-unknown, --no-run --no-default-features, true) (push) Has been cancelled
CI / build-test (macos-latest, true, stable, x86_64-apple-darwin) (push) Has been cancelled
CI / build-test (miri, true, ubuntu-22.04, nightly, x86_64-unknown-linux-gnu) (push) Has been cancelled
CI / build-test (ubuntu-22.04, ${{ needs.read-msrv.outputs.msrv }}, x86_64-unknown-linux-gnu) (push) Has been cancelled
CI / build-test (ubuntu-22.04, beta, x86_64-unknown-linux-gnu) (push) Has been cancelled
CI / build-test (ubuntu-22.04, true, stable, i686-unknown-linux-gnu) (push) Has been cancelled
CI / build-test (ubuntu-22.04, true, stable, x86_64-unknown-linux-gnu) (push) Has been cancelled
CI / build-test (windows-latest, true, stable, x86_64-pc-windows-msvc) (push) Has been cancelled
CI / logtalk-test (push) Has been cancelled
CI / report (push) Has been cancelled
CI / release (push) Has been cancelled
Docker Publish / build (push) Has been cancelled
v0.10.0
2025-09-27 00:05:31 -07:00
Mark Thom
60595f990f Merge pull request #3095 from thierrymarianne/derefering-registers-in-files-module-instructions-functions
Dereferencing registers in `files` module instructions functions
2025-09-22 22:28:10 -07:00
Thierry Marianne
042631cb4c run rustfmt
Signed-off-by: Thierry Marianne <thierry@marianne.io>
2025-09-21 22:52:12 +02:00
Thierry Marianne
32b6458deb dereferencing registers to access stack variables
deref register to access stack variable for `directory_exists/1`
deref register to access stack variable for `directory_files/2`
deref register to access stack variable for `delete_directory/1`
deref register to access stack variable for `delete_file/1`
deref registers to access stack variable for `file_copy/2`
deref register to access stack variable for `file_exists/1`
deref register to access stack variable for `file_size/2`
deref register to access stack variable from `file_time` function
deref register to access stack variable for `make_directory/1`
deref register to access stack variable for `make_directory_path/1`
deref register to access stack variable for `path_canonical/2`
deref registers to access stack variables for `rename_file/2`

Signed-off-by: Thierry Marianne <thierry@marianne.io>
2025-09-21 22:52:12 +02:00
Thierry Marianne
12db664bd9 add tests for file module predicates
reproduce failing `directory_exists/1` with working directory passed as first argument
reproduce failing `delete_directory/1` with ./test directory passed as first argument
reproduce failing `file_size/1` with 2 bytes files passed as first argument
reproduce failing `file_exists/1` with existing file passed as first argument
reproduce failing `file_modification_time/1`, `file_access_time/1` and `file_creation_time/1` with existing file passed as first argument
reproduce failing `directory_files/2` with existing directory passed as first argument
reproduce failing `delete_file/1` with existing file passed as first argument
reproduce failing `make_directory/1` with non-existing directory passed as first argument
reproduce failing `make_directory_path/1` with non-existing path passed as first argument
reproduce failing `path_canonical/2` with non-canonical path passed as first argument
reproduce failing `rename_file/2` with existing file passed as first argument, target file as second arg
revised `directory_exists/1` test case
renamed test files, test directories
use `path_segments/2`, remove path separators
do not write file size to current output
revised `directory_files/2` test
revised `path_canonical/2` test
revised `file_exists/1` test
removed hardcoded expected size
extracted hardcoded directory argument
remove path prefix containing path separator
revised expected ls cmd exit code so that it is platform-agnostic

Signed-off-by: Thierry Marianne <thierry@marianne.io>
2025-09-21 22:52:02 +02:00
Mark Thom
e9ff1348b1 Merge pull request #3084 from thierrymarianne/set_stream
Prevent top-level from panicking when calling  `set_input/1` with `Stream` variants.
2025-09-17 22:20:10 -07:00
Mark Thom
fc6e007ad1 add missing P increment to GetPartialString (#3089) 2025-09-17 20:31:03 -07:00
Mark Thom
7637a0f7d4 push cyclic pstr's tail to iterator stack of printer (#3086) 2025-09-17 20:21:54 -07:00
Mark Thom
ba7b54e8f8 fix attempted bind to bound StackVar (#3089) 2025-09-17 19:43:37 -07:00
Mark Thom
012e3de3a1 do not use self.fail in compare_term_test 2025-09-16 21:23:23 -07:00
Mark Thom
72cdba82f5 implement unify_ginteger to address FIXME in skip_max_list_cycle 2025-09-15 21:58:38 -07:00
Mark Thom
24f431e2ca fix off-by-one lam loop (#3081) 2025-09-15 21:52:43 -07:00
Thierry Marianne
8afcc7742b handle Stream variants qualified as input stream by is_input_stream
Signed-off-by: Thierry Marianne <thierry@marianne.io>
2025-09-15 08:33:47 +02:00
Thierry Marianne
e9834ffa3e throw permission_error when non-input stream is read
Signed-off-by: Thierry Marianne <thierry@marianne.io>
2025-09-15 08:28:23 +02:00
Thierry Marianne
28ec457159 merge if let, match structures
Signed-off-by: Thierry Marianne <thierry@marianne.io>
2025-09-14 20:10:44 +02:00
Thierry Marianne
1ece558a71 match against Stream HttpRead(), InputFile(_) and NamedTcp(_) variants in read_term_from_user_input
Signed-off-by: Thierry Marianne <thierry@marianne.io>
2025-09-14 19:19:26 +02:00
Thierry Marianne
be18eda696 do not reset user input Stream of kind different from Readline(_), Byte(_)
Signed-off-by: Thierry Marianne <thierry@marianne.io>
2025-09-14 19:19:21 +02:00
Thierry Marianne
fdbaf6ac9d handle named tcp and http read stream on term reading from user input 2025-09-14 17:02:09 +02:00
Thierry Marianne
5c341ce371 handle input file stream on term reading from user input 2025-09-14 17:02:09 +02:00
Thierry Marianne
5f58e1cfd7 reproduce panick originating in set_input/1 call from top-level
Signed-off-by: Thierry Marianne <thierry@marianne.io>
2025-09-14 17:02:02 +02:00