Commit Graph

735 Commits

Author SHA1 Message Date
Bennet Bleßmann
3ad4b05a97 add a features for gating things we can use once 1.80 is msrv 2024-07-25 23:09:17 +02:00
Bennet Bleßmann
0da313eb84 use a OnceLock static for LIBRARIES instead of thread_local! static 2024-07-25 18:58:29 +02:00
Bennet Bleßmann
6b50ec328c move the creation of the LIBRARIES IndexMap out of the generated file
- only leave the filling of the map in the generated code
2024-07-25 18:53:36 +02:00
Bennet Bleßmann
1eb6a883f6 run rustfmt 2024-07-23 00:01:58 +02:00
Mark Thom
eaa95293e4 Merge pull request #2439 from Skgland/miri
Some cleanup and miri fixes
2024-07-22 13:40:57 -06:00
Bennet Bleßmann
5d03be4b09 fix leak of slaps with dropped payload 2024-07-07 19:22:46 +02:00
Bennet Bleßmann
1b19ae81d5 wrap Payloads that are dropped eraly in ManuallyDrop 2024-07-07 15:58:31 +02:00
Bennet Bleßmann
a0d790445d check that we don't attempt to un-drop while evacuating 2024-07-07 14:37:41 +02:00
Bennet Bleßmann
74720d4d2e remove unsafe impl From<UntypedArenaPtr> for CodeIndex 2024-07-07 14:18:50 +02:00
Skgland
39bd520542 ignore pstr_iter_tests test in miri as it takes too long 2024-07-07 13:22:49 +02:00
Bennet Bleßmann
496e4e9f56 fix clippy again 2024-07-07 11:31:36 +02:00
Bennet Bleßmann
a2a50586aa replace static Once and two mut statics with one static OnceLock 2024-07-07 11:30:56 +02:00
Bennet Bleßmann
0284a2092d reduce span of unsafe block 2024-07-07 11:30:37 +02:00
Bennet Bleßmann
943dce566b fix clippy 2024-07-06 18:26:34 +02:00
Bennet Bleßmann
b32498b37c adjust ignore reason 2024-07-06 18:24:38 +02:00
Bennet Bleßmann
1d66f91a41 replace ref_thread_local::ref_thread_local! with std::thread_local!
removes `ref_thread_local` which was still at 0.0.0 released October 2018 while latest 0.1.1 was released mid November 2021

fixes libraries.rs UB
2024-07-06 17:18:26 +02:00
Bennet Bleßmann
fee7ba58b0 fix stack alignement
- adjust align() in RawBlockTraits impl for Stack
- ensure ptr is always aligned in RawBlock::allock
2024-07-06 16:21:59 +02:00
Adrián Arroyo Calle
08a9f7c068 Fix at_end_of_stream/1 for http read stream 2024-07-06 16:00:50 +02:00
Bennet Bleßmann
285f11ccdc add associated Payload type to ArenaAllocated 2024-07-06 15:37:08 +02:00
Bennet Bleßmann
fcb41542c3 fix stream.rs UB 2024-07-06 14:30:03 +02:00
Bennet Bleßmann
87b4c9d736 somehow this was never marked as bad 2024-07-06 14:30:03 +02:00
Bennet Bleßmann
6386e70584 clippy: change ToString impl to Display
- write directly to formatter, eliminating intermediate String allocations
- take Value by reference eliminating clones
- remove trim() called on the result of  QueryResolution::to_string
    - we only  emit "true", "false", or "[<resolutions>]"
      neither of which contains trailing or leading withespace,
      so the calls was effectively a noop
