Mark Thom
a7e93db363
improve retract/1 and related predicates ( #1598 )
2023-01-22 21:04:41 -07:00
Mark Thom
820011412b
Merge pull request #1658 from aarroyoc/copy_file
...
Add predicate file_copy/2 in library(files)
2022-12-18 21:22:25 +01:00
Markus Triska
6cb8d7596a
dereference more registers, analogous to d660e4244f
...
See also #1654 for a nice test case by @notoria which this corrects.
2022-12-18 17:43:33 +01:00
Mark Thom
cf63e8375d
track attr_var_init lengths on the stack ( #1667 )
2022-12-16 20:10:17 -07:00
Mark Thom
0a8fc70ba9
detect cyclic bindings in attr_vars_of_term ( #1666 )
2022-12-16 00:42:38 -07:00
Mark Thom
4dc0114c52
fix mishandled if-then-else interpretation ( #1659 )
2022-12-11 16:35:32 -07:00
Adrián Arroyo Calle
5f703afed1
Rename copy_file/2 to file_copy/2
2022-12-11 00:08:41 +01:00
Adrián Arroyo Calle
c6aa2068e2
Add predicate copy_file/2 in library(files)
2022-12-11 00:06:56 +01:00
Markus Triska
309e5b320e
more uses of newly available deref_register(n)
2022-12-07 23:19:31 +01:00
Markus Triska
56e5da6680
introduce and use deref_register(n)
2022-12-06 21:07:50 +01:00
Mark Thom
d660e4244f
dereference encoding register in crypto_data_decrypt ( #1650 )
2022-12-05 23:28:47 -07:00
Mark Thom
d383e5eb8b
avoid pushing stack variables to the heap in get_continuation_chunk ( #1644 )
2022-12-05 23:17:15 -07:00
Mark Thom
3bdcc3aba9
return -1 from get_code to indicate end of file ( #1622 )
2022-11-18 18:19:55 -07:00
Mark Thom
8781e03863
cache ball terms before unifying in handle_ball/3 ( #1608 )
2022-10-26 23:36:07 -06:00
Markus Triska
579aa8acd4
use newly available u8s_to_string
2022-10-26 23:36:07 -06:00
Markus Triska
9c2cb144b5
remove redundant error handling, since this case is checked in Prolog
...
This restores f668640e3d , where this
change was already made. It seems it was accidentally overwritten in
0404c3bd94 .
2022-10-26 23:36:07 -06:00
Markus Triska
3d04689660
introduce and use u8s_to_string
2022-10-26 23:36:07 -06:00
Markus Triska
9c1de8e00b
ENHANCED: Eliminate the OpenSSL dependency of library(crypto).
...
This is achieved by using the newly available crrl crate by @pornin
to implement crypto_curve_scalar_mult/4 for secp256k1. Many thanks!
2022-10-26 23:36:07 -06:00
Mark Thom
8a9cd7779c
offset into complete strings with '$skip_max_list'/4 ( #1529 )
2022-10-26 23:36:07 -06:00
Mark Thom
d4c0277065
don't return ops with priority 0 when building set for current_op ( #1571 )
2022-10-26 23:36:07 -06:00
Adrián Arroyo Calle
181be5be3f
HTTP Server 2.0
2022-10-26 23:36:07 -06:00
Mark Thom
ad3ae7991b
try to invoke '$call_inline' a second time in call/N ( #1543 )
2022-10-26 23:36:07 -06:00
Mark Thom
0aec980aa8
inference count call_inline, fail on undefined index
2022-10-26 23:36:07 -06:00
Mark Thom
6b05ee5130
streamline assertz/1, asserta/1
2022-10-26 23:36:07 -06:00
Mark Thom
1ffbf63d20
inline metacalls
2022-10-26 23:36:07 -06:00
Manos Pitsidianakis
b905d2758d
fix type_error with instantiated EOF -1 byte literal in get_byte/2
...
According to ISO Prolog, get_byte/2 predicate can receive an
instantiated input byte:
http://www.gprolog.org/manual/html_node/gprolog037.html#sec156
get_byte(+stream_or_alias, ?in_byte)
Since in_byte can be -1 if EOF is reached, instantiating it with -1
should work but does not because the implementation is trying to convert
it to a u8 which is unsigned:
?- open("/dev/null", read, S, [type(binary)]), get_byte(S, -1).
error(type_error(in_byte,-1),get_byte/2).
This commit adds an extra check for -1 before checking for a valid u8
instantiated value if in_byte is an input:
?- open("/dev/null", read, S, [type(binary)]), get_byte(S, -1).
S = '$stream'(0x55601e65c998).
Closes #1625
2022-10-26 13:49:38 +03:00
Mark Thom
cd1150c11d
use setup_cal_n_init_goal_info in dynamic_module_resolution
2022-06-15 22:33:13 -06:00
Mark Thom
987bbdecf5
improve efficiency of call/N, replace '$call_with_default_policy' with
...
'$call_with_inference_counting'
2022-06-12 22:34:07 -06:00
Mark Thom
a68394b6f2
simplify detecting undefined goal_ and term_expansion
2022-06-12 22:34:07 -06:00
Mark Thom
336311ecc8
replace call with $call in more meta-predicates
2022-06-06 09:28:03 -06:00
Mark Thom
2f3de51e55
remove non-determinism in number_chars/2 and numbercodes/2 ( #1473 )
2022-05-13 18:38:58 -06:00
Mark Thom
cea1353fbb
use must_be(chars) in number_chars/2 ( #1470 )
2022-05-12 01:09:06 -06:00
Euan Lacy
aaa75c3ffc
wip: basic completion of predicates
2022-05-10 18:10:18 +01:00
Mark Thom
2dfa108034
unify partial string tail later in create_partial_string ( #1462 , #1465 , #1427 )
2022-05-08 14:52:22 -06:00
Mark Thom
4895cb7b22
fix culprit in stream_position permission_error ( #1463 )
2022-05-06 17:38:25 -06:00
Mark Thom
6030fae685
track f64 offsets in Literal ( #1190 )
2022-05-04 21:54:46 -06:00
Mark Thom
9d5264c5a3
very minor optimizations
2022-04-17 20:10:13 -06:00
Mark Thom
2d5fe21b05
avoid writing chars to the atom table in several places
2022-04-17 12:20:00 -06:00
William Kral
9e98f75495
Fix reported source for set_output/1 error ( #1407 )
2022-04-10 12:00:59 -07:00
Mark Thom
0876d46880
unmark dereferenced cells in term_variables/2 ( #1412 )
2022-04-09 12:15:46 -06:00
Mark Thom
ed803d30cd
dereference bindings returned by stackful iterator ( #1410 , #1411 )
2022-04-09 11:47:54 -06:00
Mark Thom
b6504bf377
deduplicate variable list in term_variables/2 ( #1409 )
2022-04-08 21:18:59 -06:00
Mark Thom
d952b7ace8
restore correct order to term_variables/2 ( #1400 , #1401 )
2022-04-06 08:39:16 -06:00
Mark Thom
8c99d748e2
allocate floats in dedicated buffer
2022-04-05 20:34:27 -06:00
Mark Thom
0ab928063e
make marker into an iterators, recover post_order_iterator
2022-04-05 20:34:27 -06:00
Mark Thom
c9a34bde3f
removal of old stackless iterator, implementation of new more faithful one
2022-04-05 20:34:27 -06:00
Mark Thom
9177dbce7f
be aware of temporary variables of stackless iterator in term_variables ( #1383 )
2022-03-31 18:20:41 -06:00
Adrián Arroyo Calle
6798b22b49
http_open/3 with headers and data
2022-03-28 20:38:55 +02:00
Adrián Arroyo Calle
3acbe2a418
http_open/3 with method option
2022-03-28 20:38:52 +02:00
Mark Thom
067e2633af
compare TypedArenaPtr<T> by value not pointer ( #1362 )
2022-03-22 00:55:44 -06:00