2024-07-06 13:32:58 +02:00
Bennet Bleßmann
722975d77e clippy: use type associated constants 2024-07-06 13:08:59 +02:00
Bennet Bleßmann
1ff995fedb clippy: allow new without default 2024-07-06 13:04:55 +02:00
Bennet Bleßmann
1b16c6c73f clippy: use clone_from rather than clone 2024-07-06 13:03:14 +02:00
Bennet Bleßmann
ce40f8f10c update ignore reason 2024-07-06 04:15:30 +02:00
Bennet Bleßmann
d2d451b182 adjust the generation of the LIBRARIES map
pre-genrate constants instaed of driectly genrating the literal for the insert
2024-07-06 03:53:22 +02:00
Bennet Bleßmann
52fa51853e don't use env::current_dir() in miri 2024-07-06 03:53:22 +02:00
Bennet Bleßmann
6575b1b573 fix some more miri errors
probably relevant to mthom/scryer-prolog#2438
2024-07-06 03:52:46 +02:00
Bennet Bleßmann
cba81b4dc7 some test pass miri 2024-07-06 02:43:00 +02:00
Bennet Bleßmann
dd2548453b rework some unsafe parts
- removed some unsafe
- added some safety comments
- add explicit types to transmute calls
- reworked UntypedArenaPtr -> TypedArenaPtr conversion

might help with mthom/scryer-prolog#2438, I noticed fewer complains from miri after changing the default impl for `ArenaAllocated::alloc`
2024-07-05 23:45:02 +02:00
Bennet Bleßmann
1a9d10d298 fix two clippy lints 2024-05-28 21:28:18 +02:00
Adrián Arroyo Calle
f4d2839dc7 Fix warnings of dead code 2024-05-27 19:52:02 +02:00
Mark Thom
5e1effc69a fix failing clippy checks, remove unnecessary code 2024-04-25 20:05:22 -06:00
Mark Thom
a6157a926d improve use of unsafe Rust in arena.rs (#2391) 2024-04-24 20:28:06 -06:00
Mark Thom
7d6109feca fix char_offset values in add_pstr_offset_chars (#2381) 2024-04-10 15:46:11 -06:00
Mark Thom
cf14b222f2 fix skip_max_list crash on bigint max_steps (#2382) 2024-04-09 18:57:53 -06:00
Mark Thom
238343f389 add max_steps to PStr offset (#2381) 2024-04-09 18:40:08 -06:00
Mark Thom
77e90ca725 correct offsets around max_steps in skip_max_list (#2381) 2024-04-09 15:58:23 -06:00
Mark
40fc4f9392 correct offset retrieval in add_pstr_chars_and_step (#2370) 2024-03-25 12:47:45 -06:00
Mark
0292cb73d3 expand_call_goals/3 should expand meta-predicate subgoals (#2361) 2024-03-19 17:12:26 -06:00
Mark
42f4827854 make indexer downcast Integers to Fixnums when possible, be slightly more judicious about allocating Integers instead of Fixnums (#2340) 2024-02-29 16:15:28 -07:00
Mark
f2d3779fa9 add #2341 test to lib_machine.rs 2024-02-29 15:12:58 -07:00
Mark
b70f121e46 use scryer-modular-bitfield on github, version bump
Some checks failed
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 / style (push) Has been cancelled
CI / build-test (--no-default-features, ubuntu-22.04, true, nightly, wasm32-unknown-unknown, --no-run --no-default-features) (push) Has been cancelled
CI / build-test (macos-11, true, stable, x86_64-apple-darwin) (push) Has been cancelled
CI / build-test (ubuntu-20.04, true, stable, x86_64-unknown-linux-gnu) (push) Has been cancelled
CI / build-test (ubuntu-22.04, 1.70, 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, nightly, 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 / report (push) Has been cancelled
CI / release (push) Has been cancelled
Docker Publish / build (push) Has been cancelled
2024-02-29 10:08:14 -07:00
Mark
641765858f fix misuse of TypeError trait while fixing #2345 2024-02-28 20:47:36 -07:00
Mark
ba362e2fe0 issue callable type error from dynamic_module_resolution if module is not an atom (#2345) 2024-02-28 20:35:38 -07:00
Mark Thom
84d5ce0d1e Merge pull request #2309 from coasys/library-use-case
Iron-out edge cases for library use-case, adding extensive real-world test assertions
2024-02-28 14:34:54 -07:00
Markus Triska
27852eafd7 ADDED: Hash-based message authentication code (HMAC), using hmac(Key). 2024-02-22 20:53:27 +01:00
Mark Thom
b43f0979d9 Update src/machine/parsed_results.rs
Co-authored-by: Bennet Bleßmann <bennet.blessmann+github@googlemail.com>
2024-02-08 19:10:29 -07:00
Mark
614850ab1d fmt 2024-02-05 18:34:57 -07:00